diff --git a/.gitignore b/.gitignore index ca85c840055..5b29a556792 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ Mage.Server.Plugins/Mage.Deck.Limited/target Mage.Server.Plugins/Mage.Game.CommanderDuel/target Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/target/ Mage.Server.Plugins/Mage.Game.FreeForAll/target +Mage.Server.Plugins/Mage.Game.MomirDuel/target Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/target Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/target Mage.Server.Plugins/Mage.Player.AI.DraftBot/target diff --git a/Mage.Client/plugins/mage-theme-plugin.jar b/Mage.Client/plugins/mage-theme-plugin.jar deleted file mode 100644 index 1448724874d..00000000000 Binary files a/Mage.Client/plugins/mage-theme-plugin.jar and /dev/null differ diff --git a/Mage.Client/pom.xml b/Mage.Client/pom.xml index 13330da5fda..46cd82bba88 100644 --- a/Mage.Client/pom.xml +++ b/Mage.Client/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 org.mage diff --git a/Mage.Client/release/sample-decks/2013/Standard/DailyMTG/Adam Cotner's Skaabs!..dck b/Mage.Client/release/sample-decks/2013/Standard/DailyMTG/Adam Cotner's Skaabs!.dck similarity index 100% rename from Mage.Client/release/sample-decks/2013/Standard/DailyMTG/Adam Cotner's Skaabs!..dck rename to Mage.Client/release/sample-decks/2013/Standard/DailyMTG/Adam Cotner's Skaabs!.dck diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2015/Call the Spirits (WB).dck b/Mage.Client/release/sample-decks/Commander/Commander 2015/Call the Spirits (WB).dck new file mode 100644 index 00000000000..c00e539a8e2 --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2015/Call the Spirits (WB).dck @@ -0,0 +1,78 @@ +1 [C15:77] Open the Vaults +1 [C15:76] Monk Idealist +1 [C15:75] Mesa Enchantress +1 [C15:74] Marshal's Anthem +1 [C15:73] Kor Sanctifiers +1 [C15:281] Command Tower +1 [C15:72] Karmic Justice +1 [C15:283] Evolving Wilds +1 [C15:70] Ghostblade Eidolon +1 [C15:285] Ghost Quarter +1 [C15:121] Doomwake Giant +1 [C15:122] Dreadbringer Lampads +1 [C15:320] Vivid Meadow +1 [C15:125] Fallen Ideal +11 [C15:323] Plains +1 [C15:126] Fate Unraveler +1 [C15:79] Seal of Cleansing +1 [C15:248] Burnished Hart +1 [C15:127] Gild +1 [C15:128] Grave Peril +1 [C15:129] Nighthowler +1 [C15:80] Sigil of the Empty Throne +1 [C15:84] Vow of Duty +1 [C15:81] Silent Sentinel +1 [C15:274] Wayfarer's Bauble +1 [C15:277] Barren Moor +1 [C15:234] Teysa, Envoy of Ghosts +1 [C15:311] Tainted Field +1 [C15:235] Treasury Thrull +1 [C15:114] Ancient Craving +1 [C15:46] Karlov of the Ghost Council +1 [C15:313] Temple of the False God +1 [C15:237] Underworld Coinsmith +1 [C15:116] Black Market +1 [C15:314] Terramorphic Expanse +1 [C15:319] Vivid Marsh +1 [C15:55] Thought Vessel +1 [C15:52] Sandstone Oracle +1 [C15:261] Orzhov Cluestone +1 [C15:140] Vow of Malice +1 [C15:262] Orzhov Signet +1 [C15:19] Deadly Tempest +1 [C15:18] Daxos's Torment +1 [C15:17] Corpse Augur +1 [C15:16] Banshee of the Dread Choir +1 [C15:268] Sol Ring +1 [C15:301] Reliquary Tower +1 [C15:57] Ajani's Chosen +1 [C15:302] Scoured Barrens +1 [C15:303] Secluded Steppe +1 [C15:229] Necromancer's Covenant +1 [C15:22] Thief of Blood +1 [C15:66] Dawn to Dusk +1 [C15:64] Celestial Archon +1 [C15:63] Celestial Ancient +1 [C15:62] Cage of Hands +1 [C15:61] Banishing Light +1 [C15:250] Crystal Chimes +1 [C15:60] Aura of Silence +1 [C15:130] Phyrexian Arena +1 [C15:295] New Benalia +1 [C15:133] Phyrexian Reclamation +1 [C15:298] Orzhov Basilica +13 [C15:331] Swamp +1 [C15:299] Orzhov Guildgate +1 [C15:135] Seal of Doom +1 [C15:257] Lightning Greaves +1 [C15:8] Shielded by Faith +1 [C15:68] Dictate of Heliod +1 [C15:67] Dawnglare Invoker +1 [C15:138] Underworld Connections +1 [C15:7] Righteous Confluence +1 [C15:215] Death Grasp +1 [C15:6] Oreskos Explorer +1 [C15:4] Herald of the Host +1 [C15:3] Grasp of Fate +1 [C15:1] Bastion Protector +SB: 1 [C15:43] Daxos the Returned diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2015/Plunder the Graves (GB).dck b/Mage.Client/release/sample-decks/Commander/Commander 2015/Plunder the Graves (GB).dck new file mode 100644 index 00000000000..3f6ecd43882 --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2015/Plunder the Graves (GB).dck @@ -0,0 +1,77 @@ +1 [C15:33] Bloodspore Thrinax +1 [C15:281] Command Tower +1 [C15:283] Evolving Wilds +1 [C15:120] Diabolic Servitude +1 [C15:286] Golgari Guildgate +1 [C15:39] Skullwinder +1 [C15:287] Golgari Rot Farm +1 [C15:200] Sakura-Tribe Elder +1 [C15:38] Pathbreaker Ibex +1 [C15:123] Eater of Hope +1 [C15:288] Grim Backwoods +1 [C15:201] Satyr Wayfinder +1 [C15:37] Great Oak Guardian +1 [C15:124] Extractor Demon +1 [C15:245] Bonehoard +1 [C15:289] High Market +1 [C15:202] Spider Spawning +1 [C15:35] Centaur Vinecrasher +1 [C15:34] Caller of the Pack +1 [C15:204] Terastodon +1 [C15:206] Tribute to the Wild +1 [C15:207] Verdant Force +1 [C15:208] Viridian Emissary +1 [C15:191] Mulch +1 [C15:192] Mycoloth +1 [C15:196] Overwhelming Stampede +1 [C15:198] Primal Growth +1 [C15:232] Putrefy +1 [C15:112] Altar's Reap +1 [C15:48] Mazirek, Kraul Death Priest +1 [C15:113] Ambition's Cost +1 [C15:312] Tainted Wood +1 [C15:115] Barter in Blood +1 [C15:314] Terramorphic Expanse +1 [C15:117] Blood Bairn +1 [C15:238] Vulturous Zombie +1 [C15:118] Butcher of Malakir +1 [C15:119] Champion of Stray Souls +1 [C15:318] Vivid Grove +1 [C15:319] Vivid Marsh +1 [C15:55] Thought Vessel +1 [C15:183] Eternal Witness +1 [C15:186] Indrik Stomphowler +1 [C15:187] Kessig Cagebreakers +1 [C15:17] Corpse Augur +1 [C15:221] Golgari Charm +1 [C15:16] Banshee of the Dread Choir +1 [C15:222] Grisly Salvage +1 [C15:223] Jarad, Golgari Lich Lord +1 [C15:267] Skullclamp +1 [C15:300] Polluted Mire +1 [C15:224] Korozda Guildmage +1 [C15:268] Sol Ring +1 [C15:226] Lotleth Troll +1 [C15:307] Slippery Karst +1 [C15:22] Thief of Blood +1 [C15:21] Scourge of Nel Toth +1 [C15:20] Dread Summons +1 [C15:292] Jungle Hollow +1 [C15:173] Acidic Slime +1 [C15:131] Phyrexian Plaguelord +1 [C15:132] Phyrexian Rager +1 [C15:253] Eldrazi Monument +1 [C15:210] Viridian Zealot +13 [C15:331] Swamp +1 [C15:211] Wall of Blossoms +1 [C15:255] Golgari Signet +1 [C15:134] Rise from the Grave +1 [C15:212] Wood Elves +1 [C15:179] Cloudthresher +1 [C15:257] Lightning Greaves +1 [C15:136] Sever the Bloodline +1 [C15:137] Shriekmaw +1 [C15:23] Wretched Confluence +1 [C15:139] Victimize +12 [C15:339] Forest +SB: 1 [C15:49] Meren of Clan Nel Toth diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2015/Seize Control (UR).dck b/Mage.Client/release/sample-decks/Commander/Commander 2015/Seize Control (UR).dck new file mode 100644 index 00000000000..ee3dfe19a30 --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2015/Seize Control (UR).dck @@ -0,0 +1,75 @@ +1 [C15:31] Warchief Giant +1 [C15:30] Rite of the Raging Storm +1 [C15:281] Command Tower +1 [C15:162] Magmaquake +1 [C15:283] Evolving Wilds +1 [C15:163] Mizzium Mortars +1 [C15:240] Call the Skybreaker +1 [C15:169] Urza's Rage +14 [C15:327] Island +1 [C15:88] Blue Sun's Zenith +1 [C15:87] Blatant Thievery +1 [C15:42] Arjun, the Shifting Flame +1 [C15:85] AEtherize +1 [C15:151] Dragon Mage +1 [C15:153] Faithless Looting +1 [C15:275] Worn Powerstone +1 [C15:110] Thought Reflection +1 [C15:231] Prophetic Bolt +1 [C15:111] Windfall +1 [C15:233] Steam Augury +1 [C15:310] Swiftwater Cliffs +1 [C15:313] Temple of the False God +1 [C15:89] Blustersquall +1 [C15:314] Terramorphic Expanse +1 [C15:316] Vivid Crag +1 [C15:317] Vivid Creek +1 [C15:90] Brainstorm +1 [C15:11] Gigantoplasm +1 [C15:55] Thought Vessel +1 [C15:10] Broodbirth Viper +1 [C15:54] Seal of the Guildpact +1 [C15:98] Mystic Retrieval +1 [C15:96] Lone Revenant +1 [C15:95] Jace's Archivist +1 [C15:94] Fact or Fiction +1 [C15:93] Echoing Truth +1 [C15:141] Act of Aggression +1 [C15:92] Dominate +1 [C15:263] Psychosis Crawler +1 [C15:220] Goblin Electromancer +1 [C15:144] Chain Reaction +1 [C15:145] Charmbreaker Devils +1 [C15:101] Preordain +1 [C15:146] Comet Storm +1 [C15:268] Sol Ring +1 [C15:103] Reins of Power +1 [C15:14] Mystic Confluence +1 [C15:301] Reliquary Tower +1 [C15:302] Rogue's Passage +1 [C15:13] Mirror Match +1 [C15:104] Repeal +1 [C15:12] Illusory Ambusher +1 [C15:149] Desperate Ravings +1 [C15:105] Rite of Replication +1 [C15:227] Melek, Izzet Paragon +1 [C15:106] Sleep +1 [C15:107] Stolen Goods +1 [C15:108] Stroke of Genius +1 [C15:109] Talrand, Sky Summoner +1 [C15:309] Spinerock Knoll +1 [C15:290] Izzet Boilerworks +1 [C15:170] Vandalblast +1 [C15:291] Izzet Guildgate +1 [C15:172] Word of Seizing +1 [C15:29] Mizzix's Mastery +1 [C15:28] Meteor Blast +1 [C15:256] Izzet Signet +1 [C15:9] AEthersnatch +1 [C15:24] Awaken the Sky Tyrant +1 [C15:214] Counterflux +13 [C15:335] Mountain +1 [C15:216] Epic Experiment +1 [C15:217] Etherium-Horn Sorcerer +1 [C15:218] Firemind's Foresight +SB: 1 [C15:50] Mizzix of the Izmagnus diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2015/Swell the Host (GU).dck b/Mage.Client/release/sample-decks/Commander/Commander 2015/Swell the Host (GU).dck new file mode 100644 index 00000000000..e9b21032d22 --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2015/Swell the Host (GU).dck @@ -0,0 +1,77 @@ +1 [C15:32] Arachnogenesis +1 [C15:281] Command Tower +1 [C15:283] Evolving Wilds +1 [C15:241] Cold-Eyed Selkie +1 [C15:242] Snakeform +1 [C15:39] Skullwinder +1 [C15:243] Wistful Selkie +1 [C15:200] Sakura-Tribe Elder +1 [C15:37] Great Oak Guardian +1 [C15:289] High Market +1 [C15:322] Zoetic Cavern +1 [C15:36] Ezuri's Predation +1 [C15:203] Stingerfling Spider +1 [C15:34] Caller of the Pack +1 [C15:205] Thelonite Hermit +11 [C15:327] Island +1 [C15:209] Viridian Shaman +1 [C15:190] Loaming Shaman +1 [C15:86] Bident of Thassa +1 [C15:193] Noble Quarry +1 [C15:40] Verdant Confluence +1 [C15:194] Ohran Viper +1 [C15:271] Swiftfoot Boots +1 [C15:272] Sword of Vengeance +1 [C15:195] Overrun +1 [C15:197] Patagia Viper +1 [C15:230] Prime Speaker Zegana +1 [C15:199] Rampant Growth +1 [C15:47] Kaseto, Orochi Archmage +1 [C15:236] Trygon Predator +1 [C15:314] Terramorphic Expanse +1 [C15:315] Thornwood Falls +1 [C15:239] Biomantic Mastery +1 [C15:317] Vivid Creek +1 [C15:318] Vivid Grove +1 [C15:91] Day of the Dragons +1 [C15:99] Ninja of the Deep Hours +1 [C15:55] Thought Vessel +1 [C15:10] Broodbirth Viper +1 [C15:97] Mulldrifter +1 [C15:53] Scytheclaw +1 [C15:180] Cobra Trap +1 [C15:181] Desert Twister +1 [C15:182] Elvish Visionary +1 [C15:183] Eternal Witness +1 [C15:260] Orochi Hatchery +1 [C15:184] Experiment One +1 [C15:185] Forgotten Ancient +1 [C15:100] Plaxmanta +1 [C15:265] Simic Keyrune +1 [C15:188] Kodama's Reach +1 [C15:266] Simic Signet +1 [C15:189] Krosan Grip +1 [C15:102] Rapid Hybridization +1 [C15:15] Synthetic Destiny +1 [C15:268] Sol Ring +1 [C15:301] Reliquary Tower +1 [C15:225] Lorescale Coatl +1 [C15:269] Solemn Simulacrum +1 [C15:13] Mirror Match +1 [C15:12] Illusory Ambusher +1 [C15:56] Command Beacon +1 [C15:228] Mystic Snake +1 [C15:305] Simic Growth Chamber +1 [C15:306] Simic Guildgate +1 [C15:293] Llanowar Reborn +1 [C15:294] Mosswort Bridge +1 [C15:174] Arbor Colossus +1 [C15:175] Bane of Progress +1 [C15:296] Novijen, Heart of Progress +1 [C15:176] Beastmaster Ascension +1 [C15:297] Oran-Rief, the Vastwood +1 [C15:177] Caller of the Claw +1 [C15:178] Chameleon Colossus +1 [C15:213] Coiling Oracle +14 [C15:339] Forest +SB: 1 [C15:44] Ezuri, Claw of Progress diff --git a/Mage.Client/release/sample-decks/Commander/Commander 2015/Wade into Battle (RW).dck b/Mage.Client/release/sample-decks/Commander/Commander 2015/Wade into Battle (RW).dck new file mode 100644 index 00000000000..461da3856cb --- /dev/null +++ b/Mage.Client/release/sample-decks/Commander/Commander 2015/Wade into Battle (RW).dck @@ -0,0 +1,77 @@ +1 [C15:31] Warchief Giant +1 [C15:30] Rite of the Raging Storm +1 [C15:280] Boros Guildgate +1 [C15:160] Inferno Titan +1 [C15:281] Command Tower +1 [C15:161] Magma Giant +1 [C15:282] Drifting Meadow +1 [C15:71] Jareth, Leonine Titan +1 [C15:283] Evolving Wilds +1 [C15:284] Forgotten Cave +1 [C15:164] Stinkdrinker Daredevil +1 [C15:165] Stoneshock Giant +1 [C15:166] Sunrise Sovereign +1 [C15:320] Vivid Meadow +1 [C15:167] Taurean Mauler +1 [C15:244] Basalt Monolith +1 [C15:321] Wind-Scarred Crag +1 [C15:168] Thundercloud Shaman +1 [C15:246] Boros Cluestone +11 [C15:323] Plains +1 [C15:247] Boros Signet +1 [C15:78] Orim's Thunder +1 [C15:249] Coldsteel Heart +1 [C15:41] Anya, Merciless Angel +1 [C15:270] Staff of Nin +1 [C15:83] Victory's Herald +1 [C15:150] Disaster Radius +1 [C15:82] Sun Titan +1 [C15:273] Urza's Incubator +1 [C15:152] Earthquake +1 [C15:275] Worn Powerstone +1 [C15:154] Fall of the Hammer +1 [C15:155] Fumiko the Lowblood +1 [C15:276] Ancient Amphitheater +1 [C15:156] Hamletback Goliath +1 [C15:157] Hammerfist Giant +1 [C15:278] Blasted Landscape +1 [C15:158] Hostility +1 [C15:279] Boros Garrison +1 [C15:159] Hunted Dragon +1 [C15:314] Terramorphic Expanse +1 [C15:316] Vivid Crag +1 [C15:55] Thought Vessel +1 [C15:52] Sandstone Oracle +1 [C15:51] Blade of Selves +1 [C15:142] Borderland Behemoth +1 [C15:264] Seer's Sundial +1 [C15:143] Breath of Darigaaz +1 [C15:59] Arbiter of Knollridge +1 [C15:58] Angel of Serenity +1 [C15:268] Sol Ring +1 [C15:147] Curse of the Nightly Hunt +1 [C15:148] Desolation Giant +1 [C15:303] Secluded Steppe +1 [C15:308] Smoldering Crater +1 [C15:65] Crib Swap +1 [C15:171] Warstorm Surge +1 [C15:61] Banishing Light +1 [C15:251] Darksteel Ingot +1 [C15:252] Dreamstone Hedron +1 [C15:254] Fellwar Stone +1 [C15:28] Meteor Blast +1 [C15:27] Magus of the Wheel +1 [C15:26] Fiery Confluence +1 [C15:25] Dream Pillager +1 [C15:257] Lightning Greaves +1 [C15:69] Faith's Fetters +1 [C15:258] Loxodon Warhammer +14 [C15:335] Mountain +1 [C15:67] Dawnglare Invoker +1 [C15:259] Mind Stone +1 [C15:6] Oreskos Explorer +1 [C15:5] Kalemne's Captain +1 [C15:4] Herald of the Host +1 [C15:219] Gisela, Blade of Goldnight +1 [C15:2] Dawnbreak Reclaimer +SB: 1 [C15:45] Kalemne, Disciple of Iroas diff --git a/Mage.Client/release/sample-decks/Momir Basic/Momir Basic.dck b/Mage.Client/release/sample-decks/Momir Basic/Momir Basic.dck new file mode 100644 index 00000000000..1295622aa28 --- /dev/null +++ b/Mage.Client/release/sample-decks/Momir Basic/Momir Basic.dck @@ -0,0 +1,23 @@ +NAME:Mormir Basic +3 [BFZ:259] Island +3 [BFZ:261] Swamp +3 [BFZ:250] Plains +3 [BFZ:272] Forest +3 [BFZ:260] Swamp +3 [BFZ:271] Forest +3 [BFZ:270] Forest +3 [BFZ:265] Mountain +2 [BFZ:254] Plains +3 [BFZ:264] Swamp +3 [BFZ:274] Forest +1 [BFZ:252] Plains +3 [BFZ:262] Swamp +3 [BFZ:251] Plains +2 [BFZ:273] Forest +3 [BFZ:258] Island +2 [BFZ:269] Mountain +3 [BFZ:268] Mountain +3 [BFZ:257] Island +3 [BFZ:267] Mountain +3 [BFZ:266] Mountain +2 [BFZ:255] Island diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index a6aef412905..4494e6951da 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -83,7 +83,7 @@ import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; import mage.client.cards.BigCard; -import mage.client.chat.ChatPanel; +import mage.client.chat.ChatPanelBasic; import mage.client.components.MageComponents; import mage.client.components.MageDesktopManager; import mage.client.components.MageJDesktop; @@ -165,7 +165,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { private static boolean grayMode = false; private static boolean fullscreenMode = false; - private static final Map chats = new HashMap<>(); + private static final Map chats = new HashMap<>(); private static final Map games = new HashMap<>(); private static final Map drafts = new HashMap<>(); private static final MageUI ui = new MageUI(); @@ -372,8 +372,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { private void setWindowTitle() { setTitle(TITLE_NAME + " Client: " - + version == null ? "" : version.toString() + " Server: " - + ((session != null && session.isConnected()) ? session.getVersionInfo() : "")); + + (version == null ? "" : version.toString()) + " Server: " + + ((session != null && session.isConnected()) ? session.getVersionInfo() : "")); } private void addTooltipContainer() { @@ -1250,11 +1250,11 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { return ui; } - public static ChatPanel getChat(UUID chatId) { + public static ChatPanelBasic getChat(UUID chatId) { return chats.get(chatId); } - public static void addChat(UUID chatId, ChatPanel chatPanel) { + public static void addChat(UUID chatId, ChatPanelBasic chatPanel) { chats.put(chatId, chatPanel); } diff --git a/Mage.Client/src/main/java/mage/client/chat/ChatPanelBasic.form b/Mage.Client/src/main/java/mage/client/chat/ChatPanelBasic.form new file mode 100644 index 00000000000..70c347f0639 --- /dev/null +++ b/Mage.Client/src/main/java/mage/client/chat/ChatPanelBasic.form @@ -0,0 +1,69 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Mage.Client/src/main/java/mage/client/chat/ChatPanel.java b/Mage.Client/src/main/java/mage/client/chat/ChatPanelBasic.java similarity index 52% rename from Mage.Client/src/main/java/mage/client/chat/ChatPanel.java rename to Mage.Client/src/main/java/mage/client/chat/ChatPanelBasic.java index b20e0a9f6f4..b096fef13c9 100644 --- a/Mage.Client/src/main/java/mage/client/chat/ChatPanel.java +++ b/Mage.Client/src/main/java/mage/client/chat/ChatPanelBasic.java @@ -35,82 +35,65 @@ package mage.client.chat; import java.awt.Color; import java.awt.event.KeyEvent; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; import java.util.UUID; -import javax.swing.Icon; import javax.swing.JTextField; -import javax.swing.table.AbstractTableModel; -import javax.swing.table.JTableHeader; -import javax.swing.table.TableColumnModel; import mage.client.MageFrame; -import static mage.client.dialog.PreferencesDialog.KEY_USERS_COLUMNS_ORDER; -import static mage.client.dialog.PreferencesDialog.KEY_USERS_COLUMNS_WIDTH; -import mage.client.util.MageTableRowSorter; -import mage.client.util.gui.TableUtil; -import mage.client.util.gui.countryBox.CountryCellRenderer; -import mage.remote.MageRemoteException; import mage.remote.Session; import mage.view.ChatMessage.MessageColor; import mage.view.ChatMessage.MessageType; -import mage.view.RoomUsersView; -import mage.view.UsersView; import org.mage.card.arcane.ManaSymbols; /** * * @author BetaSteward_at_googlemail.com, nantuko */ -public class ChatPanel extends javax.swing.JPanel { +public class ChatPanelBasic extends javax.swing.JPanel { - private UUID chatId; - private Session session; - private final List players = new ArrayList<>(); - private final UserTableModel userTableModel; + protected UUID chatId; + protected Session session; /** * Chat message color for opponents. */ - private static final String OPPONENT_COLOR = "#FF7F50"; + protected static final String OPPONENT_COLOR = "#FF7F50"; /** * Chat message color for client player. */ - private static final String MY_COLOR = "#7FFFD4"; + protected static final String MY_COLOR = "#7FFFD4"; /** * Chat message color for timestamps. */ - private static final String TIMESTAMP_COLOR = "#CCCC33"; + protected static final String TIMESTAMP_COLOR = "#CCCC33"; /** * Chat message color for messages. */ - private static final String MESSAGE_COLOR = "White"; + protected static final String MESSAGE_COLOR = "White"; /** * Chat message color for personal infos. */ - private static final String USER_INFO_COLOR = "Yellow"; + protected static final String USER_INFO_COLOR = "Yellow"; /** * Chat message color for status infos. */ - private static final String STATUS_COLOR = "#FFCC33"; + protected static final String STATUS_COLOR = "#FFCC33"; /** * Alpha value for transparency (255 = not transparent) */ - private static final int ALPHA = 80; + public static final int CHAT_ALPHA = 80; /** * This will be a chat that will be connected to {this} and will handle * redirected messages; Mostly used to redirect user messages to another * window. */ - private ChatPanel connectedChat; + protected ChatPanelBasic connectedChat; /** * Parent chat this chat connected to. Used to send messages using parent * chat as it is the only one connected to server. */ - private ChatPanel parentChatRef; + protected ChatPanelBasic parentChatRef; /** * Selected extended view mode. */ - private VIEW_MODE extendedViewMode = VIEW_MODE.NONE; + protected VIEW_MODE extendedViewMode = VIEW_MODE.NONE; public enum VIEW_MODE { @@ -120,57 +103,31 @@ public class ChatPanel extends javax.swing.JPanel { * Controls the output start messages as the chat panel is created * */ - private ChatType chatType = ChatType.DEFAULT; - - private static final int[] defaultColumnsWidth = {20, 100, 100, 80, 80}; + protected ChatType chatType = ChatType.DEFAULT; public enum ChatType { DEFAULT, GAME, TABLES, TOURNAMENT } - private boolean startMessageDone = false; + protected boolean startMessageDone = false; /** - * Creates new form ChatPanel - */ - public ChatPanel() { - this(false); - } - - /** - * @param addPlayersTab if true, adds chat/players tabs - */ - /** + * * Creates new form ChatPanel * - * @param addPlayersTab */ - public ChatPanel(boolean addPlayersTab) { - userTableModel = new UserTableModel(); + public ChatPanelBasic() { initComponents(); - setBackground(new Color(0, 0, 0, ALPHA)); - jTablePlayers.setBackground(new Color(0, 0, 0, ALPHA)); - jTablePlayers.setForeground(Color.white); - jTablePlayers.setRowSorter(new MageTableRowSorter(userTableModel)); - - TableUtil.setColumnWidthAndOrder(jTablePlayers, defaultColumnsWidth, KEY_USERS_COLUMNS_WIDTH, KEY_USERS_COLUMNS_ORDER); - jTablePlayers.setDefaultRenderer(Icon.class, new CountryCellRenderer()); + setBackground(new Color(0, 0, 0, CHAT_ALPHA)); if (jScrollPaneTxt != null) { - jScrollPaneTxt.setBackground(new Color(0, 0, 0, ALPHA)); - jScrollPaneTxt.getViewport().setBackground(new Color(0, 0, 0, ALPHA)); - } - if (jScrollPanePlayers != null) { - jScrollPanePlayers.setBackground(new Color(0, 0, 0, ALPHA)); - jScrollPanePlayers.getViewport().setBackground(new Color(0, 0, 0, ALPHA)); - } - if (!addPlayersTab) { - simplifyComponents(); + jScrollPaneTxt.setBackground(new Color(0, 0, 0, CHAT_ALPHA)); + jScrollPaneTxt.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA)); } } public void cleanUp() { - TableUtil.saveColumnWidthAndOrderToPrefs(jTablePlayers, KEY_USERS_COLUMNS_WIDTH, KEY_USERS_COLUMNS_ORDER); + } public ChatType getChatType() { @@ -254,7 +211,7 @@ public class ChatPanel extends javax.swing.JPanel { this.txtConversation.append(text.toString()); } - private String getColoredText(String color, String text) { + protected String getColoredText(String color, String text) { StringBuilder sb = new StringBuilder(); sb.append(" choices; diff --git a/Mage.Client/src/main/java/mage/client/deck/generator/DeckGenerator.java b/Mage.Client/src/main/java/mage/client/deck/generator/DeckGenerator.java index 2982c97a126..67429dd5e8c 100644 --- a/Mage.Client/src/main/java/mage/client/deck/generator/DeckGenerator.java +++ b/Mage.Client/src/main/java/mage/client/deck/generator/DeckGenerator.java @@ -27,21 +27,24 @@ */ package mage.client.deck.generator; -import java.util.*; - +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.Set; import mage.cards.Card; import mage.cards.decks.Deck; import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; -import mage.cards.repository.ExpansionInfo; import mage.cards.repository.ExpansionRepository; import mage.client.dialog.PreferencesDialog; import mage.client.util.sets.ConstructedFormats; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.constants.Rarity; - +import mage.util.TournamentUtil; /** * Generates random card pool and builds a deck. @@ -57,6 +60,7 @@ public class DeckGenerator { /** * Builds a deck out of the selected block/set/format. + * * @return a path to the generated deck. */ public static String generateDeck() { @@ -70,7 +74,6 @@ public class DeckGenerator { return PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_DECK_FILE, null); } - protected static Deck buildDeck() { String selectedColors = genDialog.getSelectedColors(); @@ -100,6 +103,7 @@ public class DeckGenerator { /** * If the user has selected random colors, pick them randomly for the user. + * * @param selectedColors a string of the colors selected. * @return a String representation of the new colors chosen. */ @@ -130,9 +134,10 @@ public class DeckGenerator { } /** - * Generates all the cards to use in the deck. - * Adds creatures, non-creatures, lands (including non-basic). - * Fixes the deck, adjusting for size and color of the cards retrieved. + * Generates all the cards to use in the deck. Adds creatures, + * non-creatures, lands (including non-basic). Fixes the deck, adjusting for + * size and color of the cards retrieved. + * * @param deckSize how big the deck is to generate. * @param allowedColors which colors are allowed in the deck. * @param setsToUse which sets to use to retrieve cards for this deck. @@ -148,16 +153,18 @@ public class DeckGenerator { creatureCriteria.setCodes(sets); creatureCriteria.notTypes(CardType.LAND); creatureCriteria.types(CardType.CREATURE); - if (!(genDialog.useArtifacts())) + if (!(genDialog.useArtifacts())) { creatureCriteria.notTypes(CardType.ARTIFACT); + } // Non-creatures (sorcery, instant, enchantment, artifact etc.) final CardCriteria nonCreatureCriteria = new CardCriteria(); nonCreatureCriteria.setCodes(sets); nonCreatureCriteria.notTypes(CardType.LAND); nonCreatureCriteria.notTypes(CardType.CREATURE); - if (!(genDialog.useArtifacts())) + if (!(genDialog.useArtifacts())) { nonCreatureCriteria.notTypes(CardType.ARTIFACT); + } // Non-basic land final CardCriteria nonBasicLandCriteria = new CardCriteria(); @@ -176,15 +183,18 @@ public class DeckGenerator { return genPool.getDeck(); } - /** - * Generates all spells for the deck. - * Each card is retrieved from the database and checked against the converted mana cost (CMC) needed for the current card pool. - * If a card's CMC matches the CMC range required by the pool, it is added to the deck. - * This ensures that the majority of cards fit a fixed mana curve for the deck, and it is playable. - * Creatures and non-creatures are retrieved separately to ensure the deck contains a reasonable mix of both. + * Generates all spells for the deck. Each card is retrieved from the + * database and checked against the converted mana cost (CMC) needed for the + * current card pool. If a card's CMC matches the CMC range required by the + * pool, it is added to the deck. This ensures that the majority of cards + * fit a fixed mana curve for the deck, and it is playable. Creatures and + * non-creatures are retrieved separately to ensure the deck contains a + * reasonable mix of both. + * * @param criteria the criteria to search for in the database. - * @param spellCount the number of spells that match the criteria needed in the deck. + * @param spellCount the number of spells that match the criteria needed in + * the deck. */ private static void generateSpells(CardCriteria criteria, int spellCount) { List cardPool = CardRepository.instance.findCards(criteria); @@ -211,8 +221,9 @@ public class DeckGenerator { } else { if (reservesAdded < (genPool.getDeckSize() / 2)) { added = genPool.tryAddReserve(card, cardCMC); - if(added) + if (added) { reservesAdded++; + } } } } @@ -230,11 +241,13 @@ public class DeckGenerator { } /** - * Generates all the lands for the deck. - * Generates non-basic if selected by the user and if the deck isn't monocolored. - * Will fetch non-basic lands if required and then fill up the remaining space with basic lands. - * Basic lands are adjusted according to the mana symbols seen in the cards used in this deck. - * Usually the lands will be well balanced relative to the color of cards. + * Generates all the lands for the deck. Generates non-basic if selected by + * the user and if the deck isn't monocolored. Will fetch non-basic lands if + * required and then fill up the remaining space with basic lands. Basic + * lands are adjusted according to the mana symbols seen in the cards used + * in this deck. Usually the lands will be well balanced relative to the + * color of cards. + * * @param criteria the criteria of the lands to search for in the database. * @param landsCount the amount of lands required for this deck. * @param basicLands information about the basic lands from the sets used. @@ -280,47 +293,13 @@ public class DeckGenerator { /** * Returns a map of colored mana symbol to basic land cards of that color. + * * @param setsToUse which sets to retrieve basic lands from. * @return a map of color to basic lands. */ private static Map> generateBasicLands(List setsToUse) { - List landSets = new LinkedList<>(); - - // decide from which sets basic lands are taken from - for (String setCode :setsToUse) { - ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); - if (expansionInfo.hasBasicLands()) { - landSets.add(expansionInfo.getCode()); - } - } - - // if sets have no basic land, take land from block - if (landSets.isEmpty()) { - for (String setCode :setsToUse) { - ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); - List blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName()); - for (ExpansionInfo blockSet: blockSets) { - if (blockSet.hasBasicLands()) { - landSets.add(blockSet.getCode()); - } - } - } - } - // if still no set with lands found, take one by random - if (landSets.isEmpty()) { - // if sets have no basic lands and also it has no parent or parent has no lands get last set with lands - // select a set with basic lands by random - Random generator = new Random(); - List basicLandSets = ExpansionRepository.instance.getSetsWithBasicLandsByReleaseDate(); - if (basicLandSets.size() > 0) { - landSets.add(basicLandSets.get(generator.nextInt(basicLandSets.size())).getCode()); - } - } - - if (landSets.isEmpty()) { - throw new IllegalArgumentException("No set with basic land was found"); - } + Set landSets = TournamentUtil.getLandSetCodeForDeckSets(setsToUse); CardCriteria criteria = new CardCriteria(); if (!landSets.isEmpty()) { @@ -329,7 +308,7 @@ public class DeckGenerator { Map> basicLandMap = new HashMap<>(); - for(ColoredManaSymbol c: ColoredManaSymbol.values()) { + for (ColoredManaSymbol c : ColoredManaSymbol.values()) { String landName = DeckGeneratorPool.getBasicLandName(c.toString()); criteria.rarities(Rarity.LAND).name(landName); List cards = CardRepository.instance.findCards(criteria); @@ -339,11 +318,14 @@ public class DeckGenerator { } /** - * Once any non-basic lands are added, add basic lands until the deck is filled. + * Once any non-basic lands are added, add basic lands until the deck is + * filled. + * * @param landsNeeded how many remaining lands are needed. * @param percentage the percentage needed for each color in the final deck. * @param count how many of each color can be produced by non-basic lands. - * @param basicLands list of information about basic lands from the database. + * @param basicLands list of information about basic lands from the + * database. */ private static void addBasicLands(int landsNeeded, Map percentage, Map count, Map> basicLands) { int colorTotal = 0; @@ -369,8 +351,9 @@ public class DeckGenerator { int currentCount = count.get(color.toString()); double thisPercentage = 0.0; // Calculate the percentage of lands so far that produce this color - if (currentCount > 0) + if (currentCount > 0) { thisPercentage = (currentCount / (double) colorTotal) * 100.0; + } // Check if the color is the most "needed" (highest percentage) we have seen so far if (neededPercentage - thisPercentage > minPercentage) { // Put this color land forward to be added @@ -378,7 +361,7 @@ public class DeckGenerator { minPercentage = (neededPercentage - thisPercentage); } } - if(colorToAdd != null) { + if (colorToAdd != null) { genPool.addCard(getBasicLand(colorToAdd, basicLands)); count.put(colorToAdd.toString(), count.get(colorToAdd.toString()) + 1); colorTotal++; @@ -389,8 +372,10 @@ public class DeckGenerator { /** * Return a random basic land of the chosen color. + * * @param color the color the basic land should produce. - * @param basicLands list of information about basic lands from the database. + * @param basicLands list of information about basic lands from the + * database. * @return a single basic land that produces the color needed. */ private static Card getBasicLand(ColoredManaSymbol color, Map> basicLands) { @@ -400,5 +385,4 @@ public class DeckGenerator { return basicLandsInfo.get(random.nextInt(basicLandsInfo.size() - 1)).getMockCard().copy(); } - } diff --git a/Mage.Client/src/main/java/mage/client/dialog/AddLandDialog.java b/Mage.Client/src/main/java/mage/client/dialog/AddLandDialog.java index f198e866d29..9b25eea3712 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/AddLandDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/AddLandDialog.java @@ -57,7 +57,7 @@ public class AddLandDialog extends MageDialog { private static final Logger logger = Logger.getLogger(MageDialog.class); private Deck deck; - private final Set setCodesland = new HashSet<>(); + private final Set landSetCodes = new HashSet<>(); private static final int DEFAULT_SEALED_DECK_CARD_NUMBER = 40; @@ -71,27 +71,27 @@ public class AddLandDialog extends MageDialog { public void showDialog(Deck deck, DeckEditorMode mode) { this.deck = deck; - SortedSet landSets = new TreeSet<>(); + SortedSet landSetNames = new TreeSet<>(); if (!mode.equals(DeckEditorMode.FREE_BUILDING)) { // decide from which sets basic lands are taken from for (String setCode : deck.getExpansionSetCodes()) { ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); if (expansionInfo != null && expansionInfo.hasBasicLands()) { - this.setCodesland.add(expansionInfo.getCode()); - landSets.add(expansionInfo.getName()); + this.landSetCodes.add(expansionInfo.getCode()); + landSetNames.add(expansionInfo.getName()); } } // if sets have no basic land, take land from block - if (this.setCodesland.isEmpty()) { + if (this.landSetCodes.isEmpty()) { for (String setCode : deck.getExpansionSetCodes()) { ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); if (expansionInfo != null) { List blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName()); for (ExpansionInfo blockSet : blockSets) { if (blockSet.hasBasicLands()) { - this.setCodesland.add(blockSet.getCode()); - landSets.add(blockSet.getName()); + this.landSetCodes.add(blockSet.getCode()); + landSetNames.add(blockSet.getName()); } } } @@ -99,19 +99,19 @@ public class AddLandDialog extends MageDialog { } } // if still no set with lands found, add list of all available - if (this.setCodesland.isEmpty()) { + if (this.landSetCodes.isEmpty()) { List basicLandSets = ExpansionRepository.instance.getSetsWithBasicLandsByReleaseDate(); for (ExpansionInfo expansionInfo : basicLandSets) { - landSets.add(expansionInfo.getName()); + landSetNames.add(expansionInfo.getName()); } } - if (landSets.isEmpty()) { + if (landSetNames.isEmpty()) { throw new IllegalArgumentException("No set with basic land was found"); } - if (landSets.size() > 1) { - landSets.add(""); + if (landSetNames.size() > 1) { + landSetNames.add(""); } - cbLandSet.setModel(new DefaultComboBoxModel(landSets.toArray())); + cbLandSet.setModel(new DefaultComboBoxModel(landSetNames.toArray())); MageFrame.getDesktop().add(this, JLayeredPane.PALETTE_LAYER); this.setVisible(true); @@ -123,7 +123,7 @@ public class AddLandDialog extends MageDialog { CardCriteria criteria = new CardCriteria(); if (landSetName.equals("")) { - criteria.setCodes(setCodesland.toArray(new String[setCodesland.size()])); + criteria.setCodes(landSetCodes.toArray(new String[landSetCodes.size()])); } else { ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByName(landSetName); if (expansionInfo == null) { diff --git a/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java index 284852f6c0b..59b6a23fa66 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java @@ -36,8 +36,6 @@ package mage.client.dialog; import java.awt.Point; import java.beans.PropertyVetoException; import java.util.UUID; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.swing.ImageIcon; import javax.swing.SwingUtilities; import javax.swing.event.InternalFrameAdapter; @@ -50,6 +48,7 @@ import mage.client.util.gui.GuiDisplayUtil; import mage.view.CardsView; import mage.view.ExileView; import mage.view.SimpleCardsView; +import org.apache.log4j.Logger; import org.mage.plugins.card.utils.impl.ImageManagerImpl; /** @@ -58,6 +57,8 @@ import org.mage.plugins.card.utils.impl.ImageManagerImpl; */ public class CardInfoWindowDialog extends MageDialog { + private static final Logger logger = Logger.getLogger(CardInfoWindowDialog.class); + public static enum ShowType { REVEAL, REVEAL_TOP_LIBRARY, LOOKED_AT, EXILE, GRAVEYARD, OTHER @@ -123,7 +124,7 @@ public class CardInfoWindowDialog extends MageDialog { try { this.setIcon(false); } catch (PropertyVetoException ex) { - Logger.getLogger(CardInfoWindowDialog.class.getName()).log(Level.SEVERE, null, ex); + logger.error(null, ex); } } } else { diff --git a/Mage.Client/src/main/java/mage/client/dialog/FeedbackDialog.java b/Mage.Client/src/main/java/mage/client/dialog/FeedbackDialog.java index dc3c892658e..dfe0a233092 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/FeedbackDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/FeedbackDialog.java @@ -40,7 +40,7 @@ import javax.swing.*; */ public class FeedbackDialog extends javax.swing.JDialog { - private static final transient Logger log = Logger.getLogger(PreferencesDialog.class); + private static final Logger log = Logger.getLogger(PreferencesDialog.class); private String[] feedbackTypes = {"", "Bug or \"something doesn't work\"", "Feature or \"I need that function\"", diff --git a/Mage.Client/src/main/java/mage/client/dialog/NewTableDialog.java b/Mage.Client/src/main/java/mage/client/dialog/NewTableDialog.java index 9f0dd4a6494..71135fc7983 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/NewTableDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/NewTableDialog.java @@ -1,30 +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. -*/ + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ package mage.client.dialog; import java.io.FileNotFoundException; @@ -71,7 +71,9 @@ public class NewTableDialog extends MageDialog { private static final String LIMITED = "Limited"; - /** Creates new form NewTableDialog */ + /** + * Creates new form NewTableDialog + */ public NewTableDialog() { session = MageFrame.getSession(); lastSessionId = ""; @@ -79,13 +81,13 @@ public class NewTableDialog extends MageDialog { player1Panel.showLevel(false); this.spnNumWins.setModel(new SpinnerNumberModel(1, 1, 5, 1)); this.spnFreeMulligans.setModel(new SpinnerNumberModel(0, 0, 5, 1)); - MageFrame.getUI().addButton(MageComponents.NEW_TABLE_OK_BUTTON, btnOK); + MageFrame.getUI().addButton(MageComponents.NEW_TABLE_OK_BUTTON, btnOK); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents @@ -361,7 +363,7 @@ public class NewTableDialog extends MageDialog { GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem(); MatchOptions options = new MatchOptions(this.txtName.getText(), gameType.getName()); options.getPlayerTypes().add("Human"); - for (TablePlayerPanel player: players) { + for (TablePlayerPanel player : players) { options.getPlayerTypes().add(player.getPlayerType()); } options.setDeckType((String) this.cbDeckType.getSelectedItem()); @@ -370,9 +372,9 @@ public class NewTableDialog extends MageDialog { options.setAttackOption((MultiplayerAttackOption) this.cbAttackOption.getSelectedItem()); options.setSkillLevel((SkillLevel) this.cbSkillLevel.getSelectedItem()); options.setRange((RangeOfInfluence) this.cbRange.getSelectedItem()); - options.setWinsNeeded((Integer)this.spnNumWins.getValue()); + options.setWinsNeeded((Integer) this.spnNumWins.getValue()); options.setRollbackTurnsAllowed(chkRollbackTurnsAllowed.isSelected()); - options.setFreeMulligans((Integer)this.spnFreeMulligans.getValue()); + options.setFreeMulligans((Integer) this.spnFreeMulligans.getValue()); options.setPassword(this.txtPassword.getText()); if (!checkMatchOptions(options)) { return; @@ -391,9 +393,8 @@ public class NewTableDialog extends MageDialog { this.player1Panel.getPlayerName(), "Human", 1, DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()), - this.txtPassword.getText()) - ) { - for (TablePlayerPanel player: players) { + this.txtPassword.getText())) { + for (TablePlayerPanel player : players) { if (!player.getPlayerType().equals("Human")) { if (!player.joinTable(roomId, table.getTableId())) { // error message must be send by the server @@ -423,7 +424,7 @@ public class NewTableDialog extends MageDialog { }//GEN-LAST:event_cbGameTypeActionPerformed private void numPlayersChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_numPlayersChanged - int numPlayers = (Integer)this.spnNumPlayers.getValue() - 1; + int numPlayers = (Integer) this.spnNumPlayers.getValue() - 1; createPlayers(numPlayers); }//GEN-LAST:event_numPlayersChanged @@ -432,9 +433,10 @@ public class NewTableDialog extends MageDialog { }//GEN-LAST:event_spnNumWinsnumPlayersChanged /** - * Checks about not valid game option combinations and shows an error message - * - * @return + * Checks about not valid game option combinations and shows an error + * message + * + * @return */ private boolean checkMatchOptions(MatchOptions options) { switch (options.getDeckType()) { @@ -451,11 +453,17 @@ public class NewTableDialog extends MageDialog { return false; } break; + case "Variant Magic - Momir Basic": + if (!options.getGameType().startsWith("Momir Basic")) { + JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Deck type Momir Basic needs also a Momir Basic game type", "Error", JOptionPane.ERROR_MESSAGE); + return false; + } + break; } switch (options.getGameType()) { case "Commander Two Player Duel": case "Commander Free For All": - if (!options.getDeckType().equals("Variant Magic - Commander") && !options.getDeckType().equals("Variant Magic - Duel Commander") ) { + if (!options.getDeckType().equals("Variant Magic - Commander") && !options.getDeckType().equals("Variant Magic - Duel Commander")) { JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Deck type Commander needs also a Commander game type", "Error", JOptionPane.ERROR_MESSAGE); return false; } @@ -466,16 +474,16 @@ public class NewTableDialog extends MageDialog { return false; } break; - } + } return true; } - + private void setGameOptions() { GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem(); int oldValue = (Integer) this.spnNumPlayers.getValue(); this.spnNumPlayers.setModel(new SpinnerNumberModel(gameType.getMinPlayers(), gameType.getMinPlayers(), gameType.getMaxPlayers(), 1)); this.spnNumPlayers.setEnabled(gameType.getMinPlayers() != gameType.getMaxPlayers()); - if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()){ + if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()) { this.spnNumPlayers.setValue(oldValue); } this.cbAttackOption.setEnabled(gameType.isUseAttackOption()); @@ -495,17 +503,16 @@ public class NewTableDialog extends MageDialog { playerPanel.init(players.size() + 2, playerType); players.add(playerPanel); playerPanel.addPlayerTypeEventListener( - new Listener () { - @Override - public void event(Event event) { - drawPlayers(); + new Listener() { + @Override + public void event(Event event) { + drawPlayers(); + } } - } ); } - - } - // remove player panels no longer needed + + } // remove player panels no longer needed else if (numPlayers < players.size()) { while (players.size() != numPlayers) { players.remove(players.size() - 1); @@ -516,7 +523,7 @@ public class NewTableDialog extends MageDialog { private void drawPlayers() { this.pnlOtherPlayers.removeAll(); - for (TablePlayerPanel panel: players) { + for (TablePlayerPanel panel : players) { this.pnlOtherPlayers.add(panel); } this.pack(); @@ -531,7 +538,7 @@ public class NewTableDialog extends MageDialog { } public void showDialog(UUID roomId) { - this.roomId = roomId; + this.roomId = roomId; if (!lastSessionId.equals(MageFrame.getSession().getSessionId())) { lastSessionId = session.getSessionId(); this.player1Panel.setPlayerName(session.getUserName()); @@ -543,8 +550,8 @@ public class NewTableDialog extends MageDialog { cbAttackOption.setModel(new DefaultComboBoxModel(MultiplayerAttackOption.values())); cbSkillLevel.setModel(new DefaultComboBoxModel(SkillLevel.values())); // Update the existing player panels (neccessary if server was changes = new session) - int i=2; - for (TablePlayerPanel tablePlayerPanel :players) { + int i = 2; + for (TablePlayerPanel tablePlayerPanel : players) { tablePlayerPanel.init(i++, tablePlayerPanel.getPlayerType()); } setGameSettingsFromPrefs(); @@ -565,7 +572,7 @@ public class NewTableDialog extends MageDialog { private void selectLimitedByDefault() { for (int i = 0; i < cbDeckType.getItemCount(); i++) { - String name = (String)cbDeckType.getItemAt(i); + String name = (String) cbDeckType.getItemAt(i); if (name.equals(LIMITED)) { cbDeckType.setSelectedIndex(i); break; @@ -574,9 +581,9 @@ public class NewTableDialog extends MageDialog { } /** - * set the table settings from java prefs + * set the table settings from java prefs */ - private void setGameSettingsFromPrefs () { + private void setGameSettingsFromPrefs() { txtName.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NAME, "Game")); txtPassword.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_PASSWORD, "")); @@ -585,7 +592,6 @@ public class NewTableDialog extends MageDialog { prefPlayerTypes.addAll(Arrays.asList(playerTypes.split(","))); this.spnNumPlayers.setValue(Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_PLAYERS, "2"))); - String gameTypeName = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_GAME_TYPE, "Two Player Duel"); for (GameTypeView gtv : session.getGameTypes()) { if (gtv.getName().equals(gameTypeName)) { @@ -594,7 +600,7 @@ public class NewTableDialog extends MageDialog { } } int timeLimit = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_TIME_LIMIT, "1500")); - for (MatchTimeLimit mtl :MatchTimeLimit.values()) { + for (MatchTimeLimit mtl : MatchTimeLimit.values()) { if (mtl.getTimeLimit() == timeLimit) { this.cbTimeLimit.setSelectedItem(mtl); break; @@ -608,32 +614,32 @@ public class NewTableDialog extends MageDialog { this.spnNumWins.setValue(Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_WINS, "2"))); this.chkRollbackTurnsAllowed.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED, "Yes").equals("Yes")); - int range = Integer.parseInt(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_RANGE, "1")); - for (RangeOfInfluence roi :RangeOfInfluence.values()) { + for (RangeOfInfluence roi : RangeOfInfluence.values()) { if (roi.getRange() == range) { this.cbRange.setSelectedItem(roi); break; } } String attackOption = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_ATTACK_OPTION, "Attack Multiple Players"); - for (MultiplayerAttackOption mao :MultiplayerAttackOption.values()) { + for (MultiplayerAttackOption mao : MultiplayerAttackOption.values()) { if (mao.toString().equals(attackOption)) { this.cbAttackOption.setSelectedItem(mao); break; } } String skillLevelDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_SKILL_LEVEL, "Casual"); - for (SkillLevel skillLevel :SkillLevel.values()) { + for (SkillLevel skillLevel : SkillLevel.values()) { if (skillLevel.toString().equals(skillLevelDefault)) { this.cbSkillLevel.setSelectedItem(skillLevel); break; } - } + } } /** - * Save the settings to java prefs to reload it next time the dialog will be created + * Save the settings to java prefs to reload it next time the dialog will be + * created * * @param options * @param deckFile @@ -645,7 +651,7 @@ public class NewTableDialog extends MageDialog { PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_TIME_LIMIT, Integer.toString(options.getPriorityTime())); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_GAME_TYPE, options.getGameType()); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_WINS, Integer.toString(options.getWinsNeeded())); - PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED, options.isRollbackTurnsAllowed() ? "Yes": "No"); + PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED, options.isRollbackTurnsAllowed() ? "Yes" : "No"); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_FREE_MULLIGANS, Integer.toString(options.getFreeMulligans())); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_DECK_FILE, deckFile); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_PLAYERS, spnNumPlayers.getValue().toString()); @@ -655,7 +661,7 @@ public class NewTableDialog extends MageDialog { StringBuilder playerTypesString = new StringBuilder(); ListIterator iterator = players.listIterator(); while (iterator.hasNext()) { - if (playerTypesString.length()>0) { + if (playerTypesString.length() > 0) { playerTypesString.append(","); } TablePlayerPanel tpp = (TablePlayerPanel) iterator.next(); 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 e84416bcdfc..2d464312ebe 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -78,7 +78,7 @@ import org.apache.log4j.Logger; */ public class PreferencesDialog extends javax.swing.JDialog { - private static final transient Logger log = Logger.getLogger(PreferencesDialog.class); + private static final Logger log = Logger.getLogger(PreferencesDialog.class); public static final String KEY_HAND_USE_BIG_CARDS = "handUseBigCards"; public static final String KEY_SHOW_TOOLTIPS_ANY_ZONE = "showTooltipsInAnyZone"; @@ -270,7 +270,7 @@ public class PreferencesDialog extends javax.swing.JDialog { private static final Border GREEN_BORDER = BorderFactory.createLineBorder(Color.GREEN, 3); private static final Border BLACK_BORDER = BorderFactory.createLineBorder(Color.BLACK, 3); - private static int selectedAvatarId = DEFAULT_AVATAR_ID; + private static int selectedAvatarId; private final JFileChooser fc = new JFileChooser(); @@ -2723,6 +2723,9 @@ public class PreferencesDialog extends javax.swing.JDialog { } public static UserData getUserData() { + if (selectedAvatarId == 0) { + getSelectedAvatar(); + } return new UserData(UserGroup.PLAYER, PreferencesDialog.selectedAvatarId, PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true"), diff --git a/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.form b/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.form index 226f944a8db..be222cd34b6 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.form +++ b/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.form @@ -28,13 +28,13 @@ - + - + @@ -91,9 +91,10 @@ - + + @@ -122,10 +123,7 @@ - - - - + 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 156ea32b0a1..9840c82582b 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/TableWaitingDialog.java @@ -41,7 +41,7 @@ import javax.swing.Icon; import javax.swing.SwingWorker; import javax.swing.table.AbstractTableModel; import mage.client.MageFrame; -import mage.client.chat.ChatPanel; +import mage.client.chat.ChatPanelBasic; import mage.client.components.MageComponents; import mage.client.components.tray.MageTray; import static mage.client.dialog.PreferencesDialog.KEY_TABLE_WAITING_COLUMNS_ORDER; @@ -86,7 +86,7 @@ public class TableWaitingDialog extends MageDialog { this.setSize(prefWidth, prefHeight); } - chatPanel.useExtendedView(ChatPanel.VIEW_MODE.NONE); + chatPanel.useExtendedView(ChatPanelBasic.VIEW_MODE.NONE); tableSeats.createDefaultColumnsFromModel(); TableUtil.setColumnWidthAndOrder(tableSeats, defaultColumnsWidth, KEY_TABLE_WAITING_COLUMNS_WIDTH, KEY_TABLE_WAITING_COLUMNS_ORDER); tableSeats.setDefaultRenderer(Icon.class, new CountryCellRenderer()); @@ -183,7 +183,7 @@ public class TableWaitingDialog extends MageDialog { jSplitPane1 = new javax.swing.JSplitPane(); jScrollPane1 = new javax.swing.JScrollPane(); tableSeats = new javax.swing.JTable(); - chatPanel = new mage.client.chat.ChatPanel(false); + chatPanel = new mage.client.chat.ChatPanelBasic(); setResizable(true); setTitle("Waiting for players"); @@ -219,9 +219,10 @@ public class TableWaitingDialog extends MageDialog { } }); - jSplitPane1.setDividerLocation(320); + jSplitPane1.setDividerLocation(300); jSplitPane1.setDividerSize(3); jSplitPane1.setResizeWeight(1.0); + jSplitPane1.setToolTipText(""); tableSeats.setModel(tableWaitModel); tableSeats.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); @@ -239,12 +240,12 @@ public class TableWaitingDialog extends MageDialog { .addComponent(btnMoveDown) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnMoveUp) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 326, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnStart) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnCancel) .addContainerGap()) - .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 644, Short.MAX_VALUE) + .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -308,7 +309,7 @@ public class TableWaitingDialog extends MageDialog { private javax.swing.JButton btnMoveDown; private javax.swing.JButton btnMoveUp; private javax.swing.JButton btnStart; - private mage.client.chat.ChatPanel chatPanel; + private mage.client.chat.ChatPanelBasic chatPanel; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSplitPane jSplitPane1; private javax.swing.JTable tableSeats; 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 31269b247f4..679cb823d06 100644 --- a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java +++ b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java @@ -53,8 +53,6 @@ import java.util.LinkedList; import java.util.Map; import java.util.Set; import java.util.UUID; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.swing.AbstractAction; import javax.swing.ImageIcon; import javax.swing.JComponent; @@ -82,6 +80,7 @@ import mage.view.DraftPickView; import mage.view.DraftView; import mage.view.SimpleCardView; import mage.view.SimpleCardsView; +import org.apache.log4j.Logger; /** * @@ -89,6 +88,8 @@ import mage.view.SimpleCardsView; */ public class DraftPanel extends javax.swing.JPanel { + private static final Logger logger = Logger.getLogger(DraftPanel.class); + private UUID draftId; private Session session; private Timer countdown; @@ -185,7 +186,7 @@ public class DraftPanel extends javax.swing.JPanel { try { Files.write(pathToDraftLog(), "".getBytes(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); } catch (IOException ex) { - Logger.getLogger(DraftPanel.class.getName()).log(Level.SEVERE, null, ex); + logger.error(null, ex); } } else { logFilename = null; @@ -523,7 +524,7 @@ public class DraftPanel extends javax.swing.JPanel { try { Files.write(pathToDraftLog(), data.getBytes(), StandardOpenOption.APPEND); } catch (IOException ex) { - Logger.getLogger(DraftPanel.class.getName()).log(Level.SEVERE, null, ex); + logger.error(null, ex); } } diff --git a/Mage.Client/src/main/java/mage/client/game/FeedbackPanel.java b/Mage.Client/src/main/java/mage/client/game/FeedbackPanel.java index 2690ef639d3..6b68931c35e 100644 --- a/Mage.Client/src/main/java/mage/client/game/FeedbackPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/FeedbackPanel.java @@ -42,7 +42,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import mage.client.MageFrame; -import mage.client.chat.ChatPanel; +import mage.client.chat.ChatPanelBasic; import mage.client.components.MageTextArea; import mage.client.dialog.MageDialog; import mage.client.util.audio.AudioManager; @@ -71,7 +71,7 @@ public class FeedbackPanel extends javax.swing.JPanel { private Session session; private FeedbackMode mode; private MageDialog connectedDialog; - private ChatPanel connectedChatPanel; + private ChatPanelBasic connectedChatPanel; private int lastMessageId; private static final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor(); @@ -323,7 +323,7 @@ public class FeedbackPanel extends javax.swing.JPanel { return this.mode; } - public void setConnectedChatPanel(ChatPanel chatPanel) { + public void setConnectedChatPanel(ChatPanelBasic chatPanel) { this.connectedChatPanel = chatPanel; } 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 2c969192745..0a44146935b 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -82,7 +82,7 @@ import mage.cards.action.ActionCallback; import mage.choices.Choice; import mage.client.MageFrame; import mage.client.cards.BigCard; -import mage.client.chat.ChatPanel; +import mage.client.chat.ChatPanelBasic; import mage.client.combat.CombatManager; import mage.client.components.HoverButton; import mage.client.components.MageComponents; @@ -1204,12 +1204,12 @@ public final class GamePanel extends javax.swing.JPanel { btnSkipForward = new javax.swing.JButton(); btnPreviousPlay = new javax.swing.JButton(); pnlBattlefield = new javax.swing.JPanel(); - gameChatPanel = new mage.client.chat.ChatPanel(); - gameChatPanel.useExtendedView(ChatPanel.VIEW_MODE.GAME); - userChatPanel = new mage.client.chat.ChatPanel(); + gameChatPanel = new mage.client.chat.ChatPanelBasic(); + gameChatPanel.useExtendedView(ChatPanelBasic.VIEW_MODE.GAME); + userChatPanel = new mage.client.chat.ChatPanelBasic(); userChatPanel.setParentChat(gameChatPanel); - userChatPanel.useExtendedView(ChatPanel.VIEW_MODE.CHAT); - userChatPanel.setChatType(ChatPanel.ChatType.GAME); + userChatPanel.useExtendedView(ChatPanelBasic.VIEW_MODE.CHAT); + userChatPanel.setChatType(ChatPanelBasic.ChatType.GAME); gameChatPanel.setConnectedChat(userChatPanel); gameChatPanel.disableInput(); gameChatPanel.setMinimumSize(new java.awt.Dimension(100, 48)); @@ -2125,9 +2125,9 @@ public final class GamePanel extends javax.swing.JPanel { private javax.swing.JButton btnStopWatching; - private mage.client.chat.ChatPanel gameChatPanel; + private mage.client.chat.ChatPanelBasic gameChatPanel; private mage.client.game.FeedbackPanel feedbackPanel; - private mage.client.chat.ChatPanel userChatPanel; + private mage.client.chat.ChatPanelBasic userChatPanel; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JSplitPane jSplitPane0; diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index ff350409715..347b69c1267 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -108,6 +108,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { private int avatarId = -1; private String flagName; + private String basicTooltipText; private PriorityTimer timer; @@ -159,25 +160,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { public void update(PlayerView player) { this.player = player; - if (flagName == null) { // do only once - avatar.setText(this.player.getName()); - if (!player.getUserData().getFlagName().equals(flagName)) { - flagName = player.getUserData().getFlagName(); - this.avatar.setTopTextImage(CountryUtil.getCountryFlagIcon(flagName).getImage()); - } - // TODO: Add the wins to the tooltiptext of the avatar - String countryname = CountryUtil.getCountryName(flagName); - if (countryname == null) { - countryname = "Unknown"; - } - String tooltip = "Name: " + player.getName() + "
Country: " + countryname; - avatar.setToolTipText(tooltip); - avatar.repaint(); - - // used if avatar image can't be used - this.btnPlayer.setText(player.getName()); - this.btnPlayer.setToolTipText(tooltip); - } + updateAvatar(); int playerLife = player.getLife(); if (playerLife > 99) { Font font = lifeLabel.getFont(); @@ -287,6 +270,39 @@ public class PlayerPanelExt extends javax.swing.JPanel { update(player.getManaPool()); } + /** + * Updates the avatar image and tooltip text + */ + private void updateAvatar() { + if (flagName == null) { // do only once + avatar.setText(this.player.getName()); + if (!player.getUserData().getFlagName().equals(flagName)) { + flagName = player.getUserData().getFlagName(); + this.avatar.setTopTextImage(CountryUtil.getCountryFlagIcon(flagName).getImage()); + } + // TODO: Add the wins to the tooltiptext of the avatar + String countryname = CountryUtil.getCountryName(flagName); + if (countryname == null) { + countryname = "Unknown"; + } + basicTooltipText = "Name: " + player.getName() + + "
Country: " + countryname + + "
Deck hash code: " + player.getDeckHashCode() + + "
Wins: " + player.getWins() + " of " + player.getWinsNeeded() + " (to win the match)"; + } + // Extend tooltip + StringBuilder tooltipText = new StringBuilder(basicTooltipText); + if (player.getExperience() > 0) { + tooltipText.append("
Experience counters: ").append(player.getExperience()); + } + avatar.setToolTipText(tooltipText.toString()); + avatar.repaint(); + + // used if avatar image can't be used + this.btnPlayer.setText(player.getName()); + this.btnPlayer.setToolTipText(tooltipText.toString()); + } + private String getPriorityTimeLeftString(PlayerView player) { int priorityTimeLeft = player.getPriorityTimeLeft(); return getPriorityTimeLeftString(priorityTimeLeft); @@ -802,7 +818,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { } private void btnCommandZoneActionPerformed(java.awt.event.ActionEvent evt) { - DialogManager.getManager(gameId).showEmblemsDialog(CardsViewUtil.convertCommandObject(player.getCommadObjectList()), bigCard, gameId); + DialogManager.getManager(gameId).showEmblemsDialog(CardsViewUtil.convertCommandObject(player.getCommandObjectList()), bigCard, gameId); } private void btnExileZoneActionPerformed(java.awt.event.ActionEvent evt) { diff --git a/Mage.Client/src/main/java/mage/client/plugins/impl/Plugins.java b/Mage.Client/src/main/java/mage/client/plugins/impl/Plugins.java index 733a87391cb..ee1dcbcef4e 100644 --- a/Mage.Client/src/main/java/mage/client/plugins/impl/Plugins.java +++ b/Mage.Client/src/main/java/mage/client/plugins/impl/Plugins.java @@ -58,7 +58,6 @@ public class Plugins implements MagePlugins { pm.addPluginsFrom(new File(PLUGINS_DIRECTORY).toURI()); this.cardPlugin = new CardPluginImpl(); this.counterPlugin = pm.getPlugin(CounterPlugin.class); - //this.themePlugin = pm.getPlugin(ThemePlugin.class); this.themePlugin = new ThemePluginImpl(); logger.info("Done."); } 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 4ace6713242..1ba022d1896 100644 --- a/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java +++ b/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java @@ -33,9 +33,7 @@ import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import mage.cards.decks.Deck; import mage.client.MageFrame; -import mage.client.chat.ChatPanel; -import static mage.client.chat.ChatPanel.ChatType.TABLES; -import static mage.client.chat.ChatPanel.ChatType.TOURNAMENT; +import mage.client.chat.ChatPanelBasic; import mage.client.constants.Constants.DeckEditorMode; import mage.client.draft.DraftPanel; import mage.client.game.GamePanel; @@ -116,9 +114,9 @@ public class CallbackClientImpl implements CallbackClient { break; case "chatMessage": { ChatMessage message = (ChatMessage) callback.getData(); - ChatPanel panel = MageFrame.getChat(callback.getObjectId()); + ChatPanelBasic panel = MageFrame.getChat(callback.getObjectId()); if (panel != null) { - // play the to the message connected sound + // play the sound related to the message if (message.getSoundToPlay() != null) { switch (message.getSoundToPlay()) { case PlayerLeft: @@ -383,9 +381,9 @@ public class CallbackClientImpl implements CallbackClient { }); } - private void createChatStartMessage(ChatPanel chatPanel) { + private void createChatStartMessage(ChatPanelBasic chatPanel) { chatPanel.setStartMessageDone(true); - ChatPanel usedPanel = chatPanel; + ChatPanelBasic usedPanel = chatPanel; if (chatPanel.getConnectedChat() != null) { usedPanel = chatPanel.getConnectedChat(); } diff --git a/Mage.Client/src/main/java/mage/client/chat/ChatPanel.form b/Mage.Client/src/main/java/mage/client/table/PlayersChatPanel.form similarity index 72% rename from Mage.Client/src/main/java/mage/client/chat/ChatPanel.form rename to Mage.Client/src/main/java/mage/client/table/PlayersChatPanel.form index f423543b402..9ef7f54408f 100644 --- a/Mage.Client/src/main/java/mage/client/chat/ChatPanel.form +++ b/Mage.Client/src/main/java/mage/client/table/PlayersChatPanel.form @@ -16,16 +16,14 @@ - - + - + - @@ -43,39 +41,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -119,12 +84,16 @@
+ + + + + + + + + - - - - - diff --git a/Mage.Client/src/main/java/mage/client/table/PlayersChatPanel.java b/Mage.Client/src/main/java/mage/client/table/PlayersChatPanel.java new file mode 100644 index 00000000000..0c96d1588b5 --- /dev/null +++ b/Mage.Client/src/main/java/mage/client/table/PlayersChatPanel.java @@ -0,0 +1,278 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +/* + * ChatPanel.java + * + * Created on 15-Dec-2009, 11:04:31 PM + */ +package mage.client.table; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import javax.swing.Icon; +import javax.swing.table.AbstractTableModel; +import javax.swing.table.JTableHeader; +import javax.swing.table.TableColumnModel; +import mage.client.chat.ChatPanelBasic; +import static mage.client.chat.ChatPanelBasic.CHAT_ALPHA; +import mage.client.chat.ChatPanelSeparated; +import mage.client.components.ColorPane; +import static mage.client.dialog.PreferencesDialog.KEY_USERS_COLUMNS_ORDER; +import static mage.client.dialog.PreferencesDialog.KEY_USERS_COLUMNS_WIDTH; +import mage.client.util.MageTableRowSorter; +import mage.client.util.gui.TableUtil; +import mage.client.util.gui.countryBox.CountryCellRenderer; +import mage.remote.MageRemoteException; +import mage.view.RoomUsersView; +import mage.view.UsersView; + +/** + * + * @author BetaSteward_at_googlemail.com, nantuko + */ +public class PlayersChatPanel extends javax.swing.JPanel { + + private final List players = new ArrayList<>(); + private final UserTableModel userTableModel; + private final ChatPanelSeparated userChatPanel; + private final ColorPane systemMessagesPane; + private static final int[] defaultColumnsWidth = {20, 100, 100, 80, 80}; + + + /* + * Creates new form ChatPanel + * + */ + public PlayersChatPanel() { + userTableModel = new UserTableModel(); // needs to be set before initComponents(); + + initComponents(); + setBackground(new Color(0, 0, 0, CHAT_ALPHA)); + + jTablePlayers.setBackground(new Color(0, 0, 0, CHAT_ALPHA)); + jTablePlayers.setForeground(Color.white); + jTablePlayers.setRowSorter(new MageTableRowSorter(userTableModel)); + + TableUtil.setColumnWidthAndOrder(jTablePlayers, defaultColumnsWidth, KEY_USERS_COLUMNS_WIDTH, KEY_USERS_COLUMNS_ORDER); + jTablePlayers.setDefaultRenderer(Icon.class, new CountryCellRenderer()); + + systemMessagesPane = new ColorPane(); + + userChatPanel = new ChatPanelSeparated(); + userChatPanel.setSystemMessagesPane(systemMessagesPane); + + if (jTabbedPaneText != null) { + jTabbedPaneText.setBackground(new Color(0, 0, 0, CHAT_ALPHA)); + if (userChatPanel != null) { + userChatPanel.setBackground(new Color(0, 0, 0, CHAT_ALPHA)); + jTabbedPaneText.addTab("Talk", userChatPanel); + } + if (systemMessagesPane != null) { + systemMessagesPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + systemMessagesPane.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + systemMessagesPane.setFocusCycleRoot(false); + systemMessagesPane.setMargin(new java.awt.Insets(2, 2, 2, 2)); + systemMessagesPane.setOpaque(false); + systemMessagesPane.setExtBackgroundColor(new Color(0, 0, 0, CHAT_ALPHA)); // Alpha = 255 not transparent + systemMessagesPane.setSelectionColor(Color.LIGHT_GRAY); + jTabbedPaneText.addTab("System", systemMessagesPane); + + } + } + if (jScrollPanePlayers != null) { + + jScrollPanePlayers.setBackground(new Color(0, 0, 0, CHAT_ALPHA)); + jScrollPanePlayers.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA)); + } + } + + public ChatPanelBasic getUserChatPanel() { + return userChatPanel; + } + + public void cleanUp() { + TableUtil.saveColumnWidthAndOrderToPrefs(jTablePlayers, KEY_USERS_COLUMNS_WIDTH, KEY_USERS_COLUMNS_ORDER); + userChatPanel.cleanUp(); + } + + public void setSplitDividerLocation(int location) { + if (jSplitPane1 != null) { + jSplitPane1.setDividerLocation(location); + } + } + + public int getSplitDividerLocation() { + if (jSplitPane1 == null) { + return 0; + } + return this.jSplitPane1.getDividerLocation(); + } + + class UserTableModel extends AbstractTableModel { + + private final String[] columnNames = new String[]{"Loc", "Players", "Info", "Games", "Connection"}; + private UsersView[] players = new UsersView[0]; + + public void loadData(Collection roomUserInfoList) throws MageRemoteException { + RoomUsersView roomUserInfo = roomUserInfoList.iterator().next(); + this.players = roomUserInfo.getUsersView().toArray(new UsersView[0]); + JTableHeader th = jTablePlayers.getTableHeader(); + TableColumnModel tcm = th.getColumnModel(); + + tcm.getColumn(jTablePlayers.convertColumnIndexToView(1)).setHeaderValue("Players (" + this.players.length + ")"); + tcm.getColumn(jTablePlayers.convertColumnIndexToView(3)).setHeaderValue( + "Games " + roomUserInfo.getNumberActiveGames() + + (roomUserInfo.getNumberActiveGames() != roomUserInfo.getNumberGameThreads() ? " (T:" + roomUserInfo.getNumberGameThreads() : " (") + + " limit: " + roomUserInfo.getNumberMaxGames() + ")"); + th.repaint(); + this.fireTableDataChanged(); + } + + @Override + public int getRowCount() { + return players.length; + } + + @Override + public int getColumnCount() { + return columnNames.length; + } + + @Override + public Object getValueAt(int arg0, int arg1) { + switch (arg1) { + case 0: + return players[arg0].getFlagName(); + case 1: + return players[arg0].getUserName(); + case 2: + return players[arg0].getInfoState(); + case 3: + return players[arg0].getInfoGames(); + case 4: + return players[arg0].getInfoPing(); + } + return ""; + } + + @Override + public String getColumnName(int columnIndex) { + String colName = ""; + + if (columnIndex <= getColumnCount()) { + colName = columnNames[columnIndex]; + } + + return colName; + } + + @Override + public Class getColumnClass(int columnIndex) { + switch (columnIndex) { + case 0: + return Icon.class; + default: + return String.class; + } + } + + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + return false; + } + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jSplitPane1 = new javax.swing.JSplitPane(); + jScrollPanePlayers = new javax.swing.JScrollPane(); + jTablePlayers = new javax.swing.JTable(); + jTabbedPaneText = new javax.swing.JTabbedPane(); + + jSplitPane1.setBorder(null); + jSplitPane1.setDividerSize(10); + jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); + jSplitPane1.setResizeWeight(0.25); + + jScrollPanePlayers.setBorder(null); + + jTablePlayers.setModel(this.userTableModel); + jTablePlayers.setToolTipText("Connected players"); + jTablePlayers.setAutoscrolls(false); + jTablePlayers.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + jTablePlayers.setFocusable(false); + jTablePlayers.setGridColor(new java.awt.Color(255, 255, 255)); + jTablePlayers.setOpaque(false); + jTablePlayers.setRequestFocusEnabled(false); + jTablePlayers.setRowSelectionAllowed(false); + jTablePlayers.setUpdateSelectionOnSort(false); + jTablePlayers.setVerifyInputWhenFocusTarget(false); + jScrollPanePlayers.setViewportView(jTablePlayers); + + jSplitPane1.setTopComponent(jScrollPanePlayers); + jSplitPane1.setRightComponent(jTabbedPaneText); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(jSplitPane1) + .addGap(0, 0, 0)) + ); + }// //GEN-END:initComponents + + public void setRoomUserInfo(List> view) { + try { + userTableModel.loadData(view.get(0)); + } catch (Exception ex) { + this.players.clear(); + } + } + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JScrollPane jScrollPanePlayers; + private javax.swing.JSplitPane jSplitPane1; + private javax.swing.JTabbedPane jTabbedPaneText; + private javax.swing.JTable jTablePlayers; + // End of variables declaration//GEN-END:variables +} diff --git a/Mage.Client/src/main/java/mage/client/table/TablesPanel.form b/Mage.Client/src/main/java/mage/client/table/TablesPanel.form index 77d59264027..95b426c7da7 100644 --- a/Mage.Client/src/main/java/mage/client/table/TablesPanel.form +++ b/Mage.Client/src/main/java/mage/client/table/TablesPanel.form @@ -503,7 +503,7 @@ - + @@ -516,7 +516,7 @@ - + @@ -540,7 +540,7 @@ - + @@ -554,7 +554,7 @@ - + @@ -570,21 +570,6 @@ - - - - - - - - - - - - - - - @@ -595,7 +580,7 @@ - + @@ -679,7 +664,14 @@ + + + + + + + - + \ No newline at end of file diff --git a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java index 1a56c2873dc..1fa0b11e792 100644 --- a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java +++ b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java @@ -69,7 +69,7 @@ import javax.swing.SwingWorker; import javax.swing.table.AbstractTableModel; import mage.cards.decks.importer.DeckImporterUtil; import mage.client.MageFrame; -import mage.client.chat.ChatPanel; +import mage.client.chat.ChatPanelBasic; import mage.client.components.MageComponents; import mage.client.dialog.JoinTableDialog; import mage.client.dialog.NewTableDialog; @@ -143,16 +143,16 @@ public class TablesPanel extends javax.swing.JPanel { tableCompleted.setRowSorter(new MageTableRowSorter(matchesModel)); - chatPanel.useExtendedView(ChatPanel.VIEW_MODE.NONE); - chatPanel.setBorder(null); - chatPanel.setChatType(ChatPanel.ChatType.TABLES); + chatPanelMain.getUserChatPanel().useExtendedView(ChatPanelBasic.VIEW_MODE.NONE); + chatPanelMain.getUserChatPanel().setBorder(null); + chatPanelMain.getUserChatPanel().setChatType(ChatPanelBasic.ChatType.TABLES); filterButtons = new JToggleButton[]{btnStateWaiting, btnStateActive, btnStateFinished, btnTypeMatch, btnTypeTourneyConstructed, btnTypeTourneyLimited, btnFormatBlock, btnFormatStandard, btnFormatModern, btnFormatLegacy, btnFormatVintage, btnFormatCommander, btnFormatTinyLeader, btnFormatLimited, btnFormatOther, btnSkillBeginner, btnSkillCasual, btnSkillSerious}; - JComponent[] components = new JComponent[]{chatPanel, jSplitPane1, jScrollPane1, jScrollPane2, topPanel, jPanel3}; + JComponent[] components = new JComponent[]{chatPanelMain, jSplitPane1, jScrollPane1, jScrollPane2, topPanel, jPanel3}; for (JComponent component : components) { component.setOpaque(false); } @@ -274,7 +274,7 @@ public class TablesPanel extends javax.swing.JPanel { public void cleanUp() { saveSettings(); - chatPanel.cleanUp(); + chatPanelMain.cleanUp(); } private void saveDividerLocations() { @@ -284,7 +284,7 @@ public class TablesPanel extends javax.swing.JPanel { PreferencesDialog.saveValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, sb); PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_1, Integer.toString(this.jSplitPane1.getDividerLocation())); PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2, Integer.toString(this.jSplitPane2.getDividerLocation())); - PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3, Integer.toString(chatPanel.getSplitDividerLocation())); + PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3, Integer.toString(chatPanelMain.getSplitDividerLocation())); } private void restoreSettings() { @@ -333,8 +333,8 @@ public class TablesPanel extends javax.swing.JPanel { } } location = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3, null); - if (location != null && chatPanel != null) { - chatPanel.setSplitDividerLocation(Integer.parseInt(location)); + if (location != null && chatPanelMain != null) { + chatPanelMain.setSplitDividerLocation(Integer.parseInt(location)); } } } @@ -376,7 +376,7 @@ public class TablesPanel extends javax.swing.JPanel { updateTablesTask.execute(); } if (updatePlayersTask == null || updatePlayersTask.isDone()) { - updatePlayersTask = new UpdatePlayersTask(session, roomId, this.chatPanel); + updatePlayersTask = new UpdatePlayersTask(session, roomId, this.chatPanelMain); updatePlayersTask.execute(); } if (this.btnStateFinished.isSelected()) { @@ -426,7 +426,7 @@ public class TablesPanel extends javax.swing.JPanel { MageFrame.getDesktop().add(joinTableDialog, JLayeredPane.MODAL_LAYER); } if (chatRoomId != null) { - this.chatPanel.connect(chatRoomId); + this.chatPanelMain.getUserChatPanel().connect(chatRoomId); startTasks(); this.setVisible(true); this.repaint(); @@ -461,7 +461,7 @@ public class TablesPanel extends javax.swing.JPanel { } else { this.jPanel2.setVisible(true); this.jLabel2.setText(serverMessages.get(0)); - this.jButton1.setVisible(serverMessages.size() > 1); + this.jButtonNext.setVisible(serverMessages.size() > 1); } } @@ -473,7 +473,7 @@ public class TablesPanel extends javax.swing.JPanel { } } stopTasks(); - this.chatPanel.disconnect(); + this.chatPanelMain.getUserChatPanel().disconnect(); Component c = this.getParent(); while (c != null && !(c instanceof TablesPane)) { @@ -484,8 +484,8 @@ public class TablesPanel extends javax.swing.JPanel { } } - public ChatPanel getChatPanel() { - return this.chatPanel; + public ChatPanelBasic getChatPanel() { + return chatPanelMain.getUserChatPanel(); } private void setTableFilter() { @@ -501,7 +501,7 @@ public class TablesPanel extends javax.swing.JPanel { // type List> typeFilterList = new ArrayList<>(); if (btnTypeMatch.isSelected()) { - typeFilterList.add(RowFilter.regexFilter("Two|Commander|Free|Tiny", TableTableModel.COLUMN_GAME_TYPE)); + typeFilterList.add(RowFilter.regexFilter("Two|Commander|Free|Tiny|Momir", TableTableModel.COLUMN_GAME_TYPE)); } if (btnTypeTourneyConstructed.isSelected()) { typeFilterList.add(RowFilter.regexFilter("Constructed", TableTableModel.COLUMN_GAME_TYPE)); @@ -537,7 +537,7 @@ public class TablesPanel extends javax.swing.JPanel { formatFilterList.add(RowFilter.regexFilter("^Limited", TableTableModel.COLUMN_DECK_TYPE)); } if (btnFormatOther.isSelected()) { - formatFilterList.add(RowFilter.regexFilter("^Constructed - Pauper|^Constructed - Extended|^Constructed - Historical|^Constructed - Super", TableTableModel.COLUMN_DECK_TYPE)); + formatFilterList.add(RowFilter.regexFilter("^Momir Basic|^Constructed - Pauper|^Constructed - Extended|^Constructed - Historical|^Constructed - Super", TableTableModel.COLUMN_DECK_TYPE)); } List> skillFilterList = new ArrayList<>(); @@ -628,15 +628,15 @@ public class TablesPanel extends javax.swing.JPanel { jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); - jButton1 = new javax.swing.JButton(); + jButtonNext = new javax.swing.JButton(); jSplitPane1 = new javax.swing.JSplitPane(); - chatPanel = new mage.client.chat.ChatPanel(true); jPanel3 = new javax.swing.JPanel(); jSplitPane2 = new javax.swing.JSplitPane(); jScrollPane1 = new javax.swing.JScrollPane(); tableTables = new javax.swing.JTable(); jScrollPane2 = new javax.swing.JScrollPane(); tableCompleted = new javax.swing.JTable(); + chatPanelMain = new mage.client.table.PlayersChatPanel(); topPanel.setBackground(java.awt.Color.white); topPanel.setOpaque(false); @@ -1022,13 +1022,13 @@ public class TablesPanel extends javax.swing.JPanel { jLabel2.setText("You are playing Mage version 0.7.5. Welcome! -- Mage dev team --"); - jButton1.setText("Next"); - jButton1.setMaximumSize(new java.awt.Dimension(55, 25)); - jButton1.setMinimumSize(new java.awt.Dimension(55, 25)); - jButton1.setPreferredSize(new java.awt.Dimension(55, 25)); - jButton1.addActionListener(new java.awt.event.ActionListener() { + jButtonNext.setText("Next"); + jButtonNext.setMaximumSize(new java.awt.Dimension(55, 25)); + jButtonNext.setMinimumSize(new java.awt.Dimension(55, 25)); + jButtonNext.setPreferredSize(new java.awt.Dimension(55, 25)); + jButtonNext.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton1ActionPerformed(evt); + jButtonNextActionPerformed(evt); } }); @@ -1037,7 +1037,7 @@ public class TablesPanel extends javax.swing.JPanel { jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() - .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButtonNext, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -1048,7 +1048,7 @@ public class TablesPanel extends javax.swing.JPanel { jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButtonNext, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(jLabel1)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) @@ -1058,9 +1058,6 @@ public class TablesPanel extends javax.swing.JPanel { jSplitPane1.setDividerSize(10); jSplitPane1.setResizeWeight(1.0); - chatPanel.setMinimumSize(new java.awt.Dimension(100, 43)); - jSplitPane1.setRightComponent(chatPanel); - jSplitPane2.setBorder(null); jSplitPane2.setDividerSize(10); jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); @@ -1085,7 +1082,7 @@ public class TablesPanel extends javax.swing.JPanel { jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 798, Short.MAX_VALUE) + .addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 810, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1093,6 +1090,7 @@ public class TablesPanel extends javax.swing.JPanel { ); jSplitPane1.setLeftComponent(jPanel3); + jSplitPane1.setRightComponent(chatPanelMain); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); @@ -1154,7 +1152,7 @@ public class TablesPanel extends javax.swing.JPanel { newTableDialog.showDialog(roomId); }//GEN-LAST:event_btnNewTableActionPerformed - private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + private void jButtonNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNextActionPerformed synchronized (this) { if (messages != null && !messages.isEmpty()) { currentMessage++; @@ -1164,7 +1162,7 @@ public class TablesPanel extends javax.swing.JPanel { this.jLabel2.setText(messages.get(currentMessage)); } } - }//GEN-LAST:event_jButton1ActionPerformed + }//GEN-LAST:event_jButtonNextActionPerformed private void btnFilterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFilterActionPerformed setTableFilter(); @@ -1206,10 +1204,10 @@ public class TablesPanel extends javax.swing.JPanel { private javax.swing.JToggleButton btnTypeMatch; private javax.swing.JToggleButton btnTypeTourneyConstructed; private javax.swing.JToggleButton btnTypeTourneyLimited; - private mage.client.chat.ChatPanel chatPanel; + private mage.client.table.PlayersChatPanel chatPanelMain; private javax.swing.JToolBar filterBar1; private javax.swing.JToolBar filterBar2; - private javax.swing.JButton jButton1; + private javax.swing.JButton jButtonNext; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JPanel jPanel2; @@ -1413,11 +1411,11 @@ class UpdatePlayersTask extends SwingWorker> { private final Session session; private final UUID roomId; - private final ChatPanel chat; + private final PlayersChatPanel chat; private static final Logger logger = Logger.getLogger(UpdatePlayersTask.class); - UpdatePlayersTask(Session session, UUID roomId, ChatPanel chat) { + UpdatePlayersTask(Session session, UUID roomId, PlayersChatPanel chat) { this.session = session; this.roomId = roomId; this.chat = chat; diff --git a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.form b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.form index 7be5a2a059a..11305f2904d 100644 --- a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.form +++ b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.form @@ -349,10 +349,7 @@ - - - - + diff --git a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java index 576bdbf4cf0..9c50628a9c2 100644 --- a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java +++ b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java @@ -49,7 +49,7 @@ import javax.swing.JOptionPane; import javax.swing.SwingWorker; import javax.swing.table.AbstractTableModel; import mage.client.MageFrame; -import mage.client.chat.ChatPanel; +import mage.client.chat.ChatPanelBasic; import mage.client.dialog.PreferencesDialog; import static mage.client.dialog.PreferencesDialog.KEY_TOURNAMENT_MATCH_COLUMNS_ORDER; import static mage.client.dialog.PreferencesDialog.KEY_TOURNAMENT_MATCH_COLUMNS_WIDTH; @@ -105,8 +105,8 @@ public class TournamentPanel extends javax.swing.JPanel { tableMatches.createDefaultColumnsFromModel(); TableUtil.setColumnWidthAndOrder(tableMatches, defaultColumnsWidthMatches, KEY_TOURNAMENT_MATCH_COLUMNS_WIDTH, KEY_TOURNAMENT_MATCH_COLUMNS_ORDER); - chatPanel1.useExtendedView(ChatPanel.VIEW_MODE.NONE); - chatPanel1.setChatType(ChatPanel.ChatType.TOURNAMENT); + chatPanel1.useExtendedView(ChatPanelBasic.VIEW_MODE.NONE); + chatPanel1.setChatType(ChatPanelBasic.ChatType.TOURNAMENT); Action action = new AbstractAction() { @Override @@ -317,7 +317,7 @@ public class TournamentPanel extends javax.swing.JPanel { tablePlayers = new javax.swing.JTable(); jScrollPane2 = new javax.swing.JScrollPane(); tableMatches = new javax.swing.JTable(); - chatPanel1 = new mage.client.chat.ChatPanel(); + chatPanel1 = new mage.client.chat.ChatPanelBasic(); setPreferredSize(new java.awt.Dimension(908, 580)); @@ -484,8 +484,6 @@ public class TournamentPanel extends javax.swing.JPanel { jSplitPane1.setBottomComponent(jScrollPane2); jSplitPane2.setLeftComponent(jSplitPane1); - - chatPanel1.setStartMessageDone(true); jSplitPane2.setRightComponent(chatPanel1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); @@ -524,7 +522,7 @@ public class TournamentPanel extends javax.swing.JPanel { private javax.swing.JPanel actionPanel; private javax.swing.JButton btnCloseWindow; private javax.swing.JButton btnQuitTournament; - private mage.client.chat.ChatPanel chatPanel1; + private mage.client.chat.ChatPanelBasic chatPanel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JSplitPane jSplitPane1; diff --git a/Mage.Client/src/main/java/mage/client/unusedFiles/CombatDialog.java b/Mage.Client/src/main/java/mage/client/unusedFiles/CombatDialog.java index b5fc4b3ffd3..57a0b6cf80e 100644 --- a/Mage.Client/src/main/java/mage/client/unusedFiles/CombatDialog.java +++ b/Mage.Client/src/main/java/mage/client/unusedFiles/CombatDialog.java @@ -36,7 +36,6 @@ package mage.client.unusedFiles; import mage.client.cards.BigCard; -import mage.client.unusedFiles.CombatGroup; import mage.view.CombatGroupView; import javax.swing.*; @@ -44,9 +43,8 @@ import java.awt.*; import java.beans.PropertyVetoException; import java.util.List; import java.util.UUID; -import java.util.logging.Level; -import java.util.logging.Logger; import mage.client.dialog.MageDialog; +import org.apache.log4j.Logger; /** * @@ -54,6 +52,8 @@ import mage.client.dialog.MageDialog; */ public class CombatDialog extends MageDialog { + private static final Logger logger = Logger.getLogger(CombatDialog.class); + private UUID gameId; private BigCard bigCard; private int lastX = 500; @@ -100,7 +100,7 @@ public class CombatDialog extends MageDialog { try { this.setSelected(true); } catch (PropertyVetoException ex) { - Logger.getLogger(CombatDialog.class.getName()).log(Level.SEVERE, null, ex); + logger.error(null, ex); } pack(); this.revalidate(); diff --git a/Mage.Client/src/main/java/mage/client/util/DeckUtil.java b/Mage.Client/src/main/java/mage/client/util/DeckUtil.java index 1b240c389ce..930b1c777db 100644 --- a/Mage.Client/src/main/java/mage/client/util/DeckUtil.java +++ b/Mage.Client/src/main/java/mage/client/util/DeckUtil.java @@ -43,7 +43,7 @@ import org.apache.log4j.Logger; */ public class DeckUtil { - private static final transient Logger log = Logger.getLogger(DeckUtil.class); + private static final Logger log = Logger.getLogger(DeckUtil.class); private DeckUtil() { } 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 9e9dd416a29..a27a48f1a3a 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 @@ -303,7 +303,7 @@ public class AudioManager { private static void checkAndPlayClip(MageClip mageClip) { try { - if (mageClip != null) { + if (mageClip != null && mageClip.getClip() != null) { boolean playSound = false; switch (mageClip.getAudioGroup()) { case GameSounds: diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/CardPluginImpl.java b/Mage.Client/src/main/java/org/mage/plugins/card/CardPluginImpl.java index 7c99afe5997..6dd83a15359 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/CardPluginImpl.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/CardPluginImpl.java @@ -81,6 +81,7 @@ public class CardPluginImpl implements CardPlugin { @PluginLoaded public void newPlugin(CardPlugin plugin) { + log.info(plugin.toString() + " has been loaded."); } @Override 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 497bc1c1883..b84f07cc1ad 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 @@ -9,7 +9,7 @@ import org.mage.plugins.card.images.CardDownloadData; public interface CardImageSource { String generateURL(CardDownloadData card) throws Exception; - String generateTokenUrl(CardDownloadData card); + String generateTokenUrl(CardDownloadData card) throws Exception; String getSourceName(); Float getAverageSize(); } 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 68877f48eb8..42780067467 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 @@ -16,6 +16,13 @@ public class MagicCardsImageSource implements CardImageSource { private static final Map setNameTokenReplacement = new HashMap() { { + put("CMA", "commanders-arsenal"); + put("ARENA", "arena-league"); + put("CP", "champs"); + put("UGIN", "ugins-fate"); + put("APAC", "asia-pacific-land-program"); + put("EURO", "european-land-program"); + put("SUS", "super-series"); put("C15", "commander-2015"); put("ORG", "oath-of-the-gatewatch"); put("EXP", "zendikar-expeditions"); @@ -157,7 +164,12 @@ public class MagicCardsImageSource implements CardImageSource { @Override public String generateTokenUrl(CardDownloadData card) { - String name = card.getName().replaceAll(" ", "-").replace(",", "").toLowerCase(); + String name = card.getName(); + // add type to name if it's not 0 + if (card.getType() > 0) { + name = name + " " + card.getType(); + } + name = name.replaceAll(" ", "-").replace(",", "").toLowerCase(); String set = "not-supported-set"; if (setNameTokenReplacement.containsKey(card.getSet())) { set = setNameTokenReplacement.get(card.getSet()); 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 new file mode 100644 index 00000000000..fbdfb89d912 --- /dev/null +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/TokensMtgImageSource.java @@ -0,0 +1,324 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation 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.apache.log4j.Logger; +import org.mage.plugins.card.images.CardDownloadData; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * + * @author Quercitron + */ +public class TokensMtgImageSource implements CardImageSource { + + private static final Logger logger = Logger.getLogger(TokensMtgImageSource.class); + + private static CardImageSource instance = new TokensMtgImageSource(); + + public static CardImageSource getInstance() { + if (instance == null) { + instance = new TokensMtgImageSource(); + } + return instance; + } + + @Override + public String getSourceName() { + return "tokens.mtg.onl"; + } + + @Override + public Float getAverageSize() { + return 26.7f; + } + + @Override + public String generateURL(CardDownloadData card) throws Exception { + return null; + } + + private static final String[] EMBLEMS = { + "Ajani", + "Chandra", + "Dack", + "Daretti", + "Domri", + "Elspeth", + "Garruk", + "Gideon", + "Jace", + "Kiora", + "Koth", + "Liliana", + "Narset", + "Nixilis", + "Sarkhan", + "Sorin", + "Tamiyo", + "Teferi", + "Venser", + }; + + private static final Map SET_NAMES_REPLACEMENT = new HashMap() { + { + put("con", "CFX"); + put("fnmp", "FNM"); + } + }; + + @Override + public String generateTokenUrl(CardDownloadData card) throws IOException { + String name = card.getName(); + String set = card.getSet(); + int type = card.getType(); + + // handle emblems + if (name.toLowerCase().contains("emblem")) { + for (String emblem : EMBLEMS) { + if (name.toLowerCase().contains(emblem.toLowerCase())){ + name = emblem + " Emblem"; + break; + } + } + } + + // we should replace some set names + if (SET_NAMES_REPLACEMENT.containsKey(set.toLowerCase())) { + set = SET_NAMES_REPLACEMENT.get(set.toLowerCase()); + } + + // Image URL contains token number + // 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 tokensData = getTokensData(); + + if (tokensData.isEmpty()) { + return null; + } + + List matchedTokens = new ArrayList(); + for (TokenData token : tokensData) { + if (name.equalsIgnoreCase(token.getName()) && set.equalsIgnoreCase(token.getExpansionSetCode())) { + matchedTokens.add(token); + } + } + + 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) { + logger.info("Multiple images were found for token " + name + ", set " + set + "."); + } + tokenData = matchedTokens.get(0); + } else { + if (type > matchedTokens.size()) { + logger.warn("Not enough images for token with type " + type + ", name " + name + ", set " + set + "."); + return null; + } + tokenData = matchedTokens.get(card.getType() - 1); + } + + String url = "http://tokens.mtg.onl/tokens/" + tokenData.getExpansionSetCode().trim() + "_" + + tokenData.getNumber().trim() + "-" + tokenData.getName().trim()+ ".jpg"; + url = url.replace(' ', '-'); + return url; + } + + private List tokensData; + + private final Object tokensDataSync = new Object(); + + private List getTokensData() throws IOException { + if (tokensData == null) { + synchronized (tokensDataSync) { + if (tokensData == null) { + tokensData = new ArrayList(); + + // get tokens data from resource file + InputStream inputStream = null; + try { + inputStream = this.getClass().getResourceAsStream("/tokens-mtg-onl-list.csv"); + List fileTokensData = parseTokensData(inputStream); + tokensData.addAll(fileTokensData); + } catch (Exception exception) { + logger.warn("Failed to get tokens description from resource file tokens-mtg-onl-list.csv", exception); + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } catch (Exception e) { + logger.error("Input stream close failed:", e); + } + } + } + + // description on site may contain new information + // try to add it + try { + URL url = new URL("http://tokens.mtg.onl/data/SetsWithTokens.csv"); + 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; + } + } + if (isNew) { + newTokensData.add(siteData); + } + } + + tokensData.addAll(newTokensData); + } catch (Exception exception) { + logger.warn("Failed to get tokens description from tokens.mtg.onl", exception); + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } catch (Exception e) { + logger.error("Input stream close failed:", e); + } + } + } + } + } + } + + return tokensData; + } + + private List parseTokensData(InputStream inputStream) throws IOException { + List tokensData = new ArrayList(); + + InputStreamReader inputReader = null; + BufferedReader reader = null; + try { + // we have to specify encoding to read special comma + inputReader = new InputStreamReader(inputStream, "Cp1252"); + reader = new BufferedReader(inputReader); + + reader.readLine(); // skip header + String line = reader.readLine(); + // states + // 0 - wait set name + // 1 - wait cards + // 2 - process cards + int state = 0; + String set = null; + while (line != null) { + if (line.trim().isEmpty()) { + if (state == 2) { + state = 0; + } + } else { + if (state == 0) { + set = line.substring(0, 3); + state = 1; + } else { + if (state == 1) { + state = 2; + } + String[] split = line.split(","); + // replace special comma for cards like 'Ashaya‚ the Awoken World' + String name = split[0].replace('‚', ','); + String number = split[1]; + TokenData token = new TokenData(name, number, set); + tokensData.add(token); + } + } + + line = reader.readLine(); + } + } finally { + if (inputReader != null) { + try { + inputReader.close(); + } catch (Exception e) { + logger.error("Input reader close failed:", e); + } + } + if (reader != null) { + try { + reader.close(); + } catch (Exception e) { + logger.error("Buffered reader close failed:", e); + } + } + } + + return tokensData; + } + + final class TokenData { + final private String name; + final private String number; + final private String expansionSetCode; + + public TokenData(String name, String number, String expansionSetCode) { + this.name = name; + this.number = number; + this.expansionSetCode = expansionSetCode; + } + + public String getName() { + return name; + } + + public String getNumber() { + return number; + } + + public String getExpansionSetCode() { + return expansionSetCode; + } + } + +} 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 4467e0ab2af..fae3f0ca071 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 @@ -49,17 +49,12 @@ 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.SOCKS; import net.java.truevfs.access.TFile; import net.java.truevfs.access.TFileOutputStream; import net.java.truevfs.access.TVFS; import net.java.truevfs.kernel.spec.FsSyncException; import org.apache.log4j.Logger; -import org.mage.plugins.card.dl.sources.CardImageSource; -import org.mage.plugins.card.dl.sources.MagicCardsImageSource; -import org.mage.plugins.card.dl.sources.MythicspoilerComSource; -import org.mage.plugins.card.dl.sources.WizardCardsImageSource; +import org.mage.plugins.card.dl.sources.*; import org.mage.plugins.card.properties.SettingsManager; import org.mage.plugins.card.utils.CardImageUtils; @@ -140,7 +135,16 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab p0.add(jLabel1); p0.add(Box.createVerticalStrut(5)); - ComboBoxModel jComboBox1Model = new DefaultComboBoxModel(new String[] { "magiccards.info", "wizards.com", "mythicspoiler.com" /*, "mtgimage.com (HQ)" , "mtgathering.ru HQ", "mtgathering.ru MQ", "mtgathering.ru LQ"*/}); + ComboBoxModel jComboBox1Model = new DefaultComboBoxModel(new String[] { + "magiccards.info", + "wizards.com", + "mythicspoiler.com", + "tokens.mtg.onl", + //"mtgimage.com (HQ)", + //"mtgathering.ru HQ", + //"mtgathering.ru MQ", + //"mtgathering.ru LQ", + }); jComboBox1 = new JComboBox(); cardImageSource = MagicCardsImageSource.getInstance(); @@ -161,6 +165,9 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab case 2: cardImageSource = MythicspoilerComSource.getInstance(); break; + case 3: + cardImageSource = TokensMtgImageSource.getInstance(); + break; } int count = DownloadPictures.this.cards.size(); float mb = (count * cardImageSource.getAverageSize()) / 1024; @@ -221,7 +228,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab // JOptionPane Object[] options = { startDownloadButton, closeButton = new JButton("Cancel") }; - dlg = new JOptionPane(p0, JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[1]); + dlg = new JOptionPane(p0, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[1]); } public static boolean checkForNewCards(List allCards) { @@ -363,23 +370,27 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab while (line != null) { line = line.trim(); if (line.startsWith("|")) { // new format - String[] params = line.split("\\|"); - if (params.length >= 4) { + String[] params = line.split("\\|", -1); + if (params.length >= 5) { + int type = 0; + if (params[4] != null && ! params[4].isEmpty()) { + type = Integer.parseInt(params[4].trim()); + } if (params[1].toLowerCase().equals("generate") && params[2].startsWith("TOK:")) { String set = params[2].substring(4); - CardDownloadData card = new CardDownloadData(params[3], set, 0, false, 0, "", true); + CardDownloadData card = new CardDownloadData(params[3], set, 0, false, type, "", true); list.add(card); } else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM:")) { String set = params[2].substring(7); - CardDownloadData card = new CardDownloadData("Emblem " + params[3], set, 0, false,0, "", true); + CardDownloadData card = new CardDownloadData("Emblem " + params[3], set, 0, false, type, "", true); list.add(card); } else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM-:")) { String set = params[2].substring(8); - CardDownloadData card = new CardDownloadData(params[3] + " Emblem", set, 0, false, 0, "", true); + CardDownloadData card = new CardDownloadData(params[3] + " Emblem", set, 0, false, type, "", true); list.add(card); } else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM!:")) { String set = params[2].substring(8); - CardDownloadData card = new CardDownloadData(params[3], set, 0, false, 0, "", true); + CardDownloadData card = new CardDownloadData(params[3], set, 0, false, type, "", true); list.add(card); } } else { diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 4421bbb0c39..cdd9a2fa5cb 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1,506 +1,601 @@ -#Generate|TOK:BFZ|Dragon| -#Generate|TOK:BFZ|Eldrazi| -#Generate|TOK:BFZ|Eldrazi Scion 1| -#Generate|TOK:BFZ|Eldrazi Scion 2| -#Generate|TOK:BFZ|Eldrazi Scion 3| -#Generate|TOK:BFZ|Elemental 1| -#Generate|TOK:BFZ|Elemental 2| -#Generate|TOK:BFZ|Knight Ally| -#Generate|TOK:BFZ|Kor Ally| -#Generate|TOK:BFZ|Octopus| -#Generate|TOK:BFZ|Plant| -#|Generate|EMBLEM!:BFZ|Emblem Gideon, Ally of Zendikar| -#|Generate|EMBLEM!:BFZ|Emblem Kiora, Master of the Depths| -#|Generate|EMBLEM!:BFZ|Emblem Ob Nixilis Reignited| - -#Generate|TOK:DDP|Eldrazi Spawn 1| -#Generate|TOK:DDP|Eldrazi Spawn 2| -#Generate|TOK:DDP|Eldrazi Spawn 3| -#Generate|TOK:DDP|Hellion| -#Generate|TOK:DDP|Plant| - -#Generate|TOK:MM2|Eldrazi Spawn 1| -#Generate|TOK:MM2|Eldrazi Spawn 2| -#Generate|TOK:MM2|Eldrazi Spawn 3| -#Generate|TOK:MM2|Elephant| -#Generate|TOK:MM2|Faerie Rogue| -#Generate|TOK:MM2|Germ| -#Generate|TOK:MM2|Golem| -#Generate|TOK:MM2|Insect| -#Generate|TOK:MM2|Myr| -#Generate|TOK:MM2|Saproling| -#Generate|TOK:MM2|Snake| -#Generate|TOK:MM2|Soldier| -#Generate|TOK:MM2|Spirit| -#Generate|TOK:MM2|Thrull| -#Generate|TOK:MM2|Wolf| -#Generate|TOK:MM2|Wurm| - -#Generate|TOK:TPR|Goblin| -#Generate|TOK:TPR|Pegasus| -#Generate|TOK:TPR|Rat| -#Generate|TOK:TPR|Reflection| -#Generate|TOK:TPR|Saproling| -#Generate|TOK:TPR|Sliver| -#Generate|TOK:TPR|Spike| -#Generate|TOK:TPR|Spirit| -#Generate|TOK:TPR|Thopter| -#Generate|TOK:TPR|Zombie| - -#|Generate|TOK:ORI|Ashaya, the Awoken World| -#|Generate|TOK:ORI|Angel| -#|Generate|TOK:ORI|Demon| -#|Generate|TOK:ORI|Elemental| -#|Generate|TOK:ORI|Elf Warrior| -#|Generate|TOK:ORI|Goblin| -#|Generate|TOK:ORI|Knight| -#|Generate|TOK:ORI|Soldier| -#|Generate|TOK:ORI|Thopter 1| -#|Generate|TOK:ORI|Thopter 2| -#|Generate|TOK:ORI|Zombie| -#|Generate|EMBLEM!:ORI|Emblem Chandra, Roaring Flame| -#|Generate|EMBLEM!:ORI|Emblem Jace, Telepath Unbound| -#|Generate|EMBLEM!:ORI|Emblem Liliana, Defiant Necromancer| - -#|Generate|TOK:PTC|Angel| -#|Generate|TOK:PTC|Avatar| -#|Generate|TOK:PTC|Beast| -#|Generate|TOK:PTC|Dragon| -#|Generate|TOK:PTC|Elemental| -#|Generate|TOK:PTC|Harpy| -#|Generate|TOK:PTC|Hippo| -#|Generate|TOK:PTC|Soldier| -#|Generate|TOK:PTC|Wolf| -#|Generate|TOK:PTC|Wurm| - -|Generate|TOK:DTK|Djinn Monk| -|Generate|TOK:DTK|Dragon| -|Generate|TOK:DTK|Goblin| -|Generate|TOK:DTK|Morph| -|Generate|TOK:DTK|Warrior| -|Generate|TOK:DTK|Zombie| -|Generate|TOK:DTK|Zombie Horror| -|Generate|EMBLEM!:DTK|Emblem Narset| - -|Generate|TOK:FRF|Monk| -|Generate|TOK:FRF|Spirit| -|Generate|TOK:FRF|Warrior| -|Generate|TOK:FRF|Manifest| - -#|Generate|TOK:GRC|Bird| -#|Generate|TOK:GRC|Golem| -#|Generate|TOK:GRC|Human| -#|Generate|TOK:GRC|Myr| -#|Generate|TOK:GRC|Saproling| - -#|Generate|TOK:MBP:Beast| -#|Generate|TOK:MBP|Cat| -#|Generate|TOK:MBP|Dragon| -#|Generate|TOK:MBP|Elephant| -#|Generate|TOK:MBP|Goblin| -#|Generate|TOK:MBP|Zombie| - -#|Generate|TOK:MLP|Thopter| - -#|Generate|TOK:WMCQ|Angel| - -#|Generate|TOK:GPX|Elephant| -#|Generate|TOK:GPX|Germ| - -#|Generate|TOK:JR|Angel| -#|Generate|TOK:JR|Faerie Rogue| -#|Generate|TOK:JR|Soldier| -#|Generate|TOK:JR|Squirrel| - -#|Generate|TOK:MGDC|Centaur| -#|Generate|TOK:MGDC|Knight| -#|Generate|TOK:MGDC|Rhino| -#|Generate|TOK:MGDC|Sliver| - -#|Generate|TOK:FNMP|Centaur| -|Generate|TOK:FNMP|Human| -|Generate|TOK:FNMP|Wolf| -#|Generate|TOK:FNMP|Wurm| - -|Generate|TOK:C14|Angel| -|Generate|TOK:C14|Cat| -|Generate|TOK:C14|Goat| -|Generate|TOK:C14|Kor Soldier| -|Generate|TOK:C14|Pegasus| -|Generate|TOK:C14|Soldier| -|Generate|TOK:C14|Spirit| -|Generate|TOK:C14|Fish| -|Generate|TOK:C14|Kraken| -|Generate|TOK:C14|Whale| -|Generate|TOK:C14|Zombie 1| -|Generate|TOK:C14|Demon 1| -|Generate|TOK:C14|Demon 2| -|Generate|TOK:C14|Germ| -|Generate|TOK:C14|Horror| -|Generate|TOK:C14|Zombie 2| -|Generate|TOK:C14|Goblin| -|Generate|TOK:C14|Ape| -|Generate|TOK:C14|Beast 1| -|Generate|TOK:C14|Beast 2| -|Generate|TOK:C14|Elemental| -|Generate|TOK:C14|Elephant| -|Generate|TOK:C14|Elf Druid| -|Generate|TOK:C14|Elf Warrior| -|Generate|TOK:C14|Treefolk| -|Generate|TOK:C14|Wolf| -|Generate|TOK:C14|Gargoyle| -|Generate|TOK:C14|Myr| -|Generate|TOK:C14|Pentavite| -|Generate|TOK:C14|Stoneforged Blade| -|Generate|TOK:C14|Tuktuk the Returned| -|Generate|TOK:C14|Wurm 1| -|Generate|TOK:C14|Wurm 2| -|Generate|EMBLEM!:C14|Emblem Teferi -|Generate|EMBLEM!:C14|Emblem Nixilis -|Generate|EMBLEM!:C14|Emblem Daretti - - -|Generate|TOK:DDN|Goblin| - -|Generate|TOK:KTK|Bear| -|Generate|TOK:KTK|Bird| -|Generate|TOK:KTK|Goblin| -|Generate|TOK:KTK|Morph| -|Generate|TOK:KTK|Snake| -|Generate|TOK:KTK|Spirit Warrior| -|Generate|TOK:KTK|Spirit| -|Generate|TOK:KTK|Vampire| -|Generate|TOK:KTK|Warrior 1| -|Generate|TOK:KTK|Warrior 2| -|Generate|TOK:KTK|Zombie| -|Generate|EMBLEM!:KTK|Emblem Sarkhan| -|Generate|EMBLEM!:KTK|Emblem Sorin| - -|Generate|TOK:M15|Sliver| -|Generate|TOK:M15|Soldier| -|Generate|TOK:M15|Zombie| -|Generate|TOK:M15|Goblin| -|Generate|TOK:M15|Beast 1| -|Generate|TOK:M15|Insect| -|Generate|TOK:M15|Spirit| -|Generate|TOK:M15|Squid| -|Generate|TOK:M15|Beast 2| -|Generate|TOK:M15|Dragon| -|Generate|TOK:M15|Treefolk Warrior| -|Generate|TOK:M15|Land Mine| -|Generate|EMBLEM!:M15|Emblem Ajani| -|Generate|EMBLEM!:M15|Emblem Garruk| - -|Generate|TOK:CNS|Zombie| -|Generate|TOK:CNS|Spirit| -|Generate|TOK:CNS|Demon| -|Generate|TOK:CNS|Ogre| -|Generate|TOK:CNS|Elephant| -|Generate|TOK:CNS|Squirrel| -|Generate|TOK:CNS|Wolf| -|Generate|TOK:CNS|Construct| -|Generate|EMBLEM!:CNS|Emblem Dack Fayden| - -|Generate|TOK:JOU|Sphinx| -|Generate|TOK:JOU|Zombie| -|Generate|TOK:JOU|Minotaur| -|Generate|TOK:JOU|Hydra| -|Generate|TOK:JOU|Spider| -|Generate|TOK:JOU|Snake| - -|Generate|TOK:DDM|Assassin| - -|Generate|TOK:BNG|Bird 1| -|Generate|TOK:BNG|Cat Soldier| -|Generate|TOK:BNG|Soldier| -|Generate|TOK:BNG|Bird 2| -|Generate|TOK:BNG|Kraken| -|Generate|TOK:BNG|Zombie| -|Generate|TOK:BNG|Elemental| -|Generate|TOK:BNG|Centaur| -|Generate|TOK:BNG|Wolf| -|Generate|TOK:BNG|Gold| -|Generate|EMBLEM:BNG|Kiora, the Crashing Wave| - -|Generate|TOK:M14|Sliver| -|Generate|TOK:M14|Angel| -|Generate|TOK:M14|Cat| -|Generate|TOK:M14|Goat| -|Generate|TOK:M14|Zombie| -|Generate|TOK:M14|Dragon| -|Generate|TOK:M14|Elemental 1| -|Generate|TOK:M14|Elemental 2| -|Generate|TOK:M14|Beast| -|Generate|TOK:M14|Saproling| -|Generate|TOK:M14|Wolf| -|Generate|EMBLEM:M14|Liliana of the Dark Realms| -|Generate|EMBLEM:M14|Garruk, Caller of Beasts| - -|Generate|TOK:THS|Cleric| -|Generate|TOK:THS|Soldier 1| -|Generate|TOK:THS|Soldier 2| -|Generate|TOK:THS|Bird| -|Generate|TOK:THS|Elemental| -|Generate|TOK:THS|Harpy| -|Generate|TOK:THS|Soldier 3| -|Generate|TOK:THS|Boar| -|Generate|TOK:THS|Satyr| -|Generate|TOK:THS|Golem| -|Generate|EMBLEM-:THS|Elspeth, Suns Champion| - -|Generate|TOK:DDL|Griffin| -|Generate|TOK:DDL|Beast| - -|Generate|TOK:MMA|Giant Warrior| -|Generate|TOK:MMA|Kithkin Soldier| -|Generate|TOK:MMA|Soldier| -|Generate|TOK:MMA|Illusion| -|Generate|TOK:MMA|Bat| -|Generate|TOK:MMA|Goblin Rogue| -|Generate|TOK:MMA|Spider| -|Generate|TOK:MMA|Zombie| -|Generate|TOK:MMA|Dragon| -|Generate|TOK:MMA|Goblin| -|Generate|TOK:MMA|Elemental| -|Generate|TOK:MMA|Saproling| -|Generate|TOK:MMA|Treefolk Shaman| -|Generate|TOK:MMA|Faerie Rogue| -|Generate|TOK:MMA|Worm| -|Generate|EMBLEM:MMA|Elspeth, Knight Errant| - -|Generate|TOK:DGM|Elemental| - -|Generate|TOK:DDK|Spirit| - -|Generate|TOK:GTC|Angel| -|Generate|TOK:GTC|Rat| -|Generate|TOK:GTC|Frog Lizard| -|Generate|TOK:GTC|Cleric| -|Generate|TOK:GTC|Horror| -|Generate|TOK:GTC|Soldier| -|Generate|TOK:GTC|Spirit| -|Generate|EMBLEM:GTC|Domri Rade| - -|Generate|TOK:RTR|Bird| -|Generate|TOK:RTR|Knight| -|Generate|TOK:RTR|Soldier| -|Generate|TOK:RTR|Assassin| -|Generate|TOK:RTR|Dragon| -|Generate|TOK:RTR|Goblin| -|Generate|TOK:RTR|Centaur 1| -|Generate|TOK:RTR|Ooze| -|Generate|TOK:RTR|Rhino| -|Generate|TOK:RTR|Saproling| -|Generate|TOK:RTR|Wurm| -|Generate|TOK:RTR|Elemental| -|Generate|TOK:RTR|Centaur 2| - -|Generate|EMBLEM-:M13|Liliana of the Dark Realms| - -|Generate|TOK:DDJ|Saproling| - -|Generate|TOK:M13|Cat| -|Generate|TOK:M13|Goat| -|Generate|TOK:M13|Soldier| -|Generate|TOK:M13|Drake| -|Generate|TOK:M13|Zombie| -|Generate|TOK:M13|Goblin| -|Generate|TOK:M13|Hellion| -|Generate|TOK:M13|Beast| -|Generate|TOK:M13|Saproling| -|Generate|TOK:M13|Wurm| - -|Generate|EMBLEM:AVR|Tamiyo, the Moon Sage| - -|Generate|TOK:AVR|Angel| -|Generate|TOK:AVR|Human 1| -|Generate|TOK:AVR|Spirit 1| -|Generate|TOK:AVR|Spirit 2| -|Generate|TOK:AVR|Demon| -|Generate|TOK:AVR|Zombie| -|Generate|TOK:AVR|Human 2| - -|Generate|EMBLEM:DDI|Venser, the Sojourner| -|Generate|EMBLEM:DDI|Koth of the Hammer| - -|Generate|TOK:DKA|Human| -|Generate|TOK:DKA|Vampire| - -|Generate|TOK:ISD|Angel| -|Generate|TOK:ISD|Spirit| -|Generate|TOK:ISD|Homunculus| -|Generate|TOK:ISD|Demon| -|Generate|TOK:ISD|Vampire| -|Generate|TOK:ISD|Wolf 1| -|Generate|TOK:ISD|Zombie 1| -|Generate|TOK:ISD|Zombie 2| -|Generate|TOK:ISD|Zombie 3| -|Generate|TOK:ISD|Ooze| -|Generate|TOK:ISD|Spider| -|Generate|TOK:ISD|Wolf 2| - -|Generate|TOK:DDH|Griffin| -|Generate|TOK:DDH|Saproling| - -|Generate|TOK:M12|Bird| -|Generate|TOK:M12|Soldier| -|Generate|TOK:M12|Zombie| -|Generate|TOK:M12|Beast| -|Generate|TOK:M12|Saproling| -|Generate|TOK:M12|Wurm| -|Generate|TOK:M12|Pentavite| - -|Generate|TOK:NPH|Beast| -|Generate|TOK:NPH|Beast| -|Generate|TOK:NPH|Goblin| -|Generate|TOK:NPH|Golem| -|Generate|TOK:NPH|Myr| - -|Generate|TOK:DDG|Goblin| - -|Generate|TOK:MBS|Germ| -|Generate|TOK:MBS|Zombie| -|Generate|TOK:MBS|Golem| -|Generate|TOK:MBS|Horror| -|Generate|TOK:MBS|Thopter| -|Generate|TOK:MBS|Zombie| -|Generate|TOK:MBS|Zombie| - -|Generate|TOK:DDF|Soldier| - -|Generate|TOK:SOM|Cat| -|Generate|TOK:SOM|Soldier| -|Generate|TOK:SOM|Goblin| -|Generate|TOK:SOM|Insect| -|Generate|TOK:SOM|Wolf| -|Generate|TOK:SOM|Golem| -|Generate|TOK:SOM|Myr| -|Generate|TOK:SOM|Wurm 1| -|Generate|TOK:SOM|Wurm 2| - -|Generate|TOK:M11|Avatar| -|Generate|TOK:M11|Bird| -|Generate|TOK:M11|Zombie| -|Generate|TOK:M11|Beast| -|Generate|TOK:M11|Ooze 1| -|Generate|TOK:M11|Ooze 2| - -|Generate|TOK:ROE|Eldrazi Spawn 1| -|Generate|TOK:ROE|Eldrazi Spawn 2| -|Generate|TOK:ROE|Eldrazi Spawn 3| -|Generate|TOK:ROE|Elemental| -|Generate|TOK:ROE|Ooze| -|Generate|TOK:ROE|Tuktuk the Returned| - -|Generate|TOK:DDE|Saproling| -|Generate|TOK:DDE|Hornet| -|Generate|TOK:DDE|Minion| - -|Generate|TOK:WWK|Soldier Ally| -|Generate|TOK:WWK|Dragon| -|Generate|TOK:WWK|Ogre| -|Generate|TOK:WWK|Elephant| -|Generate|TOK:WWK|Plant| -|Generate|TOK:WWK|Construct| - -|Generate|TOK:ZEN|Angel| -|Generate|TOK:ZEN|Bird| -|Generate|TOK:ZEN|Kor Soldier| -|Generate|TOK:ZEN|Illusion| -|Generate|TOK:ZEN|Merfolk| -|Generate|TOK:ZEN|Vampire| -|Generate|TOK:ZEN|Zombie Giant| -|Generate|TOK:ZEN|Elemental| -|Generate|TOK:ZEN|Beast| -|Generate|TOK:ZEN|Snake| -|Generate|TOK:ZEN|Wolf| - -|Generate|TOK:M10|Avatar| -|Generate|TOK:M10|Beast| -|Generate|TOK:M10|Gargoyle| -|Generate|TOK:M10|Goblin| -|Generate|TOK:M10|Insect| -|Generate|TOK:M10|Soldier| -|Generate|TOK:M10|Wolf| -|Generate|TOK:M10|Zombie| - -|Generate|TOK:DDD|Beast 1| -|Generate|TOK:DDD|Beast 2| -|Generate|TOK:DDD|Elephant| - -|Generate|TOK:ARB|Bird Soldier| -|Generate|TOK:ARB|Lizard| -|Generate|TOK:ARB|Dragon| -|Generate|TOK:ARB|Zombie Wizard| - -|Generate|TOK:DDC|Spirit| -|Generate|TOK:DDC|Demon| -|Generate|TOK:DDC|Thrull| - -|Generate|TOK:CON|Angel| -|Generate|TOK:CON|Elemental| - -|Generate|TOK:DD2|Elemental Shaman| - -|Generate|TOK:ALA|Soldier| -|Generate|TOK:ALA|Beast| -|Generate|TOK:ALA|Homunculus| -|Generate|TOK:ALA|Thopter| -|Generate|TOK:ALA|Skeleton| -|Generate|TOK:ALA|Zombie| -|Generate|TOK:ALA|Dragon| -|Generate|TOK:ALA|Goblin| -|Generate|TOK:ALA|Ooze| -|Generate|TOK:ALA|Saproling| - -|Generate|TOK:EVE|Goat| -|Generate|TOK:EVE|Bird| -|Generate|TOK:EVE|Beast| -|Generate|TOK:EVE|Spirit| -|Generate|TOK:EVE|Elemental| -|Generate|TOK:EVE|Worm| -|Generate|TOK:EVE|Goblin Soldier| - -|Generate|TOK:SHM|Kithkin Soldier| -|Generate|TOK:SHM|Spirit| -|Generate|TOK:SHM|Rat| -|Generate|TOK:SHM|Elemental 1| -|Generate|TOK:SHM|Elf Warrior 1| -|Generate|TOK:SHM|Spider| -|Generate|TOK:SHM|Wolf| -|Generate|TOK:SHM|Faerie Rogue| -|Generate|TOK:SHM|Elemental 2| -|Generate|TOK:SHM|Giant Warrior| -|Generate|TOK:SHM|Goblin Warrior| -|Generate|TOK:SHM|Elf Warrior 2| - -|Generate|TOK:EVG|Elemental| -|Generate|TOK:EVG|Elf Warrior| -|Generate|TOK:EVG|Goblin| - -|Generate|TOK:MOR|Giant Warrior| -|Generate|TOK:MOR|Faerie Rogue| -|Generate|TOK:MOR|Treefolk Shaman| - -|Generate|TOK:LRW|Avatar| -|Generate|TOK:LRW|Elemental 1| -|Generate|TOK:LRW|Kithkin Soldier| -|Generate|TOK:LRW|Merfolk Wizard| -|Generate|TOK:LRW|Goblin Rogue| -|Generate|TOK:LRW|Elemental Shaman| -|Generate|TOK:LRW|Beast| -|Generate|TOK:LRW|Elemental 2| -|Generate|TOK:LRW|Elf Warrior| -|Generate|TOK:LRW|Wolf| -|Generate|TOK:LRW|Shapeshifter| - -|Generate|TOK:10E|Soldier| -|Generate|TOK:10E|Zombie| -|Generate|TOK:10E|Dragon| -|Generate|TOK:10E|Goblin| -|Generate|TOK:10E|Saproling| -|Generate|TOK:10E|Wasp| - -|Generate|TOK:CSP|Marit Lage| - -#|Generate|TOK:CHK|Spirit| \ No newline at end of file +|Generate|TOK:C15|Angel|| +|Generate|TOK:C15|Bear|| +|Generate|TOK:C15|Beast|| +|Generate|TOK:C15|Cat|| +|Generate|TOK:C15|Dragon|| +|Generate|TOK:C15|Drake|| +|Generate|TOK:C15|Elemental Shaman|| +|Generate|TOK:C15|Elemental|| +|Generate|TOK:C15|Elephant|| +|Generate|TOK:C15|Frog Lizard|| +|Generate|TOK:C15|Germ|| +|Generate|TOK:C15|Gold|| +|Generate|TOK:C15|Knight|1| +|Generate|TOK:C15|Knight|2| +|Generate|TOK:C15|Lightning Rager|| +|Generate|TOK:C15|Saproling|| +|Generate|TOK:C15|Shapeshifter|| +|Generate|TOK:C15|Snake|1| +|Generate|TOK:C15|Snake|2| +|Generate|TOK:C15|Spider|| +|Generate|TOK:C15|Spirit|1| +|Generate|TOK:C15|Spirit|2| +|Generate|TOK:C15|Wolf|| +|Generate|TOK:C15|Zombie|| + +|Generate|TOK:BFZ|Dragon|| +|Generate|TOK:BFZ|Eldrazi|| +|Generate|TOK:BFZ|Eldrazi Scion|1| +|Generate|TOK:BFZ|Eldrazi Scion|2| +|Generate|TOK:BFZ|Eldrazi Scion|3| +|Generate|TOK:BFZ|Elemental|1| +|Generate|TOK:BFZ|Elemental|2| +|Generate|TOK:BFZ|Knight Ally|| +|Generate|TOK:BFZ|Kor Ally|| +|Generate|TOK:BFZ|Octopus|| +|Generate|TOK:BFZ|Plant|| +|Generate|EMBLEM!:BFZ|Emblem Gideon, Ally of Zendikar|| +|Generate|EMBLEM!:BFZ|Emblem Kiora, Master of the Depths|| +|Generate|EMBLEM!:BFZ|Emblem Ob Nixilis Reignited|| + +|Generate|TOK:DDP|Eldrazi Spawn|1| +|Generate|TOK:DDP|Eldrazi Spawn|2| +|Generate|TOK:DDP|Eldrazi Spawn|3| +|Generate|TOK:DDP|Hellion|| +|Generate|TOK:DDP|Plant|| + +|Generate|TOK:MM2|Eldrazi Spawn|1| +|Generate|TOK:MM2|Eldrazi Spawn|2| +|Generate|TOK:MM2|Eldrazi Spawn|3| +|Generate|TOK:MM2|Elephant|| +|Generate|TOK:MM2|Faerie Rogue|| +|Generate|TOK:MM2|Germ|| +|Generate|TOK:MM2|Golem|| +|Generate|TOK:MM2|Insect|| +|Generate|TOK:MM2|Myr|| +|Generate|TOK:MM2|Saproling|| +|Generate|TOK:MM2|Snake|| +|Generate|TOK:MM2|Soldier|| +|Generate|TOK:MM2|Spirit|| +|Generate|TOK:MM2|Thrull|| +|Generate|TOK:MM2|Wolf|| +|Generate|TOK:MM2|Worm|| + +#Generate|TOK:TPR|Goblin|| +#Generate|TOK:TPR|Pegasus|| +#Generate|TOK:TPR|Rat|| +#Generate|TOK:TPR|Reflection|| +#Generate|TOK:TPR|Saproling|| +#Generate|TOK:TPR|Sliver|| +#Generate|TOK:TPR|Spike|| +#Generate|TOK:TPR|Spirit|| +#Generate|TOK:TPR|Thopter|| +#Generate|TOK:TPR|Zombie|| + +|Generate|TOK:ORI|Ashaya, the Awoken World|| +|Generate|TOK:ORI|Angel|| +|Generate|TOK:ORI|Demon|| +|Generate|TOK:ORI|Elemental|| +|Generate|TOK:ORI|Elf Warrior|| +|Generate|TOK:ORI|Goblin|| +|Generate|TOK:ORI|Knight|| +|Generate|TOK:ORI|Soldier|| +|Generate|TOK:ORI|Thopter|1| +|Generate|TOK:ORI|Thopter|2| +|Generate|TOK:ORI|Zombie|| +|Generate|EMBLEM!:ORI|Emblem Chandra, Roaring Flame|| +|Generate|EMBLEM!:ORI|Emblem Jace, Telepath Unbound|| +|Generate|EMBLEM!:ORI|Emblem Liliana, Defiant Necromancer|| + +#|Generate|TOK:PTC|Angel|| +#|Generate|TOK:PTC|Avatar|| +#|Generate|TOK:PTC|Beast|| +#|Generate|TOK:PTC|Dragon|| +#|Generate|TOK:PTC|Elemental|| +#|Generate|TOK:PTC|Harpy|| +#|Generate|TOK:PTC|Hippo|| +#|Generate|TOK:PTC|Soldier|| +#|Generate|TOK:PTC|Wolf|| +#|Generate|TOK:PTC|Wurm|| + +|Generate|TOK:DTK|Djinn Monk|| +|Generate|TOK:DTK|Dragon|| +|Generate|TOK:DTK|Goblin|| +|Generate|TOK:DTK|Morph|| +|Generate|TOK:DTK|Warrior|| +|Generate|TOK:DTK|Zombie|| +|Generate|TOK:DTK|Zombie Horror|| +|Generate|EMBLEM!:DTK|Emblem Narset|| + +|Generate|TOK:DDO|Soldier|| +|Generate|TOK:DDO|Kraken|| + +|Generate|TOK:FRF|Monk|1| +|Generate|TOK:FRF|Monk|2| +|Generate|TOK:FRF|Spirit|| +|Generate|TOK:FRF|Warrior|| +|Generate|TOK:FRF|Manifest|| + +#|Generate|TOK:GRC|Bird|| +#|Generate|TOK:GRC|Golem|| +#|Generate|TOK:GRC|Human|| +#|Generate|TOK:GRC|Myr|| +#|Generate|TOK:GRC|Saproling|| + +#|Generate|TOK:MBP:Beast|| +#|Generate|TOK:MBP|Cat|| +#|Generate|TOK:MBP|Dragon|| +#|Generate|TOK:MBP|Elephant|| +#|Generate|TOK:MBP|Goblin|| +#|Generate|TOK:MBP|Zombie|| + +#|Generate|TOK:MLP|Thopter|| + +#|Generate|TOK:WMCQ|Angel|| + +#|Generate|TOK:GPX|Elephant|| +#|Generate|TOK:GPX|Germ|| + +#|Generate|TOK:JR|Angel|| +#|Generate|TOK:JR|Faerie Rogue|| +#|Generate|TOK:JR|Soldier|| +#|Generate|TOK:JR|Squirrel|| + +#|Generate|TOK:MGDC|Centaur|| +#|Generate|TOK:MGDC|Knight|| +#|Generate|TOK:MGDC|Rhino|| +#|Generate|TOK:MGDC|Sliver|| + +#|Generate|TOK:FNMP|Centaur|| +|Generate|TOK:FNMP|Human|| +|Generate|TOK:FNMP|Wolf|| +#|Generate|TOK:FNMP|Wurm|| + +|Generate|TOK:DD3D|Elemental Shaman|| + +|Generate|TOK:DD3C|Beast|1| +|Generate|TOK:DD3C|Beast|2| +|Generate|TOK:DD3C|Elephant|| +|Generate|TOK:DD3C|Bat|| + +|Generate|TOK:DD3B|Elemental|| +|Generate|TOK:DD3B|Elf Warrior|| +|Generate|TOK:|DD3B|Goblin|| + +|Generate|TOK:DD3A|Spirit|| +|Generate|TOK:DD3A|Demon|| +|Generate|TOK:DD3A|Thrull|| + +|Generate|TOK:C14|Angel|| +|Generate|TOK:C14|Cat|| +|Generate|TOK:C14|Goat|| +|Generate|TOK:C14|Kor Soldier|| +|Generate|TOK:C14|Pegasus|| +|Generate|TOK:C14|Soldier|| +|Generate|TOK:C14|Spirit|| +|Generate|TOK:C14|Fish|| +|Generate|TOK:C14|Kraken|| +|Generate|TOK:C14|Whale|| +|Generate|TOK:C14|Zombie|1| +|Generate|TOK:C14|Demon|1| +|Generate|TOK:C14|Demon|2| +|Generate|TOK:C14|Germ|| +|Generate|TOK:C14|Horror|| +|Generate|TOK:C14|Zombie|2| +|Generate|TOK:C14|Goblin|| +|Generate|TOK:C14|Ape|| +|Generate|TOK:C14|Beast|1| +|Generate|TOK:C14|Beast|2| +|Generate|TOK:C14|Elemental|| +|Generate|TOK:C14|Elephant|| +|Generate|TOK:C14|Elf Druid|| +|Generate|TOK:C14|Elf Warrior|| +|Generate|TOK:C14|Treefolk|| +|Generate|TOK:C14|Wolf|| +|Generate|TOK:C14|Gargoyle|| +|Generate|TOK:C14|Myr|| +|Generate|TOK:C14|Pentavite|| +|Generate|TOK:C14|Stoneforged Blade|| +|Generate|TOK:C14|Tuktuk the Returned|| +|Generate|TOK:C14|Wurm|1| +|Generate|TOK:C14|Wurm|2| +|Generate|EMBLEM!:C14|Emblem Teferi| +|Generate|EMBLEM!:C14|Emblem Nixilis| +|Generate|EMBLEM!:C14|Emblem Daretti| + +|Generate|TOK:DDN|Goblin|| + +|Generate|TOK:KTK|Bear|| +|Generate|TOK:KTK|Bird|| +|Generate|TOK:KTK|Goblin|| +|Generate|TOK:KTK|Morph|| +|Generate|TOK:KTK|Snake|| +|Generate|TOK:KTK|Spirit Warrior|| +|Generate|TOK:KTK|Spirit|| +|Generate|TOK:KTK|Vampire|| +|Generate|TOK:KTK|Warrior|1| +|Generate|TOK:KTK|Warrior|2| +|Generate|TOK:KTK|Warrior|3| +|Generate|TOK:KTK|Zombie|| +|Generate|EMBLEM!:KTK|Emblem Sarkhan|| +|Generate|EMBLEM!:KTK|Emblem Sorin|| + +|Generate|TOK:M15|Sliver|| +|Generate|TOK:M15|Soldier|| +|Generate|TOK:M15|Zombie|| +|Generate|TOK:M15|Goblin|| +|Generate|TOK:M15|Beast|1| +|Generate|TOK:M15|Insect|| +|Generate|TOK:M15|Spirit|| +|Generate|TOK:M15|Squid|1| +|Generate|TOK:M15|Squid|2| +|Generate|TOK:M15|Wolf|| +|Generate|TOK:M15|Beast|2| +|Generate|TOK:M15|Dragon|| +|Generate|TOK:M15|Treefolk Warrior|| +|Generate|TOK:M15|Land Mine|| +|Generate|EMBLEM!:M15|Emblem Ajani|| +|Generate|EMBLEM!:M15|Emblem Garruk|| + +|Generate|TOK:CNS|Zombie|| +|Generate|TOK:CNS|Spirit|| +|Generate|TOK:CNS|Demon|| +|Generate|TOK:CNS|Ogre|| +|Generate|TOK:CNS|Elephant|| +|Generate|TOK:CNS|Squirrel|| +|Generate|TOK:CNS|Wolf|| +|Generate|TOK:CNS|Construct|| +|Generate|EMBLEM!:CNS|Emblem Dack Fayden|| + +|Generate|TOK:JOU|Sphinx|| +|Generate|TOK:JOU|Zombie|| +|Generate|TOK:JOU|Minotaur|1| +|Generate|TOK:JOU|Minotaur|2| +|Generate|TOK:JOU|Hydra|| +|Generate|TOK:JOU|Spider|| +|Generate|TOK:JOU|Snake|| + +|Generate|TOK:DDM|Assassin|| + +|Generate|TOK:BNG|Bird|1| +|Generate|TOK:BNG|Cat Soldier|| +|Generate|TOK:BNG|Soldier|1| +|Generate|TOK:BNG|Soldier|2| +|Generate|TOK:BNG|Bird|2| +|Generate|TOK:BNG|Kraken|| +|Generate|TOK:BNG|Zombie|| +|Generate|TOK:BNG|Elemental|| +|Generate|TOK:BNG|Centaur|| +|Generate|TOK:BNG|Wolf|| +|Generate|TOK:BNG|Gold|| +|Generate|EMBLEM:BNG|Kiora, the Crashing Wave|| + +|Generate|TOK:THS|Cleric|| +|Generate|TOK:THS|Soldier|1| +|Generate|TOK:THS|Soldier|2| +|Generate|TOK:THS|Soldier|3| +|Generate|TOK:THS|Bird|| +|Generate|TOK:THS|Elemental|| +|Generate|TOK:THS|Harpy|| +|Generate|TOK:THS|Soldier|3| +|Generate|TOK:THS|Boar|| +|Generate|TOK:THS|Satyr|| +|Generate|TOK:THS|Golem|1| +|Generate|TOK:THS|Golem|2| +|Generate|EMBLEM-:THS|Elspeth, Suns Champion|| + +|Generate|TOK:M14|Sliver|1| +|Generate|TOK:M14|Sliver|2| +|Generate|TOK:M14|Angel|| +|Generate|TOK:M14|Cat|| +|Generate|TOK:M14|Goat|| +|Generate|TOK:M14|Zombie|| +|Generate|TOK:M14|Dragon|| +|Generate|TOK:M14|Elemental|1| +|Generate|TOK:M14|Elemental|2| +|Generate|TOK:M14|Beast|| +|Generate|TOK:M14|Saproling|| +|Generate|TOK:M14|Wolf|| +|Generate|EMBLEM:M14|Liliana of the Dark Realms|| +|Generate|EMBLEM:M14|Garruk, Caller of Beasts|| + +|Generate|TOK:DDL|Griffin|| +|Generate|TOK:DDL|Beast|| + +|Generate|TOK:MMA|Giant Warrior|| +|Generate|TOK:MMA|Kithkin Soldier|| +|Generate|TOK:MMA|Soldier|| +|Generate|TOK:MMA|Illusion|| +|Generate|TOK:MMA|Bat|| +|Generate|TOK:MMA|Goblin Rogue|| +|Generate|TOK:MMA|Spider|| +|Generate|TOK:MMA|Zombie|| +|Generate|TOK:MMA|Dragon|| +|Generate|TOK:MMA|Goblin|| +|Generate|TOK:MMA|Elemental|| +|Generate|TOK:MMA|Saproling|| +|Generate|TOK:MMA|Treefolk Shaman|| +|Generate|TOK:MMA|Faerie Rogue|| +|Generate|TOK:MMA|Worm|| +|Generate|EMBLEM:MMA|Elspeth, Knight Errant|| + +|Generate|TOK:DGM|Elemental|| +|Generate|TOK:DGM|Bird|| + +|Generate|TOK:DDK|Spirit|| + +|Generate|TOK:GTC|Angel|| +|Generate|TOK:GTC|Rat|| +|Generate|TOK:GTC|Frog Lizard|| +|Generate|TOK:GTC|Cleric|| +|Generate|TOK:GTC|Horror|| +|Generate|TOK:GTC|Soldier|1| +|Generate|TOK:GTC|Soldier|2| +|Generate|TOK:GTC|Spirit|| +|Generate|EMBLEM:GTC|Domri Rade|| + +|Generate|TOK:RTR|Bird|| +|Generate|TOK:RTR|Knight|1| +|Generate|TOK:RTR|Knight|2| +|Generate|TOK:RTR|Soldier|| +|Generate|TOK:RTR|Assassin|| +|Generate|TOK:RTR|Dragon|| +|Generate|TOK:RTR|Goblin|| +|Generate|TOK:RTR|Centaur|1| +|Generate|TOK:RTR|Centaur|2| +|Generate|TOK:RTR|Ooze|| +|Generate|TOK:RTR|Rhino|| +|Generate|TOK:RTR|Saproling|| +|Generate|TOK:RTR|Wurm|| +|Generate|TOK:RTR|Elemental|| + +|Generate|TOK:DDJ|Saproling|| + +|Generate|EMBLEM-:M13|Liliana of the Dark Realms|| +|Generate|TOK:M13|Cat|| +|Generate|TOK:M13|Goat|| +|Generate|TOK:M13|Soldier|| +|Generate|TOK:M13|Drake|| +|Generate|TOK:M13|Zombie|| +|Generate|TOK:M13|Goblin|1| +|Generate|TOK:M13|Goblin|2| +|Generate|TOK:M13|Hellion|| +|Generate|TOK:M13|Beast|| +|Generate|TOK:M13|Saproling|| +|Generate|TOK:M13|Wurm|| + +|Generate|EMBLEM:AVR|Tamiyo, the Moon Sage|| +|Generate|TOK:AVR|Angel|1| +|Generate|TOK:AVR|Angel|2| +|Generate|TOK:AVR|Angel|3| +|Generate|TOK:AVR|Human|1| +|Generate|TOK:AVR|Human|2| +|Generate|TOK:AVR|Spirit|1| +|Generate|TOK:AVR|Spirit|2| +|Generate|TOK:AVR|Demon|1| +|Generate|TOK:AVR|Demon|2| +|Generate|TOK:AVR|Demon|3| +|Generate|TOK:AVR|Zombie|| + +|Generate|EMBLEM:DDI|Venser, the Sojourner|| +|Generate|EMBLEM:DDI|Koth of the Hammer|| + +|Generate|TOK:DKA|Human|| +|Generate|TOK:DKA|Vampire|| +|Generate|EMBLEM:DKA|Sorin, Lord of Innistrad| + +|Generate|TOK:ISD|Angel|| +|Generate|TOK:ISD|Spirit|| +|Generate|TOK:ISD|Homunculus|| +|Generate|TOK:ISD|Demon|| +|Generate|TOK:ISD|Vampire|| +|Generate|TOK:ISD|Wolf|1| +|Generate|TOK:ISD|Zombie|1| +|Generate|TOK:ISD|Zombie|2| +|Generate|TOK:ISD|Zombie|3| +|Generate|TOK:ISD|Ooze|| +|Generate|TOK:ISD|Spider|| +|Generate|TOK:ISD|Wolf|2| + +|Generate|TOK:DDH|Griffin|| +|Generate|TOK:DDH|Saproling|| + +|Generate|TOK:M12|Bird|| +|Generate|TOK:M12|Soldier|| +|Generate|TOK:M12|Zombie|| +|Generate|TOK:M12|Beast|| +|Generate|TOK:M12|Saproling|| +|Generate|TOK:M12|Wurm|| +|Generate|TOK:M12|Pentavite|| + +|Generate|TOK:NPH|Beast|| +|Generate|TOK:NPH|Beast|| +|Generate|TOK:NPH|Goblin|| +|Generate|TOK:NPH|Golem|| +|Generate|TOK:NPH|Myr|| + +|Generate|TOK:DDG|Goblin|| + +|Generate|TOK:MBS|Germ|| +|Generate|TOK:MBS|Zombie|| +|Generate|TOK:MBS|Golem|| +|Generate|TOK:MBS|Horror|| +|Generate|TOK:MBS|Thopter|| +|Generate|TOK:MBS|Zombie|| +|Generate|TOK:MBS|Zombie|| + +|Generate|TOK:DDF|Soldier|| + +|Generate|TOK:SOM|Cat|| +|Generate|TOK:SOM|Soldier|| +|Generate|TOK:SOM|Goblin|| +|Generate|TOK:SOM|Insect|| +|Generate|TOK:SOM|Wolf|| +|Generate|TOK:SOM|Golem|| +|Generate|TOK:SOM|Myr|| +|Generate|TOK:SOM|Wurm|1| +|Generate|TOK:SOM|Wurm|2| + +|Generate|TOK:M11|Avatar|| +|Generate|TOK:M11|Bird|| +|Generate|TOK:M11|Zombie|| +|Generate|TOK:M11|Beast|| +|Generate|TOK:M11|Ooze|1| +|Generate|TOK:M11|Ooze|2| + +|Generate|TOK:ROE|Eldrazi Spawn|1| +|Generate|TOK:ROE|Eldrazi Spawn|2| +|Generate|TOK:ROE|Eldrazi Spawn|3| +|Generate|TOK:ROE|Elemental|| +|Generate|TOK:ROE|Hellion|| +|Generate|TOK:ROE|Ooze|| +|Generate|TOK:ROE|Tuktuk the Returned|| + +|Generate|TOK:DDE|Saproling|| +|Generate|TOK:DDE|Hornet|| +|Generate|TOK:DDE|Minion|| + +|Generate|TOK:WWK|Soldier Ally|| +|Generate|TOK:WWK|Dragon|| +|Generate|TOK:WWK|Ogre|| +|Generate|TOK:WWK|Elephant|| +|Generate|TOK:WWK|Plant|| +|Generate|TOK:WWK|Construct|| + +|Generate|TOK:ZEN|Angel|| +|Generate|TOK:ZEN|Bird|| +|Generate|TOK:ZEN|Kor Soldier|| +|Generate|TOK:ZEN|Illusion|| +|Generate|TOK:ZEN|Merfolk|| +|Generate|TOK:ZEN|Vampire|| +|Generate|TOK:ZEN|Zombie Giant|| +|Generate|TOK:ZEN|Elemental|| +|Generate|TOK:ZEN|Beast|| +|Generate|TOK:ZEN|Snake|| +|Generate|TOK:ZEN|Wolf|| + +|Generate|TOK:M10|Avatar|| +|Generate|TOK:M10|Beast|| +|Generate|TOK:M10|Gargoyle|| +|Generate|TOK:M10|Goblin|| +|Generate|TOK:M10|Insect|| +|Generate|TOK:M10|Soldier|| +|Generate|TOK:M10|Wolf|| +|Generate|TOK:M10|Zombie|| + +|Generate|TOK:DDD|Beast|1| +|Generate|TOK:DDD|Beast|2| +|Generate|TOK:DDD|Elephant|| + +|Generate|TOK:ARB|Bird Soldier|| +|Generate|TOK:ARB|Lizard|| +|Generate|TOK:ARB|Dragon|| +|Generate|TOK:ARB|Zombie Wizard|| + +|Generate|TOK:DDC|Spirit|| +|Generate|TOK:DDC|Demon|| +|Generate|TOK:DDC|Thrull|| + +|Generate|TOK:CON|Angel|| +|Generate|TOK:CON|Elemental|| + +|Generate|TOK:DD2|Elemental Shaman|| + +|Generate|TOK:ALA|Soldier|| +|Generate|TOK:ALA|Beast|| +|Generate|TOK:ALA|Homunculus|| +|Generate|TOK:ALA|Thopter|| +|Generate|TOK:ALA|Skeleton|| +|Generate|TOK:ALA|Zombie|| +|Generate|TOK:ALA|Dragon|| +|Generate|TOK:ALA|Goblin|| +|Generate|TOK:ALA|Ooze|| +|Generate|TOK:ALA|Saproling|| + +|Generate|TOK:EVE|Goat|| +|Generate|TOK:EVE|Bird|| +|Generate|TOK:EVE|Beast|| +|Generate|TOK:EVE|Spirit|| +|Generate|TOK:EVE|Elemental|| +|Generate|TOK:EVE|Worm|| +|Generate|TOK:EVE|Goblin Soldier|| + +|Generate|TOK:SHM|Kithkin Soldier|| +|Generate|TOK:SHM|Spirit|| +|Generate|TOK:SHM|Rat|| +|Generate|TOK:SHM|Elemental|1| +|Generate|TOK:SHM|Elf Warrior|1| +|Generate|TOK:SHM|Spider|| +|Generate|TOK:SHM|Wolf|| +|Generate|TOK:SHM|Faerie Rogue|| +|Generate|TOK:SHM|Elemental|2| +|Generate|TOK:SHM|Giant Warrior|| +|Generate|TOK:SHM|Goblin Warrior|| +|Generate|TOK:SHM|Elf Warrior|2| + +|Generate|TOK:EVG|Elemental|| +|Generate|TOK:EVG|Elf Warrior|| +|Generate|TOK:EVG|Goblin|| + +|Generate|TOK:MOR|Giant Warrior|| +|Generate|TOK:MOR|Faerie Rogue|| +|Generate|TOK:MOR|Treefolk Shaman|| + +|Generate|TOK:LRW|Avatar|| +|Generate|TOK:LRW|Elemental|1| +|Generate|TOK:LRW|Kithkin Soldier|| +|Generate|TOK:LRW|Merfolk Wizard|| +|Generate|TOK:LRW|Goblin Rogue|| +|Generate|TOK:LRW|Elemental Shaman|| +|Generate|TOK:LRW|Beast|| +|Generate|TOK:LRW|Elemental|2| +|Generate|TOK:LRW|Elf Warrior|| +|Generate|TOK:LRW|Wolf|| +|Generate|TOK:LRW|Shapeshifter|| + +|Generate|TOK:10E|Soldier|| +|Generate|TOK:10E|Zombie|| +|Generate|TOK:10E|Dragon|| +|Generate|TOK:10E|Goblin|| +|Generate|TOK:10E|Saproling|| +|Generate|TOK:10E|Wasp|| + +|Generate|TOK:CSP|Marit Lage|| + +|Generate|TOK:CHK|Spirit|| +#|Generate|TOK:CHK|Dragon Spirit|| + +#|Generate|TOK:5DN|Kaldra|| + +|Generate|TOK:DST|Beast|| + +|Generate|TOK:MRD|Demon|| +|Generate|TOK:MRD|Myr|| +|Generate|TOK:MRD|Pentavite|| + +|Generate|TOK:8ED|Rukh|| + +|Generate|TOK:SCG|Angel|| + +|Generate|TOK:LGN|Goblin|| +|Generate|TOK:LGN|Sliver|| + +|Generate|TOK:ONS|Bear|| +|Generate|TOK:ONS|Dragon|| +|Generate|TOK:ONS|Insect|| +|Generate|TOK:ONS|Soldier|| + +|Generate|TOK:ODY|Bear|| +|Generate|TOK:ODY|Beast|| +|Generate|TOK:ODY|Elephant|| +|Generate|TOK:ODY|Squirrel|| +|Generate|TOK:ODY|Wurm|| +|Generate|TOK:ODY|Zombie|| + +|Generate|TOK:APC|Goblin Soldier|| + +|Generate|TOK:PLS|Spirit|| + +|Generate|TOK:INV|Bird|| +|Generate|TOK:INV|Elephant|| +|Generate|TOK:INV|Saproling|| \ No newline at end of file diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index 3617a698f38..e767691831e 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -64,6 +64,6 @@ ddd=gvl unh=uh dde=pvc # Remove setname as soon as the images can be downloaded -ignore.urls=TOK, OGW, C15 +ignore.urls=TOK, OGW # sets ordered by release time (newest goes first) -token.lookup.order=C15,OGW,EXP,DDP,BFZ,FVD,FVE,FVL,FVR,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 +token.lookup.order=CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,FVD,FVE,FVL,FVR,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 new file mode 100644 index 00000000000..2a64a370e06 --- /dev/null +++ b/Mage.Client/src/main/resources/tokens-mtg-onl-list.csv @@ -0,0 +1,712 @@ +Token name, Number, Color, P/T, Promo, Type, Artist, Text + +UGL - Unglued (1998-08-11) + +Pegasus, 89, W, 1|1, -, Creature - Pegasus, Mark Zug, Flying +Soldier, 90, W, 1|1, -, Creature - Soldier, Daren Bader, - +Zombie, 91, B, 2|2, -, Creature - Zombie, Christopher Rush, - +Goblin, 92, R, 1|1, -, Creature - Goblin, Pete Venters, - +Sheep, 93, G, 1|1, -, Creature - Sheep, Kev Walker, - +Squirrel, 94, G, 1|1, -, Creature - Squirrel, Ron Spencer, - + +ATH - Anthologies (1998-11-01) + +Pegasus, 89, W, 1|1, -, Creature - Pegasus, Mark Zug, Flying +Goblin, 92, R, 1|1, -, Creature - Goblin, Pete Venters, - + +INV - Invasion (2000-10-02) + +Bird, T1, U, 1|1, Player Rewards, Creature - Bird, Michael Sutfin, Flying +Elephant, T2, G, 3|3, Player Rewards, Creature - Elephant, Terese Nielsen, - +Saproling, T3, G, 1|1, Player Rewards, Creature - Saproling, Jeff Laubenstein, - + +PLS - Planeshift (2001-02-05) + +Spirit, T1, W, 1|1, Player Rewards, Creature - Spirit, John Matson, Flying + +APC - Apocalypse (2001-06-04) + +Goblin Soldier, T1, R W, 1|1, Player Rewards, Creature - Goblin Soldier, Ron Spears, - + +ODY - Odyssey (2001-10-01) + +Bear, T1, G, 2|2, Player Rewards, Creature - Bear, Heather Hudson, - +Beast, T2, G, 4|4, Player Rewards, Creature - Beast, Larry Elmore, - +Elephant, T3, G, 3|3, Player Rewards, Creature - Elephant, Arnie Swekel, - +Squirrel, T4, G, 1|1, Player Rewards, Creature - Squirrel, Ron Spencer, - +Wurm, T5, G, 6|6, Player Rewards, Creature - Wurm, Alan Pollack, - +Zombie, T6, B, 2|2, Player Rewards, Creature - Zombie, Dana Knutson, - + +ONS - Onslaught (2002-10-07) + +Bear, T1, G, 2|2, Player Rewards, Creature - Bear, Glen Angus, - +Dragon, T2, R, 5|5, Player Rewards, Creature - Dragon, Glen Angus, Flying +Insect, T3, G, 1|1, Player Rewards, Creature - Insect, Anthony S. Waters, - +Soldier, T4, W, 1|1, Player Rewards, Creature - Soldier, Ron Spencer, - + +LGN - Legions (2003-02-03) + +Goblin, T1, R, 1|1, Player Rewards, Creature - Goblin, Darrell Riche, - +Sliver, T2, -, 1|1, Player Rewards, Creature - Sliver, Tony Szczudlo, - + +SCG - Scourge (2003-05-26) + +Angel, T1, W, 4|4, Player Rewards, Creature - Angel, Scott M. Fischer, Flying + +8ED - Eighth Edition (2003-07-28) + +Rukh, T1, R, 4|4, Player Rewards, Creature - Rukh, Edward P. Beard Jr., Flying + +MRD - Mirrodin (2003-10-02) + +Demon, T1, B, *|*, Player Rewards, Creature - Demon, Pete Venters, - +Myr, T2, -, 1|1, Player Rewards, Creature - Myr, Wayne England, - +Pentavite, T3, -, 1|1, Player Rewards, Artifact Creature - Pentavite, Greg Staples, - + +DST - Darksteel (2004-02-06) + +Beast, T1, G, 3|3, Player Rewards, Creature - Beast, Edward P. Beard Jr., - + +CHK - Champions of Kamigawa (2004-10-01) + +Spirit, T1, -, 1|1, Player Rewards, Creature - Spirit, Hugh Jamieson, - + +CSP - Coldsnap (2006-07-21) + +Marit Lage, T1, B, 20|20, Pre-Release, Creature - Avatar, Stephan Martiniere, Flying indestructible + +10E - Tenth Edition (2007-07-13) + +Soldier, 1, W, 1|1, -, Creature - Soldier, Parente, - +Zombie, 2, B, 2|2, -, Creature - Zombie, Carl Critchlow, - +Dragon, 3, R, 5|5, -, Creature - Dragon, Jim Pavelec, Flying +Goblin, 4, R, 1|1, -, Creature - Goblin, Dave Kendall, - +Saproling, 5, G, 1|1, -, Creature - Saproling, Cyril Van Der Haegen, - +Wasp, 6, -, 1|1, -, Artifact Creature - Insect, Ron Spencer, Flying + +LRW - Lorwyn (2007-10-12) + +Avatar, 1, W, *|*, -, Creature - Avatar, Vance Kovacs, This creature's power and toughness are each equal to your life total. +Elemental, 2, W, 4|4, -, Creature - Elemental, Anthony S. Waters, Flying +Kithkin Soldier, 3, W, 1|1, -, Creature - Kithkin Soldier, Greg Hildebrandt, - +Merfolk Wizard, 4, U, 1|1, -, Creature - Merfolk Wizard, Mark Poole, - +Goblin Rogue, 5, B, 1|1, -, Creature - Goblin Rogue, Richard Sardinha, - +Elemental Shaman, 6, R, 3|1, -, Creature - Elemental Shaman, Jim Pavelec, - +Beast, 7, G, 3|3, -, Creature - Beast, John Donahue, - +Elemental, 8, G, 4|4, -, Creature - Elemental, Brandon Kitkouski, - +Elf Warrior, 9, G, 1|1, -, Creature - Elf Warrior, Dominick Domingo, - +Wolf, 10, G, 2|2, -, Creature - Wolf, Pete Venters, - +Shapeshifter, 11, -, 1|1, -, Creature - Shapeshifter, Franz Vohwinkel, Changeling + +EVG - Duel Decks: Elves vs. Goblins (2007-11-16) + +Elemental, T1, G, 7|7, -, Creature - Elemental, Anthony S. Waters, Trample +Elf Warrior, T2, G, 1|1, -, Creature - Elf Warrior, Dominick Domingo, - +Goblin, T3, R, 1|1, -, Creature - Goblin, Dave Kendall, - + +MOR - Morningtide (2008-02-01) + +Giant Warrior, 1, W, 5|5, -, Creature - Giant Warrior, Steve Ellis, - +Faerie Rogue, 2, B, 1|1, -, Creature - Faerie Rogue, Jim Nelson, Flying +Treefolk Shaman, 3, G, 2|5, -, Creature - Treefolk Shaman, Richard Sardinha, - + +SHM - Shadowmoor (2008-05-02) + +Kithkin Soldier, 1, W, 1|1, -, Creature - Kithkin Soldier, Randy Gallegos, - +Spirit, 2, W, 1|1, -, Creature - Spirit, Jeremy Enecio, Flying +Rat, 3, B, 1|1, -, Creature - Rat, Carl Critchlow, - +Elemental, 4, R, 1|1, -, Creature - Elemental, Cyril Van Der Haegen, Haste +Elf Warrior, 5, G, 1|1, -, Creature - Elf Warrior, William O'Connor, - +Spider, 6, G, 1|2, -, Creature - Spider, Thomas M. Baxa, Reach +Wolf, 7, G, 2|2, -, Creature - Wolf, Lars Grant-West, - +Faerie Rogue, 8, U B, 1|1, -, Creature - Faerie Rogue, E. M. Gist, Flying +Elemental, 9, B R, 5|5, -, Creature - Elemental, Dave Dorman, - +Giant Warrior, 10, R G, 4|4, -, Creature - Giant Warrior, Trevor Hairsine, Haste +Goblin Warrior, 11, R G, 1|1, -, Creature - Goblin Warrior, Dave Allsop, - +Elf Warrior, 12, G W, 1|1, -, Creature - Elf Warrior, Carl Frank, - + +EVE - Eventide (2008-07-25) + +Goat, 1, W, -, -, Creature - Goat, Terese Nielsen, - +Bird, 2, U, 1|1, -, Creature - Bird, Heather Hudson, Flying +Beast, 3, G, 3|3, -, Creature - Beast, William O'Connor, - +Spirit, 4, W B, 1|1, -, Creature - Spirit, Larry MacDougall, Flying +Elemental, 5, U R, 5|5, -, Creature - Elemental, Randy Gallegos, Flying +Worm, 6, B G, 1|1, -, Creature - Worm, Chuck Lukacs, - +Goblin Soldier, 7, R W, 1|1, -, Creature - Goblin Soldier, Jeff Miracola, - + +ALA - Shards of Alara (2008-10-03) + +Soldier, 1, W, 1|1, -, Creature - Soldier, Alan Pollack, - +Homunculus, 2, U, -, -, Artifact Creature - Homunculus, Howard Lyon, - +Thopter, 3, U, 1|1, -, Artifact Creature - Thopter, Andrew Murray, Flying +Skeleton, 4, B, 1|1, -, Creature - Skeleton, Thomas M. Baxa, {B}: Regenerate this creature. +Zombie, 5, B, 2|2, -, Creature - Zombie, Dave Kendall, - +Dragon, 6, R, 4|4, -, Creature - Dragon, Vance Kovacs, Flying +Goblin, 7, R, 1|1, -, Creature - Goblin, Brandon Kitkouski, - +Ooze, 8, G, *|*, -, Creature - Ooze, Anthony S. Waters, - +Saproling, 9, G, 1|1, -, Creature - Saproling, Trevor Claxton, - +Beast, 10, R G W, 8|8, -, Creature - Beast, Parente, - + +DD2 - Duel Decks: Jace vs. Chandra (2008-11-07) + +Elemental Shaman, T1, R, 3|1, -, Creature - Elemental Shaman, Jim Pavelec, - + +CFX - Conflux (2009-02-06) + +Angel, 1, W, 4|4, -, Creature - Angel, Cyril Van Der Haegen, Flying +Elemental, 2, R, 3|1, -, Creature - Elemental, Vance Kovacs, - + +DDC - Duel Decks: Divine vs. Demonic (2009-04-10) + +Spirit, T1, W, 1|1, -, Creature - Spirit, Luca Zontini, Flying +Demon, T2, B, *|*, -, Creature - Demon, Pete Venters, Flying +Thrull, T3, B, -, -, Creature - Thrull, Veronique Meignaud, - + +ARB - Alara Reborn (2009-04-30) + +Bird Soldier, 1, W, 1|1, -, Creature - Bird Soldier, Matt Cavotta, Flying +Lizard, 2, G, 2|2, -, Creature - Lizard, Anthony S. Waters, - +Dragon, 3, R G, 1|1, -, Creature - Dragon, Jaime Jones, Flying devour 2 +Zombie Wizard, 4, U B, 1|1, -, Creature - Zombie Wizard, Dave Allsop, - + +M10 - Magic 2010 (2009-07-17) + +Avatar, 1, W, *|*, -, Creature - Avatar, Vance Kovacs, This creature's power and toughness are each equal to your life total. +Soldier, 2, W, 1|1, -, Creature - Soldier, Parente, - +Zombie, 3, B, 2|2, -, Creature - Zombie, Bud Cook, - +Goblin, 4, R, 1|1, -, Creature - Goblin, Dave Kendall, - +Beast, 5, G, 3|3, -, Creature - Beast, John Donahue, - +Insect, 6, G, 1|1, -, Creature - Insect, Ron Spencer, - +Wolf, 7, G, 2|2, -, Creature - Wolf, Lars Grant-West, - +Gargoyle, 8, -, 3|4, -, Artifact Creature - Gargoyle, Paul Bonner, Flying + +ZEN - Zendikar (2009-10-02) + +Angel, 1, W, 4|4, -, Creature - Angel, Adi Granov, Flying +Bird, 2, W, 1|1, -, Creature - Bird, Howard Lyon, Flying +Kor Soldier, 3, W, 1|1, -, Creature - Kor Soldier, Daren Bader, - +Illusion, 4, U, 2|2, -, Creature - Illusion, Cyril Van Der Haegen, - +Merfolk, 5, U, 1|1, -, Creature - Merfolk, Warren Mahy, - +Vampire, 6, B, *|*, -, Creature - Vampire, Kekai Kotaki, - +Zombie Giant, 7, B, 5|5, -, Creature - Zombie Giant, Igor Kieryluk, - +Elemental, 8, R, 7|1, -, Creature - Elemental, Anthony Francisco, Trample haste +Beast, 9, G, 4|4, -, Creature - Beast, Steve Prescott, - +Snake, 10, G, 1|1, -, Creature - Snake, Austin Hsu, - +Wolf, 11, G, 2|2, -, Creature - Wolf, Daren Bader, - + +DDD - Duel Decks: Garruk vs. Liliana (2009-10-30) + +Beast, T1, G, 3|3, -, Creature - Beast, John Donahue, - +Beast, T2, G, 4|4, -, Creature - Beast, Steve Prescott, - +Elephant, T3, G, 3|3, -, Creature - Elephant, Arnie Swekel, - + +WWK - Worldwake (2010-02-05) + +Soldier Ally, 1, W, 1|1, -, Creature - Soldier Ally, Kekai Kotaki, - +Dragon, 2, R, 5|5, -, Creature - Dragon, Raymond Swanland, Flying +Ogre, 3, R, 3|3, -, Creature - Ogre, Paul Bonner, - +Elephant, 4, G, 3|3, -, Creature - Elephant, Lars Grant-West, - +Plant, 5, G, -, -, Creature - Plant, Daren Bader, - +Construct, 6, -, 6|12, -, Artifact Creature - Construct, Jung Park, Trample + +DDE - Duel Decks: Phyrexia vs. the Coalition (2010-03-19) + +Hornet, T1, -, 1|1, -, Artifact Creature - Insect, Ron Spencer, Flying haste +Minion, T2, B, *|*, -, Creature - Minion, Dave Kendall, - +Saproling, T3, G, 1|1, -, Creature - Saproling, Warren Mahy, - + +ROE - Rise of the Eldrazi (2010-04-23) + +Eldrazi Spawn, 1a, -, -, -, Creature - Eldrazi Spawn, Aleksi Briclot, Sacrifice this creature: Add {1} to your mana pool. +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, - +Ooze, 4, G, *|*, -, Creature - Ooze, Daniel Ljunggren, - +Tuktuk The Returned, 5, -, 5|5, -, Legendary Artifact Creature - Goblin Golem, Franz Vohwinkel, - + +M11 - Magic 2011 (2010-07-16) + +Avatar, 1, W, *|*, -, Creature - Avatar, Vance Kovacs, This creature's power and toughness are each equal to your life total. +Bird, 2, W, 3|3, -, Creature - Bird, Paul Bonner, Flying +Zombie, 3, B, 2|2, -, Creature - Zombie, Bud Cook, - +Beast, 4, G, 3|3, -, Creature - Beast, John Donahue, - +Ooze, 5, G, 2|2, -, Creature - Ooze, Raymond Swanland, When this creature dies put two 1/1 green Ooze creature tokens onto the battlefield. +Ooze, 6, G, 1|1, -, Creature - Ooze, Raymond Swanland, - + +DDF - Duel Decks: Elspeth vs. Tezzeret (2010-09-03) + +Soldier, T1, W, 1|1, -, Creature - Soldier, Parente, - + +SOM - Scars of Mirrodin (2010-10-01) + +Cat, 1, W, 2|2, -, Creature - Cat, Scott Chou, - +Soldier, 2, W, 1|1, -, Creature - Soldier, Goran Josic, - +Goblin, 3, R, 1|1, -, Creature - Goblin, Goran Josic, - +Insect, 4, G, 1|1, -, Creature - Insect, Adrian Smith, Infect +Wolf, 5, G, 2|2, -, Creature - Wolf, Chris Rahn, - +Golem, 6, -, 3|3, -, Artifact Creature - Golem, Nic Klein, - +Myr, 7, -, 1|1, -, Artifact Creature - Myr, Ryan Pancoast, - +Wurm, 8, -, 3|3, -, Artifact Creature - Wurm, Raymond Swanland, Deathtouch +Wurm, 9, -, 3|3, -, Artifact Creature - Wurm, Raymond Swanland, Lifelink +Poison Counter, -, -, -, -, Emblem, -, - + +MBS - Mirrodin Besieged (2011-02-04) + +Germ, 1, B, -, -, Creature - Germ, Igor Kieryluk, - +Zombie, 2, B, 2|2, -, Creature - Zombie, Dave Kendall, - +Golem, 3, -, 9|9, -, Artifact Creature - Golem, Svetlin Velinov, - +Horror, 4, -, *|*, -, Artifact Creature - Horror, Scott Chou, - +Thopter, 5, -, 1|1, -, Artifact Creature - Thopter, Volkan Baga, Flying +Poison Counter, -, -, -, -, Emblem, -, - + +DDG - Duel Decks: Knights vs. Dragons (2011-04-01) + +Goblin, T1, R, 1|1, -, Creature - Goblin, Brandon Kitkouski, - + +NPH - New Phyrexia (2011-05-13) + +Beast, 1, G, 3|3, -, Creature - Beast, Dave Allsop, - +Goblin, 2, R, 1|1, -, Creature - Goblin, Jaime Jones, - +Golem, 3, -, 3|3, -, Artifact Creature - Golem, Volkan Baga, - +Myr, 4, -, 1|1, -, Artifact Creature - Myr, Matt Stewart, - +Poison Counter, -, -, -, -, Emblem, -, - + +M12 - Magic 2012 (2011-07-15) + +Bird, 1, W, 3|3, -, Creature - Bird, Paul Bonner, Flying +Soldier, 2, W, 1|1, -, Creature - Soldier, Parente, - +Zombie, 3, B, 2|2, -, Creature - Zombie, Carl Critchlow, - +Beast, 4, G, 3|3, -, Creature - Beast, John Donahue, - +Saproling, 5, G, 1|1, -, Creature - Saproling, Cyril Van Der Haegen, - +Wurm, 6, G, 6|6, -, Creature - Wurm, Anthony Francisco, - +Pentavite, 7, -, 1|1, -, Artifact Creature - Pentavite, Greg Staples, Flying + +DDH - Duel Decks: Ajani vs. Nicol Bolas (2011-09-02) + +Griffin, T1, W, 2|2, -, Creature - Griffin, Jim Nelson, Flying +Saproling, T2, G, 1|1, -, Creature - Saproling, Cyril Van Der Haegen, - + +ISD - Innistrad (2011-09-30) + +Angel, 1, W, 4|4, -, Creature - Angel, Winona Nelson, Flying +Spirit, 2, W, 1|1, -, Creature - Spirit, Kev Walker, Flying +Homunculus, 3, U, 2|2, -, Creature - Homunculus, Johann Bodin, - +Demon, 4, B, 5|5, -, Creature - Demon, Kev Walker, Flying +Vampire, 5, B, 2|2, -, Creature - Vampire, Svetlin Velinov, Flying +Wolf, 6, B, 1|1, -, Creature - Wolf, Daniel Ljunggren, Deathtouch +Zombie, 7, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Zombie, 8, B, 2|2, -, Creature - Zombie, Christopher Moeller, - +Zombie, 9, B, 2|2, -, Creature - Zombie, Cynthia Sheppard, - +Ooze, 10, G, *|*, -, Creature - Ooze, Erica Yang, This creature's power and toughness are each equal to the number of slime counters on Gutter Grime. +Spider, 11, G, 1|2, -, Creature - Spider, Daniel Ljunggren, Reach +Wolf, 12, G, 2|2, -, Creature - Wolf, David Palumbo, - +Wolf, T12, G, 2|2, Judge, Creature - Wolf, David Palumbo, - + +DKA - Dark Ascension (2012-02-03) + +Human, 1, W, 1|1, -, Creature - Human, John Stanko, - +Vampire, 2, B, 1|1, -, Creature - Vampire, Peter Mohrbacher, Lifelink +Sorin Emblem, 3, -, -, -, Emblem - Sorin, Michael Komrack, Creatures you control get +1/+0. + +DDI - Duel Decks: Venser vs. Koth (2012-03-30) + +Koth Emblem, E1, -, -, -, Emblem - Koth, Eric Deschamps, Mountains you control have Tap: This land deals 1 damage to target creature or player.' +Venser Emblem, E2, -, -, -, Emblem - Venser, Eric Deschamps, Whenever you cast a spell exile target permanent. + +FNM - Friday Night Magic (2012-04-01) + +Human, T1a, W, 1|1, Full Moon, Creature - Human, Lars Grant-West, - +Wolf, T1b, G, 2|2, Full Moon, Creature - Wolf, Lars Grant-West, - + +AVR - Avacyn Restored (2012-05-04) + +Angel, 1, W, 4|4, -, Creature - Angel, Anthony Palumbo, Flying +Human, 2, W, 1|1, -, Creature - Human, Michael C. Hayes, - +Spirit, 3, W, 1|1, -, Creature - Spirit, Ryan Yee, Flying +Spirit, 4, U, 1|1, -, Creature - Spirit, Dan Scott, Flying +Demon, 5, B, 5|5, -, Creature - Demon, Kev Walker, Flying +Zombie, 6, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Human, 7, R, 1|1, -, Creature - Human, Ryan Pancoast, Haste +Tamiyo Emblem, 8, -, -, -, Emblem - Tamiyo, Eric Deschamps, You have no maximum hand size. Whenever a card is put into your graveyard from anywhere you may return it to your hand. +Angel, T1, W, 4|4, Pre-Release, Creature - Angel, James Ryman, Flying +Angel, T1F, W, 4|4, Pre-Release, Creature - Angel, James Ryman, Flying +Demon, T5, B, 5|5, Pre-Release, Creature - Demon, Karl Kopinski, Flying +Demon, T5F, B, 5|5, Pre-Release, Creature - Demon, Karl Kopinski, Flying + +M13 - Magic 2013 (2012-07-13) + +Goblin, 1, R, 1|1, League, Creature - Goblin, Jim Nelson, - +Cat, 1, W, 2|2, -, Creature - Cat, Jesper Ejsing, - +Goat, 2, W, -, -, Creature - Goat, Adam Paquette, - +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, - +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, - +Liliana Emblem, 11, -, -, -, Emblem - Liliana, D. Alexander Gregory, Swamps you control have Tap: Add {B}{B}{B}{B} to your mana pool.' + +DDJ - Duel Decks: Izzet vs. Golgari (2012-09-07) + +Saproling, T1, G, 1|1, -, Creature - Saproling, Brad Rigney, - + +RTR - Return to Ravnica (2012-10-05) + +Centaur, 1, G, 3|3, Judge, Creature - Centaur, James Ryman, - +Knight, 1, W, 2|2, League, Creature - Knight, Lucas Graciano, Vigilance +Bird, 1, W, 1|1, -, Creature - Bird, James Ryman, Flying +Knight, 2, W, 2|2, -, Creature - Knight, Matt Stewart, Vigilance +Soldier, 3, W, 1|1, -, Creature - Soldier, Steve Prescott, - +Assassin, 4, B, 1|1, -, Creature - Assassin, Svetlin Velinov, Whenever this creature deals combat damage to a player that player loses the game. +Dragon, 5, R, 6|6, -, Creature - Dragon, Mark Zug, Flying +Goblin, 6, R, 1|1, -, Creature - Goblin, Christopher Moeller, - +Centaur, 7, G, 3|3, -, Creature - Centaur, Slawomir Maniak, - +Ooze, 8, G, *|*, -, Creature - Ooze, Marco Nelor, - +Rhino, 9, G, 4|4, -, Creature - Rhino, Tomasz Jedruszek, Trample +Saproling, 10, G, 1|1, -, Creature - Saproling, Raoul Vitale, - +Wurm, 11, G, 5|5, -, Creature - Wurm, Anthony Palumbo, Trample +Elemental, 12, G W, 8|8, -, Creature - Elemental, Yeong-Hao Han, Vigilance + +GTC - Gatecrash (2013-02-01) + +Soldier, 1, R W, 1|1, League, Creature - Soldier, Zoltan Boros, Haste +Angel, 1, W, 4|4, -, Creature - Angel, Steve Argyle, Flying +Rat, 2, B, 1|1, -, Creature - Rat, Nils Hamm, - +Frog Lizard, 3, G, 3|3, -, Creature - Frog Lizard, Jack Wang, - +Cleric, 4, W B, 1|1, -, Creature - Cleric, Jason Chan, {3}{W}{B}{B} {T} Sacrifice this creature: Return a card named Deathpact Angel from your graveyard to the battlefield. +Horror, 5, U B, 1|1, -, Creature - Horror, Adam Paquette, Flying +Soldier, 6, R W, 1|1, -, Creature - Soldier, David Palumbo, Haste +Spirit, 7, W B, 1|1, -, Creature - Spirit, Cliff Childs, Flying +Domri Emblem, 8, -, -, -, Emblem - Domri, Tyler Jacobson, Creatures you control have double strike trample hexproof and haste. + +DDK - Duel Decks: Sorin vs. Tibalt (2013-03-15) + +Spirit, T1, W, 1|1, -, Creature - Spirit, Ryan Yee, Flying + +DGM - Dragon's Maze (2013-05-03) + +Bird, 1, W, 1|1, League, Creature - Bird, Martina Pilcerova, Flying +Elemental, 1, G W, *|*, -, Creature - Elemental, Mark Winters, This creature's power and toughness are each equal to the number of creatures you control. + +MMA - Modern Masters (2013-06-07) + +Giant Warrior, 1, W, 5|5, -, Creature - Giant Warrior, Svetlin Velinov, - +Kithkin Soldier, 2, W, 1|1, -, Creature - Kithkin Soldier, Randy Gallegos, - +Soldier, 3, W, 1|1, -, Creature - Soldier, Goran Josic, - +Illusion, 4, U, 1|1, -, Creature - Illusion, Veronique Meignaud, - +Bat, 5, B, 1|1, -, Creature - Bat, Wayne Reynolds, Flying +Goblin Rogue, 6, B, 1|1, -, Creature - Goblin Rogue, Dave Kendall, - +Spider, 7, B, 2|4, -, Creature - Spider, Lars Grant-West, Reach +Zombie, 8, B, 2|2, -, Creature - Zombie, Bud Cook, - +Dragon, 9, R, 4|4, -, Creature - Dragon, Vance Kovacs, Flying +Goblin, 10, R, 1|1, -, Creature - Goblin, Dave Kendall, - +Elemental, 11, G, 4|4, -, Creature - Elemental, Brandon Kitkouski, - +Saproling, 12, G, 1|1, -, Creature - Saproling, Warren Mahy, - +Treefolk Shaman, 13, G, 2|5, -, Creature - Treefolk Shaman, Zack Stella, - +Faerie Rogue, 14, U B, 1|1, -, Creature - Faerie Rogue, E. M. Gist, Flying +Worm, 15, B G, 1|1, -, Creature - Worm, Chuck Lukacs, - +Elspeth Emblem, 16, -, -, -, Emblem - Elspeth, Volkan Baga, Artifacts creatures enchantments and lands you control have indestructible. + +M14 - Magic 2014 Core Set (2013-07-19) + +Sliver, 1, -, 1|1, -, Creature - Sliver, Igor Kieryluk, - +Angel, 1, W, 4|4, -, Creature - Angel, James Ryman, Flying +Cat, 3, W, 2|2, -, Creature - Cat, Jesper Ejsing, - +Goat, 4, W, -, -, Creature - Goat, Adam Paquette, - +Zombie, 5, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Dragon, 6, R, 2|2, -, Creature - Dragon, Jack Wang, Flying {R}: This creature gets +1/+0 until end of turn. +Elemental, 7, R, 1|1, -, Creature - Elemental, Jaime Jones, - +Elemental, 8, R, 1|1, -, Creature - Elemental, Winona Nelson, - +Beast, 9, G, 3|3, -, Creature - Beast, John Donahue, - +Saproling, 10, G, 1|1, -, Creature - Saproling, Brad Rigney, - +Wolf, 11, G, 2|2, -, Creature - Wolf, Lars Grant-West, - +Liliana Emblem, 12, -, -, -, Emblem - Liliana, D. Alexander Gregory, Swamps you control have Tap: Add {B}{B}{B}{B} to your mana pool.' +Garruk Emblem, 13, -, -, -, Emblem - Garruk, Karl Kopinski, Whenever you cast a creature spell you may search your library for a creature card put it onto the battlefield then shuffle your library. +Sliver, T1, -, 1|1, League, Creature - Sliver, Vincent Proce, - + +DDL - Duel Decks: Heroes vs. Monsters (2013-09-06) + +Griffin, T1, W, 2|2, -, Creature - Griffin, Johann Bodin, Flying +Beast, T2, G, 3|3, -, Creature - Beast, Jesper Ejsing, - + +THS - Theros (2013-09-27) + +Golem, 1, -, 3|3, Judge, Enchantment Artifact Creature - Golem, Yeong-Hao Han, - +Soldier, 1, W, 1|1, League, Creature - Soldier, Johann Bodin, - +Cleric, 1, W, 2|1, -, Enchantment Creature - Cleric, Johann Bodin, - +Soldier, 2, W, 1|1, -, Creature - Soldier, Seb McKinnon, - +Soldier, 3, W, 1|1, -, Creature - Soldier, Svetlin Velinov, - +Bird, 4, U, 2|2, -, Creature - Bird, Peter Mohrbacher, Flying +Elemental, 5, U, 1|0, -, Creature - Elemental, Karl Kopinski, - +Harpy, 6, B, 1|1, -, Creature - Harpy, Nils Hamm, Flying +Soldier, 7, R, 1|1, -, Creature - Soldier, Johann Bodin, - +Boar, 8, G, 2|2, -, Creature - Boar, James Ryman, - +Satyr, 9, R G, 2|2, -, Creature - Satyr, Johann Bodin, - +Golem, 10, -, 3|3, -, Enchantment Artifact Creature - Golem, Yeong-Hao Han, - +Elspeth Emblem, 11, -, -, -, Emblem - Elspeth, Eric Deschamps, Creatures you control get +2/+2 and have flying. + +BNG - Born of the Gods (2014-02-07) + +Soldier, 1, W, 1|1, League, Enchantment Creature - Soldier, Ryan Barger, - +Bird, 1, W, 1|1, -, Creature - Bird, Clint Cearly, Flying +Cat Soldier, 2, W, 1|1, -, Creature - Cat Soldier, Scott Chou, Vigilance +Soldier, 3, W, 1|1, -, Enchantment Creature - Soldier, David Palumbo, - +Bird, 4, U, 2|2, -, Enchantment Creature - Bird, Mike Sass, Flying +Kraken, 5, U, 9|9, -, Creature - Kraken, Dan Scott, - +Zombie, 6, B, 2|2, -, Enchantment Creature - Zombie, Winona Nelson, - +Elemental, 7, R, 3|1, -, Enchantment Creature - Elemental, Greg Staples, - +Centaur, 8, G, 3|3, -, Enchantment Creature - Centaur, Ryan Barger, - +Wolf, 9, G, 2|2, -, Creature - Wolf, Raoul Vitale, - +Gold, 10, -, -, -, Artifact, Richard Wright, Sacrifice this artifact: Add one mana of any color to your mana pool. +Kiora Emblem, 11, -, -, -, Emblem - Kiora, Scott M. Fischer, At the beginning of your end step put a 9/9 blue Kraken creature token onto the battlefield. + +DDM - Duel Decks: Jace vs. Vraska (2014-03-14) + +Assassin, T1, B, 1|1, -, Creature - Assassin, Svetlin Velinov, Whenever this creature deals combat damage to a player that player loses the game. + +JOU - Journey into Nyx (2014-05-02) + +Minotaur, 1, R, 2|3, League, Creature - Minotaur, Scott Murphy, - +Sphinx, 1, U, 4|4, -, Creature - Sphinx, Jesper Ejsing, Flying +Zombie, 2, B, *|*, -, Creature - Zombie, Zack Stella, - +Minotaur, 3, R, 2|3, -, Creature - Minotaur, Craig J Spearing, - +Hydra, 4, G, *|*, -, Creature - Hydra, Steve Prescott, - +Spider, 5, G, 1|3, -, Enchantment Creature - Spider, Yohann Schepacz, Reach +Snake, 6, G B, 1|1, -, Enchantment Creature - Snake, Greg Staples, Deathtouch + +MD1 - Modern Event Deck 2014 (2014-05-30) + +Soldier, 1, W, 1|1, -, Creature - Soldier, Goran Josic, - +Spirit, 2, W, 1|1, -, Creature - Spirit, Kev Walker, Flying +Myr, 3, -, 1|1, -, Artifact Creature - Myr, Matt Stewart, - +Elspeth Emblem, 4, -, -, -, Emblem - Elspeth, Volkan Baga, Artifacts creatures enchantments and lands you control have indestructible. + +CNS - Conspiracy (2014-06-06) + +Spirit, 1, W, 1|1, -, Creature - Spirit, Jeff Simpson, Flying +Demon, 2, B, *|*, -, Creature - Demon, Evan Shipard, Flying +Zombie, 3, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Ogre, 4, R, 4|4, -, Creature - Ogre, Dave Kendall, - +Elephant, 5, G, 3|3, -, Creature - Elephant, Lars Grant-West, - +Squirrel, 6, G, 1|1, -, Creature - Squirrel, Daniel Ljunggren, - +Wolf, 7, G, 2|2, -, Creature - Wolf, Raoul Vitale, - +Construct, 8, -, 1|1, -, Artifact Creature - Construct, Adam Paquette, Defender +Dack Emblem, 9, -, -, -, Emblem - Dack, Eric Deschamps, Whenever you cast a spell that targets one or more permanents gain control of those permanents. + +M15 - Magic 2015 Core Set (2014-07-18) + +Wolf, 001, G, 1|1, Pre-Release, Creature - Wolf, David Palumbo, - +Sliver, 001, -, 1|1, -, Creature - Sliver, Igor Kieryluk, - +Squid, 001, U, 1|1, League, Creature - Squid, Richard Wright, Islandwalk +Soldier, 002, W, 1|1, -, Creature - Soldier, Greg Staples, - +Spirit, 003, W, 1|1, -, Creature - Spirit, Mike Sass, Flying +Squid, 004, U, 1|1, -, Creature - Squid, Jack Wang, Islandwalk +Beast, 005, B, 3|3, -, Creature - Beast, John Donahue, Deathtouch +Zombie, 006, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Dragon, 007, R, 2|2, -, Creature - Dragon, Jack Wang, Flying {R}: This creature gets +1/+0 until end of turn. +Goblin, 008, R, 1|1, -, Creature - Goblin, Karl Kopinski, - +Beast, 009, G, 3|3, -, Creature - Beast, Dave Kendall, - +Insect, 010, G, 1|1, -, Creature - Insect, Martina Pilcerova, Flying deathtouch +Treefolk Warrior, 011, G, *|*, -, Creature - Treefolk Warrior, Todd Lockwood, This creature's power and toughness are each equal to the number of Forests you control. +Land Mine, 012, -, -, -, Artifact, Kev Walker, {R} Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying. +Ajani Emblem, 013, -, -, -, Emblem - Ajani, Chris Rahn, If a source would deal damage to you or a planeswalker you control prevent all but 1 of that damage. +Garruk Emblem, 014, -, -, -, Emblem - Garruk, Tyler Jacobson, Whenever a creature attacks you it gets +5/+5 and gains trample until end of turn. + +DDN - Duel Decks: Speed vs. Cunning (2014-09-05) + +Goblin, 082, R, 1|1, -, Creature - Goblin, Karl Kopinski, - + +KTK - Khans of Tarkir (2014-09-26) + +Warrior, 001, W, 1|1, League, Creature - Warrior, Winona Nelson, - +Bird, 001, W, 3|4, -, Creature - Bird, Mark Zug, Flying +Spirit, 002, W, 1|1, -, Creature - Spirit, Mike Sass, Flying +Warrior, 003, W, 1|1, -, Creature - Warrior, Ryan Barger, - +Warrior, 004, W, 1|1, -, Creature - Warrior, Yefim Kligerman, - +Vampire, 005, B, 2|2, -, Creature - Vampire, Cynthia Sheppard, Flying +Zombie, 006, B, 2|2, -, Creature - Zombie, Wayne Reynolds, - +Goblin, 007, R, 1|1, -, Creature - Goblin, Kev Walker, - +Bear, 008, G, 4|4, -, Creature - Bear, Kev Walker, - +Snake, 009, G, 1|1, -, Creature - Snake, Lars Grant-West, - +Spirit Warrior, 010, B G, *|*, -, Creature - Spirit Warrior, Ryan Alexander Lee, - +Morph, 011, -, 2|2, -, Creature, Raymond Swanland, (You can cover a face-down creature with this reminder card. A card with morph can be turned face up any time for its morph cost.) +Sarkhan Emblem, 012, -, -, -, Emblem - Sarkhan, Daarken, At the beginning of your draw step draw two additional cards. At the beginning of your end step discard your hand. +Sorin Emblem, 013, -, -, -, Emblem - Sorin, Cynthia Sheppard, At the beginning of each opponent's upkeep that player sacrifices a creature. + +C14 - Commander 2014 (2014-11-07) + +Angel, 001, W, 4|4, -, Creature - Angel, Anthony Palumbo, Flying +Cat, 002, W, 2|2, -, Creature - Cat, Scott Chou, - +Goat, 003, W, -, -, Creature - Goat, Adam Paquette, - +Kor Soldier, 004, W, 1|1, -, Creature - Kor Soldier, Daren Bader, - +Pegasus, 005, W, 1|1, -, Creature - Pegasus, Greg Hildebrandt, Flying +Soldier, 006, W, 1|1, -, Creature - Soldier, Goran Josic, - +Spirit, 007, W, 1|1, -, Creature - Spirit, Ryan Yee, Flying +Fish, 008, U, 3|3, -, Creature - Fish, Dan Scott, When this creature dies put a 6/6 blue Whale creature token onto the battlefield with "When this creature dies put a 9/9 blue Kraken creature token onto the battlefield." +Kraken, 009, U, 9|9, -, Creature - Kraken, Dan Scott, - +Whale, 010, U, 6|6, -, Creature - Whale, Dan Scott, When this creature dies put a 9/9 blue Kraken creature token onto the battlefield. +Zombie, 011, U, *|*, -, Creature - Zombie, Dave Kendall, - +Demon, 012, B, *|*, -, Creature - Demon, Pete Venters, Flying +Demon, 013, B, 5|5, -, Creature - Demon, Kev Walker, Flying +Germ, 014, B, -, -, Creature - Germ, Igor Kieryluk, - +Horror, 015, B, *|*, -, Creature - Horror, Jason Felix, - +Zombie, 016, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Goblin, 017, R, 1|1, -, Creature - Goblin, Dave Kendall, - +Ape, 018, G, 3|3, -, Creature - Ape, Lars Grant-West, - +Beast, 019, G, 3|3, -, Creature - Beast, Dave Allsop, - +Beast, 020, G, 4|4, -, Creature - Beast, Steve Prescott, - +Elemental, 021, G, 5|3, -, Creature - Elemental, Nils Hamm, - +Elephant, 022, G, 3|3, -, Creature - Elephant, Lars Grant-West, - +Elf Druid, 023, G, 1|1, -, Creature - Elf Druid, Raymond Swanland, {T}: Add {G} to your mana pool. +Elf Warrior, 024, G, 1|1, -, Creature - Elf Warrior, William O'Connor, - +Treefolk, 025, G, *|*, -, Creature - Treefolk, Filip Burburan, - +Wolf, 026, G, 2|2, -, Creature - Wolf, Daren Bader, - +Gargoyle, 027, -, 3|4, -, Artifact Creature - Gargoyle, Paul Bonner, Flying +Myr, 028, -, 1|1, -, Artifact Creature - Myr, Ryan Pancoast, - +Pentavite, 029, -, 1|1, -, Artifact Creature - Pentavite, Greg Staples, Flying +Stoneforged Blade, 030, -, -, -, Artifact - Equipment, Eric Deschamps, Indestructible Equipped creature gets +5/+5 and has double strike. Equip {0} +Tuktuk The Returned, 031, -, 5|5, -, Legendary Artifact Creature - Goblin Golem, Franz Vohwinkel, - +Wurm, 032, -, 3|3, -, Artifact Creature - Wurm, Raymond Swanland, Deathtouch +Wurm, 033, -, 3|3, -, Artifact Creature - Wurm, Raymond Swanland, Lifelink +Teferi Emblem, 034, -, -, -, Emblem - Teferi, Tyler Jacobson, You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant. +Nixilis Emblem, 035, -, -, -, Emblem - Nixilis, Daarken, {1}{B} Sacrifice a creature: You gain X life and draw X cards where X is the sacrificed creature's power. +Daretti Emblem, 036, -, -, -, Emblem - Daretti, Dan Scott, Whenever an artifact is put into your graveyard from the battlefield return that card to the battlefield at the beginning of the next end step. + +DD3_EVG - Duel Decks Anthology Elves vs. Goblins (2014-12-05) + +Elemental, 001, G, 7|7, -, Creature - Elemental, Anthony S. Waters, Trample +Elf Warrior, 002, G, 1|1, -, Creature - Elf Warrior, Dominick Domingo, - +Goblin, 003, R, 1|1, -, Creature - Goblin, Dave Kendall, - + +DD3_JVC - Duel Decks Anthology Jace vs. Chandra (2014-12-05) + +Elemental Shaman, 004, R, 3|1, -, Creature - Elemental Shaman, Jim Pavelec, - + +DD3_DVD - Duel Decks Anthology Divine vs. Demonic (2014-12-05) + +Spirit, 005, W, 1|1, -, Creature - Spirit, Luca Zontini, Flying +Demon, 006, B, *|*, -, Creature - Demon, Pete Venters, Flying +Thrull, 007, B, -, -, Creature - Thrull, Veronique Meignaud, - + +DD3_GVL - Duel Decks Anthology Garruk vs. Liliana (2014-12-05) + +Beast, 008, G, 3|3, -, Creature - Beast, John Donahue, - +Beast, 009, G, 4|4, -, Creature - Beast, Steve Prescott, - +Elephant, 010, G, 3|3, -, Creature - Elephant, Arnie Swekel, - +Bat, 011, B, 1|1, -, Creature - Bat, Wayne Reynolds, Flying + +FRF - Fate Reforged (2015-01-23) + +Monk, 001, W, 1|1, -, Creature - Monk, Steven Belledin, Prowess +Monk, 001T, W, 1|1, League, Creature - Monk, Magali Villeneuve, Prowess +Spirit, 002, W, 1|1, -, Creature - Spirit, Aaron Miller, Flying +Warrior, 003, B, 2|1, -, Creature - Warrior, Zoltan Boros, - +Manifest, 004, -, 2|2, -, Creature, Raymond Swanland, (You can cover a face-down manifested creature with this reminder card. A manifested creature card can be turned face up any time for its mana cost. A face-down card can also be turned face up for its morph cost.) + +DDO - Duel Decks: Elspeth vs. Kiora (2015-02-27) + +Soldier, 066, W, 1|1, -, Creature - Soldier, Svetlin Velinov, - +Kraken, 067, U, 9|9, -, Creature - Kraken, Dan Scott, - + +DTK - Dragons of Tarkir (2015-03-27) + +Warrior, 001, W, 1|1, -, Creature - Warrior, Aaron Miller, - +Djinn Monk, 002, U, 2|2, -, Creature - Djinn Monk, Izzy, Flying +Zombie, 003, B, 2|2, -, Creature - Zombie, Vincent Proce, - +Zombie Horror, 004, B, *|*, -, Creature - Zombie Horror, Nils Hamm, - +Dragon, 005, R, 4|4, -, Creature - Dragon, Gabor Szikszai, Flying +Goblin, 006, R, 1|1, -, Creature - Goblin, Mike Bierek, - +Morph, 007, -, 2|2, -, Creature, Raymond Swanland, (You can cover a face-down creature with this reminder card. A card with morph can be turned face up any time for its morph cost.) +Narset Emblem, 008, -, -, -, Emblem - Narset, Magali Villeneuve, Your opponents can't cast noncreature spells. + +MM2 - Modern Masters 2015 Edition (2015-05-22) + +Eldrazi Spawn, 001, -, -, -, Creature - Eldrazi Spawn, Aleksi Briclot, Sacrifice this creature: Add {1} to your mana pool. +Eldrazi Spawn, 002, -, -, -, Creature - Eldrazi Spawn, Mark Tedin, Sacrifice this creature: Add {1} to your mana pool. +Eldrazi Spawn, 003, -, -, -, Creature - Eldrazi Spawn, Veronique Meignaud, Sacrifice this creature: Add {1} to your mana pool. +Soldier, 004, W, 1|1, -, Creature - Soldier, Greg Staples, - +Spirit, 005, W, 1|1, -, Creature - Spirit, Mike Sass, Flying +Faerie Rogue, 006, B, 1|1, -, Creature - Faerie Rogue, Dave Allsop, Flying +Germ, 007, B, -, -, Creature - Germ, Igor Kieryluk, - +Thrull, 008, B, 1|1, -, Creature - Thrull, Mark Tedin, - +Elephant, 009, G, 3|3, -, Creature - Elephant, Lars Grant-West, - +Insect, 010, G, 1|1, -, Creature - Insect, Ron Spencer, - +Saproling, 011, G, 1|1, -, Creature - Saproling, Warren Mahy, - +Snake, 012, G, 1|1, -, Creature - Snake, Austin Hsu, - +Wolf, 013, G, 2|2, -, Creature - Wolf, Daren Bader, - +Worm, 014, B G, 1|1, -, Creature - Worm, Chuck Lukacs, - +Golem, 015, -, 3|3, -, Artifact Creature - Golem, Nic Klein, - +Myr, 016, -, 1|1, -, Artifact Creature - Myr, Ryan Pancoast, - + +ORI - Magic Origins (2015-07-17) + +Angel, 001, W, 4|4, -, Creature - Angel, Cyril Van Der Haegen, Flying +Knight, 002, W, 2|2, -, Creature - Knight, Matt Stewart, Vigilance +Soldier, 003, W, 1|1, -, Creature - Soldier, Steve Prescott, - +Demon, 004, B, 5|5, -, Creature - Demon, Kev Walker, Flying +Zombie, 005, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Goblin, 006, R, 1|1, -, Creature - Goblin, Brandon Kitkouski, - +Ashaya the Awoken World, 007, G, 4|4, -, Legendary Creature - Elemental, Raymond Swanland, - +Elemental, 008, G, 2|2, -, Creature - Elemental, Marco Nelor, - +Elf Warrior, 009, G, 1|1, -, Creature - Elf Warrior, William O'Connor, - +Thopter, 010, -, 1|1, -, Artifact Creature - Thopter, Adam Paquette, Flying +Thopter, 011, -, 1|1, -, Artifact Creature - Thopter, Svetlin Velinov, Flying +Jace Emblem, 012, -, -, -, Emblem - Jace, Jaime Jones, Whenever you cast a spell target opponent puts the top five cards of his or her library into his or her graveyard. +Liliana Emblem, 013, -, -, -, Emblem - Liliana, Karla Ortiz, Whenever a creature dies return it to the battlefield under your control at the beginning of the next end step. +Chandra Emblem, 014, -, -, -, Emblem - Chandra, Eric Deschamps, At the beginning of your upkeep this emblem deals 3 damage to you. + +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, - +Plant, 080, G, -, -, Creature - Plant, Daren Bader, - + +BFZ - Battle for Zendikar (2015-10-09) + +Eldrazi, 001, -, 10|10, -, Creature - Eldrazi, Jack Wang, - +Eldrazi Scion, 002, -, 1|1, -, Creature - Eldrazi Scion, Izzy, Sacrifice this creature: Add {1} to your mana pool. +Eldrazi Scion, 003, -, 1|1, -, Creature - Eldrazi Scion, Winona Nelson, Sacrifice this creature: Add {1} to your mana pool. +Eldrazi Scion, 004, -, 1|1, -, Creature - Eldrazi Scion, Svetlin Velinov, Sacrifice this creature: Add {1} to your mana pool. +Knight Ally, 005, W, 2|2, -, Creature - Knight Ally, Josu Hernaiz, - +Kor Ally, 006, W, 1|1, -, Creature - Kor Ally, Jeremy Wilson, - +Octopus, 007, U, 8|8, -, Creature - Octopus, Craig J Spearing, - +Dragon, 008, R, 5|5, -, Creature - Dragon, Raymond Swanland, Flying +Plant, 009, G, 1|1, -, Creature - Plant, Sam Burley, - +Elemental, 009, R, 3|1, -, Creature - Elemental, Victor Adame Minguez, Trample Haste +Elemental, 011, G R, 5|5, -, Creature - Elemental, Brad Rigney, - +Gideon Emblem, 012, -, -, -, Emblem - Gideon, Eric Deschamps, - +Nixilis Emblem, 013, -, -, -, Emblem - Nixilis, Chris Rahn, - +Kiora Emblem, 014, -, -, -, Emblem - Kiora, Jason Chan, - + +C15 - Commander 2015 (2015-11-13) + +Shapeshifter, 001, -, 1|1, -, Creature - Shapeshifter, Franz Vohwinkel, Changeling +Angel, 002, W, 4|4, -, Creature - Angel, Cyril Van Der Haegen, Flying +Cat, 003, W, 2|2, -, Creature - Cat, Jesper Ejsing, - +Knight, 004, W, 2|2, -, Creature - Knight, Hideaki Takamura, First strike +Knight, 005, W, 2|2, -, Creature - Knight, Matt Stewart, Vigilance +Drake, 006, U, 2|2, -, Creature - Drake, Svetlin Velinov, Flying +Germ, 007, B, -, -, Creature - Germ, Igor Kieryluk, - +Zombie, 008, B, 2|2, -, Creature - Zombie, Lucas Graciano, - +Dragon, 009, R, 5|5, -, Creature - Dragon, Jim Pavelec, Flying +Elemental Shaman, 010, R, 3|1, -, Creature - Elemental Shaman, Jim Pavelec, - +Lightning Rager, 011, R, 5|1, -, Creature - Elemental, Svetlin Velinov, Trample Haste At the beginning of your end step sacrifice this creature. +Bear, 012, G, 2|2, -, Creature - Bear, Heather Hudson, - +Beast, 013, G, 4|4, -, Creature - Beast, Svetlin Velinov, - +Elephant, 014, G, 3|3, -, Creature - Elephant, Lars Grant-West, - +Frog Lizard, 015, G, 3|3, -, Creature - Frog Lizard, Jack Wang, - +Saproling, 016, G, 1|1, -, Creature - Saproling, Brad Rigney, - +Snake, 017, G, 1|1, -, Creature - Snake, Dan Scott, - +Spider, 018, G, 1|2, -, Creature - Spider, Daniel Ljunggren, Reach +Wolf, 019, G, 2|2, -, Creature - Wolf, David Palumbo, - +Elemental, 020, U R, 5|5, -, Creature - Elemental, Randy Gallegos, Flying +Snake, 021, G U, 1|1, -, Creature - Snake, Christopher Moeller, - +Spirit, 022, W B, 1|1, -, Creature - Spirit, Cliff Childs, Flying +Spirit, 023, -, *|*, -, Enchantment Creature - Spirit, Adam Paquette, This creature's power and toughness are each equal to the number of experience counters you have. +Gold, 024, -, -, -, Artifact, Richard Wright, Sacrifice this artifact: Add one mana of any color to your mana pool. diff --git a/Mage.Client/src/test/java/mage/client/game/TokensMtgImageSourceTest.java b/Mage.Client/src/test/java/mage/client/game/TokensMtgImageSourceTest.java new file mode 100644 index 00000000000..b33b81d0b99 --- /dev/null +++ b/Mage.Client/src/test/java/mage/client/game/TokensMtgImageSourceTest.java @@ -0,0 +1,32 @@ +package mage.client.game; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; +import org.mage.plugins.card.dl.sources.CardImageSource; +import org.mage.plugins.card.dl.sources.TokensMtgImageSource; +import org.mage.plugins.card.images.CardDownloadData; + +/** + * + * @author Quercitron + */ +@Ignore +public class TokensMtgImageSourceTest { + + @Test + public void generateTokenUrlTest() throws Exception { + CardImageSource imageSource = TokensMtgImageSource.getInstance(); + + String url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", 0, false, 1, "ORI")); + Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_010-Thopter.jpg", url); + url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", 0, false, 2, "ORI")); + Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_011-Thopter.jpg", url); + + url = imageSource.generateTokenUrl(new CardDownloadData("Ashaya, the Awoken World", "ORI", 0, false, 0, "ORI")); + Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_007-Ashaya,-the-Awoken-World.jpg", url); + + url = imageSource.generateTokenUrl(new CardDownloadData("Emblem Gideon, Ally of Zendikar", "BFZ", 0, false, 0, null)); + Assert.assertEquals("http://tokens.mtg.onl/tokens/BFZ_012-Gideon-Emblem.jpg", url); + } +} diff --git a/Mage.Common/pom.xml b/Mage.Common/pom.xml index d41740ec9f5..b35033d97f5 100644 --- a/Mage.Common/pom.xml +++ b/Mage.Common/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 mage-common diff --git a/Mage.Common/src/mage/remote/SessionImpl.java b/Mage.Common/src/mage/remote/SessionImpl.java index 8017868ba74..3b4036d4c26 100644 --- a/Mage.Common/src/mage/remote/SessionImpl.java +++ b/Mage.Common/src/mage/remote/SessionImpl.java @@ -468,9 +468,7 @@ public class SessionImpl implements Session { @Override public void handleConnectionException(Throwable throwable, Client client) { - logger.info("connection to server lost - " + throwable.getMessage()); - throwable.printStackTrace(); - + logger.info("connection to server lost - " + throwable.getMessage(), throwable); reconnect(throwable); } } diff --git a/Mage.Common/src/mage/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java index bc712e76d26..4680bcb2b55 100644 --- a/Mage.Common/src/mage/utils/MageVersion.java +++ b/Mage.Common/src/mage/utils/MageVersion.java @@ -40,8 +40,8 @@ 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 = 4; - public final static String MAGE_VERSION_MINOR_PATCH = "v9"; + public final static int MAGE_VERSION_PATCH = 5; + public final static String MAGE_VERSION_MINOR_PATCH = "v0"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Common/src/mage/utils/properties/PropertiesUtil.java b/Mage.Common/src/mage/utils/properties/PropertiesUtil.java index 50d1bfdbb1f..87a936131f8 100644 --- a/Mage.Common/src/mage/utils/properties/PropertiesUtil.java +++ b/Mage.Common/src/mage/utils/properties/PropertiesUtil.java @@ -1,7 +1,6 @@ package mage.utils.properties; -import com.j256.ormlite.logger.Logger; -import com.j256.ormlite.logger.LoggerFactory; +import org.apache.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -12,7 +11,7 @@ import java.util.Properties; */ public class PropertiesUtil { - private static final Logger logger = LoggerFactory.getLogger(PropertiesUtil.class); + private static final Logger logger = Logger.getLogger(PropertiesUtil.class); private static final String LOG_JDBC_URL = "jdbc:h2:file:./db/mage.h2;AUTO_SERVER=TRUE"; private static final String FEEDBACK_JDBC_URL = "jdbc:h2:file:./db/feedback.h2;AUTO_SERVER=TRUE"; @@ -25,7 +24,7 @@ public class PropertiesUtil { try { properties.load(in); } catch (IOException e) { - logger.error(e, "Couldn't load properties"); + logger.error("Couldn't load properties", e); } } else { logger.warn("No xmage.properties were found on classpath"); diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index 008f6cd0b46..5be823cbe31 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -32,7 +32,7 @@ import java.util.List; import java.util.UUID; import mage.MageObject; import mage.ObjectColor; -import mage.abilities.Modes; +import mage.abilities.Mode; import mage.abilities.SpellAbility; import mage.abilities.costs.mana.ManaCosts; import mage.cards.Card; @@ -153,7 +153,7 @@ public class CardView extends SimpleCardView { * for morph / face down cards to know which player may see information for * the card * @param showFaceDownCard if true and the card is not on the battelfield, - * also a face down card is shown in the view down cards will be shown + * also a face down card is shown in the view, face down cards will be shown */ public CardView(Card card, Game game, boolean controlled, boolean showFaceDownCard) { super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode(), game != null); @@ -311,19 +311,16 @@ public class CardView extends SimpleCardView { this.mageObjectType = MageObjectType.SPELL; Spell spell = (Spell) card; for (SpellAbility spellAbility : spell.getSpellAbilities()) { - for (UUID modeId : spellAbility.getModes().getSelectedModes()) { - spellAbility.getModes().setActiveMode(modeId); - if (spellAbility.getTargets().size() > 0) { + for (Mode mode : spellAbility.getModes().getSelectedModes()) { + if (mode.getTargets().size() > 0) { setTargets(spellAbility.getTargets()); } } } // show for modal spell, which mode was choosen if (spell.getSpellAbility().isModal()) { - Modes modes = spell.getSpellAbility().getModes(); - for (UUID modeId : modes.getSelectedModes()) { - modes.setActiveMode(modeId); - this.rules.add("Chosen mode: " + spell.getSpellAbility().getEffects().getText(modes.get(modeId)) + ""); + for (Mode mode : spell.getSpellAbility().getModes().getSelectedModes()) { + this.rules.add("Chosen mode: " + mode.getEffects().getText(mode) + ""); } } } diff --git a/Mage.Common/src/mage/view/EmblemView.java b/Mage.Common/src/mage/view/EmblemView.java index e4971d5cecb..1681f05de90 100644 --- a/Mage.Common/src/mage/view/EmblemView.java +++ b/Mage.Common/src/mage/view/EmblemView.java @@ -28,6 +28,13 @@ public class EmblemView implements CommandObjectView, Serializable { rules = emblem.getAbilities().getRules(sourceCard.getName()); } + public EmblemView(Emblem emblem) { + id = emblem.getId(); + name = emblem.getName(); + expansionSetCode = emblem.getExpansionSetCodeForImage(); + rules = emblem.getAbilities().getRules(emblem.getName()); + } + @Override public String getExpansionSetCode() { return expansionSetCode; diff --git a/Mage.Common/src/mage/view/GameView.java b/Mage.Common/src/mage/view/GameView.java index 15731967b2c..7060d19ab91 100644 --- a/Mage.Common/src/mage/view/GameView.java +++ b/Mage.Common/src/mage/view/GameView.java @@ -62,7 +62,7 @@ public class GameView implements Serializable { private static final long serialVersionUID = 1L; - private static final transient Logger logger = Logger.getLogger(GameView.class); + private static final Logger logger = Logger.getLogger(GameView.class); private final int priorityTime; private final List players = new ArrayList<>(); @@ -123,6 +123,7 @@ public class GameView implements Serializable { checkPaid(stackObject.getId(), (StackAbility) stackObject); } else if (object instanceof Emblem) { Card sourceCard = game.getCard(((Emblem) object).getSourceId()); + CardView cardView; if (sourceCard != null) { if (!sourceCard.getCardType().contains(CardType.PLANESWALKER)) { if (sourceCard.getSecondCardFace() != null) { @@ -131,11 +132,12 @@ public class GameView implements Serializable { } ((StackAbility) stackObject).setName("Emblem " + sourceCard.getName()); ((StackAbility) stackObject).setExpansionSetCode(sourceCard.getExpansionSetCode()); + cardView = new CardView(new EmblemView(((Emblem) object), sourceCard)); } else { - throw new IllegalArgumentException("Source card for emblem not found."); + cardView = new CardView(new EmblemView((Emblem) object)); } stack.put(stackObject.getId(), - new StackAbilityView(game, (StackAbility) stackObject, object.getName(), new CardView(new EmblemView(((Emblem) object), sourceCard)))); + new StackAbilityView(game, (StackAbility) stackObject, object.getName(), cardView)); checkPaid(stackObject.getId(), ((StackAbility) stackObject)); } else { if (object instanceof StackAbility) { diff --git a/Mage.Common/src/mage/view/PermanentView.java b/Mage.Common/src/mage/view/PermanentView.java index 2b7fe476f00..9ec311a269d 100644 --- a/Mage.Common/src/mage/view/PermanentView.java +++ b/Mage.Common/src/mage/view/PermanentView.java @@ -1,31 +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. -*/ - + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ package mage.view; import java.util.ArrayList; @@ -44,6 +43,7 @@ import mage.players.Player; * @author BetaSteward_at_googlemail.com */ public class PermanentView extends CardView { + private static final long serialVersionUID = 1L; private boolean tapped; @@ -78,7 +78,7 @@ public class PermanentView extends CardView { } this.attachedTo = permanent.getAttachedTo(); if (isToken()) { - original = new CardView(((PermanentToken)permanent).getToken()); + original = new CardView(((PermanentToken) permanent).getToken()); original.expansionSetCode = permanent.getExpansionSetCode(); tokenSetCode = original.getTokenSetCode(); } else { @@ -98,7 +98,7 @@ public class PermanentView extends CardView { this.alternateName = permanent.getFlipCardName(); this.originalName = this.getName(); } else { - if (controlled // controller may always know + if (controlled // controller may always know || (!morphed && !manifested)) { // others don't know for morph or transformed cards this.alternateName = original.getName(); this.originalName = this.getName(); @@ -113,11 +113,11 @@ public class PermanentView extends CardView { this.nameOwner = ""; } } else { - this.nameOwner = ""; + this.nameOwner = ""; } - + if (permanent.isFaceDown(game) && card != null) { - if (controlled){ + if (controlled) { // must be a morphed or manifested card for (Ability permanentAbility : permanent.getAbilities()) { if (permanentAbility instanceof TurnFaceUpAbility && !permanentAbility.getRuleVisible()) { @@ -131,17 +131,17 @@ public class PermanentView extends CardView { this.displayName = card.getName(); this.expansionSetCode = card.getExpansionSetCode(); this.cardNumber = card.getCardNumber(); - } else{ - if (permanent.isMorphed()) { - this.rules.add("If the controller has priority, he or she may turn this permanent face up." + - " This is a special action; it doesn’t use the stack. To do this he or she pays the morph costs," + - " then turns this permanent face up."); - }else if (permanent.isManifested()) { - this.rules.add("A manifested creature card can be turned face up any time for it's mana cost." + - " A face-down card can also be turned face up for its morph cost."); + } else { + if (permanent.isManifested()) { + this.rules.add("A manifested creature card can be turned face up any time for it's mana cost." + + " A face-down card can also be turned face up for its morph cost."); + } else if (permanent.isMorphed()) { + this.rules.add("If the controller has priority, he or she may turn this permanent face up." + + " This is a special action; it doesn’t use the stack. To do this he or she pays the morph costs," + + " then turns this permanent face up."); } } - } + } // determines if shown in it's own column if (permanent.getAttachedTo() != null) { attachedToPermanent = game.getPermanent(permanent.getAttachedTo()) != null; @@ -170,7 +170,7 @@ public class PermanentView extends CardView { return phasedIn; } - public boolean hasSummoningSickness(){ + public boolean hasSummoningSickness() { return summoningSickness; } @@ -209,6 +209,7 @@ public class PermanentView extends CardView { public boolean isMorphed() { return morphed; } + public boolean isManifested() { return manifested; } diff --git a/Mage.Common/src/mage/view/PlayerView.java b/Mage.Common/src/mage/view/PlayerView.java index ce66a5ffbe0..49b5b3d8e54 100644 --- a/Mage.Common/src/mage/view/PlayerView.java +++ b/Mage.Common/src/mage/view/PlayerView.java @@ -58,6 +58,10 @@ public class PlayerView implements Serializable { private final String name; private final int life; private final int poison; + private final int experience; + private final int wins; + private final int winsNeeded; + private final long deckHashCode; private final int libraryCount; private final int handCount; private final boolean isActive; @@ -85,6 +89,10 @@ public class PlayerView implements Serializable { this.name = player.getName(); this.life = player.getLife(); this.poison = player.getCounters().getCount(CounterType.POISON); + this.experience = player.getCounters().getCount(CounterType.EXPERIENCE); + this.wins = player.getMatchPlayer().getWins(); + this.winsNeeded = player.getMatchPlayer().getWinsNeeded(); + this.deckHashCode = player.getMatchPlayer().getDeck().getDeckHashCode(); this.libraryCount = player.getLibrary().size(); this.handCount = player.getHand().size(); this.manaPool = new ManaPoolView(player.getManaPool()); @@ -132,6 +140,8 @@ public class PlayerView implements Serializable { } } commandList.add(new EmblemView(emblem, sourceCard)); + } else { + commandList.add(new EmblemView(emblem)); } } } else if (commandObject instanceof Commander) { @@ -181,10 +191,26 @@ public class PlayerView implements Serializable { return this.poison; } + public int getExperience() { + return this.experience; + } + public int getLibraryCount() { return this.libraryCount; } + public int getWins() { + return wins; + } + + public int getWinsNeeded() { + return winsNeeded; + } + + public long getDeckHashCode() { + return deckHashCode; + } + public int getHandCount() { return this.handCount; } @@ -229,7 +255,7 @@ public class PlayerView implements Serializable { return this.userData; } - public List getCommadObjectList() { + public List getCommandObjectList() { return commandList; } diff --git a/Mage.Common/src/mage/view/SeatView.java b/Mage.Common/src/mage/view/SeatView.java index f8f79a397e2..d812dadebd6 100644 --- a/Mage.Common/src/mage/view/SeatView.java +++ b/Mage.Common/src/mage/view/SeatView.java @@ -30,6 +30,7 @@ package mage.view; import java.io.Serializable; import java.util.UUID; import mage.game.Seat; +import mage.players.net.UserData; /** * @@ -48,7 +49,11 @@ public class SeatView implements Serializable { if (seat.getPlayer() != null) { this.playerId = seat.getPlayer().getId(); this.playerName = seat.getPlayer().getName(); - this.flagName = seat.getPlayer().getUserData().getFlagName(); + if (seat.getPlayer().getUserData() == null) { + this.flagName = UserData.getDefaultFlagName(); + } else { + this.flagName = seat.getPlayer().getUserData().getFlagName(); + } } else { // Empty seat this.playerName = ""; diff --git a/Mage.Common/src/mage/view/StackAbilityView.java b/Mage.Common/src/mage/view/StackAbilityView.java index 6fb4d3c4863..815c0ec13d1 100644 --- a/Mage.Common/src/mage/view/StackAbilityView.java +++ b/Mage.Common/src/mage/view/StackAbilityView.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; import mage.MageObject; +import mage.abilities.Mode; import mage.abilities.Modes; import mage.abilities.effects.Effect; import mage.cards.Card; @@ -98,13 +99,12 @@ public class StackAbilityView extends CardView { private void updateTargets(Game game, StackAbility ability) { List names = new ArrayList<>(); - for (UUID modeId : ability.getModes().getSelectedModes()) { - ability.getModes().setActiveMode(modeId); - if (ability.getTargets().size() > 0) { - setTargets(ability.getTargets()); + for (Mode mode : ability.getModes().getSelectedModes()) { + if (mode.getTargets().size() > 0) { + setTargets(mode.getTargets()); } else { List targetList = new ArrayList<>(); - for (Effect effect : ability.getEffects()) { + for (Effect effect : mode.getEffects()) { TargetPointer targetPointer = effect.getTargetPointer(); if (targetPointer instanceof FixedTarget) { targetList.add(((FixedTarget) targetPointer).getTarget()); @@ -132,9 +132,8 @@ public class StackAbilityView extends CardView { // show for modal ability, which mode was choosen if (ability.isModal()) { Modes modes = ability.getModes(); - for (UUID modeId : modes.getSelectedModes()) { - modes.setActiveMode(modeId); - this.rules.add("Chosen mode: " + ability.getEffects().getText(modes.get(modeId)) + ""); + for (Mode mode : modes.getSelectedModes()) { + this.rules.add("Chosen mode: " + mode.getEffects().getText(mode) + ""); } } } diff --git a/Mage.Plugins/Mage.Counter.Plugin/pom.xml b/Mage.Plugins/Mage.Counter.Plugin/pom.xml index 128d50a5ca8..9005ebb0e46 100644 --- a/Mage.Plugins/Mage.Counter.Plugin/pom.xml +++ b/Mage.Plugins/Mage.Counter.Plugin/pom.xml @@ -7,7 +7,7 @@ org.mage mage-plugins - 1.4.4 + 1.4.5 mage-counter-plugin diff --git a/Mage.Plugins/Mage.Theme.Plugin/pom.xml b/Mage.Plugins/Mage.Theme.Plugin/pom.xml deleted file mode 100644 index f58f45d1d6d..00000000000 --- a/Mage.Plugins/Mage.Theme.Plugin/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - 4.0.0 - - - org.mage - mage-plugins - 1.4.4 - - - mage-theme-plugin - jar - 0.5 - Mage Theme Plugin - Contains resources for drawing background - - - - ${project.groupId} - mage-common - ${mage-version} - - - log4j - log4j - provided - - - ${project.groupId} - mage-client - 1.4.4 - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.7 - 1.7 - - - - - mage-theme-plugin - - diff --git a/Mage.Plugins/Mage.Theme.Plugin/src/main/java/org/mage/plugins/theme/ThemePluginImpl.java b/Mage.Plugins/Mage.Theme.Plugin/src/main/java/org/mage/plugins/theme/ThemePluginImpl.java deleted file mode 100644 index f2a10884a10..00000000000 --- a/Mage.Plugins/Mage.Theme.Plugin/src/main/java/org/mage/plugins/theme/ThemePluginImpl.java +++ /dev/null @@ -1,210 +0,0 @@ -package org.mage.plugins.theme; - -import mage.components.ImagePanel; -import mage.interfaces.plugin.ThemePlugin; -import mage.client.dialog.PreferencesDialog; -import net.xeoh.plugins.base.annotations.PluginImplementation; -import net.xeoh.plugins.base.annotations.events.Init; -import net.xeoh.plugins.base.annotations.events.PluginLoaded; -import net.xeoh.plugins.base.annotations.meta.Author; -import org.apache.log4j.Logger; - -import javax.imageio.ImageIO; -import javax.swing.*; -import java.awt.*; -import java.awt.image.BufferedImage; -import java.io.File; -import java.io.*; -import java.io.InputStream; -import java.util.Map; - -@PluginImplementation -@Author(name = "nantuko") -public class ThemePluginImpl implements ThemePlugin { - - private static final Logger log = Logger.getLogger(ThemePluginImpl.class); - private static BufferedImage background; - private List flist = new List(); - private String BackgroundDir = "plugins" + File.separator + "plugin.data" + File.separator - + "background" + File.separator; - @Init - public void init() { - } - - @PluginLoaded - public void newPlugin(ThemePlugin plugin) { - log.info(plugin.toString() + " has been loaded."); - } - - public String toString() { - return "[Theme plugin, version 0.5]"; - } - - public boolean loadimages(){ - File filedir = new File(BackgroundDir); - File[] filelist = filedir.listFiles(); - if(filelist == null) return false; - if(filelist.length == 0) return false; - for(File f:filelist){ - String filename = f.getName().toLowerCase(); - if(filename != null && (filename.endsWith(".png") || filename.endsWith(".jpg") - || filename.endsWith(".bmp"))){ - flist.add(filename); - } - } - if(flist.getItemCount() == 0) return false; - return true; - } - - public void applyInGame(Map ui) { - BufferedImage background; - try { - - if(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_BATTLEFIELD_IMAGE_DEFAULT, - "true").equals("true")){ - - background = loadbuffer_default(); - - }else if(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_BATTLEFIELD_IMAGE_RANDOM, - "true").equals("true")){ - - background = loadbuffer_random(); - - }else if(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_BATTLEFIELD_IMAGE, "") != null){ - - background = loadbuffer_selected(); - - }else{ - background = loadbuffer_default(); - } - - - - /* - if(loadimages()){ - int it = (int)Math.abs(Math.random()*(flist.getItemCount())); - filename = BackgroundDir + flist.getItem(it); - background = ImageIO.read(new File(filename)); - }else{ - filename = "/dragon.png"; - InputStream is = this.getClass().getResourceAsStream(filename); - if (is == null) - throw new FileNotFoundException("Couldn't find " + filename + " in resources."); - background = ImageIO.read(is); - } - */ - if (background == null) { - throw new FileNotFoundException("Couldn't find background file in resources."); - } - - if (ui.containsKey("gamePanel") && ui.containsKey("jLayeredPane")) { - ImagePanel bgPanel = new ImagePanel(background, ImagePanel.TILED); - - unsetOpaque(ui.get("jSplitPane1")); - unsetOpaque(ui.get("pnlBattlefield")); - unsetOpaque(ui.get("jPanel3")); - unsetOpaque(ui.get("hand")); - unsetOpaque(ui.get("gameChatPanel")); - unsetOpaque(ui.get("userChatPanel")); - - ui.get("gamePanel").remove(ui.get("jLayeredPane")); - bgPanel.add(ui.get("jLayeredPane")); - ui.get("gamePanel").add(bgPanel); - } else { - log.error("error: no components"); - } - } catch (Exception e) { - log.error(e.getMessage(), e); - return; - } - } - - - private BufferedImage loadbuffer_default() throws IOException{ - String filename = "/dragon.png"; - BufferedImage res; - InputStream is = this.getClass().getResourceAsStream(filename); - res = ImageIO.read(is); - return res; - } - - private BufferedImage loadbuffer_random() throws IOException{ - BufferedImage res; - if(loadimages()){ - int it = (int)Math.abs(Math.random()*(flist.getItemCount())); - String filename = BackgroundDir + flist.getItem(it); - res = ImageIO.read(new File(filename)); - return res; - } - return null; - } - - private BufferedImage loadbuffer_selected() throws IOException{ - BufferedImage res; - String path = PreferencesDialog.getCachedValue(PreferencesDialog. - KEY_BATTLEFIELD_IMAGE, ""); - if(path != null){ - res = ImageIO.read(new File(path)); - return res; - } - return null; - } - - - public JComponent updateTable(Map ui) { - ImagePanel bgPanel = createImagePanelInstance(); - - unsetOpaque(ui.get("jScrollPane1")); - unsetOpaque(ui.get("jPanel1")); - unsetOpaque(ui.get("tablesPanel")); - JComponent viewport = ui.get("jScrollPane1ViewPort"); - if (viewport != null) { - viewport.setBackground(new Color(255,255,255,50)); - } - return bgPanel; - } - - private ImagePanel createImagePanelInstance() { - if (background == null) { - synchronized (ThemePluginImpl.class) { - if (background == null) { - String filename = "/background.png"; - try { - if(PreferencesDialog.getCachedValue(PreferencesDialog. - KEY_BACKGROUND_IMAGE_DEFAULT, "true").equals("true")){ - InputStream is = this.getClass().getResourceAsStream(filename); - if (is == null) - throw new FileNotFoundException("Couldn't find " + filename + " in resources."); - background = ImageIO.read(is); - }else if(PreferencesDialog.getCachedValue(PreferencesDialog. - KEY_BACKGROUND_IMAGE, "") != null){ - String path = PreferencesDialog.getCachedValue(PreferencesDialog. - KEY_BATTLEFIELD_IMAGE, ""); - if(path != null){ - background = ImageIO.read(new File(path)); - }else{ - InputStream is = this.getClass().getResourceAsStream(filename); - if (is == null) - throw new FileNotFoundException("Couldn't find " + filename + " in resources."); - background = ImageIO.read(is); - } - } - - if (background == null) - throw new FileNotFoundException("Couldn't find " + filename + " in resources."); - } catch (Exception e) { - log.error(e.getMessage(), e); - return null; - } - } - } - } - return new ImagePanel(background, ImagePanel.SCALED); - } - - private void unsetOpaque(JComponent c) { - if (c != null) { - c.setOpaque(false); - } - } -} diff --git a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/background.png b/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/background.png deleted file mode 100644 index 01acc151f2c..00000000000 Binary files a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/background.png and /dev/null differ diff --git a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/dk_gray.jpg b/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/dk_gray.jpg deleted file mode 100644 index 2e0776d6068..00000000000 Binary files a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/dk_gray.jpg and /dev/null differ diff --git a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/dragon.png b/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/dragon.png deleted file mode 100644 index 634f56c21c8..00000000000 Binary files a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/dragon.png and /dev/null differ diff --git a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/green.jpg b/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/green.jpg deleted file mode 100644 index f5705253297..00000000000 Binary files a/Mage.Plugins/Mage.Theme.Plugin/src/main/resources/green.jpg and /dev/null differ diff --git a/Mage.Plugins/pom.xml b/Mage.Plugins/pom.xml index e1a1ba632b5..b8ec0e9e444 100644 --- a/Mage.Plugins/pom.xml +++ b/Mage.Plugins/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 mage-plugins @@ -16,7 +16,6 @@ Mage Plugins POM - Mage.Theme.Plugin Mage.Counter.Plugin diff --git a/Mage.Server.Console/pom.xml b/Mage.Server.Console/pom.xml index 8a31921aef7..01ecd66db97 100644 --- a/Mage.Server.Console/pom.xml +++ b/Mage.Server.Console/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 org.mage diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml index ed0bd5025fd..64f1bfa7580 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-deck-constructed diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalStandard.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalType2.java similarity index 96% rename from Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalStandard.java rename to Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalType2.java index 9f15bf867dc..08e2025ddb2 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalStandard.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/HistoricalType2.java @@ -23,7 +23,7 @@ import mage.constants.SetType; * * @author Marthinwurer (at gmail.com) */ -public class HistoricalStandard extends Constructed { +public class HistoricalType2 extends Constructed { /* * This array stores the set codes of each standard up to @@ -34,9 +34,9 @@ public class HistoricalStandard extends Constructed { {"DRK", "FEM", "4ED"}, // 2nd standard: 4th, Fallen Empires, Ice Age, Chronicles, Homelands, // Alliances, and Mirage. - {"FEM", "4ED", "ICE", "HML", "ALL", "MIR"}, + {"FEM", "4ED", "ICE", "CHR", "HML", "ALL", "MIR"}, // 3rd standard: 4th, Chronicles, Alliances, Mirage, Visions. - {"4ED", "ALL", "MIR", "VIS"}, + {"4ED", "CHR", "ALL", "MIR", "VIS"}, // 4th Standard: Ice Age, Homelands, Alliances, Mirage, Visions, 5th, // and Weatherlight. {"ICE", "HML", "ALL", "MIR", "VIS", "5ED", "WTH"}, @@ -84,15 +84,17 @@ public class HistoricalStandard extends Constructed { * Constructor. Don't need to mess with any of the sets yet; that will be * done in the overridden validate function. */ - public HistoricalStandard() { - super("Constructed - Historical Standard"); + public HistoricalType2() { + super("Constructed - Historical Type 2"); // banned cards banned.add("Balance"); + banned.add("Earthcraft"); banned.add("Memory Jar"); banned.add("Mind Over Matter"); banned.add("Mind Twist"); banned.add("Skullclamp"); + banned.add("Time Spiral"); banned.add("Tolarian Academy"); banned.add("Yawgmoth's Bargain"); } diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Momir.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Momir.java new file mode 100644 index 00000000000..48a05c3c81e --- /dev/null +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Momir.java @@ -0,0 +1,70 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.deck; + +import mage.cards.Card; +import mage.cards.decks.Deck; +import mage.cards.decks.DeckValidator; + +import java.util.*; + +/** + * + * @author nigelzor + */ +public class Momir extends DeckValidator { + + public Momir() { + this("Momir Basic"); + } + + public Momir(String name) { + super(name); + } + + @Override + public boolean validate(Deck deck) { + boolean valid = true; + + if (deck.getCards().size() != 60) { + invalid.put("Deck", "Must contain 60 cards: has " + deck.getCards().size() + " cards"); + valid = false; + } + + List basicLandNames = new ArrayList<>(Arrays.asList("Forest", "Island", "Mountain", "Swamp", "Plains")); + for (Card card : deck.getCards()) { + if (!basicLandNames.contains(card.getName())) { + invalid.put(card.getName(), "Only basic lands are allowed"); + valid = false; + } + } + + return valid; + } + +} diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/SuperStandard.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/SuperType2.java similarity index 97% rename from Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/SuperStandard.java rename to Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/SuperType2.java index de7ff76aae7..70780d45796 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/SuperStandard.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/SuperType2.java @@ -18,13 +18,13 @@ import mage.constants.SetType; * * This class was originally made to work with the historical standard ruleset. * Data taken from http://thattournament.website/historic-tournament.php (site - * changed, originally thtp://mtgt.nfshost.com/historic-tournament.php) + * changed, originally http://mtgt.nfshost.com/historic-tournament.php) * * If there are any questions or corrections, feel free to contact me. * * @author Marthinwurer (at gmail.com) */ -public class SuperStandard extends Constructed { +public class SuperType2 extends Constructed { /* * This array stores the set codes of each standard up to @@ -60,8 +60,8 @@ public class SuperStandard extends Constructed { * Constructor. Don't need to mess with any of the sets yet; that will be * done in the overridden validate function. */ - public SuperStandard() { - super("Constructed - Super Standard"); + public SuperType2() { + super("Constructed - Super Type 2"); banned.add("Ancient Den"); banned.add("Disciple of the Vault"); diff --git a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml index 978f5fe60ea..35b61af4df8 100644 --- a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml +++ b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-deck-limited diff --git a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml index e42e4d1eb72..009e2da37e0 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-game-commanderduel diff --git a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml index 7b4738d4885..faadbdb0d99 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml @@ -6,7 +6,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-game-commanderfreeforall diff --git a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml index 551b33a9650..75f223eebdf 100644 --- a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-game-freeforall diff --git a/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml new file mode 100644 index 00000000000..828f8c1cdd5 --- /dev/null +++ b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml @@ -0,0 +1,50 @@ + + + + 4.0.0 + + + org.mage + mage-server-plugins + 1.4.5 + + + mage-game-momirduel + jar + Mage Game Momir Basic Two Player + + + + ${project.groupId} + mage + ${project.version} + + + + + src + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.7 + 1.7 + + + + maven-resources-plugin + + UTF-8 + + + + + + mage-game-momirduel + + + + + diff --git a/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuel.java b/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuel.java new file mode 100644 index 00000000000..e34dd81d2a9 --- /dev/null +++ b/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuel.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.game; + +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.VariableManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.cards.Card; +import mage.cards.repository.CardCriteria; +import mage.cards.repository.CardInfo; +import mage.cards.repository.CardRepository; +import mage.constants.*; +import mage.game.command.Emblem; +import mage.game.match.MatchType; +import mage.game.permanent.token.EmptyToken; +import mage.game.turn.TurnMod; +import mage.players.Player; +import mage.util.CardUtil; + +import java.util.*; + +/** + * + * @author nigelzor + */ +public class MomirDuel extends GameImpl { + + public MomirDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, int freeMulligans, int startLife) { + super(attackOption, range, freeMulligans, startLife); + } + + public MomirDuel(final MomirDuel game) { + super(game); + } + + @Override + public MatchType getGameType() { + return new MomirDuelType(); + } + + @Override + public int getNumPlayers() { + return 2; + } + + @Override + protected void init(UUID choosingPlayerId) { + Ability ability = new SimpleStaticAbility(Zone.COMMAND, new InfoEffect("Vanguard effects")); + for (UUID playerId : state.getPlayerList(startingPlayerId)) { + Player player = getPlayer(playerId); + if (player != null) { + addEmblem(new MomirEmblem(), ability, playerId); + } + } + getState().addAbility(ability, null); + super.init(choosingPlayerId); + state.getTurnMods().add(new TurnMod(startingPlayerId, PhaseStep.DRAW)); + } + + @Override + public Set getOpponents(UUID playerId) { + Set opponents = new HashSet<>(); + for (UUID opponentId: this.getPlayer(playerId).getInRange()) { + if (!opponentId.equals(playerId)) { + opponents.add(opponentId); + } + } + return opponents; + } + + @Override + public boolean isOpponent(Player player, UUID playerToCheck) { + return !player.getId().equals(playerToCheck); + } + + @Override + public MomirDuel copy() { + return new MomirDuel(this); + } + +} + +// faking Vanguard as an Emblem; need to come back to this and add a new type of CommandObject +class MomirEmblem extends Emblem { + + public MomirEmblem() { + setName("Momir Vig, Simic Visionary"); + + // {X}, Discard a card: Put a token into play as a copy of a random creature card with converted mana cost X. Play this ability only any time you could play a sorcery and only once each turn. + LimitedTimesPerTurnActivatedAbility ability = new LimitedTimesPerTurnActivatedAbility(Zone.COMMAND, new MomirEffect(), new VariableManaCost()); + ability.addCost(new DiscardCardCost()); + ability.setTiming(TimingRule.SORCERY); + this.getAbilities().add(ability); + + } +} + +class MomirEffect extends OneShotEffect { + + private static final Random rnd = new Random(); + + public MomirEffect() { + super(Outcome.PutCreatureInPlay); + } + + public MomirEffect(MomirEffect effect) { + super(effect); + staticText = "Put a token into play as a copy of a random creature card with converted mana cost X"; + } + + @Override + public MomirEffect copy() { + return new MomirEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int value = source.getManaCostsToPay().getX(); + // should this be random across card names, or card printings? + CardCriteria criteria = new CardCriteria().types(CardType.CREATURE).convertedManaCost(value); + List options = CardRepository.instance.findCards(criteria); + if (options != null && !options.isEmpty()) { + Card card = options.get(rnd.nextInt(options.size())).getCard(); + EmptyToken token = new EmptyToken(); + CardUtil.copyTo(token).from(card); + token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, false); + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuelMatch.java b/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuelMatch.java new file mode 100644 index 00000000000..9f91e749f05 --- /dev/null +++ b/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuelMatch.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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; + +import mage.game.match.MatchImpl; +import mage.game.match.MatchOptions; + +/** + * + * @author nigelzor + */ +public class MomirDuelMatch extends MatchImpl { + + public MomirDuelMatch(MatchOptions options) { + super(options); + } + + @Override + public void startGame() throws GameException { + // Momir Vig, Simic Visionary gives +4 starting life + int startLife = 24; + + MomirDuel game = new MomirDuel(options.getAttackOption(), options.getRange(), options.getFreeMulligans(), startLife); + game.setStartMessage(this.createGameStartMessage()); + + this.initGame(game); + games.add(game); + } + +} diff --git a/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuelType.java b/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuelType.java new file mode 100644 index 00000000000..4ec7925477f --- /dev/null +++ b/Mage.Server.Plugins/Mage.Game.MomirDuel/src/mage/game/MomirDuelType.java @@ -0,0 +1,57 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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; + +import mage.game.match.MatchType; + +/** + * + * @author nigelzor + */ +public class MomirDuelType extends MatchType { + + public MomirDuelType() { + this.name = "Momir Basic Two Player Duel"; + this.maxPlayers = 2; + this.minPlayers = 2; + this.numTeams = 0; + this.useAttackOption = false; + this.useRange = false; + this.sideboardingAllowed = true; + } + + protected MomirDuelType(final MomirDuelType matchType){ + super(matchType); + } + + @Override + public MomirDuelType copy() { + return new MomirDuelType(this); + } + +} diff --git a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml index 8f037f31689..bbeeed59005 100644 --- a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-game-tinyleadersduel diff --git a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml index f5febf5042b..a3d7867c387 100644 --- a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-game-twoplayerduel diff --git a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml index cb6012e3f6e..7ee253d4b6b 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-player-ai-draftbot diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml index 23942195fde..9d55f31bbde 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-player-ai-ma diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java index 022e7f9ee30..37cce686334 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java @@ -104,6 +104,7 @@ import mage.players.Player; import mage.target.Target; import mage.target.TargetCard; import mage.target.Targets; +import org.apache.log4j.Logger; /** * @@ -111,7 +112,7 @@ import mage.target.Targets; */ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ { - private static final transient org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(ComputerPlayer6.class); + private static final Logger logger = Logger.getLogger(ComputerPlayer6.class); private static final ExecutorService pool = Executors.newFixedThreadPool(1); protected int maxDepth; protected int maxNodes; @@ -1193,7 +1194,8 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ { safeToAttack = false; } if (safeToAttack) { - attackingPlayer.declareAttacker(attacker.getId(), defenderId, game, false); + // undo has to be possible e.g. if not able to pay a attack fee (e.g. Ghostly Prison) + attackingPlayer.declareAttacker(attacker.getId(), defenderId, game, true); } } } diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer7.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer7.java index 22037b2ad53..3822c054646 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer7.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer7.java @@ -74,7 +74,7 @@ import org.apache.log4j.Logger; */ public class ComputerPlayer7 extends ComputerPlayer6 { - private static final transient Logger logger = Logger.getLogger(ComputerPlayer7.class); + private static final Logger logger = Logger.getLogger(ComputerPlayer7.class); private boolean allowBadMoves; diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/Config2.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/Config2.java index 6123868991c..55d87f6914e 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/Config2.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/Config2.java @@ -28,14 +28,13 @@ package mage.player.ai; +import org.apache.log4j.Logger; + import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URISyntaxException; import java.util.Properties; -import java.util.logging.Level; -import java.util.logging.Logger; -import mage.util.Logging; /** * @@ -43,7 +42,7 @@ import mage.util.Logging; */ public class Config2 { - private static final Logger logger = Logging.getLogger(Config2.class.getName()); + private static final Logger logger = Logger.getLogger(Config2.class); // public static final int maxDepth; public static final int maxNodes; @@ -70,9 +69,9 @@ public class Config2 { // p.setProperty("maxThinkSeconds", "30"); } } catch (IOException ex) { - logger.log(Level.SEVERE, null, ex); + logger.error(null, ex); } catch (URISyntaxException ex) { - Logger.getLogger(Config2.class.getName()).log(Level.SEVERE, null, ex); + logger.error(null, ex); } // maxDepth = Integer.parseInt(p.getProperty("maxDepth")); maxNodes = Integer.parseInt(p.getProperty("maxNodes")); diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/GameStateEvaluator2.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/GameStateEvaluator2.java index 0e2c9f409c1..68661f92b86 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/GameStateEvaluator2.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/GameStateEvaluator2.java @@ -9,6 +9,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.player.ai.ma.ArtificialScoringSystem; import mage.players.Player; +import org.apache.log4j.Logger; /** * @@ -19,7 +20,7 @@ import mage.players.Player; */ public class GameStateEvaluator2 { - private static final transient org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(GameStateEvaluator2.class); + private static final Logger logger = Logger.getLogger(GameStateEvaluator2.class); public static final int WIN_GAME_SCORE = 100000000; public static final int LOSE_GAME_SCORE = -WIN_GAME_SCORE; diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java index fce50c8ff20..058d42b6e6d 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java @@ -63,7 +63,7 @@ import org.apache.log4j.Logger; */ public class SimulatedPlayer2 extends ComputerPlayer { - private static final transient Logger logger = Logger.getLogger(SimulatedPlayer2.class); + private static final Logger logger = Logger.getLogger(SimulatedPlayer2.class); private final boolean isSimulatedPlayer; private transient ConcurrentLinkedQueue allActions; private boolean forced; diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulationWorker2.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulationWorker2.java index 991947bcb87..971cd3698e5 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulationWorker2.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulationWorker2.java @@ -29,11 +29,9 @@ package mage.player.ai; import java.util.concurrent.Callable; -import java.util.logging.Level; -import java.util.logging.Logger; import mage.abilities.Ability; import mage.game.Game; -import mage.util.Logging; +import org.apache.log4j.Logger; /** * @@ -41,7 +39,7 @@ import mage.util.Logging; */ public class SimulationWorker2 implements Callable { - private static final Logger logger = Logging.getLogger(SimulationWorker2.class.getName()); + private static final Logger logger = Logger.getLogger(SimulationWorker2.class); private Game game; private SimulatedAction2 previousActions; @@ -60,7 +58,7 @@ public class SimulationWorker2 implements Callable { try { // player.simulateAction(game, previousActions, action); } catch (Exception ex) { - logger.log(Level.SEVERE, null, ex); + logger.error(null, ex); } return null; } diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/util/CombatUtil.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/util/CombatUtil.java index 262523582ef..a5118936766 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/util/CombatUtil.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/util/CombatUtil.java @@ -12,6 +12,7 @@ import mage.game.turn.EndOfCombatStep; import mage.game.turn.FirstCombatDamageStep; import mage.game.turn.Step; import mage.players.Player; +import org.apache.log4j.Logger; import java.util.*; @@ -24,7 +25,7 @@ public class CombatUtil { private static final List emptyList = new ArrayList(); - private static final transient org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(CombatUtil.class); + private static final Logger log = Logger.getLogger(CombatUtil.class); private CombatUtil() { } diff --git a/Mage.Server.Plugins/Mage.Player.AI/pom.xml b/Mage.Server.Plugins/Mage.Player.AI/pom.xml index 43387e7f257..8ed2a850251 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-player-ai 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 f8666697568..6e2acbb8fa9 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 @@ -79,8 +79,6 @@ import mage.cards.decks.Deck; import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; -import mage.cards.repository.ExpansionInfo; -import mage.cards.repository.ExpansionRepository; import mage.choices.Choice; import mage.choices.ChoiceColor; import mage.constants.AsThoughEffectType; @@ -145,10 +143,12 @@ import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayerAmount; import mage.target.common.TargetDefender; import mage.target.common.TargetDiscard; +import mage.target.common.TargetOpponent; import mage.target.common.TargetPermanentOrPlayer; import mage.target.common.TargetSpellOrPermanent; import mage.util.Copier; import mage.util.MessageToClient; +import mage.util.TournamentUtil; import mage.util.TreeNode; import org.apache.log4j.Logger; @@ -160,7 +160,7 @@ import org.apache.log4j.Logger; */ public class ComputerPlayer extends PlayerImpl implements Player { - private transient final static Logger log = Logger.getLogger(ComputerPlayer.class); + private static final Logger log = Logger.getLogger(ComputerPlayer.class); protected int PASSIVITY_PENALTY = 5; // Penalty value for doing nothing if some actions are availble protected boolean ALLOW_INTERRUPT = true; // change this for test / debugging purposes to false to switch off interrupts while debugging @@ -173,6 +173,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { private transient List chosenColors; private transient ManaCost currentUnpaidMana; + private final Random random = new Random(); public ComputerPlayer(String name, RangeOfInfluence range) { super(name, range); @@ -196,7 +197,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { @Override public boolean chooseMulligan(Game game) { log.debug("chooseMulligan"); - if (hand.size() < 6 || isTestMode()) { + if (hand.size() < 6 || isTestMode() || game.getClass().getName().contains("Momir")) { return false; } Set lands = hand.getCards(new FilterLandCard(), game); @@ -218,33 +219,11 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (target.getTargetController() != null && target.getAbilityController() != null) { abilityControllerId = target.getAbilityController(); } - UUID opponentId = game.getOpponents(abilityControllerId).iterator().next(); + UUID randomOpponentId = getRandomOpponent(abilityControllerId, game); if (target instanceof TargetPlayer) { - if (outcome.isGood()) { - if (target.canTarget(abilityControllerId, game)) { - target.add(abilityControllerId, game); - return true; - } - if (target.isRequired(sourceId, game)) { - if (target.canTarget(opponentId, game)) { - target.add(opponentId, game); - return true; - } - } - } else { - if (target.canTarget(opponentId, game)) { - target.add(opponentId, game); - return true; - } - if (target.isRequired(sourceId, game)) { - if (target.canTarget(abilityControllerId, game)) { - target.add(abilityControllerId, game); - return true; - } - } - } - return false; + return setTargetPlayer(outcome, target, null, sourceId, abilityControllerId, randomOpponentId, game); } + if (target instanceof TargetDiscard) { findPlayables(game); if (unplayable.size() > 0) { @@ -291,13 +270,13 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (outcome.isGood()) { targets = threats(abilityControllerId, sourceId, ((TargetPermanent) target).getFilter(), game, target.getTargets()); } else { - targets = threats(opponentId, sourceId, ((TargetPermanent) target).getFilter(), game, target.getTargets()); + targets = threats(randomOpponentId, sourceId, ((TargetPermanent) target).getFilter(), game, target.getTargets()); } if (targets.isEmpty() && target.isRequired()) { if (!outcome.isGood()) { targets = threats(abilityControllerId, sourceId, ((TargetPermanent) target).getFilter(), game, target.getTargets()); } else { - targets = threats(opponentId, sourceId, ((TargetPermanent) target).getFilter(), game, target.getTargets()); + targets = threats(randomOpponentId, sourceId, ((TargetPermanent) target).getFilter(), game, target.getTargets()); } } } @@ -322,9 +301,10 @@ public class ComputerPlayer extends PlayerImpl implements Player { return target.isChosen(); } - if (target instanceof TargetCardInHand) { + if (target instanceof TargetCardInHand + || (target.getZone().equals(Zone.HAND) && (target instanceof TargetCard))) { List cards = new ArrayList<>(); - for (UUID cardId : ((TargetCardInHand) target).possibleTargets(sourceId, this.getId(), game)) { + for (UUID cardId : target.possibleTargets(sourceId, this.getId(), game)) { Card card = game.getCard(cardId); if (card != null) { cards.add(card); @@ -346,7 +326,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (outcome.isGood()) { targets = threats(abilityControllerId, sourceId, ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } else { - targets = threats(opponentId, sourceId, ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); + targets = threats(randomOpponentId, sourceId, ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } for (Permanent permanent : targets) { List alreadyTargetted = target.getTargets(); @@ -363,8 +343,8 @@ public class ComputerPlayer extends PlayerImpl implements Player { return true; } } else { - if (target.canTarget(opponentId, null, game)) { - target.add(opponentId, game); + if (target.canTarget(randomOpponentId, null, game)) { + target.add(randomOpponentId, game); return true; } } @@ -376,8 +356,8 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (target instanceof TargetPermanentOrPlayer) { List targets; TargetPermanentOrPlayer t = ((TargetPermanentOrPlayer) target); - List ownedTargets = threats(abilityControllerId, sourceId, ((FilterPermanentOrPlayer) t.getFilter()).getPermanentFilter(), game, target.getTargets());; - List opponentTargets = threats(opponentId, sourceId, ((FilterPermanentOrPlayer) t.getFilter()).getPermanentFilter(), game, target.getTargets()); + List ownedTargets = threats(abilityControllerId, sourceId, ((FilterPermanentOrPlayer) t.getFilter()).getPermanentFilter(), game, target.getTargets()); + List opponentTargets = threats(randomOpponentId, sourceId, ((FilterPermanentOrPlayer) t.getFilter()).getPermanentFilter(), game, target.getTargets()); if (outcome.isGood()) { targets = ownedTargets; } else { @@ -398,16 +378,16 @@ public class ComputerPlayer extends PlayerImpl implements Player { return true; } } else { - if (target.canTarget(opponentId, null, game)) { - target.add(opponentId, game); + if (target.canTarget(randomOpponentId, null, game)) { + target.add(randomOpponentId, game); return true; } } if (!target.isRequired(sourceId, game) || target.getNumberOfTargets() == 0) { return false; } - if (target.canTarget(opponentId, null, game)) { - target.add(opponentId, game); + if (target.canTarget(randomOpponentId, null, game)) { + target.add(randomOpponentId, game); return true; } if (target.canTarget(abilityControllerId, null, game)) { @@ -495,33 +475,11 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (target.getAbilityController() != null) { abilityControllerId = target.getAbilityController(); } - UUID opponentId = game.getOpponents(abilityControllerId).iterator().next(); + UUID randomOpponentId = getRandomOpponent(abilityControllerId, game); if (target instanceof TargetPlayer) { - if (outcome.isGood()) { - if (target.canTarget(abilityControllerId, abilityControllerId, source, game)) { - target.addTarget(playerId, source, game); - return true; - } - if (target.isRequired(source)) { - if (target.canTarget(abilityControllerId, opponentId, source, game)) { - target.addTarget(opponentId, source, game); - return true; - } - } - } else { - if (target.canTarget(abilityControllerId, opponentId, source, game)) { - target.addTarget(opponentId, source, game); - return true; - } - if (target.isRequired(source)) { - if (target.canTarget(abilityControllerId, abilityControllerId, source, game)) { - target.addTarget(abilityControllerId, source, game); - return true; - } - } - } - return false; + return setTargetPlayer(outcome, target, source, source.getSourceId(), abilityControllerId, randomOpponentId, game); } + if (target instanceof TargetDiscard || target instanceof TargetCardInHand) { if (outcome.isGood()) { Cards cards = new CardsImpl(target.possibleTargets(source.getSourceId(), getId(), game)); @@ -588,7 +546,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (outcome.isGood()) { targets = threats(abilityControllerId, source == null ? null : source.getSourceId(), ((TargetPermanent) target).getFilter(), game, target.getTargets()); } else { - targets = threats(opponentId, source == null ? null : source.getSourceId(), ((TargetPermanent) target).getFilter(), game, target.getTargets()); + targets = threats(randomOpponentId, source == null ? null : source.getSourceId(), ((TargetPermanent) target).getFilter(), game, target.getTargets()); } if (targets.isEmpty() && target.isRequired(source)) { targets = threats(null, source == null ? null : source.getSourceId(), ((TargetPermanent) target).getFilter(), game, target.getTargets()); @@ -612,7 +570,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (outcome.isGood()) { targets = threats(abilityControllerId, source.getSourceId(), ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } else { - targets = threats(opponentId, source.getSourceId(), ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); + targets = threats(randomOpponentId, source.getSourceId(), ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } if (targets.isEmpty()) { @@ -622,8 +580,8 @@ public class ComputerPlayer extends PlayerImpl implements Player { return true; } } else { - if (target.canTarget(getId(), opponentId, source, game)) { - target.addTarget(opponentId, source, game); + if (target.canTarget(getId(), randomOpponentId, source, game)) { + target.addTarget(randomOpponentId, source, game); return true; } } @@ -648,8 +606,8 @@ public class ComputerPlayer extends PlayerImpl implements Player { return true; } } else { - if (target.canTarget(getId(), opponentId, source, game)) { - target.addTarget(opponentId, source, game); + if (target.canTarget(getId(), randomOpponentId, source, game)) { + target.addTarget(randomOpponentId, source, game); return true; } } @@ -709,7 +667,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (outcome.isGood()) { targets = threats(abilityControllerId, source == null ? null : source.getSourceId(), ((TargetSpellOrPermanent) target).getPermanentFilter(), game, target.getTargets()); } else { - targets = threats(opponentId, source == null ? null : source.getSourceId(), ((TargetSpellOrPermanent) target).getPermanentFilter(), game, target.getTargets()); + targets = threats(randomOpponentId, source == null ? null : source.getSourceId(), ((TargetSpellOrPermanent) target).getPermanentFilter(), game, target.getTargets()); } if (targets.isEmpty() && target.isRequired(source)) { targets = threats(null, source == null ? null : source.getSourceId(), ((TargetSpellOrPermanent) target).getPermanentFilter(), game, target.getTargets()); @@ -757,7 +715,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (target instanceof TargetDefender) { // TODO: Improve, now planeswalker is always chosen if it exits List targets; - targets = game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), opponentId, game); + targets = game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), randomOpponentId, game); if (targets != null && !targets.isEmpty()) { for (Permanent planeswalker : targets) { if (target.canTarget(getId(), planeswalker.getId(), source, game)) { @@ -769,8 +727,8 @@ public class ComputerPlayer extends PlayerImpl implements Player { } } if (!target.isChosen()) { - if (target.canTarget(getId(), opponentId, source, game)) { - target.addTarget(opponentId, source, game); + if (target.canTarget(getId(), randomOpponentId, source, game)) { + target.addTarget(randomOpponentId, source, game); } } return target.isChosen(); @@ -993,7 +951,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { } while (lands.size() > 0 && this.canPlayLand()) { if (lands.size() == 1) { - this.playLand(lands.iterator().next(), game); + this.playLand(lands.iterator().next(), game, false); } else { playALand(lands, game); } @@ -1008,7 +966,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { for (ManaAbility ability : card.getAbilities().getManaAbilities(Zone.BATTLEFIELD)) { for (Mana netMana : ability.getNetMana(game)) { if (netMana.enough(mana)) { - this.playLand(card, game); + this.playLand(card, game, false); lands.remove(card); return; } @@ -1022,7 +980,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { for (ManaAbility ability : card.getAbilities().getManaAbilities(Zone.BATTLEFIELD)) { for (Mana netMana : ability.getNetMana(game)) { if (mana.contains(netMana)) { - this.playLand(card, game); + this.playLand(card, game, false); lands.remove(card); return; } @@ -1031,7 +989,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { } } //play first available land - this.playLand(lands.iterator().next(), game); + this.playLand(lands.iterator().next(), game, false); lands.remove(lands.iterator().next()); } @@ -1567,9 +1525,14 @@ public class ComputerPlayer extends PlayerImpl implements Player { return modes.getMode(); } //TODO: improve this; + AvailableMode: for (Mode mode : modes.getAvailableModes(source, game)) { - if (!modes.getSelectedModes().contains(mode.getId()) // select only modes not already selected - && mode.getTargets().canChoose(source.getSourceId(), source.getControllerId(), game)) { // and where targets are available + for (Mode selectedMode : modes.getSelectedModes()) { + if (selectedMode.getId().equals(mode.getId())) { + continue AvailableMode; + } + } + if (mode.getTargets().canChoose(source.getSourceId(), source.getControllerId(), game)) { // and where targets are available return mode; } } @@ -1631,42 +1594,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { private static void addBasicLands(Deck deck, String landName, int number) { Random random = new Random(); - Set landSets = new HashSet<>(); - - // decide from which sets basic lands are taken from - for (String setCode : deck.getExpansionSetCodes()) { - ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); - if (expansionInfo.hasBasicLands()) { - landSets.add(expansionInfo.getCode()); - } - } - - // if sets have no basic land, take land from block - if (landSets.isEmpty()) { - for (String setCode : deck.getExpansionSetCodes()) { - ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); - List blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName()); - for (ExpansionInfo blockSet : blockSets) { - if (blockSet.hasBasicLands()) { - landSets.add(blockSet.getCode()); - } - } - } - } - // if still no set with lands found, take one by random - if (landSets.isEmpty()) { - // if sets have no basic lands and also it has no parent or parent has no lands get last set with lands - // select a set with basic lands by random - Random generator = new Random(); - List basicLandSets = ExpansionRepository.instance.getSetsWithBasicLandsByReleaseDate(); - if (basicLandSets.size() > 0) { - landSets.add(basicLandSets.get(generator.nextInt(basicLandSets.size())).getCode()); - } - } - - if (landSets.isEmpty()) { - throw new IllegalArgumentException("No set with basic land was found"); - } + Set landSets = TournamentUtil.getLandSetCodeForDeckSets(deck.getExpansionSetCodes()); CardCriteria criteria = new CardCriteria(); if (!landSets.isEmpty()) { @@ -2222,4 +2150,116 @@ public class ComputerPlayer extends PlayerImpl implements Player { return new ComputerPlayer(this); } + /** + * Sets a possible target player + * + */ + private boolean setTargetPlayer(Outcome outcome, Target target, Ability source, UUID sourceId, UUID abilityControllerId, UUID randomOpponentId, Game game) { + if (target instanceof TargetOpponent) { + if (source == null) { + if (((TargetOpponent) target).canTarget(randomOpponentId, game)) { + target.add(randomOpponentId, game); + return true; + } + } else { + if (((TargetOpponent) target).canTarget(randomOpponentId, source, game)) { + target.add(randomOpponentId, game); + return true; + } + } + for (UUID currentId : game.getOpponents(abilityControllerId)) { + if (source == null) { + if (((TargetOpponent) target).canTarget(currentId, game)) { + target.add(currentId, game); + return true; + } + } else { + if (((TargetOpponent) target).canTarget(currentId, source, game)) { + target.add(currentId, game); + return true; + } + } + } + return false; + } + + if (target instanceof TargetPlayer) { + if (outcome.isGood()) { + if (source == null) { + if (target.canTarget(abilityControllerId, game)) { + target.add(abilityControllerId, game); + return true; + } + if (target.isRequired(sourceId, game)) { + if (target.canTarget(randomOpponentId, game)) { + target.add(randomOpponentId, game); + return true; + } + } + } else { + if (target.canTarget(abilityControllerId, abilityControllerId, source, game)) { + target.addTarget(playerId, source, game); + return true; + } + if (target.isRequired(sourceId, game)) { + if (target.canTarget(randomOpponentId, game)) { + target.add(randomOpponentId, game); + return true; + } + } + } + + } else { + if (source == null) { + if (target.canTarget(randomOpponentId, game)) { + target.add(randomOpponentId, game); + return true; + } + if (target.isRequired(sourceId, game)) { + if (target.canTarget(abilityControllerId, game)) { + target.add(abilityControllerId, game); + return true; + } + } + } else { + if (target.canTarget(randomOpponentId, game)) { + target.add(randomOpponentId, game); + return true; + } + if (target.isRequired(sourceId, game)) { + if (target.canTarget(abilityControllerId, game)) { + target.add(abilityControllerId, game); + return true; + } + } + } + } + return false; + } + + return false; + } + + /** + * Returns an opponent by random + * + * @param abilityControllerId + * @param game + * @return + */ + private UUID getRandomOpponent(UUID abilityControllerId, Game game) { + UUID randomOpponentId = game.getOpponents(abilityControllerId).iterator().next(); + Set opponents = game.getOpponents(abilityControllerId); + if (opponents.size() > 1) { + int rand = random.nextInt(opponents.size()); + int count = 0; + for (UUID currentId : opponents) { + if (count == rand) { + randomOpponentId = currentId; + break; + } + } + } + return randomOpponentId; + } } diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml index 5107921f395..baeab50796e 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-player-ai-mcts diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/ComputerPlayerMCTS.java b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/ComputerPlayerMCTS.java index c620bb68407..e36bde422eb 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/ComputerPlayerMCTS.java +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/ComputerPlayerMCTS.java @@ -62,7 +62,7 @@ public class ComputerPlayerMCTS extends ComputerPlayer implements Player { protected transient MCTSNode root; protected int maxThinkTime; - private static final transient Logger logger = Logger.getLogger(ComputerPlayerMCTS.class); + private static final Logger logger = Logger.getLogger(ComputerPlayerMCTS.class); private int poolSize; public ComputerPlayerMCTS(String name, RangeOfInfluence range, int skill) { diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSExecutor.java b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSExecutor.java index 1e12abdcc7b..e46c0ed9a91 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSExecutor.java +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSExecutor.java @@ -43,7 +43,7 @@ public class MCTSExecutor implements Callable { protected UUID playerId; protected int simCount; - private static final transient Logger logger = Logger.getLogger(ComputerPlayerMCTS.class); + private static final Logger logger = Logger.getLogger(ComputerPlayerMCTS.class); public MCTSExecutor(Game sim, UUID playerId, int thinkTime) { this.playerId = playerId; diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSNode.java b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSNode.java index eacf86be8b5..f28f8683921 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSNode.java +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSNode.java @@ -57,7 +57,7 @@ public class MCTSNode { public static final boolean USE_ACTION_CACHE = false; private static final double selectionCoefficient = Math.sqrt(2.0); private static final double passRatioTolerance = 0.0; - private static final transient Logger logger = Logger.getLogger(MCTSNode.class); + private static final Logger logger = Logger.getLogger(MCTSNode.class); private int visits = 0; private int wins = 0; diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSPlayer.java b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSPlayer.java index e653bc80db8..9c2769eb1dc 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/MCTSPlayer.java @@ -45,7 +45,7 @@ import java.util.UUID; */ public class MCTSPlayer extends ComputerPlayer { - private static final transient Logger logger = Logger.getLogger(MCTSPlayer.class); + private static final Logger logger = Logger.getLogger(MCTSPlayer.class); protected PassAbility pass = new PassAbility(); diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java index 94633b9f034..6e0ffde4447 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java @@ -66,7 +66,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer { private boolean isSimulatedPlayer; private static Random rnd = new Random(); private int actionCount = 0; - private static final transient Logger logger = Logger.getLogger(SimulatedPlayerMCTS.class); + private static final Logger logger = Logger.getLogger(SimulatedPlayerMCTS.class); public SimulatedPlayerMCTS(UUID id, boolean isSimulatedPlayer) { super(id); diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml index c18ef70a712..31d417e4151 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-player-aiminimax diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer2.java b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer2.java index 496bf0a47af..bc43063666e 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer2.java +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer2.java @@ -60,8 +60,8 @@ import java.util.concurrent.*; */ public class ComputerPlayer2 extends ComputerPlayer implements Player { - private static final transient Logger logger = Logger.getLogger(ComputerPlayer2.class); - private static final transient ExecutorService pool = Executors.newFixedThreadPool(1); + private static final Logger logger = Logger.getLogger(ComputerPlayer2.class); + private static final ExecutorService pool = Executors.newFixedThreadPool(1); protected int maxDepth; protected int maxNodes; diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java index 8b2d9cfaf17..c01bed8a68e 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java @@ -49,7 +49,7 @@ import java.util.UUID; */ public class ComputerPlayer3 extends ComputerPlayer2 implements Player { - private static final transient Logger logger = Logger.getLogger(ComputerPlayer3.class); + private static final Logger logger = Logger.getLogger(ComputerPlayer3.class); public ComputerPlayer3(String name, RangeOfInfluence range, int skill) { super(name, range, skill); diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/GameStateEvaluator.java b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/GameStateEvaluator.java index 920b00d2520..16e131031eb 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/GameStateEvaluator.java +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/GameStateEvaluator.java @@ -53,7 +53,7 @@ import org.apache.log4j.Logger; */ public class GameStateEvaluator { - private static final transient Logger logger = Logger.getLogger(GameStateEvaluator.class); + private static final Logger logger = Logger.getLogger(GameStateEvaluator.class); private static final int LIFE_FACTOR = Config.evaluatorLifeFactor; private static final int PERMANENT_FACTOR = Config.evaluatorPermanentFactor; diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulateBlockWorker.java b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulateBlockWorker.java index 10f315c56d7..97dc7bf9da4 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulateBlockWorker.java +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulateBlockWorker.java @@ -28,10 +28,9 @@ package mage.player.ai; +import org.apache.log4j.Logger; + import java.util.concurrent.Callable; -import java.util.logging.Level; -import java.util.logging.Logger; -import mage.util.Logging; /** * @@ -39,7 +38,7 @@ import mage.util.Logging; */ public class SimulateBlockWorker implements Callable { - private static final Logger logger = Logging.getLogger(SimulationWorker.class.getName()); + private static final Logger logger = Logger.getLogger(SimulationWorker.class); private SimulationNode node; private ComputerPlayer3 player; @@ -54,7 +53,7 @@ public class SimulateBlockWorker implements Callable { try { // player.simulateBlock(node); } catch (Exception ex) { - logger.log(Level.SEVERE, null, ex); + logger.error(null, ex); } return null; } diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulatedPlayer.java b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulatedPlayer.java index a43eddaa763..a7547ce9649 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulatedPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulatedPlayer.java @@ -51,7 +51,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; */ public class SimulatedPlayer extends ComputerPlayer { - private static final transient Logger logger = Logger.getLogger(SimulatedPlayer.class); + private static final Logger logger = Logger.getLogger(SimulatedPlayer.class); private boolean isSimulatedPlayer; private transient ConcurrentLinkedQueue allActions; private static PassAbility pass = new PassAbility(); diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulationWorker.java b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulationWorker.java index 2d185c8096b..41ef901f423 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulationWorker.java +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/src/mage/player/ai/SimulationWorker.java @@ -29,11 +29,9 @@ package mage.player.ai; import java.util.concurrent.Callable; -import java.util.logging.Level; -import java.util.logging.Logger; import mage.abilities.Ability; import mage.game.Game; -import mage.util.Logging; +import org.apache.log4j.Logger; /** * @@ -41,7 +39,7 @@ import mage.util.Logging; */ public class SimulationWorker implements Callable { - private static final Logger logger = Logging.getLogger(SimulationWorker.class.getName()); + private static final Logger logger = Logger.getLogger(SimulationWorker.class); private Game game; private SimulatedAction previousActions; @@ -60,7 +58,7 @@ public class SimulationWorker implements Callable { try { // player.simulateAction(game, previousActions, action); } catch (Exception ex) { - logger.log(Level.SEVERE, null, ex); + logger.error(null, ex); } return null; } diff --git a/Mage.Server.Plugins/Mage.Player.Human/pom.xml b/Mage.Server.Plugins/Mage.Player.Human/pom.xml index c1b13ea06a1..a8440a72de3 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.Human/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-player-human 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 ce033535822..ee62a58f33d 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 @@ -47,6 +47,7 @@ import mage.abilities.SpellAbility; import mage.abilities.TriggeredAbility; import mage.abilities.costs.VariableCost; import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.PhyrexianManaCost; @@ -63,7 +64,16 @@ import mage.constants.ManaType; import mage.constants.Outcome; import mage.constants.PhaseStep; import mage.constants.PlayerAction; +import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_ID_NO; +import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_ID_YES; import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_RESET_ALL; +import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_TEXT_NO; +import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_TEXT_YES; +import static mage.constants.PlayerAction.RESET_AUTO_SELECT_REPLACEMENT_EFFECTS; +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.RangeOfInfluence; import mage.constants.Zone; @@ -789,6 +799,7 @@ public class HumanPlayer extends PlayerImpl { if (unpaid instanceof ManaCostsImpl) { specialManaAction(unpaid, game); // TODO: delve or convoke cards with PhyrexianManaCost won't work together (this combinaton does not exist yet) + @SuppressWarnings("unchecked") ManaCostsImpl costs = (ManaCostsImpl) unpaid; for (ManaCost cost : costs.getUnpaid()) { if (cost instanceof PhyrexianManaCost) { @@ -1222,7 +1233,9 @@ public class HumanPlayer extends PlayerImpl { updateGameStatePriority("activateAbility", game); if (abilities.size() == 1 && suppressAbilityPicker(abilities.values().iterator().next())) { ActivatedAbility ability = abilities.values().iterator().next(); - if (ability.getTargets().size() != 0 || !(ability.getCosts().size() == 1 && ability.getCosts().get(0) instanceof SacrificeSourceCost)) { + if (ability.getTargets().size() != 0 + || !(ability.getCosts().size() == 1 && ability.getCosts().get(0) instanceof SacrificeSourceCost) + || !(ability.getCosts().size() == 2 && ability.getCosts().get(0) instanceof TapSourceCost && ability.getCosts().get(0) instanceof SacrificeSourceCost)) { activateAbility(ability, game); return; } @@ -1281,12 +1294,27 @@ public class HumanPlayer extends PlayerImpl { if (modes.size() > 1) { MageObject obj = game.getObject(source.getSourceId()); Map modeMap = new LinkedHashMap<>(); + AvailableModes: for (Mode mode : modes.getAvailableModes(source, game)) { - if (!modes.getSelectedModes().contains(mode.getId()) // show only modes not already selected - && mode.getTargets().canChoose(source.getSourceId(), source.getControllerId(), game)) { // and where targets are available + int timesSelected = 0; + for (Mode selectedMode : modes.getSelectedModes()) { + if (mode.getId().equals(selectedMode.getId())) { + if (modes.isEachModeMoreThanOnce()) { + timesSelected++; + } else { + continue AvailableModes; + } + } + } + if (mode.getTargets().canChoose(source.getSourceId(), source.getControllerId(), game)) { // and needed targets have to be available String modeText = mode.getEffects().getText(mode); if (obj != null) { - modeText = modeText.replace("{source}", obj.getName()); + modeText = modeText.replace("{source}", obj.getName()).replace("{this}", obj.getName()); + } + if (modes.isEachModeMoreThanOnce()) { + if (timesSelected > 0) { + modeText = "(selected " + timesSelected + "x) " + modeText; + } } modeMap.put(mode.getId(), modeText); } @@ -1313,6 +1341,7 @@ public class HumanPlayer extends PlayerImpl { } return null; } + return modes.getMode(); } diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml index 4bb3a3af1af..ad866a17197 100644 --- a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-tournament-boosterdraft diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/AdamStyborskisPauperCube.java b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/AdamStyborskisPauperCube.java new file mode 100644 index 00000000000..66ab2c5a67f --- /dev/null +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/AdamStyborskisPauperCube.java @@ -0,0 +1,454 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.tournament.cubes; + +import mage.game.draft.DraftCube; +import mage.game.draft.DraftCube.CardIdentity; + +/** + * + * @author fireshoes + */ +public class AdamStyborskisPauperCube extends DraftCube { + +public AdamStyborskisPauperCube() { + super("Adam Styborkski's Cube (411 cards)"); // https://docs.google.com/spreadsheets/d/12iQhC4bHqFW7hEWxPBjyC8yBDehFZ0_4DkqzyA8EL3o/edit#gid=0 + + cubeCards.add(new CardIdentity("Act of Treason", "")); + cubeCards.add(new CardIdentity("Adventuring Gear", "")); + cubeCards.add(new CardIdentity("Aerie Ouphes", "")); + cubeCards.add(new CardIdentity("AEther Adept", "")); + cubeCards.add(new CardIdentity("AEthersnipe", "")); + cubeCards.add(new CardIdentity("Agony Warp", "")); + cubeCards.add(new CardIdentity("Ambush Viper", "")); + cubeCards.add(new CardIdentity("Apex Hawks", "")); + cubeCards.add(new CardIdentity("Arachnus Web", "")); + cubeCards.add(new CardIdentity("Arc Lightning", "")); + cubeCards.add(new CardIdentity("Armillary Sphere", "")); + cubeCards.add(new CardIdentity("Army of Allah", "")); + cubeCards.add(new CardIdentity("Arrest", "")); + cubeCards.add(new CardIdentity("Ashes to Ashes", "")); + cubeCards.add(new CardIdentity("Assault Zeppelid", "")); + cubeCards.add(new CardIdentity("Attended Knight", "")); + cubeCards.add(new CardIdentity("Auger Spree", "")); + cubeCards.add(new CardIdentity("Aven Riftwatcher", "")); + cubeCards.add(new CardIdentity("Aven Surveyor", "")); + cubeCards.add(new CardIdentity("Azorius Guildgate", "")); + cubeCards.add(new CardIdentity("Baleful Eidolon", "")); + cubeCards.add(new CardIdentity("Barbed Lightning", "")); + cubeCards.add(new CardIdentity("Barren Moor", "")); + cubeCards.add(new CardIdentity("Basking Rootwalla", "")); + cubeCards.add(new CardIdentity("Battle Screech", "")); + cubeCards.add(new CardIdentity("Beetleback Chief", "")); + cubeCards.add(new CardIdentity("Beetleform Mage", "")); + cubeCards.add(new CardIdentity("Blade of the Sixth Pride", "")); + cubeCards.add(new CardIdentity("Blastoderm", "")); + cubeCards.add(new CardIdentity("Blazing Torch", "")); + cubeCards.add(new CardIdentity("Blightning", "")); + cubeCards.add(new CardIdentity("Blinding Beam", "")); + cubeCards.add(new CardIdentity("Bloodfell Caves", "")); + cubeCards.add(new CardIdentity("Blossoming Sands", "")); + cubeCards.add(new CardIdentity("Bonded Construct", "")); + cubeCards.add(new CardIdentity("Bonds of Faith", "")); + cubeCards.add(new CardIdentity("Bonesplitter", "")); + cubeCards.add(new CardIdentity("Boomerang", "")); + cubeCards.add(new CardIdentity("Borderland Marauder", "")); + cubeCards.add(new CardIdentity("Boros Guildgate", "")); + cubeCards.add(new CardIdentity("Branching Bolt", "")); + cubeCards.add(new CardIdentity("Brute Force", "")); + cubeCards.add(new CardIdentity("Burst Lightning", "")); + cubeCards.add(new CardIdentity("Butcher Ghoul", "")); + cubeCards.add(new CardIdentity("Cadaver Imp", "")); + cubeCards.add(new CardIdentity("Cage of Hands", "")); + cubeCards.add(new CardIdentity("Calcite Snapper", "")); + cubeCards.add(new CardIdentity("Capsize", "")); + cubeCards.add(new CardIdentity("Carnivorous Death-Parrot", "")); + cubeCards.add(new CardIdentity("Carnophage", "")); + cubeCards.add(new CardIdentity("Cathodion", "")); + cubeCards.add(new CardIdentity("Cavern Harpy", "")); + cubeCards.add(new CardIdentity("Centaur Healer", "")); + cubeCards.add(new CardIdentity("Centaur's Herald", "")); + cubeCards.add(new CardIdentity("Center Soul", "")); + cubeCards.add(new CardIdentity("Chain Lightning", "")); + cubeCards.add(new CardIdentity("Chainer's Edict", "")); + cubeCards.add(new CardIdentity("Citanul Woodreaders", "")); + cubeCards.add(new CardIdentity("Claustrophobia", "")); + cubeCards.add(new CardIdentity("Clay Statue", "")); + cubeCards.add(new CardIdentity("Cloaked Siren", "")); + cubeCards.add(new CardIdentity("Cloud of Faeries", "")); + cubeCards.add(new CardIdentity("Cloudshift", "")); + cubeCards.add(new CardIdentity("Coalition Honor Guard", "")); + cubeCards.add(new CardIdentity("Cogwork Librarian", "")); + cubeCards.add(new CardIdentity("Colossal Might", "")); + cubeCards.add(new CardIdentity("Compulsive Research", "")); + cubeCards.add(new CardIdentity("Consume Strength", "")); + cubeCards.add(new CardIdentity("Corrupted Zendikon", "")); + cubeCards.add(new CardIdentity("Counterspell", "")); + cubeCards.add(new CardIdentity("Crippling Fatigue", "")); + cubeCards.add(new CardIdentity("Crocanura", "")); + cubeCards.add(new CardIdentity("Crypt Rats", "")); + cubeCards.add(new CardIdentity("Crystallization", "")); + cubeCards.add(new CardIdentity("Cultivate", "")); + cubeCards.add(new CardIdentity("Cunning Strike", "")); + cubeCards.add(new CardIdentity("Curse of Chains", "")); + cubeCards.add(new CardIdentity("Custodi Squire", "")); + cubeCards.add(new CardIdentity("Daring Skyjek", "")); + cubeCards.add(new CardIdentity("Daru Lancer", "")); + cubeCards.add(new CardIdentity("Dauthi Horror", "")); + cubeCards.add(new CardIdentity("Dauthi Marauder", "")); + cubeCards.add(new CardIdentity("Dauthi Mercenary", "")); + cubeCards.add(new CardIdentity("Dauthi Slayer", "")); + cubeCards.add(new CardIdentity("Dead Reveler", "")); + cubeCards.add(new CardIdentity("Dead Weight", "")); + cubeCards.add(new CardIdentity("Death Denied", "")); + cubeCards.add(new CardIdentity("Deep Analysis", "")); + cubeCards.add(new CardIdentity("Deprive", "")); + cubeCards.add(new CardIdentity("Deputy of Acquittals", "")); + cubeCards.add(new CardIdentity("Desert", "")); + cubeCards.add(new CardIdentity("Devour Flesh", "")); + cubeCards.add(new CardIdentity("Diabolic Edict", "")); + cubeCards.add(new CardIdentity("Dimir Guildgate", "")); + cubeCards.add(new CardIdentity("Disfigure", "")); + cubeCards.add(new CardIdentity("Dismal Backwater", "")); + cubeCards.add(new CardIdentity("Distortion Strike", "")); + cubeCards.add(new CardIdentity("Doom Blade", "")); + cubeCards.add(new CardIdentity("Doomed Traveler", "")); + cubeCards.add(new CardIdentity("Dragon Fodder", "")); + cubeCards.add(new CardIdentity("Driver of the Dead", "")); + cubeCards.add(new CardIdentity("Dynacharge", "")); + cubeCards.add(new CardIdentity("Elephant Ambush", "")); + cubeCards.add(new CardIdentity("Elephant Guide", "")); + cubeCards.add(new CardIdentity("Elusive Spellfist", "")); + cubeCards.add(new CardIdentity("Enhanced Awareness", "")); + cubeCards.add(new CardIdentity("Epic Confrontation", "")); + cubeCards.add(new CardIdentity("Errant Ephemeron", "")); + cubeCards.add(new CardIdentity("Esper Cormorants", "")); + cubeCards.add(new CardIdentity("Essence Scatter", "")); + cubeCards.add(new CardIdentity("Ethereal Armor", "")); + cubeCards.add(new CardIdentity("Evincar's Justice", "")); + cubeCards.add(new CardIdentity("Evolution Charm", "")); + cubeCards.add(new CardIdentity("Evolving Wilds", "")); + cubeCards.add(new CardIdentity("Exclude", "")); + cubeCards.add(new CardIdentity("Eye of Nowhere", "")); + cubeCards.add(new CardIdentity("Faceless Butcher", "")); + cubeCards.add(new CardIdentity("Faith's Fetters", "")); + cubeCards.add(new CardIdentity("Fall of the Hammer", "")); + cubeCards.add(new CardIdentity("Farseek", "")); + cubeCards.add(new CardIdentity("Feat of Resistance", "")); + cubeCards.add(new CardIdentity("Feeling of Dread", "")); + cubeCards.add(new CardIdentity("Fellwar Stone", "")); + cubeCards.add(new CardIdentity("Fervent Cathar", "")); + cubeCards.add(new CardIdentity("Fire Ambush", "")); + cubeCards.add(new CardIdentity("Fireblast", "")); + cubeCards.add(new CardIdentity("Firebolt", "")); + cubeCards.add(new CardIdentity("Firefiend Elemental", "")); + cubeCards.add(new CardIdentity("Fireslinger", "")); + cubeCards.add(new CardIdentity("Fists of Ironwood", "")); + cubeCards.add(new CardIdentity("Flayer Husk", "")); + cubeCards.add(new CardIdentity("Flurry of Horns", "")); + cubeCards.add(new CardIdentity("Font of Return", "")); + cubeCards.add(new CardIdentity("Fortify", "")); + cubeCards.add(new CardIdentity("Foul Spirit", "")); + cubeCards.add(new CardIdentity("Frilled Oculus", "")); + cubeCards.add(new CardIdentity("Frostburn Weird", "")); + cubeCards.add(new CardIdentity("Fyndhorn Elves", "")); + cubeCards.add(new CardIdentity("Garruk's Companion", "")); + cubeCards.add(new CardIdentity("Gathan Raiders", "")); + cubeCards.add(new CardIdentity("Gather the Townsfolk", "")); + cubeCards.add(new CardIdentity("Ghastly Demise", "")); + cubeCards.add(new CardIdentity("Ghirapur Gearcrafter", "")); + cubeCards.add(new CardIdentity("Ghitu Slinger", "")); + cubeCards.add(new CardIdentity("Giant Growth", "")); + cubeCards.add(new CardIdentity("Gideon's Lawkeeper", "")); + cubeCards.add(new CardIdentity("Goblin Heelcutter", "")); + cubeCards.add(new CardIdentity("Gods Willing", "")); + cubeCards.add(new CardIdentity("Goldmeadow Harrier", "")); + cubeCards.add(new CardIdentity("Golgari Guildgate", "")); + cubeCards.add(new CardIdentity("Gore-House Chainwalker", "")); + cubeCards.add(new CardIdentity("Gravedigger", "")); + cubeCards.add(new CardIdentity("Gray Merchant of Asphodel", "")); + cubeCards.add(new CardIdentity("Grim Contest", "")); + cubeCards.add(new CardIdentity("Grisly Salvage", "")); + cubeCards.add(new CardIdentity("Gruul Guildgate", "")); + cubeCards.add(new CardIdentity("Gryff Vanguard", "")); + cubeCards.add(new CardIdentity("Guardian Automaton", "")); + cubeCards.add(new CardIdentity("Guardian of the Guildpact", "")); + cubeCards.add(new CardIdentity("Gurmag Angler", "")); + cubeCards.add(new CardIdentity("Halimar Depths", "")); + cubeCards.add(new CardIdentity("Halimar Wavewatch", "")); + cubeCards.add(new CardIdentity("Harrow", "")); + cubeCards.add(new CardIdentity("Harsh Sustenance", "")); + cubeCards.add(new CardIdentity("Hissing Iguanar", "")); + cubeCards.add(new CardIdentity("Hooting Mandrills", "")); + cubeCards.add(new CardIdentity("Hyena Umbra", "")); + cubeCards.add(new CardIdentity("Hymn to Tourach", "")); + cubeCards.add(new CardIdentity("Imperiosaur", "")); + cubeCards.add(new CardIdentity("Incinerate", "")); + cubeCards.add(new CardIdentity("Inner-Flame Acolyte", "")); + cubeCards.add(new CardIdentity("Into the Roil", "")); + cubeCards.add(new CardIdentity("Izzet Chronarch", "")); + cubeCards.add(new CardIdentity("Izzet Guildgate", "")); + cubeCards.add(new CardIdentity("Jilt", "")); + cubeCards.add(new CardIdentity("Journey to Nowhere", "")); + cubeCards.add(new CardIdentity("Jungle Hollow", "")); + cubeCards.add(new CardIdentity("Kabuto Moth", "")); + cubeCards.add(new CardIdentity("Keldon Marauders", "")); + cubeCards.add(new CardIdentity("Khalni Garden", "")); + cubeCards.add(new CardIdentity("Kingpin's Pet", "")); + cubeCards.add(new CardIdentity("Kodama's Reach", "")); + cubeCards.add(new CardIdentity("Kor Skyfisher", "")); + cubeCards.add(new CardIdentity("Kozilek's Predator", "")); + cubeCards.add(new CardIdentity("Krenko's Command", "")); + cubeCards.add(new CardIdentity("Krosan Tusker", "")); + cubeCards.add(new CardIdentity("Kruin Striker", "")); + cubeCards.add(new CardIdentity("Lash Out", "")); + cubeCards.add(new CardIdentity("Last Gasp", "")); + cubeCards.add(new CardIdentity("Leonin Bola", "")); + cubeCards.add(new CardIdentity("Leonin Scimitar", "")); + cubeCards.add(new CardIdentity("Lightning Bolt", "")); + cubeCards.add(new CardIdentity("Lightning Strike", "")); + cubeCards.add(new CardIdentity("Liliana's Specter", "")); + cubeCards.add(new CardIdentity("Llanowar Elves", "")); + cubeCards.add(new CardIdentity("Lone Missionary", "")); + cubeCards.add(new CardIdentity("Looter il-Kor", "")); + cubeCards.add(new CardIdentity("Lotus Path Djinn", "")); + cubeCards.add(new CardIdentity("Loyal Cathar", "")); + cubeCards.add(new CardIdentity("Loyal Pegasus", "")); + cubeCards.add(new CardIdentity("Lurking Automaton", "")); + cubeCards.add(new CardIdentity("Makeshift Mauler", "")); + cubeCards.add(new CardIdentity("Mana Leak", "")); + cubeCards.add(new CardIdentity("Man-o'-War", "")); + cubeCards.add(new CardIdentity("Mardu Hordechief", "")); + cubeCards.add(new CardIdentity("Mardu Scout", "")); + cubeCards.add(new CardIdentity("Mardu Skullhunter", "")); + cubeCards.add(new CardIdentity("Martial Glory", "")); + cubeCards.add(new CardIdentity("Maul Splicer", "")); + cubeCards.add(new CardIdentity("Maze of Ith", "")); + cubeCards.add(new CardIdentity("Merfolk Looter", "")); + cubeCards.add(new CardIdentity("Mind Stone", "")); + cubeCards.add(new CardIdentity("Minotaur Skullcleaver", "")); + cubeCards.add(new CardIdentity("Mire Boa", "")); + cubeCards.add(new CardIdentity("Miscalculation", "")); + cubeCards.add(new CardIdentity("Mishra's Factory", "")); + cubeCards.add(new CardIdentity("Mist Raven", "")); + cubeCards.add(new CardIdentity("Mogg Fanatic", "")); + cubeCards.add(new CardIdentity("Mogg Flunkies", "")); + cubeCards.add(new CardIdentity("Mogg War Marshal", "")); + cubeCards.add(new CardIdentity("Moldervine Cloak", "")); + cubeCards.add(new CardIdentity("Momentary Blink", "")); + cubeCards.add(new CardIdentity("Morgue Theft", "")); + cubeCards.add(new CardIdentity("Mulldrifter", "")); + cubeCards.add(new CardIdentity("Nameless Inversion", "")); + cubeCards.add(new CardIdentity("Narcolepsy", "")); + cubeCards.add(new CardIdentity("Necromancer's Assistant", "")); + cubeCards.add(new CardIdentity("Nessian Asp", "")); + cubeCards.add(new CardIdentity("Nest Invader", "")); + cubeCards.add(new CardIdentity("Nezumi Cutthroat", "")); + cubeCards.add(new CardIdentity("Nightscape Familiar", "")); + cubeCards.add(new CardIdentity("Ninja of the Deep Hours", "")); + cubeCards.add(new CardIdentity("Oblivion Ring", "")); + cubeCards.add(new CardIdentity("Okiba-Gang Shinobi", "")); + cubeCards.add(new CardIdentity("Omenspeaker", "")); + cubeCards.add(new CardIdentity("Orzhov Guildgate", "")); + cubeCards.add(new CardIdentity("Otherworldly Journey", "")); + cubeCards.add(new CardIdentity("Pacifism", "")); + cubeCards.add(new CardIdentity("Path of Anger's Flame", "")); + cubeCards.add(new CardIdentity("Penumbra Spider", "")); + cubeCards.add(new CardIdentity("Perilous Myr", "")); + cubeCards.add(new CardIdentity("Pestermite", "")); + cubeCards.add(new CardIdentity("Pestilence", "")); + cubeCards.add(new CardIdentity("Phantom Nomad", "")); + cubeCards.add(new CardIdentity("Phantom Tiger", "")); + cubeCards.add(new CardIdentity("Pharika's Chosen", "")); + cubeCards.add(new CardIdentity("Phyrexian Rager", "")); + cubeCards.add(new CardIdentity("Pillory of the Sleepless", "")); + cubeCards.add(new CardIdentity("Pit Fight", "")); + cubeCards.add(new CardIdentity("Pit Keeper", "")); + cubeCards.add(new CardIdentity("Plated Geopede", "")); + cubeCards.add(new CardIdentity("Plover Knights", "")); + cubeCards.add(new CardIdentity("Porcelain Legionnaire", "")); + cubeCards.add(new CardIdentity("Pouncing Kavu", "")); + cubeCards.add(new CardIdentity("Predatory Nightstalker", "")); + cubeCards.add(new CardIdentity("Preordain", "")); + cubeCards.add(new CardIdentity("Prey Upon", "")); + cubeCards.add(new CardIdentity("Prismatic Lens", "")); + cubeCards.add(new CardIdentity("Prismatic Strands", "")); + cubeCards.add(new CardIdentity("Pristine Talisman", "")); + cubeCards.add(new CardIdentity("Probe", "")); + cubeCards.add(new CardIdentity("Prophetic Prism", "")); + cubeCards.add(new CardIdentity("Putrid Leech", "")); + cubeCards.add(new CardIdentity("Pyrotechnics", "")); + cubeCards.add(new CardIdentity("Qasali Pridemage", "")); + cubeCards.add(new CardIdentity("Raise the Alarm", "")); + cubeCards.add(new CardIdentity("Rakdos Guildgate", "")); + cubeCards.add(new CardIdentity("Rakdos Shred-Freak", "")); + cubeCards.add(new CardIdentity("Rampant Growth", "")); + cubeCards.add(new CardIdentity("Rancor", "")); + cubeCards.add(new CardIdentity("Ranger's Guile", "")); + cubeCards.add(new CardIdentity("Ray of Command", "")); + cubeCards.add(new CardIdentity("Razorfin Hunter", "")); + cubeCards.add(new CardIdentity("Reckless Charge", "")); + cubeCards.add(new CardIdentity("Reclaim", "")); + cubeCards.add(new CardIdentity("Recoil", "")); + cubeCards.add(new CardIdentity("Remove Soul", "")); + cubeCards.add(new CardIdentity("Rend Flesh", "")); + cubeCards.add(new CardIdentity("Rendclaw Trow", "")); + cubeCards.add(new CardIdentity("Rhox Maulers", "")); + cubeCards.add(new CardIdentity("Rishadan Airship", "")); + cubeCards.add(new CardIdentity("River Boa", "")); + cubeCards.add(new CardIdentity("Ronin Houndmaster", "")); + cubeCards.add(new CardIdentity("Rugged Highlands", "")); + cubeCards.add(new CardIdentity("Runed Servitor", "")); + cubeCards.add(new CardIdentity("Rushing River", "")); + cubeCards.add(new CardIdentity("Safehold Elite", "")); + cubeCards.add(new CardIdentity("Sakura-Tribe Elder", "")); + cubeCards.add(new CardIdentity("Sandsteppe Outcast", "")); + cubeCards.add(new CardIdentity("Sangrite Backlash", "")); + cubeCards.add(new CardIdentity("Sarkhan's Rage", "")); + cubeCards.add(new CardIdentity("Savage Punch", "")); + cubeCards.add(new CardIdentity("Savage Surge", "")); + cubeCards.add(new CardIdentity("Scatter the Seeds", "")); + cubeCards.add(new CardIdentity("Scion of the Wild", "")); + cubeCards.add(new CardIdentity("Scoured Barrens", "")); + cubeCards.add(new CardIdentity("Scuzzback Marauders", "")); + cubeCards.add(new CardIdentity("Searing Blaze", "")); + cubeCards.add(new CardIdentity("Searing Spear", "")); + cubeCards.add(new CardIdentity("Sejiri Steppe", "")); + cubeCards.add(new CardIdentity("Selesnya Guildgate", "")); + cubeCards.add(new CardIdentity("Sentinel Spider", "")); + cubeCards.add(new CardIdentity("Seraph of Dawn", "")); + cubeCards.add(new CardIdentity("Serrated Arrows", "")); + cubeCards.add(new CardIdentity("Shaper Parasite", "")); + cubeCards.add(new CardIdentity("Shelter", "")); + cubeCards.add(new CardIdentity("Shimmering Glasskite", "")); + cubeCards.add(new CardIdentity("Shimmering Grotto", "")); + cubeCards.add(new CardIdentity("Sigil Blessing", "")); + cubeCards.add(new CardIdentity("Silent Departure", "")); + cubeCards.add(new CardIdentity("Simic Guildgate", "")); + cubeCards.add(new CardIdentity("Skinthinner", "")); + cubeCards.add(new CardIdentity("Skirk Marauder", "")); + cubeCards.add(new CardIdentity("Skyknight Legionnaire", "")); + cubeCards.add(new CardIdentity("Skywinder Drake", "")); + cubeCards.add(new CardIdentity("Slash Panther", "")); + cubeCards.add(new CardIdentity("Slippery Bogle", "")); + cubeCards.add(new CardIdentity("Snakeform", "")); + cubeCards.add(new CardIdentity("Snap", "")); + cubeCards.add(new CardIdentity("Snuff Out", "")); + cubeCards.add(new CardIdentity("Soltari Emissary", "")); + cubeCards.add(new CardIdentity("Soltari Lancer", "")); + cubeCards.add(new CardIdentity("Soltari Trooper", "")); + cubeCards.add(new CardIdentity("Soul Manipulation", "")); + cubeCards.add(new CardIdentity("Sparksmith", "")); + cubeCards.add(new CardIdentity("Sphere of the Suns", "")); + cubeCards.add(new CardIdentity("Spined Thopter", "")); + cubeCards.add(new CardIdentity("Splatter Thug", "")); + cubeCards.add(new CardIdentity("Staggershock", "")); + cubeCards.add(new CardIdentity("Stampeding Elk Herd", "")); + cubeCards.add(new CardIdentity("Stave Off", "")); + cubeCards.add(new CardIdentity("Stealer of Secrets", "")); + cubeCards.add(new CardIdentity("Stitched Drake", "")); + cubeCards.add(new CardIdentity("Stormfront Pegasus", "")); + cubeCards.add(new CardIdentity("Stormscape Apprentice", "")); + cubeCards.add(new CardIdentity("Strider Harness", "")); + cubeCards.add(new CardIdentity("Strip Mine", "")); + cubeCards.add(new CardIdentity("Sultai Scavenger", "")); + cubeCards.add(new CardIdentity("Suppression Bonds", "")); + cubeCards.add(new CardIdentity("Suq'Ata Lancer", "")); + cubeCards.add(new CardIdentity("Swiftwater Cliffs", "")); + cubeCards.add(new CardIdentity("Sylvok Lifestaff", "")); + cubeCards.add(new CardIdentity("Tail Slash", "")); + cubeCards.add(new CardIdentity("Teetering Peaks", "")); + cubeCards.add(new CardIdentity("Temporal Isolation", "")); + cubeCards.add(new CardIdentity("Tenement Crasher", "")); + cubeCards.add(new CardIdentity("Terminate", "")); + cubeCards.add(new CardIdentity("Terramorphic Expanse", "")); + cubeCards.add(new CardIdentity("Test of Faith", "")); + cubeCards.add(new CardIdentity("Thornweald Archer", "")); + cubeCards.add(new CardIdentity("Thornwood Falls", "")); + cubeCards.add(new CardIdentity("Thought Courier", "")); + cubeCards.add(new CardIdentity("Thundering Giant", "")); + cubeCards.add(new CardIdentity("Thundering Tanadon", "")); + cubeCards.add(new CardIdentity("Time to Feed", "")); + cubeCards.add(new CardIdentity("Tithe Drinker", "")); + cubeCards.add(new CardIdentity("Totem-Guide Hartebeest", "")); + cubeCards.add(new CardIdentity("Tragic Slip", "")); + cubeCards.add(new CardIdentity("Tranquil Cove", "")); + cubeCards.add(new CardIdentity("Travel Preparations", "")); + cubeCards.add(new CardIdentity("Treasure Cruise", "")); + cubeCards.add(new CardIdentity("Triplicate Spirits", "")); + cubeCards.add(new CardIdentity("Trumpet Blast", "")); + cubeCards.add(new CardIdentity("Tumble Magnet", "")); + cubeCards.add(new CardIdentity("Twin Bolt", "")); + cubeCards.add(new CardIdentity("Typhoid Rats", "")); + cubeCards.add(new CardIdentity("Ulamog's Crusher", "")); + cubeCards.add(new CardIdentity("Undying Evil", "")); + cubeCards.add(new CardIdentity("Unearth", "")); + cubeCards.add(new CardIdentity("Unknown Shores", "")); + cubeCards.add(new CardIdentity("Unmake", "")); + cubeCards.add(new CardIdentity("Vampire Interloper", "")); + cubeCards.add(new CardIdentity("Vampire Lacerator", "")); + cubeCards.add(new CardIdentity("Vault Skirge", "")); + cubeCards.add(new CardIdentity("Vendetta", "")); + cubeCards.add(new CardIdentity("Veteran's Sidearm", "")); + cubeCards.add(new CardIdentity("Viashino Firstblade", "")); + cubeCards.add(new CardIdentity("Vines of Vastwood", "")); + cubeCards.add(new CardIdentity("Voidwielder", "")); + cubeCards.add(new CardIdentity("Volcanic Hammer", "")); + cubeCards.add(new CardIdentity("Vulshok Morningstar", "")); + cubeCards.add(new CardIdentity("Vulshok Sorcerer", "")); + cubeCards.add(new CardIdentity("Vulturous Aven", "")); + cubeCards.add(new CardIdentity("Wakedancer", "")); + cubeCards.add(new CardIdentity("Walker of the Grove", "")); + cubeCards.add(new CardIdentity("Wall of Roots", "")); + cubeCards.add(new CardIdentity("War Flare", "")); + cubeCards.add(new CardIdentity("Warren Pilferers", "")); + cubeCards.add(new CardIdentity("Waterfront Bouncer", "")); + cubeCards.add(new CardIdentity("Wayfarer's Bauble", "")); + cubeCards.add(new CardIdentity("Whirlpool Whelm", "")); + cubeCards.add(new CardIdentity("Whispers of the Muse", "")); + cubeCards.add(new CardIdentity("Whispersilk Cloak", "")); + cubeCards.add(new CardIdentity("Whitemane Lion", "")); + cubeCards.add(new CardIdentity("Wickerbough Elder", "")); + cubeCards.add(new CardIdentity("Wild Instincts", "")); + cubeCards.add(new CardIdentity("Wild Mongrel", "")); + cubeCards.add(new CardIdentity("Wild Nacatl", "")); + cubeCards.add(new CardIdentity("Wildsize", "")); + cubeCards.add(new CardIdentity("Will-Forged Golem", "")); + cubeCards.add(new CardIdentity("Wind-Scarred Crag", "")); + cubeCards.add(new CardIdentity("Wingcrafter", "")); + cubeCards.add(new CardIdentity("Wingsteed Rider", "")); + cubeCards.add(new CardIdentity("Withdraw", "")); + cubeCards.add(new CardIdentity("Wojek Halberdiers", "")); + cubeCards.add(new CardIdentity("Wrecking Ball", "")); + cubeCards.add(new CardIdentity("Yavimaya Elder", "")); + cubeCards.add(new CardIdentity("Yotian Soldier", "")); + cubeCards.add(new CardIdentity("Young Wolf", "")); + cubeCards.add(new CardIdentity("Youthful Knight", "")); + cubeCards.add(new CardIdentity("Zhur-Taa Swine", "")); + } +} diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/JimDavisCube.java b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/JimDavisCube.java index cb363a30f89..8674c4e2251 100644 --- a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/JimDavisCube.java +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/JimDavisCube.java @@ -91,10 +91,12 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Brainstorm", "")); cubeCards.add(new CardIdentity("Breeding Pool", "")); cubeCards.add(new CardIdentity("Brimaz, King of Oreskos", "")); + cubeCards.add(new CardIdentity("Bring to Light", "")); cubeCards.add(new CardIdentity("Broodmate Dragon", "")); cubeCards.add(new CardIdentity("Cabal Ritual", "")); cubeCards.add(new CardIdentity("Careful Study", "")); cubeCards.add(new CardIdentity("Carrion Feeder", "")); + cubeCards.add(new CardIdentity("Catacomb Sifter", "")); cubeCards.add(new CardIdentity("Celestial Colonnade", "")); cubeCards.add(new CardIdentity("Chained to the Rocks", "")); cubeCards.add(new CardIdentity("Chain Lightning", "")); @@ -141,6 +143,7 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Dismember", "")); cubeCards.add(new CardIdentity("Dragon Hunter", "")); cubeCards.add(new CardIdentity("Dragonlord Atarka", "")); + cubeCards.add(new CardIdentity("Drana, Liberator of Malakir", "")); cubeCards.add(new CardIdentity("Dream Halls", "")); cubeCards.add(new CardIdentity("Dryad Militant", "")); cubeCards.add(new CardIdentity("Dust Bowl", "")); @@ -148,7 +151,6 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Edric, Spymaster of Trest", "")); cubeCards.add(new CardIdentity("Eidolon of the Great Revel", "")); cubeCards.add(new CardIdentity("Electrolyze", "")); - cubeCards.add(new CardIdentity("Elspeth, Knight-Errant", "")); cubeCards.add(new CardIdentity("Emrakul, the Aeons Torn", "")); cubeCards.add(new CardIdentity("Engineered Explosives", "")); cubeCards.add(new CardIdentity("Enlightened Tutor", "")); @@ -194,6 +196,7 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Genesis Hydra", "")); cubeCards.add(new CardIdentity("Ghitu Encampment", "")); cubeCards.add(new CardIdentity("Ghor-Clan Rampager", "")); + cubeCards.add(new CardIdentity("Gideon, Ally of Zendikar", "")); cubeCards.add(new CardIdentity("Gifts Ungiven", "")); cubeCards.add(new CardIdentity("Gilded Lotus", "")); cubeCards.add(new CardIdentity("Gitaxian Probe", "")); @@ -214,7 +217,6 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Grim Lavamancer", "")); cubeCards.add(new CardIdentity("Grim Monolith", "")); cubeCards.add(new CardIdentity("Griselbrand", "")); - cubeCards.add(new CardIdentity("Grisly Salvage", "")); cubeCards.add(new CardIdentity("Gush", "")); cubeCards.add(new CardIdentity("Hallowed Fountain", "")); cubeCards.add(new CardIdentity("Hallowed Spiritkeeper", "")); @@ -231,7 +233,6 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Hooting Mandrills", "")); cubeCards.add(new CardIdentity("Horizon Canopy", "")); cubeCards.add(new CardIdentity("Hymn to Tourach", "")); - cubeCards.add(new CardIdentity("Icefeather Aven", "")); cubeCards.add(new CardIdentity("Imperial Recruiter", "")); cubeCards.add(new CardIdentity("Imperial Seal", "")); cubeCards.add(new CardIdentity("Inferno Titan", "")); @@ -273,6 +274,7 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Lotus Petal", "")); cubeCards.add(new CardIdentity("Maelstrom Pulse", "")); cubeCards.add(new CardIdentity("Magma Jet", "")); + cubeCards.add(new CardIdentity("Makindi Sliderunner", "")); cubeCards.add(new CardIdentity("Mana Confluence", "")); cubeCards.add(new CardIdentity("Mana Leak", "")); cubeCards.add(new CardIdentity("Mardu Woe-Reaper", "")); @@ -306,7 +308,6 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Mystical Tutor", "")); cubeCards.add(new CardIdentity("Necropotence", "")); cubeCards.add(new CardIdentity("Nether Void", "")); - cubeCards.add(new CardIdentity("Nimble Mongoose", "")); cubeCards.add(new CardIdentity("Noble Hierarch", "")); cubeCards.add(new CardIdentity("Oath of Druids", "")); cubeCards.add(new CardIdentity("Oblivion Ring", "")); @@ -319,6 +320,7 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Outpost Siege", "")); cubeCards.add(new CardIdentity("Overgrown Tomb", "")); cubeCards.add(new CardIdentity("Pack Rat", "")); + cubeCards.add(new CardIdentity("Painful Truths", "")); cubeCards.add(new CardIdentity("Path to Exile", "")); cubeCards.add(new CardIdentity("Pernicious Deed", "")); cubeCards.add(new CardIdentity("Phantasmal Image", "")); @@ -361,15 +363,14 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Rofellos, Llanowar Emissary", "")); cubeCards.add(new CardIdentity("Rude Awakening", "")); cubeCards.add(new CardIdentity("Sacred Foundry", "")); - cubeCards.add(new CardIdentity("Sagu Mauler", "")); cubeCards.add(new CardIdentity("Sakura-Tribe Elder", "")); - cubeCards.add(new CardIdentity("Sarcomancy", "")); cubeCards.add(new CardIdentity("Sarkhan, the Dragonspeaker", "")); cubeCards.add(new CardIdentity("Savannah", "")); cubeCards.add(new CardIdentity("Scalding Tarn", "")); cubeCards.add(new CardIdentity("Scavenging Ooze", "")); cubeCards.add(new CardIdentity("Scroll Rack", "")); cubeCards.add(new CardIdentity("Scrubland", "")); + cubeCards.add(new CardIdentity("Scythe Leopard", "")); cubeCards.add(new CardIdentity("Seachrome Coast", "")); cubeCards.add(new CardIdentity("Searing Blaze", "")); cubeCards.add(new CardIdentity("Seat of the Synod", "")); @@ -377,15 +378,16 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Seething Song", "")); cubeCards.add(new CardIdentity("Sensei's Divining Top", "")); cubeCards.add(new CardIdentity("Shadowmage Infiltrator", "")); + cubeCards.add(new CardIdentity("Shambling Vent", "")); cubeCards.add(new CardIdentity("Shardless Agent", "")); cubeCards.add(new CardIdentity("Shelldock Isle", "")); cubeCards.add(new CardIdentity("Show and Tell", "")); cubeCards.add(new CardIdentity("Shrapnel Blast", "")); - cubeCards.add(new CardIdentity("Shriekmaw", "")); cubeCards.add(new CardIdentity("Siege Rhino", "")); cubeCards.add(new CardIdentity("Signal Pest", "")); cubeCards.add(new CardIdentity("Simic Growth Chamber", "")); cubeCards.add(new CardIdentity("Simic Signet", "")); + cubeCards.add(new CardIdentity("Simic Sky Swallower", "")); cubeCards.add(new CardIdentity("Sinkhole", "")); cubeCards.add(new CardIdentity("Skullclamp", "")); cubeCards.add(new CardIdentity("Skyshroud Elite", "")); @@ -433,7 +435,6 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Temple Garden", "")); cubeCards.add(new CardIdentity("Temple of Epiphany", "")); cubeCards.add(new CardIdentity("Temple of Malice", "")); - cubeCards.add(new CardIdentity("Temple of Silence", "")); cubeCards.add(new CardIdentity("Tendrils of Agony", "")); cubeCards.add(new CardIdentity("Terastodon", "")); cubeCards.add(new CardIdentity("Terminate", "")); @@ -447,7 +448,6 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Thoughtseize", "")); cubeCards.add(new CardIdentity("Thragtusk", "")); cubeCards.add(new CardIdentity("Thran Dynamo", "")); - cubeCards.add(new CardIdentity("Thundermaw Hellkite", "")); cubeCards.add(new CardIdentity("Tidehollow Sculler", "")); cubeCards.add(new CardIdentity("Time Spiral", "")); cubeCards.add(new CardIdentity("Timetwister", "")); @@ -506,7 +506,6 @@ public class JimDavisCube extends DraftCube { cubeCards.add(new CardIdentity("Xathrid Necromancer", "")); cubeCards.add(new CardIdentity("Yawgmoth's Will", "")); cubeCards.add(new CardIdentity("Young Pyromancer", "")); - cubeCards.add(new CardIdentity("Zombie Cutthroat", "")); cubeCards.add(new CardIdentity("Zurgo Bellstriker", "")); } } diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/LegendaryCube.java b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/LegendaryCube.java new file mode 100644 index 00000000000..9e5c8a3573f --- /dev/null +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/LegendaryCube.java @@ -0,0 +1,641 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.tournament.cubes; + +import mage.game.draft.DraftCube; + +/** + * + * @author fireshoes + */ + +public class LegendaryCube extends DraftCube { + +public LegendaryCube() { + super("Legendary Cube (598 cards)"); // http://magic.wizards.com/en/MTGO/articles/archive/legendary-cube-cardlist-2015-11-09 + + cubeCards.add(new CardIdentity("Aboshan, Cephalid Emperor", "")); + cubeCards.add(new CardIdentity("Absorb Vis", "")); + cubeCards.add(new CardIdentity("Akroma's Memorial", "")); + cubeCards.add(new CardIdentity("Akroma's Vengeance", "")); + cubeCards.add(new CardIdentity("Akroma, Angel of Wrath", "")); + cubeCards.add(new CardIdentity("Akuta, Born of Ash", "")); + cubeCards.add(new CardIdentity("Alesha, Who Smiles at Death", "")); + cubeCards.add(new CardIdentity("Alhammarret's Archive", "")); + cubeCards.add(new CardIdentity("All Suns' Dawn", "")); + cubeCards.add(new CardIdentity("Anafenza, Kin-Tree Spirit", "")); + cubeCards.add(new CardIdentity("Anger of the Gods", "")); + cubeCards.add(new CardIdentity("Anticipate", "")); + cubeCards.add(new CardIdentity("Arashi, the Sky Asunder", "")); + cubeCards.add(new CardIdentity("Arcane Denial", "")); + cubeCards.add(new CardIdentity("Arcane Sanctum", "")); + cubeCards.add(new CardIdentity("Arcanis the Omnipotent", "")); + cubeCards.add(new CardIdentity("Arid Mesa", "")); + cubeCards.add(new CardIdentity("Armillary Sphere", "")); + cubeCards.add(new CardIdentity("Ascendant Evincar", "")); + cubeCards.add(new CardIdentity("Ashling the Pilgrim", "")); + cubeCards.add(new CardIdentity("Ashling, the Extinguisher", "")); + cubeCards.add(new CardIdentity("Atarka, World Render", "")); + cubeCards.add(new CardIdentity("Austere Command", "")); + cubeCards.add(new CardIdentity("Avacyn, Angel of Hope", "")); + cubeCards.add(new CardIdentity("Ayumi, the Last Visitor", "")); + cubeCards.add(new CardIdentity("Azami, Lady of Scrolls", "")); + cubeCards.add(new CardIdentity("Azorius Chancery", "")); + cubeCards.add(new CardIdentity("Azorius Signet", "")); + cubeCards.add(new CardIdentity("Azusa, Lost but Seeking", "")); + cubeCards.add(new CardIdentity("Bad River", "")); + cubeCards.add(new CardIdentity("Badlands", "")); + cubeCards.add(new CardIdentity("Banishing Light", "")); + cubeCards.add(new CardIdentity("Basalt Monolith", "")); + cubeCards.add(new CardIdentity("Basilisk Collar", "")); + cubeCards.add(new CardIdentity("Bayou", "")); + cubeCards.add(new CardIdentity("Beacon of Destruction", "")); + cubeCards.add(new CardIdentity("Beacon of Tomorrows", "")); + cubeCards.add(new CardIdentity("Beast Within", "")); + cubeCards.add(new CardIdentity("Berserkers' Onslaught", "")); + cubeCards.add(new CardIdentity("Black Market", "")); + cubeCards.add(new CardIdentity("Black Sun's Zenith", "")); + cubeCards.add(new CardIdentity("Blasphemous Act", "")); + cubeCards.add(new CardIdentity("Blood Crypt", "")); + cubeCards.add(new CardIdentity("Bloodstained Mire", "")); + cubeCards.add(new CardIdentity("Bonfire of the Damned", "")); + cubeCards.add(new CardIdentity("Boros Garrison", "")); + cubeCards.add(new CardIdentity("Boros Signet", "")); + cubeCards.add(new CardIdentity("Brago, King Eternal", "")); + cubeCards.add(new CardIdentity("Brainbite", "")); + cubeCards.add(new CardIdentity("Brainstorm", "")); + cubeCards.add(new CardIdentity("Breeding Pool", "")); + cubeCards.add(new CardIdentity("Brimaz, King of Oreskos", "")); + cubeCards.add(new CardIdentity("Brion Stoutarm", "")); + cubeCards.add(new CardIdentity("Brothers Yamazaki", "")); + cubeCards.add(new CardIdentity("Brothers Yamazaki", "")); + cubeCards.add(new CardIdentity("Caged Sun", "")); + cubeCards.add(new CardIdentity("Calciform Pools", "")); + cubeCards.add(new CardIdentity("Canopy Vista", "")); + cubeCards.add(new CardIdentity("Captain Sisay", "")); + cubeCards.add(new CardIdentity("Careful Consideration", "")); + cubeCards.add(new CardIdentity("Cascade Bluffs", "")); + cubeCards.add(new CardIdentity("Catch // Release", "")); + cubeCards.add(new CardIdentity("Cauldron of Souls", "")); + cubeCards.add(new CardIdentity("Chain Reaction", "")); + cubeCards.add(new CardIdentity("Chainer's Edict", "")); + cubeCards.add(new CardIdentity("Champion's Helm", "")); + cubeCards.add(new CardIdentity("Chandra, Fire of Kaladesh", "")); + cubeCards.add(new CardIdentity("Charcoal Diamond", "")); + cubeCards.add(new CardIdentity("Cho-Manno, Revolutionary", "")); + cubeCards.add(new CardIdentity("Chromatic Lantern", "")); + cubeCards.add(new CardIdentity("Chromatic Sphere", "")); + cubeCards.add(new CardIdentity("Chromatic Star", "")); + cubeCards.add(new CardIdentity("Cinder Glade", "")); + cubeCards.add(new CardIdentity("Clifftop Retreat", "")); + cubeCards.add(new CardIdentity("Coalition Relic", "")); + cubeCards.add(new CardIdentity("Coalition Victory", "")); + cubeCards.add(new CardIdentity("Coldsteel Heart", "")); + cubeCards.add(new CardIdentity("Commander Eesha", "")); + cubeCards.add(new CardIdentity("Compulsive Research", "")); + cubeCards.add(new CardIdentity("Condemn", "")); + cubeCards.add(new CardIdentity("Conflux", "")); + cubeCards.add(new CardIdentity("Contagion Clasp", "")); + cubeCards.add(new CardIdentity("Council's Judgment", "")); + cubeCards.add(new CardIdentity("Crackling Doom", "")); + cubeCards.add(new CardIdentity("Crib Swap", "")); + cubeCards.add(new CardIdentity("Cromat", "")); + cubeCards.add(new CardIdentity("Crovax, Ascendant Hero", "")); + cubeCards.add(new CardIdentity("Cruel Ultimatum", "")); + cubeCards.add(new CardIdentity("Crumbling Necropolis", "")); + cubeCards.add(new CardIdentity("Crux of Fate", "")); + cubeCards.add(new CardIdentity("Crystal Ball", "")); + cubeCards.add(new CardIdentity("Cultivate", "")); + cubeCards.add(new CardIdentity("Cyclonic Rift", "")); + cubeCards.add(new CardIdentity("Daretti, Scrap Savant", "")); + cubeCards.add(new CardIdentity("Dark Depths", "")); + cubeCards.add(new CardIdentity("Daxos of Meletis", "")); + cubeCards.add(new CardIdentity("Day of Destiny", "")); + cubeCards.add(new CardIdentity("Death Denied", "")); + cubeCards.add(new CardIdentity("Detention Sphere", "")); + cubeCards.add(new CardIdentity("Devour Flesh", "")); + cubeCards.add(new CardIdentity("Devour in Shadow", "")); + cubeCards.add(new CardIdentity("Diabolic Tutor", "")); + cubeCards.add(new CardIdentity("Diaochan, Artful Beauty", "")); + cubeCards.add(new CardIdentity("Dimir Aqueduct", "")); + cubeCards.add(new CardIdentity("Dimir Signet", "")); + cubeCards.add(new CardIdentity("Disenchant", "")); + cubeCards.add(new CardIdentity("Dismantling Blow", "")); + cubeCards.add(new CardIdentity("Divine Reckoning", "")); + cubeCards.add(new CardIdentity("Door to Nothingness", "")); + cubeCards.add(new CardIdentity("Doran, the Siege Tower", "")); + cubeCards.add(new CardIdentity("Doubling Season", "")); + cubeCards.add(new CardIdentity("Dragon Breath", "")); + cubeCards.add(new CardIdentity("Dragonlord Atarka", "")); + cubeCards.add(new CardIdentity("Dragonlord Dromoka", "")); + cubeCards.add(new CardIdentity("Dragonlord Ojutai", "")); + cubeCards.add(new CardIdentity("Dragonlord Silumgar", "")); + cubeCards.add(new CardIdentity("Dragonskull Summit", "")); + cubeCards.add(new CardIdentity("Drana, Kalastria Bloodchief", "")); + cubeCards.add(new CardIdentity("Drana, Liberator of Malakir", "")); + cubeCards.add(new CardIdentity("Dreadship Reef", "")); + cubeCards.add(new CardIdentity("Dromoka's Command", "")); + cubeCards.add(new CardIdentity("Drowned Catacomb", "")); + cubeCards.add(new CardIdentity("Duress", "")); + cubeCards.add(new CardIdentity("Dwynen, Gilt-Leaf Daen", "")); + cubeCards.add(new CardIdentity("Edric, Spymaster of Trest", "")); + cubeCards.add(new CardIdentity("Eiganjo Castle", "")); + cubeCards.add(new CardIdentity("Eight-and-a-Half-Tails", "")); + cubeCards.add(new CardIdentity("Eladamri's Call", "")); + cubeCards.add(new CardIdentity("Eladamri, Lord of Leaves", "")); + cubeCards.add(new CardIdentity("Elbrus, the Binding Blade", "")); + cubeCards.add(new CardIdentity("Elesh Norn, Grand Cenobite", "")); + cubeCards.add(new CardIdentity("Emrakul, the Aeons Torn", "")); + cubeCards.add(new CardIdentity("Endrek Sahr, Master Breeder", "")); + cubeCards.add(new CardIdentity("Engineered Explosives", "")); + cubeCards.add(new CardIdentity("Enlightened Tutor", "")); + cubeCards.add(new CardIdentity("Esper Charm", "")); + cubeCards.add(new CardIdentity("Everflowing Chalice", "")); + cubeCards.add(new CardIdentity("Evolving Wilds", "")); + cubeCards.add(new CardIdentity("Exava, Rakdos Blood Witch", "")); + cubeCards.add(new CardIdentity("Experiment Kraj", "")); + cubeCards.add(new CardIdentity("Explore", "")); + cubeCards.add(new CardIdentity("Explosive Vegetation", "")); + cubeCards.add(new CardIdentity("Expunge", "")); + cubeCards.add(new CardIdentity("Ezuri, Claw of Progress", "")); + cubeCards.add(new CardIdentity("Fact or Fiction", "")); + cubeCards.add(new CardIdentity("Faith's Fetters", "")); + cubeCards.add(new CardIdentity("Faithless Looting", "")); + cubeCards.add(new CardIdentity("Far // Away", "")); + cubeCards.add(new CardIdentity("Farseek", "")); + cubeCards.add(new CardIdentity("Fellwar Stone", "")); + cubeCards.add(new CardIdentity("Fetid Heath", "")); + cubeCards.add(new CardIdentity("Fiery Confluence", "")); + cubeCards.add(new CardIdentity("Fiery Fall", "")); + cubeCards.add(new CardIdentity("Finest Hour", "")); + cubeCards.add(new CardIdentity("Fire Diamond", "")); + cubeCards.add(new CardIdentity("Fire-Lit Thicket", "")); + cubeCards.add(new CardIdentity("Firebolt", "")); + cubeCards.add(new CardIdentity("Fires of Yavimaya", "")); + cubeCards.add(new CardIdentity("Flood Plain", "")); + cubeCards.add(new CardIdentity("Flooded Grove", "")); + cubeCards.add(new CardIdentity("Flooded Strand", "")); + cubeCards.add(new CardIdentity("Forbidden Alchemy", "")); + cubeCards.add(new CardIdentity("Foresee", "")); + cubeCards.add(new CardIdentity("Frontier Bivouac", "")); + cubeCards.add(new CardIdentity("Fungal Reaches", "")); + cubeCards.add(new CardIdentity("Genesis Wave", "")); + cubeCards.add(new CardIdentity("Genju of the Realm", "")); + cubeCards.add(new CardIdentity("Ghave, Guru of Spores", "")); + cubeCards.add(new CardIdentity("Ghoulcaller Gisa", "")); + cubeCards.add(new CardIdentity("Gift of the Gargantuan", "")); + cubeCards.add(new CardIdentity("Gilded Light", "")); + cubeCards.add(new CardIdentity("Gilded Lotus", "")); + cubeCards.add(new CardIdentity("Gisela, Blade of Goldnight", "")); + cubeCards.add(new CardIdentity("Glacial Fortress", "")); + cubeCards.add(new CardIdentity("Gleam of Resistance", "")); + cubeCards.add(new CardIdentity("Glissa Sunseeker", "")); + cubeCards.add(new CardIdentity("Glissa, the Traitor", "")); + cubeCards.add(new CardIdentity("Godless Shrine", "")); + cubeCards.add(new CardIdentity("Godo, Bandit Warlord", "")); + cubeCards.add(new CardIdentity("Gods Willing", "")); + cubeCards.add(new CardIdentity("Golgari Rot Farm", "")); + cubeCards.add(new CardIdentity("Golgari Signet", "")); + cubeCards.add(new CardIdentity("Grasslands", "")); + cubeCards.add(new CardIdentity("Graven Cairns", "")); + cubeCards.add(new CardIdentity("Grenzo, Dungeon Warden", "")); + cubeCards.add(new CardIdentity("Griselbrand", "")); + cubeCards.add(new CardIdentity("Gruul Signet", "")); + cubeCards.add(new CardIdentity("Gruul Turf", "")); + cubeCards.add(new CardIdentity("Hallowed Fountain", "")); + cubeCards.add(new CardIdentity("Hanna, Ship's Navigator", "")); + cubeCards.add(new CardIdentity("Harmonize", "")); + cubeCards.add(new CardIdentity("Heartless Hidetsugu", "")); + cubeCards.add(new CardIdentity("Hedron Archive", "")); + cubeCards.add(new CardIdentity("Helvault", "")); + cubeCards.add(new CardIdentity("Hero's Blade", "")); + cubeCards.add(new CardIdentity("Hero's Demise", "")); + cubeCards.add(new CardIdentity("Hero's Downfall", "")); + cubeCards.add(new CardIdentity("Heroes' Podium", "")); + cubeCards.add(new CardIdentity("Hide // Seek", "")); + cubeCards.add(new CardIdentity("Hidetsugu's Second Rite", "")); + cubeCards.add(new CardIdentity("Hinterland Harbor", "")); + cubeCards.add(new CardIdentity("Homicidal Seclusion", "")); + cubeCards.add(new CardIdentity("Honden of Cleansing Fire", "")); + cubeCards.add(new CardIdentity("Honden of Infinite Rage", "")); + cubeCards.add(new CardIdentity("Honden of Life's Web", "")); + cubeCards.add(new CardIdentity("Honden of Night's Reach", "")); + cubeCards.add(new CardIdentity("Honden of Seeing Winds", "")); + cubeCards.add(new CardIdentity("Honor-Worn Shaku", "")); + cubeCards.add(new CardIdentity("Horobi, Death's Wail", "")); + cubeCards.add(new CardIdentity("Hua Tuo, Honored Physician", "")); + cubeCards.add(new CardIdentity("Hull Breach", "")); + cubeCards.add(new CardIdentity("Hythonia the Cruel", "")); + cubeCards.add(new CardIdentity("Ichor Wellspring", "")); + cubeCards.add(new CardIdentity("Impulse", "")); + cubeCards.add(new CardIdentity("Into the Roil", "")); + cubeCards.add(new CardIdentity("Isamaru, Hound of Konda", "")); + cubeCards.add(new CardIdentity("Isao, Enlightened Bushi", "")); + cubeCards.add(new CardIdentity("Isolated Chapel", "")); + cubeCards.add(new CardIdentity("Ith, High Arcanist", "")); + cubeCards.add(new CardIdentity("Izzet Boilerworks", "")); + cubeCards.add(new CardIdentity("Izzet Signet", "")); + cubeCards.add(new CardIdentity("Jace, Vryn's Prodigy", "")); + cubeCards.add(new CardIdentity("Jareth, Leonine Titan", "")); + cubeCards.add(new CardIdentity("Jaya Ballard, Task Mage", "")); + cubeCards.add(new CardIdentity("Jazal Goldmane", "")); + cubeCards.add(new CardIdentity("Jenara, Asura of War", "")); + cubeCards.add(new CardIdentity("Jeska, Warrior Adept", "")); + cubeCards.add(new CardIdentity("Jeskai Ascendancy", "")); + cubeCards.add(new CardIdentity("Jin-Gitaxias, Core Augur", "")); + cubeCards.add(new CardIdentity("Jiwari, the Earth Aflame", "")); + cubeCards.add(new CardIdentity("Jor Kadeen, the Prevailer", "")); + cubeCards.add(new CardIdentity("Jungle Shrine", "")); + cubeCards.add(new CardIdentity("Kaervek the Merciless", "")); + cubeCards.add(new CardIdentity("Kagemaro, First to Suffer", "")); + cubeCards.add(new CardIdentity("Kaho, Minamo Historian", "")); + cubeCards.add(new CardIdentity("Kalemne, Disciple of Iroas", "")); + cubeCards.add(new CardIdentity("Kalitas, Bloodchief of Ghet", "")); + cubeCards.add(new CardIdentity("Kamahl, Fist of Krosa", "")); + cubeCards.add(new CardIdentity("Kamahl, Pit Fighter", "")); + cubeCards.add(new CardIdentity("Karador, Ghost Chieftain", "")); + cubeCards.add(new CardIdentity("Karlov of the Ghost Council", "")); + cubeCards.add(new CardIdentity("Karn, Silver Golem", "")); + cubeCards.add(new CardIdentity("Kataki, War's Wage", "")); + cubeCards.add(new CardIdentity("Kazuul, Tyrant of the Cliffs", "")); + cubeCards.add(new CardIdentity("Keiga, the Tide Star", "")); + cubeCards.add(new CardIdentity("Kemba, Kha Regent", "")); + cubeCards.add(new CardIdentity("Keranos, God of Storms", "")); + cubeCards.add(new CardIdentity("Kira, Great Glass-Spinner", "")); + cubeCards.add(new CardIdentity("Kodama of the North Tree", "")); + cubeCards.add(new CardIdentity("Kodama's Reach", "")); + cubeCards.add(new CardIdentity("Kokusho, the Evening Star", "")); + cubeCards.add(new CardIdentity("Kolaghan's Command", "")); + cubeCards.add(new CardIdentity("Kolaghan, the Storm's Fury", "")); + cubeCards.add(new CardIdentity("Konda's Banner", "")); + cubeCards.add(new CardIdentity("Kongming, 'Sleeping Dragon'", "")); + cubeCards.add(new CardIdentity("Kozilek, Butcher of Truth", "")); + cubeCards.add(new CardIdentity("Krenko, Mob Boss", "")); + cubeCards.add(new CardIdentity("Kresh the Bloodbraided", "")); + cubeCards.add(new CardIdentity("Krosan Grip", "")); + cubeCards.add(new CardIdentity("Krosan Verge", "")); + cubeCards.add(new CardIdentity("Kumano, Master Yamabushi", "")); + cubeCards.add(new CardIdentity("Kurkesh, Onakke Ancient", "")); + cubeCards.add(new CardIdentity("Kytheon, Hero of Akros", "")); + cubeCards.add(new CardIdentity("Last Stand", "")); + cubeCards.add(new CardIdentity("Lavalanche", "")); + cubeCards.add(new CardIdentity("Legacy Weapon", "")); + cubeCards.add(new CardIdentity("Life's Legacy", "")); + cubeCards.add(new CardIdentity("Lightning Bolt", "")); + cubeCards.add(new CardIdentity("Lightning Greaves", "")); + cubeCards.add(new CardIdentity("Liliana, Heretical Healer", "")); + cubeCards.add(new CardIdentity("Linvala, Keeper of Silence", "")); + cubeCards.add(new CardIdentity("Llawan, Cephalid Empress", "")); + cubeCards.add(new CardIdentity("Lorthos, the Tidemaker", "")); + cubeCards.add(new CardIdentity("Lu Xun, Scholar General", "")); + cubeCards.add(new CardIdentity("Lyzolda, the Blood Witch", "")); + cubeCards.add(new CardIdentity("Maelstrom Nexus", "")); + cubeCards.add(new CardIdentity("Maelstrom Wanderer", "")); + cubeCards.add(new CardIdentity("Maga, Traitor to Mortals", "")); + cubeCards.add(new CardIdentity("Mage's Guile", "")); + cubeCards.add(new CardIdentity("Mageta the Lion", "")); + cubeCards.add(new CardIdentity("Mana Reflection", "")); + cubeCards.add(new CardIdentity("Marath, Will of the Wild", "")); + cubeCards.add(new CardIdentity("Marble Diamond", "")); + cubeCards.add(new CardIdentity("March of the Machines", "")); + cubeCards.add(new CardIdentity("Marchesa, the Black Rose", "")); + cubeCards.add(new CardIdentity("Marsh Flats", "")); + cubeCards.add(new CardIdentity("Mayael's Aria", "")); + cubeCards.add(new CardIdentity("Melek, Izzet Paragon", "")); + cubeCards.add(new CardIdentity("Memnarch", "")); + cubeCards.add(new CardIdentity("Meng Huo, Barbarian King", "")); + cubeCards.add(new CardIdentity("Meren of Clan Nel Toth", "")); + cubeCards.add(new CardIdentity("Mikaeus, the Lunarch", "")); + cubeCards.add(new CardIdentity("Mikaeus, the Unhallowed", "")); + cubeCards.add(new CardIdentity("Mikokoro, Center of the Sea", "")); + cubeCards.add(new CardIdentity("Minamo, School at Water's Edge", "")); + cubeCards.add(new CardIdentity("Mind Stone", "")); + cubeCards.add(new CardIdentity("Mind's Eye", "")); + cubeCards.add(new CardIdentity("Mindslaver", "")); + cubeCards.add(new CardIdentity("Mirari", "")); + cubeCards.add(new CardIdentity("Mirari's Wake", "")); + cubeCards.add(new CardIdentity("Miren, the Moaning Well", "")); + cubeCards.add(new CardIdentity("Mirri the Cursed", "")); + cubeCards.add(new CardIdentity("Mirri, Cat Warrior", "")); + cubeCards.add(new CardIdentity("Misdirection", "")); + cubeCards.add(new CardIdentity("Misty Rainforest", "")); + cubeCards.add(new CardIdentity("Mizzium Mortars", "")); + cubeCards.add(new CardIdentity("Mizzix of the Izmagnus", "")); + cubeCards.add(new CardIdentity("Mizzix's Mastery", "")); + cubeCards.add(new CardIdentity("Molten Slagheap", "")); + cubeCards.add(new CardIdentity("Momentous Fall", "")); + cubeCards.add(new CardIdentity("Mortify", "")); + cubeCards.add(new CardIdentity("Moss Diamond", "")); + cubeCards.add(new CardIdentity("Mountain Valley", "")); + cubeCards.add(new CardIdentity("Muddle the Mixture", "")); + cubeCards.add(new CardIdentity("Multani, Maro-Sorcerer", "")); + cubeCards.add(new CardIdentity("Muzzio, Visionary Architect", "")); + cubeCards.add(new CardIdentity("Mycosynth Wellspring", "")); + cubeCards.add(new CardIdentity("Myojin of Cleansing Fire", "")); + cubeCards.add(new CardIdentity("Myojin of Life's Web", "")); + cubeCards.add(new CardIdentity("Myriad Landscape", "")); + cubeCards.add(new CardIdentity("Mystic Confluence", "")); + cubeCards.add(new CardIdentity("Mystic Gate", "")); + cubeCards.add(new CardIdentity("Mystic Monastery", "")); + cubeCards.add(new CardIdentity("Nagao, Bound by Honor", "")); + cubeCards.add(new CardIdentity("Nath of the Gilt-Leaf", "")); + cubeCards.add(new CardIdentity("Naturalize", "")); + cubeCards.add(new CardIdentity("Negate", "")); + cubeCards.add(new CardIdentity("Night's Whisper", "")); + cubeCards.add(new CardIdentity("Nissa's Revelation", "")); + cubeCards.add(new CardIdentity("Nissa, Vastwood Seer", "")); + cubeCards.add(new CardIdentity("Niv-Mizzet, Dracogenius", "")); + cubeCards.add(new CardIdentity("Niv-Mizzet, the Firemind", "")); + cubeCards.add(new CardIdentity("Nomad Outpost", "")); + cubeCards.add(new CardIdentity("Noyan Dar, Roil Shaper", "")); + cubeCards.add(new CardIdentity("Ob Nixilis, the Fallen", "")); + cubeCards.add(new CardIdentity("Obelisk of Alara", "")); + cubeCards.add(new CardIdentity("Oblation", "")); + cubeCards.add(new CardIdentity("Oblivion Ring", "")); + cubeCards.add(new CardIdentity("Oblivion Stone", "")); + cubeCards.add(new CardIdentity("Obzedat, Ghost Council", "")); + cubeCards.add(new CardIdentity("Odric, Master Tactician", "")); + cubeCards.add(new CardIdentity("Okina, Temple to the Grandfathers", "")); + cubeCards.add(new CardIdentity("Omnath, Locus of Mana", "")); + cubeCards.add(new CardIdentity("Omnath, Locus of Rage", "")); + cubeCards.add(new CardIdentity("Opal-Eye, Konda's Yojimbo", "")); + cubeCards.add(new CardIdentity("Opulent Palace", "")); + cubeCards.add(new CardIdentity("Oran-Rief, the Vastwood", "")); + cubeCards.add(new CardIdentity("Orim, Samite Healer", "")); + cubeCards.add(new CardIdentity("Orzhov Basilica", "")); + cubeCards.add(new CardIdentity("Orzhov Signet", "")); + cubeCards.add(new CardIdentity("Outpost Siege", "")); + cubeCards.add(new CardIdentity("Overgrown Tomb", "")); + cubeCards.add(new CardIdentity("Panoptic Mirror", "")); + cubeCards.add(new CardIdentity("Pariah", "")); + cubeCards.add(new CardIdentity("Path to Exile", "")); + cubeCards.add(new CardIdentity("Pernicious Deed", "")); + cubeCards.add(new CardIdentity("Phage the Untouchable", "")); + cubeCards.add(new CardIdentity("Phyrexian Arena", "")); + cubeCards.add(new CardIdentity("Pia and Kiran Nalaar", "")); + cubeCards.add(new CardIdentity("Pianna, Nomad Captain", "")); + cubeCards.add(new CardIdentity("Pithing Needle", "")); + cubeCards.add(new CardIdentity("Plateau", "")); + cubeCards.add(new CardIdentity("Polluted Delta", "")); + cubeCards.add(new CardIdentity("Polukranos, World Eater", "")); + cubeCards.add(new CardIdentity("Praetor's Counsel", "")); + cubeCards.add(new CardIdentity("Prairie Stream", "")); + cubeCards.add(new CardIdentity("Prime Speaker Zegana", "")); + cubeCards.add(new CardIdentity("Primeval Bounty", "")); + cubeCards.add(new CardIdentity("Prismatic Lens", "")); + cubeCards.add(new CardIdentity("Progenitus", "")); + cubeCards.add(new CardIdentity("Prophetic Prism", "")); + cubeCards.add(new CardIdentity("Psychotic Fury", "")); + cubeCards.add(new CardIdentity("Pure // Simple", "")); + cubeCards.add(new CardIdentity("Putrefy", "")); + cubeCards.add(new CardIdentity("Pyromancer's Goggles", "")); + cubeCards.add(new CardIdentity("Radha, Heir to Keld", "")); + cubeCards.add(new CardIdentity("Radiant Purge", "")); + cubeCards.add(new CardIdentity("Radiant's Judgment", "")); + cubeCards.add(new CardIdentity("Rafiq of the Many", "")); + cubeCards.add(new CardIdentity("Rakdos Carnarium", "")); + cubeCards.add(new CardIdentity("Rakdos Signet", "")); + cubeCards.add(new CardIdentity("Rakka Mar", "")); + cubeCards.add(new CardIdentity("Rampant Growth", "")); + cubeCards.add(new CardIdentity("Ray of Command", "")); + cubeCards.add(new CardIdentity("Read the Bones", "")); + cubeCards.add(new CardIdentity("Recoup", "")); + cubeCards.add(new CardIdentity("Reflecting Pool", "")); + cubeCards.add(new CardIdentity("Regrowth", "")); + cubeCards.add(new CardIdentity("Reiterate", "")); + cubeCards.add(new CardIdentity("Reki, the History of Kamigawa", "")); + cubeCards.add(new CardIdentity("Repeal", "")); + cubeCards.add(new CardIdentity("Repulse", "")); + cubeCards.add(new CardIdentity("Rescind", "")); + cubeCards.add(new CardIdentity("Reya Dawnbringer", "")); + cubeCards.add(new CardIdentity("Rhys the Redeemed", "")); + cubeCards.add(new CardIdentity("Righteous Confluence", "")); + cubeCards.add(new CardIdentity("Rings of Brighthearth", "")); + cubeCards.add(new CardIdentity("Rocky Tar Pit", "")); + cubeCards.add(new CardIdentity("Rofellos, Llanowar Emissary", "")); + cubeCards.add(new CardIdentity("Rootbound Crag", "")); + cubeCards.add(new CardIdentity("Rorix Bladewing", "")); + cubeCards.add(new CardIdentity("Rugged Prairie", "")); + cubeCards.add(new CardIdentity("Rupture Spire", "")); + cubeCards.add(new CardIdentity("Ruric Thar, the Unbowed", "")); + cubeCards.add(new CardIdentity("Rush of Knowledge", "")); + cubeCards.add(new CardIdentity("Ryusei, the Falling Star", "")); + cubeCards.add(new CardIdentity("Sachi, Daughter of Seshiro", "")); + cubeCards.add(new CardIdentity("Sacred Foundry", "")); + cubeCards.add(new CardIdentity("Saffi Eriksdotter", "")); + cubeCards.add(new CardIdentity("Sakashima the Impostor", "")); + cubeCards.add(new CardIdentity("Saltcrusted Steppe", "")); + cubeCards.add(new CardIdentity("Sandsteppe Citadel", "")); + cubeCards.add(new CardIdentity("Savage Lands", "")); + cubeCards.add(new CardIdentity("Savannah", "")); + cubeCards.add(new CardIdentity("Scalding Tarn", "")); + cubeCards.add(new CardIdentity("Scion of the Ur-Dragon", "")); + cubeCards.add(new CardIdentity("Scrap", "")); + cubeCards.add(new CardIdentity("Scrubland", "")); + cubeCards.add(new CardIdentity("Sculpting Steel", "")); + cubeCards.add(new CardIdentity("Search for Tomorrow", "")); + cubeCards.add(new CardIdentity("Seaside Citadel", "")); + cubeCards.add(new CardIdentity("Seizan, Perverter of Truth", "")); + cubeCards.add(new CardIdentity("Selesnya Sanctuary", "")); + cubeCards.add(new CardIdentity("Selesnya Signet", "")); + cubeCards.add(new CardIdentity("Sensei Golden-Tail", "")); + cubeCards.add(new CardIdentity("Sharuum the Hegemon", "")); + cubeCards.add(new CardIdentity("Shattergang Brothers", "")); + cubeCards.add(new CardIdentity("Sheoldred, Whispering One", "")); + cubeCards.add(new CardIdentity("Shinka, the Bloodsoaked Keep", "")); + cubeCards.add(new CardIdentity("Shizo, Death's Storehouse", "")); + cubeCards.add(new CardIdentity("Shu Yun, the Silent Tempest", "")); + cubeCards.add(new CardIdentity("Sidar Jabari", "")); + cubeCards.add(new CardIdentity("Sidisi, Brood Tyrant", "")); + cubeCards.add(new CardIdentity("Sidisi, Undead Vizier", "")); + cubeCards.add(new CardIdentity("Sigarda, Host of Herons", "")); + cubeCards.add(new CardIdentity("Sign in Blood", "")); + cubeCards.add(new CardIdentity("Silence the Believers", "")); + cubeCards.add(new CardIdentity("Silumgar's Command", "")); + cubeCards.add(new CardIdentity("Silumgar, the Drifting Death", "")); + cubeCards.add(new CardIdentity("Silvos, Rogue Elemental", "")); + cubeCards.add(new CardIdentity("Simic Growth Chamber", "")); + cubeCards.add(new CardIdentity("Simic Signet", "")); + cubeCards.add(new CardIdentity("Skullbriar, the Walking Grave", "")); + cubeCards.add(new CardIdentity("Sky Diamond", "")); + cubeCards.add(new CardIdentity("Skyship Weatherlight", "")); + cubeCards.add(new CardIdentity("Smoldering Marsh", "")); + cubeCards.add(new CardIdentity("Song of the Dryads", "")); + cubeCards.add(new CardIdentity("Sorin's Vengeance", "")); + cubeCards.add(new CardIdentity("Soul's Fire", "")); + cubeCards.add(new CardIdentity("Sphere of the Suns", "")); + cubeCards.add(new CardIdentity("Sphinx-Bone Wand", "")); + cubeCards.add(new CardIdentity("Spine of Ish Sah", "")); + cubeCards.add(new CardIdentity("Spirit of the Night", "")); + cubeCards.add(new CardIdentity("Spite // Malice", "")); + cubeCards.add(new CardIdentity("Squee, Goblin Nabob", "")); + cubeCards.add(new CardIdentity("Staff of Nin", "")); + cubeCards.add(new CardIdentity("Steam Vents", "")); + cubeCards.add(new CardIdentity("Stitcher Geralf", "")); + cubeCards.add(new CardIdentity("Stomping Ground", "")); + cubeCards.add(new CardIdentity("Stubborn Denial", "")); + cubeCards.add(new CardIdentity("Sulfur Falls", "")); + cubeCards.add(new CardIdentity("Sultai Charm", "")); + cubeCards.add(new CardIdentity("Sun Ce, Young Conquerer", "")); + cubeCards.add(new CardIdentity("Sun Quan, Lord of Wu", "")); + cubeCards.add(new CardIdentity("Sunken Hollow", "")); + cubeCards.add(new CardIdentity("Sunken Ruins", "")); + cubeCards.add(new CardIdentity("Sunpetal Grove", "")); + cubeCards.add(new CardIdentity("Surrak Dragonclaw", "")); + cubeCards.add(new CardIdentity("Surrak, the Hunt Caller", "")); + cubeCards.add(new CardIdentity("Swiftfoot Boots", "")); + cubeCards.add(new CardIdentity("Sword of the Animist", "")); + cubeCards.add(new CardIdentity("Sword of the Chosen", "")); + cubeCards.add(new CardIdentity("Sydri, Galvanic Genius", "")); + cubeCards.add(new CardIdentity("Sygg, River Cutthroat", "")); + cubeCards.add(new CardIdentity("Sygg, River Guide", "")); + cubeCards.add(new CardIdentity("Sylvan Bounty", "")); + cubeCards.add(new CardIdentity("Tahngarth, Talruum Hero", "")); + cubeCards.add(new CardIdentity("Taiga", "")); + cubeCards.add(new CardIdentity("Tainted Pact", "")); + cubeCards.add(new CardIdentity("Tajic, Blade of the Legion", "")); + cubeCards.add(new CardIdentity("Talisman of Dominance", "")); + cubeCards.add(new CardIdentity("Talisman of Impulse", "")); + cubeCards.add(new CardIdentity("Talisman of Indulgence", "")); + cubeCards.add(new CardIdentity("Talisman of Progress", "")); + cubeCards.add(new CardIdentity("Talisman of Unity", "")); + cubeCards.add(new CardIdentity("Talrand, Sky Summoner", "")); + cubeCards.add(new CardIdentity("Tasigur, the Golden Fang", "")); + cubeCards.add(new CardIdentity("Tatsumasa, the Dragon's Fang", "")); + cubeCards.add(new CardIdentity("Teferi, Mage of Zhalfir", "")); + cubeCards.add(new CardIdentity("Temple Garden", "")); + cubeCards.add(new CardIdentity("Temple of Abandon", "")); + cubeCards.add(new CardIdentity("Temple of Deceit", "")); + cubeCards.add(new CardIdentity("Temple of Enlightenment", "")); + cubeCards.add(new CardIdentity("Temple of Epiphany", "")); + cubeCards.add(new CardIdentity("Temple of Malady", "")); + cubeCards.add(new CardIdentity("Temple of Malice", "")); + cubeCards.add(new CardIdentity("Temple of Mystery", "")); + cubeCards.add(new CardIdentity("Temple of Plenty", "")); + cubeCards.add(new CardIdentity("Temple of Silence", "")); + cubeCards.add(new CardIdentity("Temple of the False God", "")); + cubeCards.add(new CardIdentity("Temple of Triumph", "")); + cubeCards.add(new CardIdentity("Temur Ascendancy", "")); + cubeCards.add(new CardIdentity("Temur Battle Rage", "")); + cubeCards.add(new CardIdentity("Tenza, Godo's Maul", "")); + cubeCards.add(new CardIdentity("Terminate", "")); + cubeCards.add(new CardIdentity("Terramorphic Expanse", "")); + cubeCards.add(new CardIdentity("Terrarion", "")); + cubeCards.add(new CardIdentity("Teysa, Envoy of Ghosts", "")); + cubeCards.add(new CardIdentity("Tezzeret the Seeker", "")); + cubeCards.add(new CardIdentity("Thada Adel, Acquisitor", "")); + cubeCards.add(new CardIdentity("That Which Was Taken", "")); + cubeCards.add(new CardIdentity("The Mimeoplasm", "")); + cubeCards.add(new CardIdentity("Thirst for Knowledge", "")); + cubeCards.add(new CardIdentity("Thran Dynamo", "")); + cubeCards.add(new CardIdentity("Thraximundar", "")); + cubeCards.add(new CardIdentity("Thrun, the Last Troll", "")); + cubeCards.add(new CardIdentity("Time of Need", "")); + cubeCards.add(new CardIdentity("Time Stop", "")); + cubeCards.add(new CardIdentity("Time Warp", "")); + cubeCards.add(new CardIdentity("Titania, Protector of Argoth", "")); + cubeCards.add(new CardIdentity("Tithe", "")); + cubeCards.add(new CardIdentity("Tolsimir Wolfblood", "")); + cubeCards.add(new CardIdentity("Tomorrow, Azami's Familiar", "")); + cubeCards.add(new CardIdentity("Tormenting Voice", "")); + cubeCards.add(new CardIdentity("Toshiro Umezawa", "")); + cubeCards.add(new CardIdentity("Toxic Deluge", "")); + cubeCards.add(new CardIdentity("Trading Post", "")); + cubeCards.add(new CardIdentity("Tragic Slip", "")); + cubeCards.add(new CardIdentity("Transguild Promenade", "")); + cubeCards.add(new CardIdentity("Traumatic Visions", "")); + cubeCards.add(new CardIdentity("Tribute to Hunger", "")); + cubeCards.add(new CardIdentity("Tromokratis", "")); + cubeCards.add(new CardIdentity("Tropical Island", "")); + cubeCards.add(new CardIdentity("Tsabo Tavoc", "")); + cubeCards.add(new CardIdentity("Tuktuk the Explorer", "")); + cubeCards.add(new CardIdentity("Tumble Magnet", "")); + cubeCards.add(new CardIdentity("Tundra", "")); + cubeCards.add(new CardIdentity("Turn // Burn", "")); + cubeCards.add(new CardIdentity("Twilight Mire", "")); + cubeCards.add(new CardIdentity("Tymaret, the Murder King", "")); + cubeCards.add(new CardIdentity("Ugin's Insight", "")); + cubeCards.add(new CardIdentity("Ulamog, the Infinite Gyre", "")); + cubeCards.add(new CardIdentity("Ultimate Price", "")); + cubeCards.add(new CardIdentity("Underground Sea", "")); + cubeCards.add(new CardIdentity("Unexpectedly Absent", "")); + cubeCards.add(new CardIdentity("Unstable Obelisk", "")); + cubeCards.add(new CardIdentity("Untaidake, the Cloud Keeper", "")); + cubeCards.add(new CardIdentity("Urabrask the Hidden", "")); + cubeCards.add(new CardIdentity("Urban Evolution", "")); + cubeCards.add(new CardIdentity("Urza's Rage", "")); + cubeCards.add(new CardIdentity("Utter End", "")); + cubeCards.add(new CardIdentity("Uyo, Silent Prophet", "")); + cubeCards.add(new CardIdentity("Valorous Stance", "")); + cubeCards.add(new CardIdentity("Vampiric Tutor", "")); + cubeCards.add(new CardIdentity("Vanish into Memory", "")); + cubeCards.add(new CardIdentity("Vedalken Orrery", "")); + cubeCards.add(new CardIdentity("Vendetta", "")); + cubeCards.add(new CardIdentity("Vendilion Clique", "")); + cubeCards.add(new CardIdentity("Venser, Shaper Savant", "")); + cubeCards.add(new CardIdentity("Verdant Catacombs", "")); + cubeCards.add(new CardIdentity("Verdant Confluence", "")); + cubeCards.add(new CardIdentity("Verdeloth the Ancient", "")); + cubeCards.add(new CardIdentity("Vicious Shadows", "")); + cubeCards.add(new CardIdentity("Visara the Dreadful", "")); + cubeCards.add(new CardIdentity("Vish Kal, Blood Arbiter", "")); + cubeCards.add(new CardIdentity("Volcanic Island", "")); + cubeCards.add(new CardIdentity("Vorel of the Hull Clade", "")); + cubeCards.add(new CardIdentity("Vorinclex, Voice of Hunger", "")); + cubeCards.add(new CardIdentity("Warstorm Surge", "")); + cubeCards.add(new CardIdentity("Watery Grave", "")); + cubeCards.add(new CardIdentity("Wayfarer's Bauble", "")); + cubeCards.add(new CardIdentity("Wear // Tear", "")); + cubeCards.add(new CardIdentity("Whispers of the Muse", "")); + cubeCards.add(new CardIdentity("Wild Ricochet", "")); + cubeCards.add(new CardIdentity("Windswept Heath", "")); + cubeCards.add(new CardIdentity("Wooded Bastion", "")); + cubeCards.add(new CardIdentity("Wooded Foothills", "")); + cubeCards.add(new CardIdentity("Woodland Cemetery", "")); + cubeCards.add(new CardIdentity("Word of Seizing", "")); + cubeCards.add(new CardIdentity("Worldly Tutor", "")); + cubeCards.add(new CardIdentity("Worn Powerstone", "")); + cubeCards.add(new CardIdentity("Wort, the Raidmother", "")); + cubeCards.add(new CardIdentity("Wrath of God", "")); + cubeCards.add(new CardIdentity("Wretched Confluence", "")); + cubeCards.add(new CardIdentity("Wrexial, the Risen Deep", "")); + cubeCards.add(new CardIdentity("Wydwen, the Biting Gale", "")); + cubeCards.add(new CardIdentity("Xenagos, God of Revels", "")); + cubeCards.add(new CardIdentity("Xiahou Dun, the One-Eyed", "")); + cubeCards.add(new CardIdentity("Yasova Dragonclaw", "")); + cubeCards.add(new CardIdentity("Yawgmoth's Agenda", "")); + cubeCards.add(new CardIdentity("Yeva, Nature's Herald", "")); + cubeCards.add(new CardIdentity("Yisan, the Wanderer Bard", "")); + cubeCards.add(new CardIdentity("Yomiji, Who Bars the Way", "")); + cubeCards.add(new CardIdentity("Yosei, the Morning Star", "")); + cubeCards.add(new CardIdentity("Zedruu the Greathearted", "")); + cubeCards.add(new CardIdentity("Zirilan of the Claw", "")); + cubeCards.add(new CardIdentity("Zurgo Bellstriker", "")); + cubeCards.add(new CardIdentity("Zurgo Helmsmasher", "")); + } +} diff --git a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml index ece1bd9e9ef..df970bfe867 100644 --- a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-tournament-constructed diff --git a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml index 7b3ed663f08..94f10534af6 100644 --- a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.4 + 1.4.5 mage-tournament-sealed diff --git a/Mage.Server.Plugins/pom.xml b/Mage.Server.Plugins/pom.xml index 590c8fbc00d..2ba6c35a8ac 100644 --- a/Mage.Server.Plugins/pom.xml +++ b/Mage.Server.Plugins/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 mage-server-plugins @@ -17,9 +17,10 @@ Mage.Deck.Constructed Mage.Deck.Limited - Mage.Game.CommanderDuel + Mage.Game.CommanderDuel Mage.Game.CommanderFreeForAll Mage.Game.FreeForAll + Mage.Game.MomirDuel Mage.Game.TinyLeadersDuel Mage.Game.TwoPlayerDuel Mage.Player.AI diff --git a/Mage.Server/config/config.xml b/Mage.Server/config/config.xml index b51b2a2564d..f043debc6a5 100644 --- a/Mage.Server/config/config.xml +++ b/Mage.Server/config/config.xml @@ -49,6 +49,7 @@ + @@ -65,6 +66,7 @@ + @@ -77,6 +79,7 @@ + @@ -87,11 +90,12 @@ - - + + + diff --git a/Mage.Server/pom.xml b/Mage.Server/pom.xml index 7490945b1e7..60418e808d1 100644 --- a/Mage.Server/pom.xml +++ b/Mage.Server/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 mage-server @@ -142,6 +142,12 @@ ${project.version} runtime + + ${project.groupId} + mage-game-momirduel + ${project.version} + runtime + diff --git a/Mage.Server/release/config/config.xml b/Mage.Server/release/config/config.xml index 92ff87d7d58..b4d0356c3fc 100644 --- a/Mage.Server/release/config/config.xml +++ b/Mage.Server/release/config/config.xml @@ -28,6 +28,7 @@ + @@ -44,6 +45,7 @@ + @@ -56,6 +58,7 @@ + @@ -66,11 +69,12 @@ - - + + + diff --git a/Mage.Server/src/main/java/mage/server/Main.java b/Mage.Server/src/main/java/mage/server/Main.java index d9f8aec6c2b..7e83044274d 100644 --- a/Mage.Server/src/main/java/mage/server/Main.java +++ b/Mage.Server/src/main/java/mage/server/Main.java @@ -166,12 +166,9 @@ public class Main { else { logger.fatal("Unable to start MAGE server - another server is already started"); } - } catch (IOException ex) { - logger.fatal("Failed to start server - " + connection.toString(), ex); } catch (Exception ex) { logger.fatal("Failed to start server - " + connection.toString(), ex); } - } static void initStatistics() { 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 eec4ea0dfe7..07a5763a51a 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -825,8 +825,11 @@ public class GameController implements GameCallback { @Override public void execute(UUID playerId) { if (cards != null) { - Zone targetZone = (Zone) options.get("targetZone"); - boolean showFaceDown = targetZone != null && targetZone.equals(Zone.PICK); + // Zone targetZone = (Zone) options.get("targetZone"); + // Are there really situations where a player selects from a list of face down cards? + // So always show face up for selection + // boolean showFaceDown = targetZone != null && targetZone.equals(Zone.PICK); + boolean showFaceDown = true; getGameSession(playerId).target(question, new CardsView(game, cards.getCards(game), showFaceDown), targets, required, options); } else if (perms != null) { CardsView permsView = new CardsView(); diff --git a/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java b/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java index 63edac13488..9afcea78466 100644 --- a/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java +++ b/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java @@ -228,13 +228,15 @@ class TableListSorter implements Comparator { @Override public int compare(Table one, Table two) { - if (!one.getState().equals(TableState.SIDEBOARDING) && !one.getState().equals(TableState.DUELING)) { - if (one.getState().compareTo(two.getState()) != 0) { - return one.getState().compareTo(two.getState()); - } - } else if (!two.getState().equals(TableState.SIDEBOARDING) && !two.getState().equals(TableState.DUELING)) { - if (one.getState().compareTo(two.getState()) != 0) { - return one.getState().compareTo(two.getState()); + if (one.getState() != null && two.getState() != null) { + if (!TableState.SIDEBOARDING.equals(one.getState()) && !TableState.DUELING.equals(one.getState())) { + if (one.getState().compareTo(two.getState()) != 0) { + return one.getState().compareTo(two.getState()); + } + } else if (!TableState.SIDEBOARDING.equals(two.getState()) && !TableState.DUELING.equals(two.getState())) { + if (one.getState().compareTo(two.getState()) != 0) { + return one.getState().compareTo(two.getState()); + } } } if (two.getEndTime() != null) { diff --git a/Mage.Sets/pom.xml b/Mage.Sets/pom.xml index bf208a1fcc7..ab84711c0db 100644 --- a/Mage.Sets/pom.xml +++ b/Mage.Sets/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 org.mage diff --git a/Mage.Sets/src/mage/sets/ArenaLeague.java b/Mage.Sets/src/mage/sets/ArenaLeague.java new file mode 100644 index 00000000000..da8b0b76603 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ArenaLeague.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class ArenaLeague extends ExpansionSet { + + private static final ArenaLeague fINSTANCE = new ArenaLeague(); + + public static ArenaLeague getInstance() { + return fINSTANCE; + } + + private ArenaLeague() { + super("Arena League", "ARENA", "mage.sets.arenaleague", new GregorianCalendar(1996, 7, 4).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + } +} diff --git a/Mage.Sets/src/mage/sets/AsiaPacificLandProgram.java b/Mage.Sets/src/mage/sets/AsiaPacificLandProgram.java new file mode 100644 index 00000000000..c4c411e19f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/AsiaPacificLandProgram.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class AsiaPacificLandProgram extends ExpansionSet { + + private static final AsiaPacificLandProgram fINSTANCE = new AsiaPacificLandProgram(); + + public static AsiaPacificLandProgram getInstance() { + return fINSTANCE; + } + + private AsiaPacificLandProgram() { + super("Asia Pacific Land Program", "APAC", "mage.sets.asiapacificlandprogram", new GregorianCalendar(1997, 10, 13).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + } +} diff --git a/Mage.Sets/src/mage/sets/Champs.java b/Mage.Sets/src/mage/sets/Champs.java new file mode 100644 index 00000000000..55898461a77 --- /dev/null +++ b/Mage.Sets/src/mage/sets/Champs.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class Champs extends ExpansionSet { + + private static final Champs fINSTANCE = new Champs(); + + public static Champs getInstance() { + return fINSTANCE; + } + + private Champs() { + super("Champs", "CP", "mage.sets.champs", new GregorianCalendar(2006, 3, 18).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + } +} diff --git a/Mage.Sets/src/mage/sets/Chronicles.java b/Mage.Sets/src/mage/sets/Chronicles.java new file mode 100644 index 00000000000..6f24be32909 --- /dev/null +++ b/Mage.Sets/src/mage/sets/Chronicles.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.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author LevelX2 + */ +public class Chronicles extends ExpansionSet { + + private static final Chronicles fINSTANCE = new Chronicles(); + + public static Chronicles getInstance() { + return fINSTANCE; + } + + private Chronicles() { + super("Chronicles", "CHR", "mage.sets.chronicles", new GregorianCalendar(1995, 6, 1).getTime(), SetType.SUPPLEMENTAL); + this.blockName = "Reprint"; + this.hasBasicLands = false; + this.hasBoosters = true; + this.numBoosterLands = 0; + this.numBoosterCommon = 9; + this.numBoosterUncommon = 2; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + } + +} diff --git a/Mage.Sets/src/mage/sets/CommandersArsenal.java b/Mage.Sets/src/mage/sets/CommandersArsenal.java new file mode 100644 index 00000000000..e1a95c89b0d --- /dev/null +++ b/Mage.Sets/src/mage/sets/CommandersArsenal.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.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class CommandersArsenal extends ExpansionSet { + + private static final CommandersArsenal fINSTANCE = new CommandersArsenal(); + + public static CommandersArsenal getInstance() { + return fINSTANCE; + } + + private CommandersArsenal() { + super("Commander's Arsenal", "CMA", "mage.sets.commandersarsenal", new GregorianCalendar(2012, 11, 2).getTime(), SetType.SUPPLEMENTAL); + this.blockName = "Command Zone"; + } + +} diff --git a/Mage.Sets/src/mage/sets/EuropeanLandProgram.java b/Mage.Sets/src/mage/sets/EuropeanLandProgram.java new file mode 100644 index 00000000000..e74fe24b5e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/EuropeanLandProgram.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class EuropeanLandProgram extends ExpansionSet { + + private static final EuropeanLandProgram fINSTANCE = new EuropeanLandProgram(); + + public static EuropeanLandProgram getInstance() { + return fINSTANCE; + } + + private EuropeanLandProgram() { + super("European Land Program", "EURO", "mage.sets.europeanlandprogram", new GregorianCalendar(2000, 2, 14).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + } +} diff --git a/Mage.Sets/src/mage/sets/FateReforged.java b/Mage.Sets/src/mage/sets/FateReforged.java index 76d31b292a2..d3359435df5 100644 --- a/Mage.Sets/src/mage/sets/FateReforged.java +++ b/Mage.Sets/src/mage/sets/FateReforged.java @@ -57,7 +57,7 @@ public class FateReforged extends ExpansionSet { super("Fate Reforged", "FRF", "mage.sets.fatereforged", new GregorianCalendar(2015, 1, 23).getTime(), SetType.EXPANSION); this.blockName = "Khans of Tarkir"; this.parentSet = KhansOfTarkir.getInstance(); - this.hasBasicLands = false; + this.hasBasicLands = true; this.hasBoosters = true; this.numBoosterSpecial = 1; this.numBoosterLands = 0; diff --git a/Mage.Sets/src/mage/sets/Gatecrash.java b/Mage.Sets/src/mage/sets/Gatecrash.java index 46679ecbbfc..9a89355f6ea 100644 --- a/Mage.Sets/src/mage/sets/Gatecrash.java +++ b/Mage.Sets/src/mage/sets/Gatecrash.java @@ -44,15 +44,15 @@ public class Gatecrash extends ExpansionSet { } private Gatecrash() { - super("Gatecrash", "GTC", "mage.sets.gatecrash", new GregorianCalendar(2013, 2, 01).getTime(), SetType.EXPANSION); + super("Gatecrash", "GTC", "mage.sets.gatecrash", new GregorianCalendar(2013, 2, 1).getTime(), SetType.EXPANSION); this.blockName = "Return to Ravnica"; + this.parentSet = ReturnToRavnica.getInstance(); + this.hasBasicLands = false; this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 8; - this.parentSet = ReturnToRavnica.getInstance(); - this.hasBasicLands = false; } } diff --git a/Mage.Sets/src/mage/sets/JourneyIntoNyx.java b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java index c5252356ea3..18365532892 100644 --- a/Mage.Sets/src/mage/sets/JourneyIntoNyx.java +++ b/Mage.Sets/src/mage/sets/JourneyIntoNyx.java @@ -50,8 +50,8 @@ public class JourneyIntoNyx extends ExpansionSet { this.parentSet = Theros.getInstance(); this.hasBasicLands = false; this.hasBoosters = true; - this.numBoosterLands = 0; - this.numBoosterCommon = 11; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 8; diff --git a/Mage.Sets/src/mage/sets/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index 0637ada20b5..4ff6cebfa37 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionII.java @@ -45,7 +45,7 @@ public class MastersEditionII extends ExpansionSet { private MastersEditionII() { super("Masters Edition II", "ME2", "mage.sets.masterseditionii", new GregorianCalendar(2008, 9, 22).getTime(), SetType.MAGIC_ONLINE); - this.hasBasicLands = true; + this.hasBasicLands = false; this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; diff --git a/Mage.Sets/src/mage/sets/MastersEditionIV.java b/Mage.Sets/src/mage/sets/MastersEditionIV.java index 2c9f75e2a54..37b62cf137c 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionIV.java +++ b/Mage.Sets/src/mage/sets/MastersEditionIV.java @@ -46,7 +46,7 @@ public class MastersEditionIV extends ExpansionSet { private MastersEditionIV() { super("Masters Edition IV", "ME4", "mage.sets.masterseditioniv", new GregorianCalendar(2011, 1, 10).getTime(), SetType.MAGIC_ONLINE); - this.hasBasicLands = true; + this.hasBasicLands = false; this.hasBoosters = true; this.numBoosterLands = 1; this.numBoosterCommon = 10; diff --git a/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java b/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java index f64b8803066..91b2c7313cc 100644 --- a/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java +++ b/Mage.Sets/src/mage/sets/PortalThreeKingdoms.java @@ -36,15 +36,10 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class PortalThreeKingdoms extends ExpansionSet { private static final PortalThreeKingdoms fINSTANCE = new PortalThreeKingdoms(); - /** - * - * @return - */ public static PortalThreeKingdoms getInstance() { return fINSTANCE; } @@ -56,7 +51,7 @@ public class PortalThreeKingdoms extends ExpansionSet { this.hasBoosters = true; this.numBoosterLands = 2; this.numBoosterCommon = 5; - this.numBoosterUncommon = 5; + this.numBoosterUncommon = 2; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; } diff --git a/Mage.Sets/src/mage/sets/Starter1999.java b/Mage.Sets/src/mage/sets/Starter1999.java index 0e3ad40a75a..90a6197afd8 100644 --- a/Mage.Sets/src/mage/sets/Starter1999.java +++ b/Mage.Sets/src/mage/sets/Starter1999.java @@ -36,15 +36,10 @@ import mage.constants.SetType; * * @author LevelX2 */ - public class Starter1999 extends ExpansionSet { private static final Starter1999 fINSTANCE = new Starter1999(); - /** - * - * @return - */ public static Starter1999 getInstance() { return fINSTANCE; } @@ -54,8 +49,8 @@ public class Starter1999 extends ExpansionSet { this.blockName = "Beginner"; this.hasBasicLands = true; this.hasBoosters = true; - this.numBoosterLands = 1; - this.numBoosterCommon = 10; + this.numBoosterLands = 2; + this.numBoosterCommon = 9; this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; diff --git a/Mage.Sets/src/mage/sets/SuperSeries.java b/Mage.Sets/src/mage/sets/SuperSeries.java new file mode 100644 index 00000000000..4d1927615d6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/SuperSeries.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class SuperSeries extends ExpansionSet { + + private static final SuperSeries fINSTANCE = new SuperSeries(); + + public static SuperSeries getInstance() { + return fINSTANCE; + } + + private SuperSeries() { + super("Super Series", "SUS", "mage.sets.superseries", new GregorianCalendar(1996, 1, 1).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + } +} diff --git a/Mage.Sets/src/mage/sets/UginsFate.java b/Mage.Sets/src/mage/sets/UginsFate.java new file mode 100644 index 00000000000..39f260a59f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/UginsFate.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class UginsFate extends ExpansionSet { + + private static final UginsFate fINSTANCE = new UginsFate(); + + public static UginsFate getInstance() { + return fINSTANCE; + } + + private UginsFate() { + super("Ugin's Fate", "UGIN", "mage.sets.uginsfate", new GregorianCalendar(2015, 1, 16).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + } +} diff --git a/Mage.Sets/src/mage/sets/UnlimitedEdition.java b/Mage.Sets/src/mage/sets/UnlimitedEdition.java index 2b3eaee6192..5e2e9c30212 100644 --- a/Mage.Sets/src/mage/sets/UnlimitedEdition.java +++ b/Mage.Sets/src/mage/sets/UnlimitedEdition.java @@ -20,8 +20,8 @@ public class UnlimitedEdition extends ExpansionSet { private UnlimitedEdition() { super("Unlimited Edition", "2ED", "mage.sets.unlimitededition", new GregorianCalendar(1993, 11, 1).getTime(), SetType.CORE); this.hasBoosters = true; - this.numBoosterLands = 1; - this.numBoosterCommon = 10; + this.numBoosterLands = 0; + this.numBoosterCommon = 11; this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; diff --git a/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java b/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java index 7e2ab26e168..abcb06b0024 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java +++ b/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java @@ -53,13 +53,11 @@ public class LordOfExtinction extends CardImpl { this.expansionSetCode = "ARB"; this.subtype.add("Elemental"); - - this.power = new MageInt(0); this.toughness = new MageInt(0); // Lord of Extinction's power and toughness are each equal to the number of cards in all graveyards. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new LordOfExtinctionDynamicCount(), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new LordOfExtinctionDynamicCount(), Duration.EndOfGame))); } public LordOfExtinction(final LordOfExtinction card) { diff --git a/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald1.java b/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald1.java index 5abea54055d..74abd2db26d 100644 --- a/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald1.java +++ b/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald1.java @@ -52,7 +52,7 @@ public class AgentOfStromgald1 extends CardImpl { this.toughness = new MageInt(1); // {R}: Add {B} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new ManaCostsImpl("{R}"))); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new ManaCostsImpl("{R}"))); } public AgentOfStromgald1(final AgentOfStromgald1 card) { diff --git a/Mage.Sets/src/mage/sets/alliances/ElvishSpiritGuide.java b/Mage.Sets/src/mage/sets/alliances/ElvishSpiritGuide.java index 0387a462db3..c8edfd7de71 100644 --- a/Mage.Sets/src/mage/sets/alliances/ElvishSpiritGuide.java +++ b/Mage.Sets/src/mage/sets/alliances/ElvishSpiritGuide.java @@ -58,7 +58,7 @@ public class ElvishSpiritGuide extends CardImpl { this.toughness = new MageInt(2); // Exile Elvish Spirit Guide from your hand: Add {G} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.HAND, new BasicManaEffect(Mana.GreenMana), new ExileSourceFromHandCost())); + this.addAbility(new SimpleManaAbility(Zone.HAND, new BasicManaEffect(Mana.GreenMana(1)), new ExileSourceFromHandCost())); } public ElvishSpiritGuide(final ElvishSpiritGuide card) { diff --git a/Mage.Sets/src/mage/sets/alliances/GorillaShaman1.java b/Mage.Sets/src/mage/sets/alliances/GorillaShaman1.java index edb27282bc7..3fd9f9e798b 100644 --- a/Mage.Sets/src/mage/sets/alliances/GorillaShaman1.java +++ b/Mage.Sets/src/mage/sets/alliances/GorillaShaman1.java @@ -52,6 +52,8 @@ import mage.target.TargetPermanent; */ public class GorillaShaman1 extends CardImpl { + private final UUID originalId; + public GorillaShaman1(UUID ownerId) { super(ownerId, 106, "Gorilla Shaman", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); this.expansionSetCode = "ALL"; @@ -63,12 +65,13 @@ public class GorillaShaman1 extends CardImpl { // {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(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + 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()); @@ -81,6 +84,7 @@ public class GorillaShaman1 extends CardImpl { public GorillaShaman1(final GorillaShaman1 card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/alliances/SoldeviAdnate1.java b/Mage.Sets/src/mage/sets/alliances/SoldeviAdnate1.java index 6dc868b548c..129cee811e4 100644 --- a/Mage.Sets/src/mage/sets/alliances/SoldeviAdnate1.java +++ b/Mage.Sets/src/mage/sets/alliances/SoldeviAdnate1.java @@ -66,7 +66,7 @@ public class SoldeviAdnate1 extends CardImpl { this.toughness = new MageInt(2); // {T}, Sacrifice a black or artifact creature: Add to your mana pool an amount of {B} equal to the sacrificed creature's converted mana cost. - Ability ability = new DynamicManaAbility(Mana.BlackMana, new SacrificeCostConvertedMana("creature"), + Ability ability = new DynamicManaAbility(Mana.BlackMana(1), new SacrificeCostConvertedMana("creature"), new TapSourceCost(), "add to your mana pool an amount of {B} equal to the sacrificed creature's converted mana cost"); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/alliances/WildAesthir1.java b/Mage.Sets/src/mage/sets/alliances/WildAesthir1.java new file mode 100644 index 00000000000..7f7c7851621 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/WildAesthir1.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.sets.alliances; + +import java.util.UUID; + +/** + * + * @author nigelzor + */ +public class WildAesthir1 extends mage.sets.masterseditioniv.WildAesthir { + + public WildAesthir1(UUID ownerId) { + super(ownerId); + this.cardNumber = 154; + this.expansionSetCode = "ALL"; + } + + public WildAesthir1(final WildAesthir1 card) { + super(card); + } + + @Override + public WildAesthir1 copy() { + return new WildAesthir1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/WildAesthir2.java b/Mage.Sets/src/mage/sets/alliances/WildAesthir2.java new file mode 100644 index 00000000000..59c160f0ccd --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/WildAesthir2.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.sets.alliances; + +import java.util.UUID; + +/** + * + * @author nigelzor + */ +public class WildAesthir2 extends mage.sets.masterseditioniv.WildAesthir { + + public WildAesthir2(UUID ownerId) { + super(ownerId); + this.cardNumber = 155; + this.expansionSetCode = "ALL"; + } + + public WildAesthir2(final WildAesthir2 card) { + super(card); + } + + @Override + public WildAesthir2 copy() { + return new WildAesthir2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/antiquities/CoralHelm.java b/Mage.Sets/src/mage/sets/antiquities/CoralHelm.java new file mode 100644 index 00000000000..033986635c5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/antiquities/CoralHelm.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.antiquities; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author nigelzor + */ +public class CoralHelm extends mage.sets.masterseditioniv.CoralHelm { + + public CoralHelm(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "ATQ"; + this.rarity = Rarity.RARE; + } + + public CoralHelm(final CoralHelm card) { + super(card); + } + + @Override + public CoralHelm copy() { + return new CoralHelm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/antiquities/PriestOfYawgmoth.java b/Mage.Sets/src/mage/sets/antiquities/PriestOfYawgmoth.java index e648e0db971..26885789eac 100644 --- a/Mage.Sets/src/mage/sets/antiquities/PriestOfYawgmoth.java +++ b/Mage.Sets/src/mage/sets/antiquities/PriestOfYawgmoth.java @@ -56,7 +56,7 @@ public class PriestOfYawgmoth extends CardImpl { this.toughness = new MageInt(2); // {T}, Sacrifice an artifact: Add to your mana pool an amount of {B} equal to the sacrificed artifact's converted mana cost. - Ability ability = new DynamicManaAbility(Mana.BlackMana, new SacrificeCostConvertedMana("artifact"), + Ability ability = new DynamicManaAbility(Mana.BlackMana(1), new SacrificeCostConvertedMana("artifact"), new TapSourceCost(), "add to your mana pool an amount of {B} equal to the sacrificed artifact's converted mana cost"); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent()))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/apocalypse/BattlefieldForge.java b/Mage.Sets/src/mage/sets/apocalypse/BattlefieldForge.java index 9249e78220f..a719d2eed70 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/BattlefieldForge.java +++ b/Mage.Sets/src/mage/sets/apocalypse/BattlefieldForge.java @@ -53,10 +53,10 @@ public class BattlefieldForge extends CardImpl { this.addAbility(new ColorlessManaAbility()); // Tap: Add Red or White to your mana pool. Battlefield Forge deals 1 damage to you. - Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new TapSourceCost()); + Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new TapSourceCost()); redManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(redManaAbility); - Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new TapSourceCost()); + Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new TapSourceCost()); whiteManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(whiteManaAbility); } diff --git a/Mage.Sets/src/mage/sets/apocalypse/BogGnarr.java b/Mage.Sets/src/mage/sets/apocalypse/BogGnarr.java index efc75cfd615..560c89d024e 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/BogGnarr.java +++ b/Mage.Sets/src/mage/sets/apocalypse/BogGnarr.java @@ -31,25 +31,26 @@ package mage.sets.apocalypse; import java.util.UUID; import mage.MageInt; import mage.ObjectColor; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SpellCastAllTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.stack.Spell; /** * @author Loki */ public class BogGnarr extends CardImpl { + private static final FilterSpell filter = new FilterSpell("a black spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + public BogGnarr(UUID ownerId) { super(ownerId, 76, "Bog Gnarr", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); this.expansionSetCode = "APC"; @@ -57,7 +58,9 @@ public class BogGnarr extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - this.addAbility(new BogGnarrTriggeredAbility()); + + // Whenever a player casts a black spell, Bog Gnarr gets +2/+2 until end of turn. + this.addAbility(new SpellCastAllTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), filter, false)); } public BogGnarr(final BogGnarr card) { @@ -68,43 +71,4 @@ public class BogGnarr extends CardImpl { public BogGnarr copy() { return new BogGnarr(this); } - } - -class BogGnarrTriggeredAbility extends TriggeredAbilityImpl { - - private static final FilterCard filter = new FilterCard("a black spell"); - - static { - filter.add(new ColorPredicate(ObjectColor.BLACK)); - } - - public BogGnarrTriggeredAbility() { - super(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), false); - } - - public BogGnarrTriggeredAbility(final BogGnarrTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Spell spell = game.getStack().getSpell(event.getTargetId()); - return spell != null && filter.match(spell, game); - } - - @Override - public String getRule() { - return "Whenever a player casts " + filter.getMessage() + ", " + super.getRule(); - } - - @Override - public BogGnarrTriggeredAbility copy() { - return new BogGnarrTriggeredAbility(this); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/apocalypse/CavesOfKoilos.java b/Mage.Sets/src/mage/sets/apocalypse/CavesOfKoilos.java index b1e785367a4..f50512eebb0 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/CavesOfKoilos.java +++ b/Mage.Sets/src/mage/sets/apocalypse/CavesOfKoilos.java @@ -54,10 +54,10 @@ public class CavesOfKoilos extends CardImpl { this.addAbility(new ColorlessManaAbility()); // Tap: Add White or Black to your mana pool. Caves of Koilos deals 1 damage to you. - Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new TapSourceCost()); + Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new TapSourceCost()); whiteManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(whiteManaAbility); - Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()); + Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost()); blackManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blackManaAbility); } diff --git a/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java b/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java index dd1b5db3a32..be3613ad5a8 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java +++ b/Mage.Sets/src/mage/sets/apocalypse/DesolationAngel.java @@ -29,26 +29,31 @@ package mage.sets.apocalypse; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.KickerAbility; -import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.TargetController; import mage.filter.common.FilterLandPermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.filter.predicate.permanent.ControllerPredicate; /** * @author Loki */ public class DesolationAngel extends CardImpl { + private static final FilterLandPermanent filter = new FilterLandPermanent("lands"); + private static final FilterLandPermanent filter2 = new FilterLandPermanent("lands you control"); + + static { + filter2.add(new ControllerPredicate(TargetController.YOU)); + } + public DesolationAngel(UUID ownerId) { super(ownerId, 38, "Desolation Angel", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.expansionSetCode = "APC"; @@ -64,7 +69,8 @@ public class DesolationAngel extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Desolation Angel enters the battlefield, destroy all lands you control. If it was kicked, destroy all lands instead. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DesolationAngelEntersBattlefieldEffect())); + this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyAllEffect(filter), + new DestroyAllEffect(filter2), KickedCondition.getInstance(), "destroy all lands you control. If it was kicked, destroy all lands instead."))); } public DesolationAngel(final DesolationAngel card) { @@ -76,34 +82,3 @@ public class DesolationAngel extends CardImpl { return new DesolationAngel(this); } } - -class DesolationAngelEntersBattlefieldEffect extends OneShotEffect { - - DesolationAngelEntersBattlefieldEffect() { - super(Outcome.DestroyPermanent); - staticText = "destroy all lands you control. If it was kicked, destroy all lands instead"; - } - - DesolationAngelEntersBattlefieldEffect(final DesolationAngelEntersBattlefieldEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Card p = game.getCard(source.getSourceId()); - boolean kicked = KickedCondition.getInstance().apply(game, source); - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), source.getSourceId(), game)) { - if ((!kicked && permanent.getControllerId().equals(source.getControllerId())) - || kicked) { - permanent.destroy(source.getSourceId(), game, false); - } - } - return true; - } - - @Override - public DesolationAngelEntersBattlefieldEffect copy() { - return new DesolationAngelEntersBattlefieldEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/apocalypse/DwarvenLandslide.java b/Mage.Sets/src/mage/sets/apocalypse/DwarvenLandslide.java index c6168855cc6..65b47b76d27 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/DwarvenLandslide.java +++ b/Mage.Sets/src/mage/sets/apocalypse/DwarvenLandslide.java @@ -29,6 +29,7 @@ package mage.sets.apocalypse; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.SpellAbility; import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.Cost; import mage.abilities.costs.Costs; @@ -72,8 +73,10 @@ public class DwarvenLandslide extends CardImpl { @Override public void adjustTargets(Ability ability, Game game) { - if (KickedCondition.getInstance().apply(game, ability)) { - getSpellAbility().addTarget(new TargetLandPermanent(new FilterLandPermanent("land (Kicker)"))); + if (ability instanceof SpellAbility) { + if (KickedCondition.getInstance().apply(game, ability)) { + getSpellAbility().addTarget(new TargetLandPermanent(new FilterLandPermanent("land (Kicker)"))); + } } } diff --git a/Mage.Sets/src/mage/sets/apocalypse/GladeGnarr.java b/Mage.Sets/src/mage/sets/apocalypse/GladeGnarr.java index 4ff643a49d7..d09a25aafdc 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/GladeGnarr.java +++ b/Mage.Sets/src/mage/sets/apocalypse/GladeGnarr.java @@ -30,25 +30,26 @@ package mage.sets.apocalypse; import java.util.UUID; import mage.MageInt; import mage.ObjectColor; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SpellCastAllTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.stack.Spell; /** * @author Loki */ public class GladeGnarr extends CardImpl { + private static final FilterSpell filter = new FilterSpell("a blue spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + public GladeGnarr(UUID ownerId) { super(ownerId, 78, "Glade Gnarr", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{G}"); this.expansionSetCode = "APC"; @@ -56,7 +57,9 @@ public class GladeGnarr extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - this.addAbility(new GladeGnarrTriggeredAbility()); + + // Whenever a player casts a blue spell, Glade Gnarr gets +2/+2 until end of turn. + this.addAbility(new SpellCastAllTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), filter, false)); } public GladeGnarr(final GladeGnarr card) { @@ -68,41 +71,3 @@ public class GladeGnarr extends CardImpl { return new GladeGnarr(this); } } - -class GladeGnarrTriggeredAbility extends TriggeredAbilityImpl { - - private static final FilterCard filter = new FilterCard("a black spell"); - - static { - filter.add(new ColorPredicate(ObjectColor.BLACK)); - } - - public GladeGnarrTriggeredAbility() { - super(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), false); - } - - public GladeGnarrTriggeredAbility(final GladeGnarrTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Spell spell = game.getStack().getSpell(event.getTargetId()); - return spell != null && filter.match(spell, game); - } - - @Override - public String getRule() { - return "Whenever a player casts " + filter.getMessage() + ", " + super.getRule(); - } - - @Override - public GladeGnarrTriggeredAbility copy() { - return new GladeGnarrTriggeredAbility(this); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/apocalypse/LlanowarWastes.java b/Mage.Sets/src/mage/sets/apocalypse/LlanowarWastes.java index ad86d704930..a118997e456 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/LlanowarWastes.java +++ b/Mage.Sets/src/mage/sets/apocalypse/LlanowarWastes.java @@ -53,10 +53,10 @@ public class LlanowarWastes extends CardImpl { this.addAbility(new ColorlessManaAbility()); // Tap: Add Black or Green to your mana pool. Llanowar Wastes deals 1 damage to you. - Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()); + Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost()); blackManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blackManaAbility); - Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new TapSourceCost()); + Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new TapSourceCost()); greenManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(greenManaAbility); } diff --git a/Mage.Sets/src/mage/sets/apocalypse/ShivanReef.java b/Mage.Sets/src/mage/sets/apocalypse/ShivanReef.java index 390599b642e..4370edbb834 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/ShivanReef.java +++ b/Mage.Sets/src/mage/sets/apocalypse/ShivanReef.java @@ -53,10 +53,10 @@ public class ShivanReef extends CardImpl { this.addAbility(new ColorlessManaAbility()); //Tap: Add Blue or Red to your mana pool. Shivan Reef deals 1 damage to you. - Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new TapSourceCost()); + Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new TapSourceCost()); blueManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blueManaAbility); - Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new TapSourceCost()); + Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new TapSourceCost()); redManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(redManaAbility); } diff --git a/Mage.Sets/src/mage/sets/apocalypse/Smash.java b/Mage.Sets/src/mage/sets/apocalypse/Smash.java index d744e0f308a..7cffc876212 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/Smash.java +++ b/Mage.Sets/src/mage/sets/apocalypse/Smash.java @@ -46,7 +46,7 @@ public class Smash extends CardImpl { this.expansionSetCode = "APC"; // Destroy target artifact. - this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent())); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolDrake.java b/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolDrake.java index ea29cc684c1..f643a96561d 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolDrake.java +++ b/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolDrake.java @@ -29,20 +29,13 @@ package mage.sets.apocalypse; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ShuffleHandIntoLibraryDrawThatManySourceEffect; import mage.abilities.keyword.FlyingAbility; -import mage.cards.Card; import mage.cards.CardImpl; -import mage.cards.Cards; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; /** * @@ -61,10 +54,10 @@ public class WhirlpoolDrake extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Whirlpool Drake enters the battlefield, shuffle the cards from your hand into your library, then draw that many cards. - this.addAbility(new EntersBattlefieldTriggeredAbility(new WhirlpoolSDrakeTriggeredEffect(), false)); - + this.addAbility(new EntersBattlefieldTriggeredAbility(new ShuffleHandIntoLibraryDrawThatManySourceEffect(), false)); + // When Whirlpool Drake dies, shuffle the cards from your hand into your library, then draw that many cards. - this.addAbility(new DiesTriggeredAbility(new WhirlpoolSDrakeTriggeredEffect(), false)); + this.addAbility(new DiesTriggeredAbility(new ShuffleHandIntoLibraryDrawThatManySourceEffect(), false)); } public WhirlpoolDrake(final WhirlpoolDrake card) { @@ -76,40 +69,3 @@ public class WhirlpoolDrake extends CardImpl { return new WhirlpoolDrake(this); } } - -class WhirlpoolSDrakeTriggeredEffect extends OneShotEffect { - - public WhirlpoolSDrakeTriggeredEffect() { - super(Outcome.DrawCard); - this.staticText = "shuffle the cards from your hand into your library, then draw that many cards"; - } - - public WhirlpoolSDrakeTriggeredEffect(final WhirlpoolSDrakeTriggeredEffect effect) { - super(effect); - } - - @Override - public WhirlpoolSDrakeTriggeredEffect copy() { - return new WhirlpoolSDrakeTriggeredEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - int cardsHand = controller.getHand().size(); - if (cardsHand > 0){ - for (Card card: controller.getHand().getCards(game)) { - if (card != null) { - controller.removeFromHand(card, game); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - } - controller.shuffleLibrary(game); - controller.drawCards(cardsHand, game); - } - return true; - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolRider.java b/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolRider.java index f407dec978b..ddaaa83c70f 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolRider.java +++ b/Mage.Sets/src/mage/sets/apocalypse/WhirlpoolRider.java @@ -29,18 +29,11 @@ package mage.sets.apocalypse; 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.abilities.effects.common.ShuffleHandIntoLibraryDrawThatManySourceEffect; import mage.cards.CardImpl; -import mage.cards.Cards; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; /** * @@ -57,7 +50,7 @@ public class WhirlpoolRider extends CardImpl { this.toughness = new MageInt(1); // When Whirlpool Rider enters the battlefield, shuffle the cards from your hand into your library, then draw that many cards. - this.addAbility(new EntersBattlefieldTriggeredAbility(new WhirlpoolRiderTriggeredEffect())); + this.addAbility(new EntersBattlefieldTriggeredAbility(new ShuffleHandIntoLibraryDrawThatManySourceEffect())); } @@ -70,40 +63,3 @@ public class WhirlpoolRider extends CardImpl { return new WhirlpoolRider(this); } } - -class WhirlpoolRiderTriggeredEffect extends OneShotEffect { - - public WhirlpoolRiderTriggeredEffect() { - super(Outcome.DrawCard); - this.staticText = "shuffle the cards from your hand into your library, then draw that many cards"; - } - - public WhirlpoolRiderTriggeredEffect(final WhirlpoolRiderTriggeredEffect effect) { - super(effect); - } - - @Override - public WhirlpoolRiderTriggeredEffect copy() { - return new WhirlpoolRiderTriggeredEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - int cardsHand = controller.getHand().size(); - if (cardsHand > 0) { - for (Card card: controller.getHand().getCards(game)) { - if (card != null) { - controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false); - } - } - controller.shuffleLibrary(game); - controller.drawCards(cardsHand, game); - } - return true; - } - - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/apocalypse/YavimayaCoast.java b/Mage.Sets/src/mage/sets/apocalypse/YavimayaCoast.java index 2857fbe48d7..d97bf224a67 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/YavimayaCoast.java +++ b/Mage.Sets/src/mage/sets/apocalypse/YavimayaCoast.java @@ -53,10 +53,10 @@ public class YavimayaCoast extends CardImpl { this.addAbility(new ColorlessManaAbility()); // Tap: Add Green or Blue to your mana pool. Yavimaya Coast deals 1 damage to you. - Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new TapSourceCost()); + Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new TapSourceCost()); greenManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(greenManaAbility); - Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new TapSourceCost()); + Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new TapSourceCost()); blueManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blueManaAbility); } diff --git a/Mage.Sets/src/mage/sets/arabiannights/Aladdin.java b/Mage.Sets/src/mage/sets/arabiannights/Aladdin.java new file mode 100644 index 00000000000..51906a0d334 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/Aladdin.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.sets.arabiannights; + +import java.util.UUID; + +/** + * + * @author nigelzor + */ +public class Aladdin extends mage.sets.masterseditioniv.Aladdin { + + public Aladdin(UUID ownerId) { + super(ownerId); + this.cardNumber = 42; + this.expansionSetCode = "ARN"; + } + + public Aladdin(final Aladdin card) { + super(card); + } + + @Override + public Aladdin copy() { + return new Aladdin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arabiannights/ArmyOfAllah.java b/Mage.Sets/src/mage/sets/arabiannights/ArmyOfAllah.java new file mode 100644 index 00000000000..77bc94ac9a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/ArmyOfAllah.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.sets.arabiannights; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; + +/** + * + * @author fireshoes + */ +public class ArmyOfAllah extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("Attacking creatures"); + + public ArmyOfAllah(UUID ownerId) { + super(ownerId, 56, "Army of Allah", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}{W}"); + this.expansionSetCode = "ARN"; + + // Attacking creatures get +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false)); + } + + public ArmyOfAllah(final ArmyOfAllah card) { + super(card); + } + + @Override + public ArmyOfAllah copy() { + return new ArmyOfAllah(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arabiannights/MijaeDjinn.java b/Mage.Sets/src/mage/sets/arabiannights/MijaeDjinn.java new file mode 100644 index 00000000000..7785a68488b --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/MijaeDjinn.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.sets.arabiannights; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MijaeDjinn extends mage.sets.masterseditioniv.MijaeDjinn { + + public MijaeDjinn(UUID ownerId) { + super(ownerId); + this.cardNumber = 51; + this.expansionSetCode = "ARN"; + } + + public MijaeDjinn(final MijaeDjinn card) { + super(card); + } + + @Override + public MijaeDjinn copy() { + return new MijaeDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arabiannights/Mountain1.java b/Mage.Sets/src/mage/sets/arabiannights/Mountain1.java index 2a8a566afa3..6e8f256143d 100644 --- a/Mage.Sets/src/mage/sets/arabiannights/Mountain1.java +++ b/Mage.Sets/src/mage/sets/arabiannights/Mountain1.java @@ -27,19 +27,20 @@ */ package mage.sets.arabiannights; +import mage.constants.Rarity; + import java.util.UUID; /** * * @author LevelX2 */ - - public class Mountain1 extends mage.cards.basiclands.Mountain { public Mountain1(UUID ownerId) { super(ownerId, 91); this.expansionSetCode = "ARN"; + this.rarity = Rarity.COMMON; } public Mountain1(final Mountain1 card) { diff --git a/Mage.Sets/src/mage/sets/archenemy/BogWitch.java b/Mage.Sets/src/mage/sets/archenemy/BogWitch.java new file mode 100644 index 00000000000..616a6836a57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/archenemy/BogWitch.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.sets.archenemy; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class BogWitch extends mage.sets.mercadianmasques.BogWitch { + + public BogWitch(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "ARC"; + } + + public BogWitch(final BogWitch card) { + super(card); + } + + @Override + public BogWitch copy() { + return new BogWitch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/archenemy/DragonBreath.java b/Mage.Sets/src/mage/sets/archenemy/DragonBreath.java new file mode 100644 index 00000000000..82eab473946 --- /dev/null +++ b/Mage.Sets/src/mage/sets/archenemy/DragonBreath.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.sets.archenemy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.OneShotEffect; +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.Card; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.Filter.ComparisonType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class DragonBreath extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater"); + static { + filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 5)); + } + + public DragonBreath(UUID ownerId) { + super(ownerId, 33, "Dragon Breath", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "ARC"; + 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 has haste. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.AURA))); + + // {R}: Enchanted creature gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); + + // When a creature with converted mana cost 6 or greater enters the battlefield, you may return Dragon Breath from your graveyard to the battlefield attached to that creature. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new DragonBreathEffect(), filter, true, SetTargetPointer.PERMANENT, null)); + } + + public DragonBreath(final DragonBreath card) { + super(card); + } + + @Override + public DragonBreath copy() { + return new DragonBreath(this); + } +} + +class DragonBreathEffect extends OneShotEffect { + + DragonBreathEffect() { + super(Outcome.Benefit); + this.staticText = "return {this} from your graveyard to the battlefield attached to that creature"; + } + + DragonBreathEffect(final DragonBreathEffect effect) { + super(effect); + } + + @Override + public DragonBreathEffect copy() { + return new DragonBreathEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card sourceCard = (Card) source.getSourceObjectIfItStillExists(game); + Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + Player controller = game.getPlayer(source.getControllerId()); + if (sourceCard != null && permanent != null && controller != null) { + game.getState().setValue("attachTo:" + sourceCard.getId(), permanent); + if (controller.moveCards(sourceCard, Zone.BATTLEFIELD, source, game)) { + permanent.addAttachment(sourceCard.getId(), game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/archenemy/ImperialHellkite.java b/Mage.Sets/src/mage/sets/archenemy/ImperialHellkite.java new file mode 100644 index 00000000000..f5a85182220 --- /dev/null +++ b/Mage.Sets/src/mage/sets/archenemy/ImperialHellkite.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.sets.archenemy; + +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.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterBySubtypeCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class ImperialHellkite extends CardImpl { + + public ImperialHellkite(UUID ownerId) { + super(ownerId, 42, "Imperial Hellkite", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "ARC"; + this.subtype.add("Dragon"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Morph {6}{R}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{R}{R}"))); + + // When Imperial Hellkite is turned face up, you may search your library for a Dragon card, reveal it, and put it into your hand. If you do, shuffle your library. + Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterBySubtypeCard("Dragon")), true, true); + effect.setText("you may search your library for a Dragon card, reveal it, and put it into your hand. If you do, shuffle your library"); + this.addAbility(new TurnedFaceUpSourceTriggeredAbility(effect)); + } + + public ImperialHellkite(final ImperialHellkite card) { + super(card); + } + + @Override + public ImperialHellkite copy() { + return new ImperialHellkite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/ArcLightning.java b/Mage.Sets/src/mage/sets/arenaleague/ArcLightning.java new file mode 100644 index 00000000000..768fb2ae63d --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/ArcLightning.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ArcLightning extends mage.sets.urzassaga.ArcLightning { + + public ArcLightning(UUID ownerId) { + super(ownerId); + this.cardNumber = 42; + this.expansionSetCode = "ARENA"; + } + + public ArcLightning(final ArcLightning card) { + super(card); + } + + @Override + public ArcLightning copy() { + return new ArcLightning(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Bonesplitter.java b/Mage.Sets/src/mage/sets/arenaleague/Bonesplitter.java new file mode 100644 index 00000000000..4ed95889fae --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Bonesplitter.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Bonesplitter extends mage.sets.mirrodin.Bonesplitter { + + public Bonesplitter(UUID ownerId) { + super(ownerId); + this.cardNumber = 52; + this.expansionSetCode = "ARENA"; + } + + public Bonesplitter(final Bonesplitter card) { + super(card); + } + + @Override + public Bonesplitter copy() { + return new Bonesplitter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Castigate.java b/Mage.Sets/src/mage/sets/arenaleague/Castigate.java new file mode 100644 index 00000000000..5aa7c8c8af4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Castigate.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Castigate extends mage.sets.guildpact.Castigate { + + public Castigate(UUID ownerId) { + super(ownerId); + this.cardNumber = 80; + this.expansionSetCode = "ARENA"; + } + + public Castigate(final Castigate card) { + super(card); + } + + @Override + public Castigate copy() { + return new Castigate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Chill.java b/Mage.Sets/src/mage/sets/arenaleague/Chill.java new file mode 100644 index 00000000000..4d8395c0d87 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Chill.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Chill extends mage.sets.tempest.Chill { + + public Chill(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public Chill(final Chill card) { + super(card); + } + + @Override + public Chill copy() { + return new Chill(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/CoilingOracle.java b/Mage.Sets/src/mage/sets/arenaleague/CoilingOracle.java new file mode 100644 index 00000000000..49978333154 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/CoilingOracle.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CoilingOracle extends mage.sets.dissension.CoilingOracle { + + public CoilingOracle(UUID ownerId) { + super(ownerId); + this.cardNumber = 82; + this.expansionSetCode = "ARENA"; + } + + public CoilingOracle(final CoilingOracle card) { + super(card); + } + + @Override + public CoilingOracle copy() { + return new CoilingOracle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/CreepingMold.java b/Mage.Sets/src/mage/sets/arenaleague/CreepingMold.java new file mode 100644 index 00000000000..feddce59ba7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/CreepingMold.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CreepingMold extends mage.sets.tenthedition.CreepingMold { + + public CreepingMold(UUID ownerId) { + super(ownerId); + this.cardNumber = 28; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public CreepingMold(final CreepingMold card) { + super(card); + } + + @Override + public CreepingMold copy() { + return new CreepingMold(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/DarksteelIngot.java b/Mage.Sets/src/mage/sets/arenaleague/DarksteelIngot.java new file mode 100644 index 00000000000..f00fa9ecce0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/DarksteelIngot.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DarksteelIngot extends mage.sets.darksteel.DarksteelIngot { + + public DarksteelIngot(UUID ownerId) { + super(ownerId); + this.cardNumber = 58; + this.expansionSetCode = "ARENA"; + } + + public DarksteelIngot(final DarksteelIngot card) { + super(card); + } + + @Override + public DarksteelIngot copy() { + return new DarksteelIngot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/DauthiSlayer.java b/Mage.Sets/src/mage/sets/arenaleague/DauthiSlayer.java new file mode 100644 index 00000000000..1f99fed6009 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/DauthiSlayer.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DauthiSlayer extends mage.sets.tempest.DauthiSlayer { + + public DauthiSlayer(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public DauthiSlayer(final DauthiSlayer card) { + super(card); + } + + @Override + public DauthiSlayer copy() { + return new DauthiSlayer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/DiabolicEdict.java b/Mage.Sets/src/mage/sets/arenaleague/DiabolicEdict.java new file mode 100644 index 00000000000..1fcf31c8599 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/DiabolicEdict.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DiabolicEdict extends mage.sets.tempest.DiabolicEdict { + + public DiabolicEdict(UUID ownerId) { + super(ownerId); + this.cardNumber = 37; + this.expansionSetCode = "ARENA"; + } + + public DiabolicEdict(final DiabolicEdict card) { + super(card); + } + + @Override + public DiabolicEdict copy() { + return new DiabolicEdict(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Disenchant.java b/Mage.Sets/src/mage/sets/arenaleague/Disenchant.java new file mode 100644 index 00000000000..43b830f5c08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Disenchant.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Disenchant extends mage.sets.tempest.Disenchant { + + public Disenchant(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "ARENA"; + } + + public Disenchant(final Disenchant card) { + super(card); + } + + @Override + public Disenchant copy() { + return new Disenchant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Dismiss.java b/Mage.Sets/src/mage/sets/arenaleague/Dismiss.java new file mode 100644 index 00000000000..1ae351f234f --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Dismiss.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Dismiss extends mage.sets.tempest.Dismiss { + + public Dismiss(UUID ownerId) { + super(ownerId); + this.cardNumber = 29; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public Dismiss(final Dismiss card) { + super(card); + } + + @Override + public Dismiss copy() { + return new Dismiss(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Duress.java b/Mage.Sets/src/mage/sets/arenaleague/Duress.java new file mode 100644 index 00000000000..dbc8931d5af --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Duress.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Duress extends mage.sets.magic2010.Duress { + + public Duress(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "ARENA"; + } + + public Duress(final Duress card) { + super(card); + } + + @Override + public Duress copy() { + return new Duress(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/ElvishAberration.java b/Mage.Sets/src/mage/sets/arenaleague/ElvishAberration.java new file mode 100644 index 00000000000..95297f9832f --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/ElvishAberration.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ElvishAberration extends mage.sets.scourge.ElvishAberration { + + public ElvishAberration(UUID ownerId) { + super(ownerId); + this.cardNumber = 51; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.COMMON; + } + + public ElvishAberration(final ElvishAberration card) { + super(card); + } + + @Override + public ElvishAberration copy() { + return new ElvishAberration(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/EmpyrialArmor.java b/Mage.Sets/src/mage/sets/arenaleague/EmpyrialArmor.java new file mode 100644 index 00000000000..cef065d8cc5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/EmpyrialArmor.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class EmpyrialArmor extends mage.sets.vintagemasters.EmpyrialArmor { + + public EmpyrialArmor(UUID ownerId) { + super(ownerId); + this.cardNumber = 31; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public EmpyrialArmor(final EmpyrialArmor card) { + super(card); + } + + @Override + public EmpyrialArmor copy() { + return new EmpyrialArmor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/EnlightenedTutor.java b/Mage.Sets/src/mage/sets/arenaleague/EnlightenedTutor.java new file mode 100644 index 00000000000..a3404cfc5a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/EnlightenedTutor.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class EnlightenedTutor extends mage.sets.mirage.EnlightenedTutor { + + public EnlightenedTutor(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public EnlightenedTutor(final EnlightenedTutor card) { + super(card); + } + + @Override + public EnlightenedTutor copy() { + return new EnlightenedTutor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Fireball.java b/Mage.Sets/src/mage/sets/arenaleague/Fireball.java new file mode 100644 index 00000000000..826c3773047 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Fireball.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Fireball extends mage.sets.magic2010.Fireball { + + public Fireball(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public Fireball(final Fireball card) { + super(card); + } + + @Override + public Fireball copy() { + return new Fireball(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Fling.java b/Mage.Sets/src/mage/sets/arenaleague/Fling.java new file mode 100644 index 00000000000..8822e0b6e7f --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Fling.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Fling extends mage.sets.magic2011.Fling { + + public Fling(UUID ownerId) { + super(ownerId); + this.cardNumber = 30; + this.expansionSetCode = "ARENA"; + } + + public Fling(final Fling card) { + super(card); + } + + @Override + public Fling copy() { + return new Fling(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest1.java b/Mage.Sets/src/mage/sets/arenaleague/Forest1.java new file mode 100644 index 00000000000..0fba7d9c46c --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId, 5); + this.expansionSetCode = "ARENA"; + } + + public Forest1(final Forest1 card) { + super(card); + } + + @Override + public Forest1 copy() { + return new Forest1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest2.java b/Mage.Sets/src/mage/sets/arenaleague/Forest2.java new file mode 100644 index 00000000000..8efcb6bcda3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId, 12); + this.expansionSetCode = "ARENA"; + } + + public Forest2(final Forest2 card) { + super(card); + } + + @Override + public Forest2 copy() { + return new Forest2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest3.java b/Mage.Sets/src/mage/sets/arenaleague/Forest3.java new file mode 100644 index 00000000000..404d486fe9f --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId, 27); + this.expansionSetCode = "ARENA"; + } + + public Forest3(final Forest3 card) { + super(card); + } + + @Override + public Forest3 copy() { + return new Forest3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest4.java b/Mage.Sets/src/mage/sets/arenaleague/Forest4.java new file mode 100644 index 00000000000..3d3182f485e --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId, 36); + this.expansionSetCode = "ARENA"; + } + + public Forest4(final Forest4 card) { + super(card); + } + + @Override + public Forest4 copy() { + return new Forest4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest5.java b/Mage.Sets/src/mage/sets/arenaleague/Forest5.java new file mode 100644 index 00000000000..56476f5d3d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest5.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest5 extends mage.cards.basiclands.Forest { + + public Forest5(UUID ownerId) { + super(ownerId, 40); + this.expansionSetCode = "ARENA"; + } + + public Forest5(final Forest5 card) { + super(card); + } + + @Override + public Forest5 copy() { + return new Forest5(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest6.java b/Mage.Sets/src/mage/sets/arenaleague/Forest6.java new file mode 100644 index 00000000000..144227cf3a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest6.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest6 extends mage.cards.basiclands.Forest { + + public Forest6(UUID ownerId) { + super(ownerId, 49); + this.expansionSetCode = "ARENA"; + } + + public Forest6(final Forest6 card) { + super(card); + } + + @Override + public Forest6 copy() { + return new Forest6(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest7.java b/Mage.Sets/src/mage/sets/arenaleague/Forest7.java new file mode 100644 index 00000000000..1460adcb57f --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest7.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest7 extends mage.cards.basiclands.Forest { + + public Forest7(UUID ownerId) { + super(ownerId, 57); + this.expansionSetCode = "ARENA"; + } + + public Forest7(final Forest7 card) { + super(card); + } + + @Override + public Forest7 copy() { + return new Forest7(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest8.java b/Mage.Sets/src/mage/sets/arenaleague/Forest8.java new file mode 100644 index 00000000000..d60a7341ff6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest8.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest8 extends mage.cards.basiclands.Forest { + + public Forest8(UUID ownerId) { + super(ownerId, 71); + this.expansionSetCode = "ARENA"; + } + + public Forest8(final Forest8 card) { + super(card); + } + + @Override + public Forest8 copy() { + return new Forest8(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Forest9.java b/Mage.Sets/src/mage/sets/arenaleague/Forest9.java new file mode 100644 index 00000000000..78bfffbe4a3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Forest9.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest9 extends mage.cards.basiclands.Forest { + + public Forest9(UUID ownerId) { + super(ownerId, 79); + this.expansionSetCode = "ARENA"; + } + + public Forest9(final Forest9 card) { + super(card); + } + + @Override + public Forest9 copy() { + return new Forest9(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/GaeasBlessing.java b/Mage.Sets/src/mage/sets/arenaleague/GaeasBlessing.java new file mode 100644 index 00000000000..10b2433e490 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/GaeasBlessing.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GaeasBlessing extends mage.sets.timeshifted.GaeasBlessing { + + public GaeasBlessing(UUID ownerId) { + super(ownerId); + this.cardNumber = 38; + this.expansionSetCode = "ARENA"; + } + + public GaeasBlessing(final GaeasBlessing card) { + super(card); + } + + @Override + public GaeasBlessing copy() { + return new GaeasBlessing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/GenjuOfTheSpires.java b/Mage.Sets/src/mage/sets/arenaleague/GenjuOfTheSpires.java new file mode 100644 index 00000000000..f16b8006001 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/GenjuOfTheSpires.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class GenjuOfTheSpires extends mage.sets.betrayersofkamigawa.GenjuOfTheSpires { + + public GenjuOfTheSpires(UUID ownerId) { + super(ownerId); + this.cardNumber = 72; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public GenjuOfTheSpires(final GenjuOfTheSpires card) { + super(card); + } + + @Override + public GenjuOfTheSpires copy() { + return new GenjuOfTheSpires(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/GlacialRay.java b/Mage.Sets/src/mage/sets/arenaleague/GlacialRay.java new file mode 100644 index 00000000000..64e2b5bb173 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/GlacialRay.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GlacialRay extends mage.sets.modernmasters.GlacialRay { + + public GlacialRay(UUID ownerId) { + super(ownerId); + this.cardNumber = 60; + this.expansionSetCode = "ARENA"; + } + + public GlacialRay(final GlacialRay card) { + super(card); + } + + @Override + public GlacialRay copy() { + return new GlacialRay(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island1.java b/Mage.Sets/src/mage/sets/arenaleague/Island1.java new file mode 100644 index 00000000000..6ee92065eec --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId, 2); + this.expansionSetCode = "ARENA"; + } + + public Island1(final Island1 card) { + super(card); + } + + @Override + public Island1 copy() { + return new Island1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island2.java b/Mage.Sets/src/mage/sets/arenaleague/Island2.java new file mode 100644 index 00000000000..bbdad6fb35a --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId, 9); + this.expansionSetCode = "ARENA"; + } + + public Island2(final Island2 card) { + super(card); + } + + @Override + public Island2 copy() { + return new Island2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island3.java b/Mage.Sets/src/mage/sets/arenaleague/Island3.java new file mode 100644 index 00000000000..1be2618fb87 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId, 24); + this.expansionSetCode = "ARENA"; + } + + public Island3(final Island3 card) { + super(card); + } + + @Override + public Island3 copy() { + return new Island3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island4.java b/Mage.Sets/src/mage/sets/arenaleague/Island4.java new file mode 100644 index 00000000000..dffaf9c1063 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId, 33); + this.expansionSetCode = "ARENA"; + } + + public Island4(final Island4 card) { + super(card); + } + + @Override + public Island4 copy() { + return new Island4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island5.java b/Mage.Sets/src/mage/sets/arenaleague/Island5.java new file mode 100644 index 00000000000..31a43ca2d70 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island5.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island5 extends mage.cards.basiclands.Island { + + public Island5(UUID ownerId) { + super(ownerId, 39); + this.expansionSetCode = "ARENA"; + } + + public Island5(final Island5 card) { + super(card); + } + + @Override + public Island5 copy() { + return new Island5(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island6.java b/Mage.Sets/src/mage/sets/arenaleague/Island6.java new file mode 100644 index 00000000000..eb8cb947d9a --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island6.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island6 extends mage.cards.basiclands.Island { + + public Island6(UUID ownerId) { + super(ownerId, 46); + this.expansionSetCode = "ARENA"; + } + + public Island6(final Island6 card) { + super(card); + } + + @Override + public Island6 copy() { + return new Island6(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island7.java b/Mage.Sets/src/mage/sets/arenaleague/Island7.java new file mode 100644 index 00000000000..7ce1951a2a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island7.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island7 extends mage.cards.basiclands.Island { + + public Island7(UUID ownerId) { + super(ownerId, 54); + this.expansionSetCode = "ARENA"; + } + + public Island7(final Island7 card) { + super(card); + } + + @Override + public Island7 copy() { + return new Island7(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island8.java b/Mage.Sets/src/mage/sets/arenaleague/Island8.java new file mode 100644 index 00000000000..0f6a2b964e7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island8.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island8 extends mage.cards.basiclands.Island { + + public Island8(UUID ownerId) { + super(ownerId, 68); + this.expansionSetCode = "ARENA"; + } + + public Island8(final Island8 card) { + super(card); + } + + @Override + public Island8 copy() { + return new Island8(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Island9.java b/Mage.Sets/src/mage/sets/arenaleague/Island9.java new file mode 100644 index 00000000000..13aae166e31 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Island9.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island9 extends mage.cards.basiclands.Island { + + public Island9(UUID ownerId) { + super(ownerId, 76); + this.expansionSetCode = "ARENA"; + } + + public Island9(final Island9 card) { + super(card); + } + + @Override + public Island9 copy() { + return new Island9(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/KarnSilverGolem.java b/Mage.Sets/src/mage/sets/arenaleague/KarnSilverGolem.java new file mode 100644 index 00000000000..206ee44feaa --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/KarnSilverGolem.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class KarnSilverGolem extends mage.sets.urzassaga.KarnSilverGolem { + + public KarnSilverGolem(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public KarnSilverGolem(final KarnSilverGolem card) { + super(card); + } + + @Override + public KarnSilverGolem copy() { + return new KarnSilverGolem(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/ManOWar.java b/Mage.Sets/src/mage/sets/arenaleague/ManOWar.java new file mode 100644 index 00000000000..fe6d42204fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/ManOWar.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ManOWar extends mage.sets.visions.ManOWar { + + public ManOWar(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "ARENA"; + } + + public ManOWar(final ManOWar card) { + super(card); + } + + @Override + public ManOWar copy() { + return new ManOWar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/ManaLeak.java b/Mage.Sets/src/mage/sets/arenaleague/ManaLeak.java new file mode 100644 index 00000000000..2d99187537c --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/ManaLeak.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ManaLeak extends mage.sets.magic2011.ManaLeak { + + public ManaLeak(UUID ownerId) { + super(ownerId); + this.cardNumber = 44; + this.expansionSetCode = "ARENA"; + } + + public ManaLeak(final ManaLeak card) { + super(card); + } + + @Override + public ManaLeak copy() { + return new ManaLeak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain1.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain1.java new file mode 100644 index 00000000000..84d0ec6740d --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain1 extends mage.cards.basiclands.Mountain { + + public Mountain1(UUID ownerId) { + super(ownerId, 4); + this.expansionSetCode = "ARENA"; + } + + public Mountain1(final Mountain1 card) { + super(card); + } + + @Override + public Mountain1 copy() { + return new Mountain1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain2.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain2.java new file mode 100644 index 00000000000..98219f13d4b --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain2 extends mage.cards.basiclands.Mountain { + + public Mountain2(UUID ownerId) { + super(ownerId, 11); + this.expansionSetCode = "ARENA"; + } + + public Mountain2(final Mountain2 card) { + super(card); + } + + @Override + public Mountain2 copy() { + return new Mountain2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain3.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain3.java new file mode 100644 index 00000000000..ac1475f17dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain3 extends mage.cards.basiclands.Mountain { + + public Mountain3(UUID ownerId) { + super(ownerId, 26); + this.expansionSetCode = "ARENA"; + } + + public Mountain3(final Mountain3 card) { + super(card); + } + + @Override + public Mountain3 copy() { + return new Mountain3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain4.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain4.java new file mode 100644 index 00000000000..088220ca011 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain4 extends mage.cards.basiclands.Mountain { + + public Mountain4(UUID ownerId) { + super(ownerId, 35); + this.expansionSetCode = "ARENA"; + } + + public Mountain4(final Mountain4 card) { + super(card); + } + + @Override + public Mountain4 copy() { + return new Mountain4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain5.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain5.java new file mode 100644 index 00000000000..4e2aa9b4b25 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain5.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain5 extends mage.cards.basiclands.Mountain { + + public Mountain5(UUID ownerId) { + super(ownerId, 48); + this.expansionSetCode = "ARENA"; + } + + public Mountain5(final Mountain5 card) { + super(card); + } + + @Override + public Mountain5 copy() { + return new Mountain5(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain6.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain6.java new file mode 100644 index 00000000000..44aba48dd3d --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain6.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain6 extends mage.cards.basiclands.Mountain { + + public Mountain6(UUID ownerId) { + super(ownerId, 56); + this.expansionSetCode = "ARENA"; + } + + public Mountain6(final Mountain6 card) { + super(card); + } + + @Override + public Mountain6 copy() { + return new Mountain6(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain7.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain7.java new file mode 100644 index 00000000000..97947a3ef61 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain7.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain7 extends mage.cards.basiclands.Mountain { + + public Mountain7(UUID ownerId) { + super(ownerId, 70); + this.expansionSetCode = "ARENA"; + } + + public Mountain7(final Mountain7 card) { + super(card); + } + + @Override + public Mountain7 copy() { + return new Mountain7(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Mountain8.java b/Mage.Sets/src/mage/sets/arenaleague/Mountain8.java new file mode 100644 index 00000000000..7b96df913bd --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Mountain8.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain8 extends mage.cards.basiclands.Mountain { + + public Mountain8(UUID ownerId) { + super(ownerId, 78); + this.expansionSetCode = "ARENA"; + } + + public Mountain8(final Mountain8 card) { + super(card); + } + + @Override + public Mountain8 copy() { + return new Mountain8(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/OkinaNightwatch.java b/Mage.Sets/src/mage/sets/arenaleague/OkinaNightwatch.java new file mode 100644 index 00000000000..87864e65bc3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/OkinaNightwatch.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OkinaNightwatch extends mage.sets.saviorsofkamigawa.OkinaNightwatch { + + public OkinaNightwatch(UUID ownerId) { + super(ownerId); + this.cardNumber = 73; + this.expansionSetCode = "ARENA"; + } + + public OkinaNightwatch(final OkinaNightwatch card) { + super(card); + } + + @Override + public OkinaNightwatch copy() { + return new OkinaNightwatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Pillage.java b/Mage.Sets/src/mage/sets/arenaleague/Pillage.java new file mode 100644 index 00000000000..24f2bfeafee --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Pillage.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Pillage extends mage.sets.seventhedition.Pillage { + + public Pillage(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public Pillage(final Pillage card) { + super(card); + } + + @Override + public Pillage copy() { + return new Pillage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains1.java b/Mage.Sets/src/mage/sets/arenaleague/Plains1.java new file mode 100644 index 00000000000..80faa56141a --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains1 extends mage.cards.basiclands.Plains { + + public Plains1(UUID ownerId) { + super(ownerId, 1); + this.expansionSetCode = "ARENA"; + } + + public Plains1(final Plains1 card) { + super(card); + } + + @Override + public Plains1 copy() { + return new Plains1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains2.java b/Mage.Sets/src/mage/sets/arenaleague/Plains2.java new file mode 100644 index 00000000000..2ed4851d8c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains2 extends mage.cards.basiclands.Plains { + + public Plains2(UUID ownerId) { + super(ownerId, 8); + this.expansionSetCode = "ARENA"; + } + + public Plains2(final Plains2 card) { + super(card); + } + + @Override + public Plains2 copy() { + return new Plains2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains3.java b/Mage.Sets/src/mage/sets/arenaleague/Plains3.java new file mode 100644 index 00000000000..0812b375a27 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains3 extends mage.cards.basiclands.Plains { + + public Plains3(UUID ownerId) { + super(ownerId, 23); + this.expansionSetCode = "ARENA"; + } + + public Plains3(final Plains3 card) { + super(card); + } + + @Override + public Plains3 copy() { + return new Plains3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains4.java b/Mage.Sets/src/mage/sets/arenaleague/Plains4.java new file mode 100644 index 00000000000..56ef45a76d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains4 extends mage.cards.basiclands.Plains { + + public Plains4(UUID ownerId) { + super(ownerId, 32); + this.expansionSetCode = "ARENA"; + } + + public Plains4(final Plains4 card) { + super(card); + } + + @Override + public Plains4 copy() { + return new Plains4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains5.java b/Mage.Sets/src/mage/sets/arenaleague/Plains5.java new file mode 100644 index 00000000000..526e72f3dc0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains5.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains5 extends mage.cards.basiclands.Plains { + + public Plains5(UUID ownerId) { + super(ownerId, 45); + this.expansionSetCode = "ARENA"; + } + + public Plains5(final Plains5 card) { + super(card); + } + + @Override + public Plains5 copy() { + return new Plains5(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains6.java b/Mage.Sets/src/mage/sets/arenaleague/Plains6.java new file mode 100644 index 00000000000..d4708c8e6e7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains6.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains6 extends mage.cards.basiclands.Plains { + + public Plains6(UUID ownerId) { + super(ownerId, 53); + this.expansionSetCode = "ARENA"; + } + + public Plains6(final Plains6 card) { + super(card); + } + + @Override + public Plains6 copy() { + return new Plains6(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains7.java b/Mage.Sets/src/mage/sets/arenaleague/Plains7.java new file mode 100644 index 00000000000..c20023b170f --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains7.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains7 extends mage.cards.basiclands.Plains { + + public Plains7(UUID ownerId) { + super(ownerId, 67); + this.expansionSetCode = "ARENA"; + } + + public Plains7(final Plains7 card) { + super(card); + } + + @Override + public Plains7 copy() { + return new Plains7(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Plains8.java b/Mage.Sets/src/mage/sets/arenaleague/Plains8.java new file mode 100644 index 00000000000..c381f03bb42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Plains8.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains8 extends mage.cards.basiclands.Plains { + + public Plains8(UUID ownerId) { + super(ownerId, 75); + this.expansionSetCode = "ARENA"; + } + + public Plains8(final Plains8 card) { + super(card); + } + + @Override + public Plains8 copy() { + return new Plains8(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/PouncingJaguar.java b/Mage.Sets/src/mage/sets/arenaleague/PouncingJaguar.java new file mode 100644 index 00000000000..62d9fdc46ba --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/PouncingJaguar.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PouncingJaguar extends mage.sets.urzassaga.PouncingJaguar { + + public PouncingJaguar(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "ARENA"; + } + + public PouncingJaguar(final PouncingJaguar card) { + super(card); + } + + @Override + public PouncingJaguar copy() { + return new PouncingJaguar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Rewind.java b/Mage.Sets/src/mage/sets/arenaleague/Rewind.java new file mode 100644 index 00000000000..73fc6696121 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Rewind.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Rewind extends mage.sets.urzassaga.Rewind { + + public Rewind(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "ARENA"; + } + + public Rewind(final Rewind card) { + super(card); + } + + @Override + public Rewind copy() { + return new Rewind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/SerumVisions.java b/Mage.Sets/src/mage/sets/arenaleague/SerumVisions.java new file mode 100644 index 00000000000..4793902833d --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/SerumVisions.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SerumVisions extends mage.sets.fifthdawn.SerumVisions { + + public SerumVisions(UUID ownerId) { + super(ownerId); + this.cardNumber = 59; + this.expansionSetCode = "ARENA"; + } + + public SerumVisions(final SerumVisions card) { + super(card); + } + + @Override + public SerumVisions copy() { + return new SerumVisions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/SkirkMarauder.java b/Mage.Sets/src/mage/sets/arenaleague/SkirkMarauder.java new file mode 100644 index 00000000000..0cefb0e3157 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/SkirkMarauder.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SkirkMarauder extends mage.sets.legions.SkirkMarauder { + + public SkirkMarauder(UUID ownerId) { + super(ownerId); + this.cardNumber = 50; + this.expansionSetCode = "ARENA"; + } + + public SkirkMarauder(final SkirkMarauder card) { + super(card); + } + + @Override + public SkirkMarauder copy() { + return new SkirkMarauder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/SkitteringSkirge.java b/Mage.Sets/src/mage/sets/arenaleague/SkitteringSkirge.java new file mode 100644 index 00000000000..f9a6b32fecb --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/SkitteringSkirge.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SkitteringSkirge extends mage.sets.urzassaga.SkitteringSkirge { + + public SkitteringSkirge(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "ARENA"; + } + + public SkitteringSkirge(final SkitteringSkirge card) { + super(card); + } + + @Override + public SkitteringSkirge copy() { + return new SkitteringSkirge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/SkyknightLegionnaire.java b/Mage.Sets/src/mage/sets/arenaleague/SkyknightLegionnaire.java new file mode 100644 index 00000000000..ef97bad5325 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/SkyknightLegionnaire.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SkyknightLegionnaire extends mage.sets.ravnica.SkyknightLegionnaire { + + public SkyknightLegionnaire(UUID ownerId) { + super(ownerId); + this.cardNumber = 74; + this.expansionSetCode = "ARENA"; + } + + public SkyknightLegionnaire(final SkyknightLegionnaire card) { + super(card); + } + + @Override + public SkyknightLegionnaire copy() { + return new SkyknightLegionnaire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Stupor.java b/Mage.Sets/src/mage/sets/arenaleague/Stupor.java new file mode 100644 index 00000000000..d927b12ac93 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Stupor.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Stupor extends mage.sets.timeshifted.Stupor { + + public Stupor(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "ARENA"; + } + + public Stupor(final Stupor card) { + super(card); + } + + @Override + public Stupor copy() { + return new Stupor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/SurgingFlame.java b/Mage.Sets/src/mage/sets/arenaleague/SurgingFlame.java new file mode 100644 index 00000000000..70d4759e51c --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/SurgingFlame.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SurgingFlame extends mage.sets.coldsnap.SurgingFlame { + + public SurgingFlame(UUID ownerId) { + super(ownerId); + this.cardNumber = 83; + this.expansionSetCode = "ARENA"; + } + + public SurgingFlame(final SurgingFlame card) { + super(card); + } + + @Override + public SurgingFlame copy() { + return new SurgingFlame(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp1.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp1.java new file mode 100644 index 00000000000..b8eef9abfc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp1 extends mage.cards.basiclands.Swamp { + + public Swamp1(UUID ownerId) { + super(ownerId, 3); + this.expansionSetCode = "ARENA"; + } + + public Swamp1(final Swamp1 card) { + super(card); + } + + @Override + public Swamp1 copy() { + return new Swamp1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp2.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp2.java new file mode 100644 index 00000000000..40a2e44e3a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp2 extends mage.cards.basiclands.Swamp { + + public Swamp2(UUID ownerId) { + super(ownerId, 10); + this.expansionSetCode = "ARENA"; + } + + public Swamp2(final Swamp2 card) { + super(card); + } + + @Override + public Swamp2 copy() { + return new Swamp2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp3.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp3.java new file mode 100644 index 00000000000..b02bd4490da --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp3 extends mage.cards.basiclands.Swamp { + + public Swamp3(UUID ownerId) { + super(ownerId, 25); + this.expansionSetCode = "ARENA"; + } + + public Swamp3(final Swamp3 card) { + super(card); + } + + @Override + public Swamp3 copy() { + return new Swamp3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp4.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp4.java new file mode 100644 index 00000000000..25c06e20dc1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp4 extends mage.cards.basiclands.Swamp { + + public Swamp4(UUID ownerId) { + super(ownerId, 34); + this.expansionSetCode = "ARENA"; + } + + public Swamp4(final Swamp4 card) { + super(card); + } + + @Override + public Swamp4 copy() { + return new Swamp4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp5.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp5.java new file mode 100644 index 00000000000..e97e6dbc56f --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp5.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp5 extends mage.cards.basiclands.Swamp { + + public Swamp5(UUID ownerId) { + super(ownerId, 47); + this.expansionSetCode = "ARENA"; + } + + public Swamp5(final Swamp5 card) { + super(card); + } + + @Override + public Swamp5 copy() { + return new Swamp5(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp6.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp6.java new file mode 100644 index 00000000000..de6f7817bb2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp6.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp6 extends mage.cards.basiclands.Swamp { + + public Swamp6(UUID ownerId) { + super(ownerId, 55); + this.expansionSetCode = "ARENA"; + } + + public Swamp6(final Swamp6 card) { + super(card); + } + + @Override + public Swamp6 copy() { + return new Swamp6(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp7.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp7.java new file mode 100644 index 00000000000..2fbceb0d284 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp7.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp7 extends mage.cards.basiclands.Swamp { + + public Swamp7(UUID ownerId) { + super(ownerId, 69); + this.expansionSetCode = "ARENA"; + } + + public Swamp7(final Swamp7 card) { + super(card); + } + + @Override + public Swamp7 copy() { + return new Swamp7(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/Swamp8.java b/Mage.Sets/src/mage/sets/arenaleague/Swamp8.java new file mode 100644 index 00000000000..c95a05bdb98 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/Swamp8.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp8 extends mage.cards.basiclands.Swamp { + + public Swamp8(UUID ownerId) { + super(ownerId, 77); + this.expansionSetCode = "ARENA"; + } + + public Swamp8(final Swamp8 card) { + super(card); + } + + @Override + public Swamp8 copy() { + return new Swamp8(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/UktabiOrangutan.java b/Mage.Sets/src/mage/sets/arenaleague/UktabiOrangutan.java new file mode 100644 index 00000000000..30e9304d022 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/UktabiOrangutan.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.arenaleague; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class UktabiOrangutan extends mage.sets.visions.UktabiOrangutan { + + public UktabiOrangutan(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "ARENA"; + this.rarity = Rarity.SPECIAL; + } + + public UktabiOrangutan(final UktabiOrangutan card) { + super(card); + } + + @Override + public UktabiOrangutan copy() { + return new UktabiOrangutan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arenaleague/WeeDragonauts.java b/Mage.Sets/src/mage/sets/arenaleague/WeeDragonauts.java new file mode 100644 index 00000000000..c0051d66198 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arenaleague/WeeDragonauts.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.sets.arenaleague; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WeeDragonauts extends mage.sets.guildpact.WeeDragonauts { + + public WeeDragonauts(UUID ownerId) { + super(ownerId); + this.cardNumber = 81; + this.expansionSetCode = "ARENA"; + } + + public WeeDragonauts(final WeeDragonauts card) { + super(card); + } + + @Override + public WeeDragonauts copy() { + return new WeeDragonauts(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest1.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest1.java new file mode 100644 index 00000000000..ed2439398d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId, 1); + this.expansionSetCode = "APAC"; + } + + public Forest1(final Forest1 card) { + super(card); + } + + @Override + public Forest1 copy() { + return new Forest1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest2.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest2.java new file mode 100644 index 00000000000..2c1fd9bf31f --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId, 6); + this.expansionSetCode = "APAC"; + } + + public Forest2(final Forest2 card) { + super(card); + } + + @Override + public Forest2 copy() { + return new Forest2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest3.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest3.java new file mode 100644 index 00000000000..d745d8dd23d --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Forest3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId, 11); + this.expansionSetCode = "APAC"; + } + + public Forest3(final Forest3 card) { + super(card); + } + + @Override + public Forest3 copy() { + return new Forest3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island1.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island1.java new file mode 100644 index 00000000000..8a0b518f402 --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId, 2); + this.expansionSetCode = "APAC"; + } + + public Island1(final Island1 card) { + super(card); + } + + @Override + public Island1 copy() { + return new Island1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island2.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island2.java new file mode 100644 index 00000000000..89abc4c7bec --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId, 7); + this.expansionSetCode = "APAC"; + } + + public Island2(final Island2 card) { + super(card); + } + + @Override + public Island2 copy() { + return new Island2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island3.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island3.java new file mode 100644 index 00000000000..357a50f961e --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Island3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId, 12); + this.expansionSetCode = "APAC"; + } + + public Island3(final Island3 card) { + super(card); + } + + @Override + public Island3 copy() { + return new Island3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain1.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain1.java new file mode 100644 index 00000000000..bf88198e614 --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain1 extends mage.cards.basiclands.Mountain { + + public Mountain1(UUID ownerId) { + super(ownerId, 3); + this.expansionSetCode = "APAC"; + } + + public Mountain1(final Mountain1 card) { + super(card); + } + + @Override + public Mountain1 copy() { + return new Mountain1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain2.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain2.java new file mode 100644 index 00000000000..86a6722e334 --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain2 extends mage.cards.basiclands.Mountain { + + public Mountain2(UUID ownerId) { + super(ownerId, 8); + this.expansionSetCode = "APAC"; + } + + public Mountain2(final Mountain2 card) { + super(card); + } + + @Override + public Mountain2 copy() { + return new Mountain2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain3.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain3.java new file mode 100644 index 00000000000..55670e6305e --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Mountain3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain3 extends mage.cards.basiclands.Mountain { + + public Mountain3(UUID ownerId) { + super(ownerId, 13); + this.expansionSetCode = "APAC"; + } + + public Mountain3(final Mountain3 card) { + super(card); + } + + @Override + public Mountain3 copy() { + return new Mountain3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains1.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains1.java new file mode 100644 index 00000000000..b6844dbebe6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains1 extends mage.cards.basiclands.Plains { + + public Plains1(UUID ownerId) { + super(ownerId, 4); + this.expansionSetCode = "APAC"; + } + + public Plains1(final Plains1 card) { + super(card); + } + + @Override + public Plains1 copy() { + return new Plains1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains2.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains2.java new file mode 100644 index 00000000000..fd97d49106d --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains2 extends mage.cards.basiclands.Plains { + + public Plains2(UUID ownerId) { + super(ownerId, 9); + this.expansionSetCode = "APAC"; + } + + public Plains2(final Plains2 card) { + super(card); + } + + @Override + public Plains2 copy() { + return new Plains2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains3.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains3.java new file mode 100644 index 00000000000..6e0dd52eed3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Plains3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains3 extends mage.cards.basiclands.Plains { + + public Plains3(UUID ownerId) { + super(ownerId, 14); + this.expansionSetCode = "APAC"; + } + + public Plains3(final Plains3 card) { + super(card); + } + + @Override + public Plains3 copy() { + return new Plains3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp1.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp1.java new file mode 100644 index 00000000000..c814937570a --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp1 extends mage.cards.basiclands.Swamp { + + public Swamp1(UUID ownerId) { + super(ownerId, 5); + this.expansionSetCode = "APAC"; + } + + public Swamp1(final Swamp1 card) { + super(card); + } + + @Override + public Swamp1 copy() { + return new Swamp1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp2.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp2.java new file mode 100644 index 00000000000..af86ec068a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp2 extends mage.cards.basiclands.Swamp { + + public Swamp2(UUID ownerId) { + super(ownerId, 10); + this.expansionSetCode = "APAC"; + } + + public Swamp2(final Swamp2 card) { + super(card); + } + + @Override + public Swamp2 copy() { + return new Swamp2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp3.java b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp3.java new file mode 100644 index 00000000000..5cd78cf047b --- /dev/null +++ b/Mage.Sets/src/mage/sets/asiapacificlandprogram/Swamp3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.asiapacificlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp3 extends mage.cards.basiclands.Swamp { + + public Swamp3(UUID ownerId) { + super(ownerId, 15); + this.expansionSetCode = "APAC"; + } + + public Swamp3(final Swamp3 card) { + super(card); + } + + @Override + public Swamp3 copy() { + return new Swamp3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java b/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java index f248e81664d..9ed4bfca997 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java @@ -67,10 +67,10 @@ public class AbundantGrowth extends CardImpl { // When Abundant Growth enters the battlefield, draw a card. this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); - // Enchanted land has "{tap}: Add one mana of any color to your mana pool." + // Enchanted land has "{T}: Add one mana of any color to your mana pool." Ability gainedAbility = new AnyColorManaAbility(new TapSourceCost()); Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA); - effect.setText("Enchanted land has \"{tap}: Add one mana of any color to your mana pool.\""); + effect.setText("Enchanted land has \"{T}: Add one mana of any color to your mana pool.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/BattleHymn.java b/Mage.Sets/src/mage/sets/avacynrestored/BattleHymn.java index 43aa5e4bf40..758adcf4f9d 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/BattleHymn.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/BattleHymn.java @@ -48,7 +48,7 @@ public class BattleHymn extends CardImpl { // Add {R} to your mana pool for each creature you control. - this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))); + this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))); } public BattleHymn(final BattleHymn card) { diff --git a/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java b/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java index a0453080103..72e5a85d72f 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java @@ -28,11 +28,10 @@ package mage.sets.avacynrestored; import java.util.UUID; - -import mage.constants.*; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.AddCardSubtypeAttachedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; @@ -40,6 +39,12 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -51,6 +56,7 @@ import mage.target.common.TargetCreaturePermanent; * @author Loki */ public class CallToServe extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); static { @@ -62,18 +68,22 @@ public class CallToServe extends CardImpl { this.expansionSetCode = "AVR"; this.subtype.add("Aura"); - // Enchant nonblack creature - TargetPermanent auraTarget = new TargetCreaturePermanent(); + TargetPermanent auraTarget = new TargetCreaturePermanent(filter); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +1/+2, has flying, and is an Angel in addition to its other types. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AddCardSubtypeAttachedEffect("Angel", Duration.WhileOnBattlefield, AttachmentType.AURA))); + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText(", has flying"); + ability.addEffect(effect); + effect = new AddCardSubtypeAttachedEffect("Angel", Duration.WhileOnBattlefield, AttachmentType.AURA); + effect.setText(", and is an Angel in addition to its other types"); + ability.addEffect(effect); + this.addAbility(ability); } public CallToServe(final CallToServe card) { diff --git a/Mage.Sets/src/mage/sets/avacynrestored/GallowsAtWillowHill.java b/Mage.Sets/src/mage/sets/avacynrestored/GallowsAtWillowHill.java index 0d5cdcee9d5..7a5f29fbcd0 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/GallowsAtWillowHill.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/GallowsAtWillowHill.java @@ -34,6 +34,7 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapTargetCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -46,7 +47,6 @@ import mage.filter.predicate.permanent.TappedPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.SpiritWhiteToken; -import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; @@ -111,8 +111,7 @@ class GallowsAtWillowHillEffect extends OneShotEffect { Player controller = game.getPlayer(permanent.getControllerId()); permanent.destroy(source.getSourceId(), game, false); if (controller != null) { - Token spirit = new SpiritWhiteToken("AVR", 1); - spirit.putOntoBattlefield(1, game, source.getSourceId(), controller.getId()); + new CreateTokenEffect(new SpiritWhiteToken()).apply(game, source); } affectedTargets++; } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/GloomSurgeon.java b/Mage.Sets/src/mage/sets/avacynrestored/GloomSurgeon.java index 1e1c67ad312..b1881c58e86 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/GloomSurgeon.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/GloomSurgeon.java @@ -27,20 +27,22 @@ */ package mage.sets.avacynrestored; -import mage.constants.*; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamageCreatureEvent; import mage.game.events.GameEvent; import mage.players.Player; -import java.util.UUID; - /** * @author noxx */ @@ -86,19 +88,19 @@ class GloomSurgeonEffect extends ReplacementEffectImpl { int preventedDamage = event.getAmount(); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), preventedDamage)); Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.moveCards(player.getLibrary().getTopCards(game, preventedDamage), Zone.LIBRARY, Zone.EXILED, source, game); + if (player != null) { + player.moveCards(player.getLibrary().getTopCards(game, preventedDamage), Zone.EXILED, source, game); } return true; } return false; } - + @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(source.getSourceId())) { diff --git a/Mage.Sets/src/mage/sets/avacynrestored/MoonsilverSpear.java b/Mage.Sets/src/mage/sets/avacynrestored/MoonsilverSpear.java index 83d3afff427..66ed9f70c7f 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/MoonsilverSpear.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/MoonsilverSpear.java @@ -54,7 +54,7 @@ public class MoonsilverSpear extends CardImpl { // Equipped creature has first strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); // Whenever equipped creature attacks, put a 4/4 white Angel creature token with flying onto the battlefield. - this.addAbility(new AttacksAttachedTriggeredAbility(new CreateTokenEffect(new AngelToken(expansionSetCode)))); + this.addAbility(new AttacksAttachedTriggeredAbility(new CreateTokenEffect(new AngelToken()))); // Equip {4} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(4))); } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/NephaliaSmuggler.java b/Mage.Sets/src/mage/sets/avacynrestored/NephaliaSmuggler.java index e5cdcfb0e65..d939c4a073e 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/NephaliaSmuggler.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/NephaliaSmuggler.java @@ -38,6 +38,8 @@ import mage.abilities.effects.common.ExileTargetForSourceEffect; import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect; import mage.cards.CardImpl; import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledCreaturePermanent; import java.util.UUID; @@ -47,6 +49,11 @@ import java.util.UUID; */ public class NephaliaSmuggler extends CardImpl { + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control"); + static { + filter.add(new AnotherPredicate()); + } + public NephaliaSmuggler(UUID ownerId) { super(ownerId, 69, "Nephalia Smuggler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}"); this.expansionSetCode = "AVR"; @@ -60,7 +67,7 @@ public class NephaliaSmuggler extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetForSourceEffect(), new ManaCostsImpl("{3}{U}")); ability.addCost(new TapSourceCost()); ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); - ability.addTarget(new TargetControlledCreaturePermanent()); + ability.addTarget(new TargetControlledCreaturePermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/PillarOfFlame.java b/Mage.Sets/src/mage/sets/avacynrestored/PillarOfFlame.java index 014284bd8e5..ed8b8b3b02c 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/PillarOfFlame.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/PillarOfFlame.java @@ -74,51 +74,3 @@ public class PillarOfFlame extends CardImpl { return new PillarOfFlame(this); } } - -class PillarOfFlameEffect extends ReplacementEffectImpl { - - public PillarOfFlameEffect() { - super(Duration.EndOfTurn, Outcome.Exile); - staticText = "If a creature dealt damage this way would die this turn, exile it instead"; - } - - public PillarOfFlameEffect(final PillarOfFlameEffect effect) { - super(effect); - } - - @Override - public PillarOfFlameEffect copy() { - return new PillarOfFlameEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent permanent = ((ZoneChangeEvent) event).getTarget(); - if (controller != null && permanent != null) { - return controller.moveCards(permanent, Zone.BATTLEFIELD, Zone.EXILED, source, game); - } - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.ZONE_CHANGE; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (((ZoneChangeEvent) event).isDiesEvent()) { - DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId()); - if (watcher != null) { - return watcher.wasDamaged(event.getTargetId(), game); - } - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/SternMentor.java b/Mage.Sets/src/mage/sets/avacynrestored/SternMentor.java index 23757600e70..feb58ede09a 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/SternMentor.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/SternMentor.java @@ -47,7 +47,7 @@ import mage.target.TargetPlayer; */ public class SternMentor extends CardImpl { - private static final String ruleText = "As long as {this} is paired with another creature, each of those creatures has \"{tap}: Target player puts the top two cards of his or her library into his or her graveyard.\""; + private static final String ruleText = "As long as {this} is paired with another creature, each of those creatures has \"{T}: Target player puts the top two cards of his or her library into his or her graveyard.\""; public SternMentor(UUID ownerId) { super(ownerId, 77, "Stern Mentor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); @@ -61,7 +61,7 @@ public class SternMentor extends CardImpl { // Soulbond this.addAbility(SoulbondAbility.getInstance()); - // As long as Stern Mentor is paired with another creature, each of those creatures has "{t}: Target player puts the top two cards of his or her library into his or her graveyard." + // As long as Stern Mentor is paired with another creature, each of those creatures has "{T}: Target player puts the top two cards of his or her library into his or her graveyard." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(2), new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityPairedEffect(ability, ruleText))); diff --git a/Mage.Sets/src/mage/sets/avacynrestored/StolenGoods.java b/Mage.Sets/src/mage/sets/avacynrestored/StolenGoods.java index f6550ca84e3..591adb8e6a1 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/StolenGoods.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/StolenGoods.java @@ -141,7 +141,7 @@ class StolenGoodsCastFromExileEffect extends AsThoughEffectImpl { Card card = game.getCard(sourceId); if (card != null && game.getState().getZone(sourceId) == Zone.EXILED) { Player player = game.getPlayer(affectedControllerId); - player.setCastSourceIdWithAlternateMana(sourceId, null); + player.setCastSourceIdWithAlternateMana(sourceId, null, null); return true; } } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java b/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java index c2fc5802c19..3e3518eebde 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java @@ -31,7 +31,6 @@ import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeTargetEffect; @@ -87,18 +86,14 @@ class ThatcherRevoltEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - for (int i = 0; i < 3; i++) { - RedHumanToken token = new RedHumanToken(); - token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - Permanent permanent = game.getPermanent(token.getLastAddedToken()); - if (permanent != null) { - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this token", source.getControllerId()); - sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + RedHumanToken token = new RedHumanToken(); + token.putOntoBattlefield(3, game, source.getSourceId(), source.getControllerId()); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect(); + sacrificeEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect), source); } } return true; diff --git a/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java b/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java index 6978d7118c5..ce92e18fccf 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/TormentorsTrident.java @@ -27,16 +27,21 @@ */ package mage.sets.avacynrestored; -import mage.constants.*; -import mage.abilities.common.AttacksEachTurnStaticAbility; +import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.AttacksIfAbleAttachedEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; - -import java.util.UUID; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; /** * @@ -51,8 +56,11 @@ public class TormentorsTrident extends CardImpl { this.subtype.add("Equipment"); // Equipped creature gets +3/+0 and attacks each turn if able. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new AttacksEachTurnStaticAbility(), AttachmentType.EQUIPMENT))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0)); + Effect effect = new AttacksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT); + effect.setText("and attacks each turn if able"); + ability.addEffect(effect); + this.addAbility(ability); // Equip {3} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumStonewaker.java b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumStonewaker.java index aa2253b1e40..66d3ca61ff6 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumStonewaker.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumStonewaker.java @@ -30,7 +30,6 @@ package mage.sets.battleforzendikar; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.LandfallAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -44,6 +43,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; @@ -97,13 +97,14 @@ class AkoumStonewakerEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Token token = new AkoumStonewakerElementalToken(); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } return true; } return false; @@ -122,5 +123,6 @@ class AkoumStonewakerElementalToken extends Token { this.addAbility(TrampleAbility.getInstance()); this.addAbility(HasteAbility.getInstance()); this.setOriginalExpansionSetCode("BFZ"); + this.setTokenType(1); } } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BringToLight.java b/Mage.Sets/src/mage/sets/battleforzendikar/BringToLight.java index 21f64d21c7e..5419dc82641 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/BringToLight.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BringToLight.java @@ -45,6 +45,7 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import org.apache.log4j.Logger; /** * @@ -77,7 +78,7 @@ class BringToLightEffect extends OneShotEffect { public BringToLightEffect() { super(Outcome.PlayForFree); this.staticText = "Converge — Search your library for a creature, instant, or sorcery card with converted mana " - + "cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, " + + "cost less than or equal to the number of colors of mana spent to cast {this}, exile that card, " + "then shuffle your library. You may cast that card without paying its mana cost"; } @@ -102,12 +103,16 @@ class BringToLightEffect extends OneShotEffect { controller.searchLibrary(target, game); Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); if (card != null) { - controller.moveCards(card, null, Zone.EXILED, source, game); + controller.moveCards(card, Zone.EXILED, source, game); } controller.shuffleLibrary(game); if (card != null) { if (controller.chooseUse(outcome, "Cast " + card.getName() + " without paying its mana cost?", source, game)) { - controller.cast(card.getSpellAbility(), game, true); + if (card.getSpellAbility() != null) { + controller.cast(card.getSpellAbility(), game, true); + } else { + Logger.getLogger(BringToLightEffect.class).error("Bring to Light: spellAbility == null " + card.getName()); + } } } return true; diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CanopyVista.java b/Mage.Sets/src/mage/sets/battleforzendikar/CanopyVista.java index d6fc7f74027..97dcdb7afae 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/CanopyVista.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CanopyVista.java @@ -47,9 +47,9 @@ import mage.filter.predicate.mageobject.SupertypePredicate; * @author fireshoes */ public class CanopyVista extends CardImpl { - + private static final FilterLandPermanent filter = new FilterLandPermanent(); - + static { filter.add(new SupertypePredicate("Basic")); } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java b/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java index b4322ab7f47..df914e83869 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java @@ -113,7 +113,7 @@ class EmeriaShepherdReturnToHandTargetEffect extends OneShotEffect { && controller.chooseUse(Outcome.PutCardInPlay, "Put the card to battlefield instead?", source, game)) { toZone = Zone.BATTLEFIELD; } - return controller.moveCards(new CardsImpl(targetPointer.getTargets(game, source)), null, toZone, source, game); + return controller.moveCards(new CardsImpl(targetPointer.getTargets(game, source)), toZone, source, game); } } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java b/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java index 80518ad1c23..533a88f299a 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java @@ -111,7 +111,7 @@ class OblivionSowerEffect extends OneShotEffect { + targetPlayer.getName() + " to put into play under your control"); TargetCard targetCards = new TargetCard(0, exiledLands.size(), Zone.EXILED, filterToPlay); if (controller.chooseTarget(outcome, exiledLands, targetCards, source, game)) { - controller.moveCards(new CardsImpl(targetCards.getTargets()), null, Zone.BATTLEFIELD, source, game); + controller.moveCards(new CardsImpl(targetCards.getTargets()), Zone.BATTLEFIELD, source, game); } } return true; diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OmnathLocusOfRage.java b/Mage.Sets/src/mage/sets/battleforzendikar/OmnathLocusOfRage.java index c09d7fe5080..fff58c51cfa 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/OmnathLocusOfRage.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OmnathLocusOfRage.java @@ -88,7 +88,7 @@ class OmnathElementalToken extends Token { OmnathElementalToken() { super("Elemental", "5/5 red and green Elemental creature token"); - setTokenType(1); + setTokenType(2); setOriginalExpansionSetCode("BFZ"); cardType.add(CardType.CREATURE); subtype.add("Elemental"); diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java index 7b1b6ded224..97e768c1c32 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java @@ -29,13 +29,13 @@ package mage.sets.battleforzendikar; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; /** @@ -82,15 +82,7 @@ class UginsInsightEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - int highCMC = 0; - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { - if (permanent.getSpellAbility() != null) { - int cmc = permanent.getSpellAbility().getManaCosts().convertedManaCost(); - if (cmc > highCMC) { - highCMC = cmc; - } - } - } + int highCMC = new HighestConvertedManaCostValue().calculate(game, source, this); if (highCMC > 0) { controller.scry(highCMC, source, game); } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VoidWinnower.java b/Mage.Sets/src/mage/sets/battleforzendikar/VoidWinnower.java index f76974193ac..474486e7019 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/VoidWinnower.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VoidWinnower.java @@ -44,6 +44,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; +import mage.game.stack.Spell; /** * @@ -108,16 +109,16 @@ class VoidWinnowerCantCastEffect extends ContinuousRuleModifyingEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.CAST_SPELL; + return event.getType() == EventType.CAST_SPELL_LATE; } @Override public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { - MageObject object = game.getObject(event.getSourceId()); - if (object != null) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null) { // the low bit will always be set on an odd number. - return (object.getManaCost().convertedManaCost() & 1) == 0; + return (spell.getConvertedManaCost() & 1) == 0; } } return false; diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ZadaHedronGrinder.java b/Mage.Sets/src/mage/sets/battleforzendikar/ZadaHedronGrinder.java index e34ac40666b..e20744b3694 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/ZadaHedronGrinder.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ZadaHedronGrinder.java @@ -30,6 +30,7 @@ package mage.sets.battleforzendikar; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -102,9 +103,8 @@ class ZadaHedronGrinderTriggeredAbility extends TriggeredAbilityImpl { Spell spell = game.getStack().getSpell(event.getTargetId()); if (isControlledInstantOrSorcery(spell)) { boolean targetsSource = false; - for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) { - spell.getSpellAbility().getModes().setActiveMode(modeId); - for (Target target : spell.getSpellAbility().getTargets()) { + for (Mode mode : spell.getSpellAbility().getModes().getSelectedModes()) { + for (Target target : mode.getTargets()) { for (UUID targetId : target.getTargets()) { if (targetId.equals(getSourceId())) { targetsSource = true; @@ -161,9 +161,8 @@ class ZadaHedronGrinderEffect extends OneShotEffect { if (spell != null && controller != null) { Target usedTarget = null; setUsedTarget: - for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) { - spell.getSpellAbility().getModes().setActiveMode(modeId); - for (Target target : spell.getSpellAbility().getTargets()) { + for (Mode mode : spell.getSpellAbility().getModes().getSelectedModes()) { + for (Target target : mode.getTargets()) { if (target.getFirstTarget().equals(source.getSourceId())) { usedTarget = target.copy(); usedTarget.clearChosen(); @@ -178,13 +177,14 @@ class ZadaHedronGrinderEffect extends OneShotEffect { if (!creature.getId().equals(source.getSourceId()) && usedTarget.canTarget(source.getControllerId(), creature.getId(), source, game)) { Spell copy = spell.copySpell(); setTarget: - for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) { - copy.getSpellAbility().getModes().setActiveMode(modeId); - for (Target target : copy.getSpellAbility().getTargets()) { - if (target.getClass().equals(usedTarget.getClass()) && target.getMessage().equals(usedTarget.getMessage())) { - target.clearChosen(); - target.add(creature.getId(), game); - break setTarget; + for (Mode mode : spell.getSpellAbility().getModes().getSelectedModes()) { + for (Target target : mode.getTargets()) { + if (target.getClass().equals(usedTarget.getClass())) { + target.clearChosen(); // For targets with Max > 1 we need to clear before the text is comapred + if (target.getMessage().equals(usedTarget.getMessage())) { + target.add(creature.getId(), game); + break setTarget; + } } } } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/KitsunePalliator.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/KitsunePalliator.java index 4940e8ce24f..9af055fbbd3 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/KitsunePalliator.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/KitsunePalliator.java @@ -39,8 +39,6 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -52,12 +50,6 @@ import mage.target.targetpointer.FixedTarget; */ public class KitsunePalliator extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai you control"); - static { - filter.add(new ControllerPredicate(TargetController.YOU)); - filter.add(new SubtypePredicate("Samurai")); - } - public KitsunePalliator(UUID ownerId) { super(ownerId, 14, "Kitsune Palliator", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.expansionSetCode = "BOK"; diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamoSightbender.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamoSightbender.java index e10d7262166..60331f9d608 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamoSightbender.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MinamoSightbender.java @@ -28,9 +28,6 @@ package mage.sets.betrayersofkamigawa; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,6 +36,8 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; @@ -54,6 +53,7 @@ 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; public MinamoSightbender(UUID ownerId) { super(ownerId, 41, "Minamo Sightbender", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); @@ -69,19 +69,20 @@ public class MinamoSightbender extends CardImpl { Target target = new TargetCreaturePermanent(filter); ability.addTarget(target); ability.addCost(new TapSourceCost()); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { - for (Effect effect :ability.getEffects()) { + 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(Filter.ComparisonType.LessThan, manaX +1)); + filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, manaX + 1)); Target target = new TargetCreaturePermanent(newFilter); ability.addTarget(target); break; @@ -92,6 +93,7 @@ public class MinamoSightbender extends CardImpl { public MinamoSightbender(final MinamoSightbender card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java index 504916c8d76..29b2018d772 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OrnateKanzashi.java @@ -79,6 +79,7 @@ public class OrnateKanzashi extends CardImpl { } } + class OrnateKanzashiEffect extends OneShotEffect { public OrnateKanzashiEffect() { @@ -98,14 +99,14 @@ class OrnateKanzashiEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); - MageObject sourceObject = game.getObject(source.getSourceId()); + MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null && opponent != null) { if (opponent.getLibrary().size() > 0) { Library library = opponent.getLibrary(); Card card = library.getFromTop(game); if (card != null) { opponent.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); - ContinuousEffect effect = new OrnateKanzashiCastFromExileEffect(card.getId()); + ContinuousEffect effect = new OrnateKanzashiCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); } @@ -118,7 +119,7 @@ class OrnateKanzashiEffect extends OneShotEffect { class OrnateKanzashiCastFromExileEffect extends AsThoughEffectImpl { - public OrnateKanzashiCastFromExileEffect(UUID cardId) { + public OrnateKanzashiCastFromExileEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); staticText = "You may play that card from exile this turn"; } @@ -139,6 +140,7 @@ class OrnateKanzashiCastFromExileEffect 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)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/QuillmaneBaku.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/QuillmaneBaku.java index b367b8f020f..f20848de39f 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/QuillmaneBaku.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/QuillmaneBaku.java @@ -59,6 +59,7 @@ import mage.target.common.TargetCreaturePermanent; public class QuillmaneBaku extends CardImpl { private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard(); + private final UUID originalId; public QuillmaneBaku(UUID ownerId) { super(ownerId, 48, "Quillmane Baku", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); @@ -76,12 +77,13 @@ public class QuillmaneBaku extends CardImpl { ability.addCost(new TapSourceCost()); ability.addCost(new RemoveVariableCountersSourceCost(CounterType.KI.createInstance(1))); ability.addTarget(new TargetCreaturePermanent()); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + if (ability.getOriginalId().equals(originalId)) { int maxConvManaCost = 0; for (Cost cost : ability.getCosts()) { if (cost instanceof RemoveVariableCountersSourceCost) { @@ -98,6 +100,7 @@ public class QuillmaneBaku extends CardImpl { public QuillmaneBaku(final QuillmaneBaku card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/SakuraTribeSpringcaller.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/SakuraTribeSpringcaller.java index 360d827de87..56324702173 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/SakuraTribeSpringcaller.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/SakuraTribeSpringcaller.java @@ -55,7 +55,7 @@ public class SakuraTribeSpringcaller extends CardImpl { this.toughness = new MageInt(4); // At the beginning of your upkeep, add {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end. - Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(Mana.GreenMana), "your", true); + Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(Mana.GreenMana(1)), "your", true); effect.setText("add {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end"); this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/ChampionOfStraySouls.java b/Mage.Sets/src/mage/sets/bornofthegods/ChampionOfStraySouls.java index a59de281863..421d4ef2737 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/ChampionOfStraySouls.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/ChampionOfStraySouls.java @@ -27,6 +27,7 @@ */ package mage.sets.bornofthegods; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -47,14 +48,13 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.Game; import mage.target.common.TargetCardInYourGraveyard; -import java.util.UUID; - /** * * @author LevelX2 */ public class ChampionOfStraySouls extends CardImpl { + private final UUID originalId; private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creatures"); static { @@ -71,8 +71,9 @@ public class ChampionOfStraySouls extends CardImpl { this.toughness = new MageInt(4); /** - * You choose the targets of the first ability as you activate that ability, - * before you pay any costs. You can't target any of the creatures you sacrifice. + * You choose the targets of the first ability as you activate that + * ability, before you pay any costs. You can't target any of the + * creatures you sacrifice. */ // {3}{B}{B}, {T}, Sacrifice X other creatures: Return X target creatures from your graveyard to the battlefield. Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); @@ -80,11 +81,12 @@ public class ChampionOfStraySouls extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{B}{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeXTargetCost(filter)); - ability.addTarget(new TargetCardInYourGraveyard(0,Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); + ability.addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); + originalId = ability.getOriginalId(); this.addAbility(ability); // {5}{B}{B}: Put Champion of Stray Souls on top of your library from your graveyard. - this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, + this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new PutOnLibrarySourceEffect(true, "Put {this} on top of your library from your graveyard"), new ManaCostsImpl("{5}{B}{B}"))); @@ -92,12 +94,12 @@ public class ChampionOfStraySouls extends CardImpl { @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + if (ability.getOriginalId().equals(originalId)) { for (Effect effect : ability.getEffects()) { if (effect instanceof ReturnFromGraveyardToBattlefieldTargetEffect) { int xValue = new GetXValue().calculate(game, ability, null); ability.getTargets().clear(); - ability.addTarget(new TargetCardInYourGraveyard(xValue,xValue, new FilterCreatureCard("creature cards from your graveyard"))); + ability.addTarget(new TargetCardInYourGraveyard(xValue, xValue, new FilterCreatureCard("creature cards from your graveyard"))); } } } @@ -105,6 +107,7 @@ public class ChampionOfStraySouls extends CardImpl { public ChampionOfStraySouls(final ChampionOfStraySouls card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java b/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java index c5df6d378d0..7d218025f4a 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java @@ -58,7 +58,6 @@ import mage.target.TargetSpell; import mage.util.CardUtil; /** - * import mage.constants.Outcome; * * @author LevelX2 */ diff --git a/Mage.Sets/src/mage/sets/bornofthegods/MogisGodOfSlaughter.java b/Mage.Sets/src/mage/sets/bornofthegods/MogisGodOfSlaughter.java index 85fb229bf73..d5bd22552ac 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/MogisGodOfSlaughter.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/MogisGodOfSlaughter.java @@ -74,9 +74,9 @@ public class MogisGodOfSlaughter extends CardImpl { // As long as your devotion to black and red is less than seven, Mogis isn't a creature. Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.R), 7); effect.setText("As long as your devotion to black and red is less than seven, Mogis isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - - // At the beginning of each opponent's upkeep, Mogis deals 2 damage to that player unless he or she sacrifices a creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + // At the beginning of each opponent's upkeep, Mogis deals 2 damage to that player unless he or she sacrifices a creature. effect = new DoUnlessTargetPaysCost(new DamageTargetEffect(2, false, "that player"), new SacrificeTargetCost(new TargetControlledCreaturePermanent()), "Sacrifice a creature? (otherwise you get 2 damage)"); effect.setText("Mogis deals 2 damage to that player unless he or she sacrifices a creature"); @@ -95,6 +95,7 @@ public class MogisGodOfSlaughter extends CardImpl { } class DoUnlessTargetPaysCost extends OneShotEffect { + private final OneShotEffect executingEffect; private final Cost cost; private final String userMessage; @@ -102,6 +103,7 @@ class DoUnlessTargetPaysCost extends OneShotEffect { public DoUnlessTargetPaysCost(OneShotEffect effect, Cost cost) { this(effect, cost, null); } + public DoUnlessTargetPaysCost(OneShotEffect effect, Cost cost, String userMessage) { super(Outcome.Benefit); this.executingEffect = effect; @@ -123,7 +125,7 @@ class DoUnlessTargetPaysCost extends OneShotEffect { if (player != null && mageObject != null) { String message = userMessage; if (message == null) { - message = new StringBuilder(getCostText()).append(" to prevent ").append(executingEffect.getText(source.getModes().getMode())).append("?").toString(); + message = getCostText() + " to prevent " + executingEffect.getText(source.getModes().getMode()) + "?"; } message = CardUtil.replaceSourceName(message, mageObject.getLogName()); cost.clearPaid(); @@ -132,8 +134,8 @@ class DoUnlessTargetPaysCost extends OneShotEffect { } if (!cost.isPaid()) { executingEffect.setTargetPointer(this.targetPointer); - return executingEffect.apply(game, source); - } + return executingEffect.apply(game, source); + } return true; } return false; @@ -153,8 +155,8 @@ class DoUnlessTargetPaysCost extends OneShotEffect { private String getCostText() { StringBuilder sb = new StringBuilder(); String costText = cost.getText(); - if (costText != null && - !costText.toLowerCase().startsWith("discard") + if (costText != null + && !costText.toLowerCase().startsWith("discard") && !costText.toLowerCase().startsWith("sacrifice") && !costText.toLowerCase().startsWith("remove")) { sb.append("pay "); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/HallOfTheBanditLord.java b/Mage.Sets/src/mage/sets/championsofkamigawa/HallOfTheBanditLord.java index a23e783906b..95a7e71b4be 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/HallOfTheBanditLord.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/HallOfTheBanditLord.java @@ -71,7 +71,7 @@ public class HallOfTheBanditLord extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // {T}, Pay 3 life: Add {1} to your mana pool. If that mana is spent on a creature spell, it gains haste. - Mana mana = Mana.ColorlessMana; + Mana mana = Mana.ColorlessMana(1); mana.setFlag(true); ManaEffect effect = new BasicManaEffect(mana); effect.setText("Add {1} to your mana pool. If that mana is spent on a creature spell, it gains haste"); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/HearthKami.java b/Mage.Sets/src/mage/sets/championsofkamigawa/HearthKami.java index 1b9764a3912..8920c45bf6d 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/HearthKami.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/HearthKami.java @@ -25,20 +25,19 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.championsofkamigawa; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.costs.mana.*; +import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.Filter; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -51,6 +50,8 @@ import mage.target.TargetPermanent; */ public class HearthKami extends CardImpl { + private final UUID originalId; + public HearthKami(UUID ownerId) { super(ownerId, 171, "Hearth Kami", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.expansionSetCode = "CHK"; @@ -63,12 +64,13 @@ public class HearthKami extends CardImpl { 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(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + 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()); @@ -80,6 +82,7 @@ public class HearthKami extends CardImpl { public HearthKami(final HearthKami card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java index dac84fa0c2d..378e07cfa4a 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Hinder.java @@ -28,27 +28,12 @@ package mage.sets.championsofkamigawa; import java.util.UUID; +import mage.abilities.effects.common.CounterTargetWithReplacementEffect; +import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.ReplacementEffectImpl; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.constants.Duration; -import mage.constants.PhaseStep; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.ZoneChangeEvent; -import mage.game.stack.Spell; -import mage.game.stack.StackObject; -import mage.players.Player; import mage.target.TargetSpell; -import mage.target.targetpointer.FixedTarget; /** * @@ -61,7 +46,7 @@ public class Hinder extends CardImpl { this.expansionSetCode = "CHK"; // Counter target spell. If that spell is countered this way, put that card on the top or bottom of its owner's library instead of into that player's graveyard. - this.getSpellAbility().addEffect(new HinderEffect()); + this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, true)); this.getSpellAbility().addTarget(new TargetSpell()); } @@ -74,119 +59,3 @@ public class Hinder extends CardImpl { return new Hinder(this); } } - -class HinderEffect extends OneShotEffect { - - public HinderEffect() { - super(Outcome.Detriment); - this.staticText = "Counter target spell. If that spell is countered this way, put that card on the top or bottom of its owner's library instead of into that player's graveyard"; - } - - public HinderEffect(final HinderEffect effect) { - super(effect); - } - - @Override - public HinderEffect copy() { - return new HinderEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - UUID objectId = source.getFirstTarget(); - UUID sourceId = source.getSourceId(); - // counter code from Spellstack - StackObject stackObject = game.getStack().getStackObject(objectId); - MageObject sourceObject = game.getObject(sourceId); - if (stackObject != null && sourceObject != null) { - if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) { - if ( stackObject instanceof Spell ) { - game.rememberLKI(objectId, Zone.STACK, (Spell)stackObject); - } - // Hinder specific code - ReplacementEffectImpl effect = new HinderReplacementEffect(); - effect.setTargetPointer(new FixedTarget(stackObject.getId())); - game.addEffect(effect, source); - // Hinder specific code end - game.informPlayers(new StringBuilder(stackObject.getName()).append(" is countered by ").append(sourceObject.getLogName()).toString()); - game.getStack().remove(stackObject); - stackObject.counter(sourceId, game); // tries to move to graveyard - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId())); - } else { - game.informPlayers(new StringBuilder(stackObject.getName()).append(" could not be countered by ").append(sourceObject.getLogName()).toString()); - } - return true; - } - return false; - // counter code from Spellstack end - } -} - -class HinderReplacementEffect extends ReplacementEffectImpl { - - private PhaseStep phaseStep; - - public HinderReplacementEffect() { - super(Duration.OneUse, Outcome.Benefit); - staticText = "If that spell is countered this way, put that card on the top or bottom of its owner's library instead of into that player's graveyard"; - phaseStep = null; - } - - public HinderReplacementEffect(final HinderReplacementEffect effect) { - super(effect); - phaseStep = effect.phaseStep; - } - - @Override - public HinderReplacementEffect copy() { - return new HinderReplacementEffect(this); - } - - @Override - public boolean isInactive(Ability source, Game game) { - if (!game.getPhase().getStep().getType().equals(phaseStep)) { - return true; - } - return super.isInactive(source, game); - } - - @Override - public void init(Ability source, Game game) { - phaseStep = game.getPhase().getStep().getType(); - super.init(source, game); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - MageObject targetObject = game.getObject(event.getTargetId()); - if (targetObject instanceof Card) { - Card card = (Card) targetObject; - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - boolean top = player.chooseUse(Outcome.Neutral, "Put " + card.getName() + " on top of the library? Otherwise it will be put on the bottom.", source, game); - if (card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, top, event.getAppliedEffects())) { - game.informPlayers(player.getLogName() + " has put " + card.getName() + " on " + (top ? "top" : "the bottom") + " of the library."); - } - return true; - } - } - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.ZONE_CHANGE; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (((ZoneChangeEvent)event).getToZone().equals(Zone.GRAVEYARD)) { - MageObject mageObject = game.getLastKnownInformation(getTargetPointer().getFirst(game, source), Zone.STACK); - if (mageObject instanceof Spell) { - return ((Spell)mageObject).getSourceId().equals(event.getTargetId()); - } - } - return false; - } - -} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java index 14109095917..ede835d57b0 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java @@ -154,14 +154,16 @@ class KondasBannerColorBoostEffect extends BoostAllEffect { Permanent equipment = game.getPermanent(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { Permanent equipedCreature = game.getPermanent(equipment.getAttachedTo()); - for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - if (equipedCreature.getColor(game).shares(perm.getColor(game))) { - perm.addPower(power.calculate(game, source, this)); - perm.addToughness(toughness.calculate(game, source, this)); + if (equipedCreature != null) { + for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + if (equipedCreature.getColor(game).shares(perm.getColor(game))) { + perm.addPower(power.calculate(game, source, this)); + perm.addToughness(toughness.calculate(game, source, this)); + } } + return true; } - return true; } return false; } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/NineRingedBo.java b/Mage.Sets/src/mage/sets/championsofkamigawa/NineRingedBo.java index 6914d9ff5bb..8f5ac8aaffa 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/NineRingedBo.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/NineRingedBo.java @@ -28,27 +28,19 @@ package mage.sets.championsofkamigawa; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.Effect; -import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.ZoneChangeEvent; -import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.common.TargetCreaturePermanent; import mage.watchers.common.DamagedByWatcher; @@ -74,7 +66,7 @@ public class NineRingedBo extends CardImpl { Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); effect.setText("If that creature would die this turn, exile it instead"); ability.addEffect(effect); - this.addAbility(ability); + this.addAbility(ability, new DamagedByWatcher()); } public NineRingedBo(final NineRingedBo card) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SosukeSonOfSeshiro.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SosukeSonOfSeshiro.java index 29c128af844..8cdf926c72c 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SosukeSonOfSeshiro.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SosukeSonOfSeshiro.java @@ -29,17 +29,16 @@ package mage.sets.championsofkamigawa; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -76,7 +75,10 @@ public class SosukeSonOfSeshiro extends CardImpl { // Other Snake creatures you control get +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, filter, true))); // Whenever a Warrior you control deals combat damage to a creature, destroy that creature at end of combat. - this.addAbility(new SosukeSonOfSeshiroTriggeredAbility()); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + this.addAbility(new SosukeSonOfSeshiroTriggeredAbility(effect)); } public SosukeSonOfSeshiro(final SosukeSonOfSeshiro card) { @@ -91,8 +93,8 @@ public class SosukeSonOfSeshiro extends CardImpl { class SosukeSonOfSeshiroTriggeredAbility extends TriggeredAbilityImpl { - SosukeSonOfSeshiroTriggeredAbility() { - super(Zone.BATTLEFIELD, new SosukeSonOfSeshiroEffect()); + SosukeSonOfSeshiroTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect); } SosukeSonOfSeshiroTriggeredAbility(final SosukeSonOfSeshiroTriggeredAbility ability) { @@ -128,35 +130,3 @@ class SosukeSonOfSeshiroTriggeredAbility extends TriggeredAbilityImpl { return "Whenever a Warrior you control deals combat damage to a creature, destroy that creature at end of combat."; } } - -class SosukeSonOfSeshiroEffect extends OneShotEffect { - - SosukeSonOfSeshiroEffect() { - super(Outcome.DestroyPermanent); - staticText = "destroy that creature at end of combat"; - } - - SosukeSonOfSeshiroEffect(final SosukeSonOfSeshiroEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - if (targetCreature != null) { - AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId())); - game.addDelayedTriggeredAbility(delayedAbility); - return true; - } - return false; - } - - @Override - public SosukeSonOfSeshiroEffect copy() { - return new SosukeSonOfSeshiroEffect(this); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/YamabushisStorm.java b/Mage.Sets/src/mage/sets/championsofkamigawa/YamabushisStorm.java index 9ec4a27bccf..ad1ceef375e 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/YamabushisStorm.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/YamabushisStorm.java @@ -77,45 +77,3 @@ public class YamabushisStorm extends CardImpl { } } - -class YamabushisStormEffect extends ReplacementEffectImpl { - - public YamabushisStormEffect() { - super(Duration.EndOfTurn, Outcome.Exile); - staticText = "If a creature dealt damage this way would die this turn, exile it instead"; - } - - public YamabushisStormEffect(final YamabushisStormEffect effect) { - super(effect); - } - - @Override - public YamabushisStormEffect copy() { - return new YamabushisStormEffect(this); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent permanent = ((ZoneChangeEvent) event).getTarget(); - if (controller != null && permanent != null) { - return controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true); - } - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.ZONE_CHANGE; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (((ZoneChangeEvent) event).isDiesEvent()) { - DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId()); - return watcher != null && watcher.wasDamaged(event.getTargetId(), game); - } - return false; - } - -} diff --git a/Mage.Sets/src/mage/sets/champs/BloodKnight.java b/Mage.Sets/src/mage/sets/champs/BloodKnight.java new file mode 100644 index 00000000000..909516dffbf --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/BloodKnight.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BloodKnight extends mage.sets.planarchaos.BloodKnight { + + public BloodKnight(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public BloodKnight(final BloodKnight card) { + super(card); + } + + @Override + public BloodKnight copy() { + return new BloodKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/BramblewoodParagon.java b/Mage.Sets/src/mage/sets/champs/BramblewoodParagon.java new file mode 100644 index 00000000000..a5a125c1ff2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/BramblewoodParagon.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BramblewoodParagon extends mage.sets.morningtide.BramblewoodParagon { + + public BramblewoodParagon(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public BramblewoodParagon(final BramblewoodParagon card) { + super(card); + } + + @Override + public BramblewoodParagon copy() { + return new BramblewoodParagon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/DoranTheSiegeTower.java b/Mage.Sets/src/mage/sets/champs/DoranTheSiegeTower.java new file mode 100644 index 00000000000..067a5a09084 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/DoranTheSiegeTower.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DoranTheSiegeTower extends mage.sets.lorwyn.DoranTheSiegeTower { + + public DoranTheSiegeTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public DoranTheSiegeTower(final DoranTheSiegeTower card) { + super(card); + } + + @Override + public DoranTheSiegeTower copy() { + return new DoranTheSiegeTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/Electrolyze.java b/Mage.Sets/src/mage/sets/champs/Electrolyze.java new file mode 100644 index 00000000000..1605d10725c --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/Electrolyze.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Electrolyze extends mage.sets.guildpact.Electrolyze { + + public Electrolyze(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public Electrolyze(final Electrolyze card) { + super(card); + } + + @Override + public Electrolyze copy() { + return new Electrolyze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/Groundbreaker.java b/Mage.Sets/src/mage/sets/champs/Groundbreaker.java new file mode 100644 index 00000000000..4959f52104b --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/Groundbreaker.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Groundbreaker extends mage.sets.planarchaos.Groundbreaker { + + public Groundbreaker(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public Groundbreaker(final Groundbreaker card) { + super(card); + } + + @Override + public Groundbreaker copy() { + return new Groundbreaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/ImperiousPerfect.java b/Mage.Sets/src/mage/sets/champs/ImperiousPerfect.java new file mode 100644 index 00000000000..a1a465c2d85 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/ImperiousPerfect.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ImperiousPerfect extends mage.sets.lorwyn.ImperiousPerfect { + + public ImperiousPerfect(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public ImperiousPerfect(final ImperiousPerfect card) { + super(card); + } + + @Override + public ImperiousPerfect copy() { + return new ImperiousPerfect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/Mutavault.java b/Mage.Sets/src/mage/sets/champs/Mutavault.java new file mode 100644 index 00000000000..bac75c2f32e --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/Mutavault.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Mutavault extends mage.sets.morningtide.Mutavault { + + public Mutavault(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public Mutavault(final Mutavault card) { + super(card); + } + + @Override + public Mutavault copy() { + return new Mutavault(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/NivMizzetTheFiremind.java b/Mage.Sets/src/mage/sets/champs/NivMizzetTheFiremind.java new file mode 100644 index 00000000000..922c4da0679 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/NivMizzetTheFiremind.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class NivMizzetTheFiremind extends mage.sets.guildpact.NivMizzetTheFiremind { + + public NivMizzetTheFiremind(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public NivMizzetTheFiremind(final NivMizzetTheFiremind card) { + super(card); + } + + @Override + public NivMizzetTheFiremind copy() { + return new NivMizzetTheFiremind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/RakdosGuildmage.java b/Mage.Sets/src/mage/sets/champs/RakdosGuildmage.java new file mode 100644 index 00000000000..548df18fef9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/RakdosGuildmage.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class RakdosGuildmage extends mage.sets.dissension.RakdosGuildmage { + + public RakdosGuildmage(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public RakdosGuildmage(final RakdosGuildmage card) { + super(card); + } + + @Override + public RakdosGuildmage copy() { + return new RakdosGuildmage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/SerraAvenger.java b/Mage.Sets/src/mage/sets/champs/SerraAvenger.java new file mode 100644 index 00000000000..e7cd605e2e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/SerraAvenger.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SerraAvenger extends mage.sets.timespiral.SerraAvenger { + + public SerraAvenger(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public SerraAvenger(final SerraAvenger card) { + super(card); + } + + @Override + public SerraAvenger copy() { + return new SerraAvenger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/UrzasFactory.java b/Mage.Sets/src/mage/sets/champs/UrzasFactory.java new file mode 100644 index 00000000000..25ac014e1f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/UrzasFactory.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class UrzasFactory extends mage.sets.timespiral.UrzasFactory { + + public UrzasFactory(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public UrzasFactory(final UrzasFactory card) { + super(card); + } + + @Override + public UrzasFactory copy() { + return new UrzasFactory(this); + } +} diff --git a/Mage.Sets/src/mage/sets/champs/Voidslime.java b/Mage.Sets/src/mage/sets/champs/Voidslime.java new file mode 100644 index 00000000000..951b2ababa9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/champs/Voidslime.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.champs; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Voidslime extends mage.sets.dissension.Voidslime { + + public Voidslime(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "CP"; + this.rarity = Rarity.SPECIAL; + } + + public Voidslime(final Voidslime card) { + super(card); + } + + @Override + public Voidslime copy() { + return new Voidslime(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/ActiveVolcano.java b/Mage.Sets/src/mage/sets/chronicles/ActiveVolcano.java new file mode 100644 index 00000000000..609dc9bf888 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/ActiveVolcano.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ActiveVolcano extends mage.sets.legends.ActiveVolcano { + + public ActiveVolcano(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "CHR"; + } + + public ActiveVolcano(final ActiveVolcano card) { + super(card); + } + + @Override + public ActiveVolcano copy() { + return new ActiveVolcano(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/AkronLegionnaire.java b/Mage.Sets/src/mage/sets/chronicles/AkronLegionnaire.java new file mode 100644 index 00000000000..fa86851783d --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/AkronLegionnaire.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class AkronLegionnaire extends mage.sets.legends.AkronLegionnaire { + + public AkronLegionnaire(UUID ownerId) { + super(ownerId); + this.cardNumber = 58; + this.expansionSetCode = "CHR"; + } + + public AkronLegionnaire(final AkronLegionnaire card) { + super(card); + } + + @Override + public AkronLegionnaire copy() { + return new AkronLegionnaire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Aladdin.java b/Mage.Sets/src/mage/sets/chronicles/Aladdin.java new file mode 100644 index 00000000000..fc6e364fec4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Aladdin.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class Aladdin extends mage.sets.masterseditioniv.Aladdin { + + public Aladdin(UUID ownerId) { + super(ownerId); + this.cardNumber = 44; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.RARE; // U1 + } + + public Aladdin(final Aladdin card) { + super(card); + } + + @Override + public Aladdin copy() { + return new Aladdin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/ArcadesSabboth.java b/Mage.Sets/src/mage/sets/chronicles/ArcadesSabboth.java new file mode 100644 index 00000000000..8da622b1bac --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/ArcadesSabboth.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ArcadesSabboth extends mage.sets.masterseditioniii.ArcadesSabboth { + + public ArcadesSabboth(UUID ownerId) { + super(ownerId); + this.cardNumber = 106; + this.expansionSetCode = "CHR"; + } + + public ArcadesSabboth(final ArcadesSabboth card) { + super(card); + } + + @Override + public ArcadesSabboth copy() { + return new ArcadesSabboth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/ArenaOfTheAncients.java b/Mage.Sets/src/mage/sets/chronicles/ArenaOfTheAncients.java new file mode 100644 index 00000000000..949c905e289 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/ArenaOfTheAncients.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ArenaOfTheAncients extends mage.sets.legends.ArenaOfTheAncients { + + public ArenaOfTheAncients(UUID ownerId) { + super(ownerId); + this.cardNumber = 71; + this.expansionSetCode = "CHR"; + } + + public ArenaOfTheAncients(final ArenaOfTheAncients card) { + super(card); + } + + @Override + public ArenaOfTheAncients copy() { + return new ArenaOfTheAncients(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/AshnodsAltar.java b/Mage.Sets/src/mage/sets/chronicles/AshnodsAltar.java new file mode 100644 index 00000000000..35e6c8a928e --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/AshnodsAltar.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class AshnodsAltar extends mage.sets.fifthedition.AshnodsAltar { + + public AshnodsAltar(UUID ownerId) { + super(ownerId); + this.cardNumber = 72; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.COMMON; + } + + public AshnodsAltar(final AshnodsAltar card) { + super(card); + } + + @Override + public AshnodsAltar copy() { + return new AshnodsAltar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/AshnodsTransmogrant.java b/Mage.Sets/src/mage/sets/chronicles/AshnodsTransmogrant.java new file mode 100644 index 00000000000..82f86a2c7e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/AshnodsTransmogrant.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class AshnodsTransmogrant extends mage.sets.fifthedition.AshnodsTransmogrant { + + public AshnodsTransmogrant(UUID ownerId) { + super(ownerId); + this.cardNumber = 73; + this.expansionSetCode = "CHR"; + } + + public AshnodsTransmogrant(final AshnodsTransmogrant card) { + super(card); + } + + @Override + public AshnodsTransmogrant copy() { + return new AshnodsTransmogrant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/AzureDrake.java b/Mage.Sets/src/mage/sets/chronicles/AzureDrake.java new file mode 100644 index 00000000000..f101b17327b --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/AzureDrake.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class AzureDrake extends mage.sets.magic2011.AzureDrake { + + public AzureDrake(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public AzureDrake(final AzureDrake card) { + super(card); + } + + @Override + public AzureDrake copy() { + return new AzureDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/BarlsCage.java b/Mage.Sets/src/mage/sets/chronicles/BarlsCage.java new file mode 100644 index 00000000000..ce0b7e01fb8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/BarlsCage.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class BarlsCage extends mage.sets.thedark.BarlsCage { + + public BarlsCage(UUID ownerId) { + super(ownerId); + this.cardNumber = 74; + this.expansionSetCode = "CHR"; + } + + public BarlsCage(final BarlsCage card) { + super(card); + } + + @Override + public BarlsCage copy() { + return new BarlsCage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/BloodMoon.java b/Mage.Sets/src/mage/sets/chronicles/BloodMoon.java new file mode 100644 index 00000000000..5d9ec363d5c --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/BloodMoon.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class BloodMoon extends mage.sets.ninthedition.BloodMoon { + + public BloodMoon(UUID ownerId) { + super(ownerId); + this.cardNumber = 46; + this.expansionSetCode = "CHR"; + } + + public BloodMoon(final BloodMoon card) { + super(card); + } + + @Override + public BloodMoon copy() { + return new BloodMoon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/BogRats.java b/Mage.Sets/src/mage/sets/chronicles/BogRats.java new file mode 100644 index 00000000000..43bdee011ee --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/BogRats.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class BogRats extends mage.sets.thedark.BogRats { + + public BogRats(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "CHR"; + } + + public BogRats(final BogRats card) { + super(card); + } + + @Override + public BogRats copy() { + return new BogRats(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/BookOfRass.java b/Mage.Sets/src/mage/sets/chronicles/BookOfRass.java new file mode 100644 index 00000000000..0619b5de2bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/BookOfRass.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class BookOfRass extends mage.sets.thedark.BookOfRass { + + public BookOfRass(UUID ownerId) { + super(ownerId); + this.cardNumber = 75; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.RARE; + } + + public BookOfRass(final BookOfRass card) { + super(card); + } + + @Override + public BookOfRass copy() { + return new BookOfRass(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Boomerang.java b/Mage.Sets/src/mage/sets/chronicles/Boomerang.java new file mode 100644 index 00000000000..fcbcab9d347 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Boomerang.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Boomerang extends mage.sets.tenthedition.Boomerang { + + public Boomerang(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "CHR"; + } + + public Boomerang(final Boomerang card) { + super(card); + } + + @Override + public Boomerang copy() { + return new Boomerang(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/CatWarriors.java b/Mage.Sets/src/mage/sets/chronicles/CatWarriors.java new file mode 100644 index 00000000000..c72a5f8e779 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/CatWarriors.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class CatWarriors extends mage.sets.fifthedition.CatWarriors { + + public CatWarriors(UUID ownerId) { + super(ownerId); + this.cardNumber = 30; + this.expansionSetCode = "CHR"; + } + + public CatWarriors(final CatWarriors card) { + super(card); + } + + @Override + public CatWarriors copy() { + return new CatWarriors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Chromium.java b/Mage.Sets/src/mage/sets/chronicles/Chromium.java new file mode 100644 index 00000000000..d537746a3a3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Chromium.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Chromium extends mage.sets.masterseditioniii.Chromium { + + public Chromium(UUID ownerId) { + super(ownerId); + this.cardNumber = 109; + this.expansionSetCode = "CHR"; + } + + public Chromium(final Chromium card) { + super(card); + } + + @Override + public Chromium copy() { + return new Chromium(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/CityOfBrass.java b/Mage.Sets/src/mage/sets/chronicles/CityOfBrass.java new file mode 100644 index 00000000000..734a42b855c --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/CityOfBrass.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class CityOfBrass extends mage.sets.seventhedition.CityOfBrass { + + public CityOfBrass(UUID ownerId) { + super(ownerId); + this.cardNumber = 92; + this.expansionSetCode = "CHR"; + } + + public CityOfBrass(final CityOfBrass card) { + super(card); + } + + @Override + public CityOfBrass copy() { + return new CityOfBrass(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/ConcordantCrossroads.java b/Mage.Sets/src/mage/sets/chronicles/ConcordantCrossroads.java new file mode 100644 index 00000000000..3115c10a6ce --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/ConcordantCrossroads.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ConcordantCrossroads extends mage.sets.masterseditioniii.ConcordantCrossroads { + + public ConcordantCrossroads(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "CHR"; + } + + public ConcordantCrossroads(final ConcordantCrossroads card) { + super(card); + } + + @Override + public ConcordantCrossroads copy() { + return new ConcordantCrossroads(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/CrawGiant.java b/Mage.Sets/src/mage/sets/chronicles/CrawGiant.java new file mode 100644 index 00000000000..11cb2e90afa --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/CrawGiant.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class CrawGiant extends mage.sets.legends.CrawGiant { + + public CrawGiant(UUID ownerId) { + super(ownerId); + this.cardNumber = 33; + this.expansionSetCode = "CHR"; + } + + public CrawGiant(final CrawGiant card) { + super(card); + } + + @Override + public CrawGiant copy() { + return new CrawGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/CuombajjWitches.java b/Mage.Sets/src/mage/sets/chronicles/CuombajjWitches.java new file mode 100644 index 00000000000..dea6e097dff --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/CuombajjWitches.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class CuombajjWitches extends mage.sets.mastersedition.CuombajjWitches { + + public CuombajjWitches(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "CHR"; + } + + public CuombajjWitches(final CuombajjWitches card) { + super(card); + } + + @Override + public CuombajjWitches copy() { + return new CuombajjWitches(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/DAvenantArcher.java b/Mage.Sets/src/mage/sets/chronicles/DAvenantArcher.java new file mode 100644 index 00000000000..c730cf781a9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/DAvenantArcher.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class DAvenantArcher extends mage.sets.fifthedition.DAvenantArcher { + + public DAvenantArcher(UUID ownerId) { + super(ownerId); + this.cardNumber = 61; + this.expansionSetCode = "CHR"; + } + + public DAvenantArcher(final DAvenantArcher card) { + super(card); + } + + @Override + public DAvenantArcher copy() { + return new DAvenantArcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/DakkonBlackblade.java b/Mage.Sets/src/mage/sets/chronicles/DakkonBlackblade.java new file mode 100644 index 00000000000..c2e877d05de --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/DakkonBlackblade.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class DakkonBlackblade extends mage.sets.legends.DakkonBlackblade { + + public DakkonBlackblade(UUID ownerId) { + super(ownerId); + this.cardNumber = 110; + this.expansionSetCode = "CHR"; + } + + public DakkonBlackblade(final DakkonBlackblade card) { + super(card); + } + + @Override + public DakkonBlackblade copy() { + return new DakkonBlackblade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/DanceOfMany.java b/Mage.Sets/src/mage/sets/chronicles/DanceOfMany.java new file mode 100644 index 00000000000..70efd0bc8f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/DanceOfMany.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class DanceOfMany extends mage.sets.thedark.DanceOfMany { + + public DanceOfMany(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "CHR"; + } + + public DanceOfMany(final DanceOfMany card) { + super(card); + } + + @Override + public DanceOfMany copy() { + return new DanceOfMany(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Dandan.java b/Mage.Sets/src/mage/sets/chronicles/Dandan.java new file mode 100644 index 00000000000..3c00a357d01 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Dandan.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Dandan extends mage.sets.fifthedition.Dandan { + + public Dandan(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "CHR"; + } + + public Dandan(final Dandan card) { + super(card); + } + + @Override + public Dandan copy() { + return new Dandan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/DivineOffering.java b/Mage.Sets/src/mage/sets/chronicles/DivineOffering.java new file mode 100644 index 00000000000..3875e9ed8a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/DivineOffering.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class DivineOffering extends mage.sets.mirrodinbesieged.DivineOffering { + + public DivineOffering(UUID ownerId) { + super(ownerId); + this.cardNumber = 62; + this.expansionSetCode = "CHR"; + } + + public DivineOffering(final DivineOffering card) { + super(card); + } + + @Override + public DivineOffering copy() { + return new DivineOffering(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/ErhnamDjinn.java b/Mage.Sets/src/mage/sets/chronicles/ErhnamDjinn.java new file mode 100644 index 00000000000..f7504e6689f --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/ErhnamDjinn.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class ErhnamDjinn extends mage.sets.judgment.ErhnamDjinn { + + public ErhnamDjinn(UUID ownerId) { + super(ownerId); + this.cardNumber = 36; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public ErhnamDjinn(final ErhnamDjinn card) { + super(card); + } + + @Override + public ErhnamDjinn copy() { + return new ErhnamDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/FallenAngel.java b/Mage.Sets/src/mage/sets/chronicles/FallenAngel.java new file mode 100644 index 00000000000..3399b9f7b4b --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/FallenAngel.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class FallenAngel extends mage.sets.seventhedition.FallenAngel { + + public FallenAngel(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public FallenAngel(final FallenAngel card) { + super(card); + } + + @Override + public FallenAngel copy() { + return new FallenAngel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/FeldonsCane.java b/Mage.Sets/src/mage/sets/chronicles/FeldonsCane.java new file mode 100644 index 00000000000..652f6cb1251 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/FeldonsCane.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class FeldonsCane extends mage.sets.timeshifted.FeldonsCane { + + public FeldonsCane(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.COMMON; + } + + public FeldonsCane(final FeldonsCane card) { + super(card); + } + + @Override + public FeldonsCane copy() { + return new FeldonsCane(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/FireDrake.java b/Mage.Sets/src/mage/sets/chronicles/FireDrake.java new file mode 100644 index 00000000000..495eed1b302 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/FireDrake.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class FireDrake extends mage.sets.fifthedition.FireDrake { + + public FireDrake(UUID ownerId) { + super(ownerId); + this.cardNumber = 47; + this.expansionSetCode = "CHR"; + } + + public FireDrake(final FireDrake card) { + super(card); + } + + @Override + public FireDrake copy() { + return new FireDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/FlashFlood.java b/Mage.Sets/src/mage/sets/chronicles/FlashFlood.java new file mode 100644 index 00000000000..42961156fa0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/FlashFlood.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class FlashFlood extends mage.sets.legends.FlashFlood { + + public FlashFlood(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "CHR"; + } + + public FlashFlood(final FlashFlood card) { + super(card); + } + + @Override + public FlashFlood copy() { + return new FlashFlood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/FountainOfYouth.java b/Mage.Sets/src/mage/sets/chronicles/FountainOfYouth.java new file mode 100644 index 00000000000..c1bcf6311d9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/FountainOfYouth.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class FountainOfYouth extends mage.sets.tenthedition.FountainOfYouth { + + public FountainOfYouth(UUID ownerId) { + super(ownerId); + this.cardNumber = 78; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.COMMON; + } + + public FountainOfYouth(final FountainOfYouth card) { + super(card); + } + + @Override + public FountainOfYouth copy() { + return new FountainOfYouth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/GoblinDiggingTeam.java b/Mage.Sets/src/mage/sets/chronicles/GoblinDiggingTeam.java new file mode 100644 index 00000000000..2e9152c2ef6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/GoblinDiggingTeam.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class GoblinDiggingTeam extends mage.sets.thedark.GoblinDiggingTeam { + + public GoblinDiggingTeam(UUID ownerId) { + super(ownerId); + this.cardNumber = 49; + this.expansionSetCode = "CHR"; + } + + public GoblinDiggingTeam(final GoblinDiggingTeam card) { + super(card); + } + + @Override + public GoblinDiggingTeam copy() { + return new GoblinDiggingTeam(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/GoblinsOfTheFlarg.java b/Mage.Sets/src/mage/sets/chronicles/GoblinsOfTheFlarg.java new file mode 100644 index 00000000000..fbe8a0072c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/GoblinsOfTheFlarg.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class GoblinsOfTheFlarg extends mage.sets.thedark.GoblinsOfTheFlarg { + + public GoblinsOfTheFlarg(UUID ownerId) { + super(ownerId); + this.cardNumber = 51; + this.expansionSetCode = "CHR"; + } + + public GoblinsOfTheFlarg(final GoblinsOfTheFlarg card) { + super(card); + } + + @Override + public GoblinsOfTheFlarg copy() { + return new GoblinsOfTheFlarg(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/HasranOgress.java b/Mage.Sets/src/mage/sets/chronicles/HasranOgress.java new file mode 100644 index 00000000000..6071dbb25af --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/HasranOgress.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class HasranOgress extends mage.sets.masterseditioniv.HasranOgress { + + public HasranOgress(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "CHR"; + } + + public HasranOgress(final HasranOgress card) { + super(card); + } + + @Override + public HasranOgress copy() { + return new HasranOgress(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/HellsCaretaker.java b/Mage.Sets/src/mage/sets/chronicles/HellsCaretaker.java new file mode 100644 index 00000000000..a067672e161 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/HellsCaretaker.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class HellsCaretaker extends mage.sets.ninthedition.HellsCaretaker { + + public HellsCaretaker(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "CHR"; + } + + public HellsCaretaker(final HellsCaretaker card) { + super(card); + } + + @Override + public HellsCaretaker copy() { + return new HellsCaretaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/HornOfDeafening.java b/Mage.Sets/src/mage/sets/chronicles/HornOfDeafening.java new file mode 100644 index 00000000000..cbd9780da1a --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/HornOfDeafening.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class HornOfDeafening extends mage.sets.legends.HornOfDeafening { + + public HornOfDeafening(UUID ownerId) { + super(ownerId); + this.cardNumber = 80; + this.expansionSetCode = "CHR"; + } + + public HornOfDeafening(final HornOfDeafening card) { + super(card); + } + + @Override + public HornOfDeafening copy() { + return new HornOfDeafening(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/IvoryGuardians.java b/Mage.Sets/src/mage/sets/chronicles/IvoryGuardians.java new file mode 100644 index 00000000000..2819a071d27 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/IvoryGuardians.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class IvoryGuardians extends mage.sets.legends.IvoryGuardians { + + public IvoryGuardians(UUID ownerId) { + super(ownerId); + this.cardNumber = 64; + this.expansionSetCode = "CHR"; + } + + public IvoryGuardians(final IvoryGuardians card) { + super(card); + } + + @Override + public IvoryGuardians copy() { + return new IvoryGuardians(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/JalumTome.java b/Mage.Sets/src/mage/sets/chronicles/JalumTome.java new file mode 100644 index 00000000000..baf68f49246 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/JalumTome.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class JalumTome extends mage.sets.seventhedition.JalumTome { + + public JalumTome(UUID ownerId) { + super(ownerId); + this.cardNumber = 81; + this.expansionSetCode = "CHR"; + } + + public JalumTome(final JalumTome card) { + super(card); + } + + @Override + public JalumTome copy() { + return new JalumTome(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Juxtapose.java b/Mage.Sets/src/mage/sets/chronicles/Juxtapose.java new file mode 100644 index 00000000000..78d68a0e715 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Juxtapose.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Juxtapose extends mage.sets.fifthedition.Juxtapose { + + public Juxtapose(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "CHR"; + } + + public Juxtapose(final Juxtapose card) { + super(card); + } + + @Override + public Juxtapose copy() { + return new Juxtapose(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/KeepersOfTheFaith.java b/Mage.Sets/src/mage/sets/chronicles/KeepersOfTheFaith.java new file mode 100644 index 00000000000..2ab714d0f34 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/KeepersOfTheFaith.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class KeepersOfTheFaith extends mage.sets.legends.KeepersOfTheFaith { + + public KeepersOfTheFaith(UUID ownerId) { + super(ownerId); + this.cardNumber = 65; + this.expansionSetCode = "CHR"; + } + + public KeepersOfTheFaith(final KeepersOfTheFaith card) { + super(card); + } + + @Override + public KeepersOfTheFaith copy() { + return new KeepersOfTheFaith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/KeiTakahashi.java b/Mage.Sets/src/mage/sets/chronicles/KeiTakahashi.java new file mode 100644 index 00000000000..2f6f3960acb --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/KeiTakahashi.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class KeiTakahashi extends mage.sets.masterseditioniii.KeiTakahashi { + + public KeiTakahashi(UUID ownerId) { + super(ownerId); + this.cardNumber = 113; + this.expansionSetCode = "CHR"; + } + + public KeiTakahashi(final KeiTakahashi card) { + super(card); + } + + @Override + public KeiTakahashi copy() { + return new KeiTakahashi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/MarhaultElsdragon.java b/Mage.Sets/src/mage/sets/chronicles/MarhaultElsdragon.java new file mode 100644 index 00000000000..8e8e8cc446f --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/MarhaultElsdragon.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class MarhaultElsdragon extends mage.sets.legends.MarhaultElsdragon { + + public MarhaultElsdragon(UUID ownerId) { + super(ownerId); + this.cardNumber = 114; + this.expansionSetCode = "CHR"; + } + + public MarhaultElsdragon(final MarhaultElsdragon card) { + super(card); + } + + @Override + public MarhaultElsdragon copy() { + return new MarhaultElsdragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/MountainYeti.java b/Mage.Sets/src/mage/sets/chronicles/MountainYeti.java new file mode 100644 index 00000000000..ccac499bab6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/MountainYeti.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class MountainYeti extends mage.sets.legends.MountainYeti { + + public MountainYeti(UUID ownerId) { + super(ownerId); + this.cardNumber = 53; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.COMMON; + } + + public MountainYeti(final MountainYeti card) { + super(card); + } + + @Override + public MountainYeti copy() { + return new MountainYeti(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/NicolBolas.java b/Mage.Sets/src/mage/sets/chronicles/NicolBolas.java new file mode 100644 index 00000000000..f22cb409534 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/NicolBolas.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class NicolBolas extends mage.sets.legends.NicolBolas { + + public NicolBolas(UUID ownerId) { + super(ownerId); + this.cardNumber = 116; + this.expansionSetCode = "CHR"; + } + + public NicolBolas(final NicolBolas card) { + super(card); + } + + @Override + public NicolBolas copy() { + return new NicolBolas(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/PalladiaMors.java b/Mage.Sets/src/mage/sets/chronicles/PalladiaMors.java new file mode 100644 index 00000000000..9557eb555d1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/PalladiaMors.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class PalladiaMors extends mage.sets.masterseditioniii.PalladiaMors { + + public PalladiaMors(UUID ownerId) { + super(ownerId); + this.cardNumber = 117; + this.expansionSetCode = "CHR"; + } + + public PalladiaMors(final PalladiaMors card) { + super(card); + } + + @Override + public PalladiaMors copy() { + return new PalladiaMors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Recall.java b/Mage.Sets/src/mage/sets/chronicles/Recall.java new file mode 100644 index 00000000000..796d838744b --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Recall.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class Recall extends mage.sets.fifthedition.Recall { + + public Recall(UUID ownerId) { + super(ownerId); + this.cardNumber = 24; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public Recall(final Recall card) { + super(card); + } + + @Override + public Recall copy() { + return new Recall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/RemoveSoul.java b/Mage.Sets/src/mage/sets/chronicles/RemoveSoul.java new file mode 100644 index 00000000000..2b747e9bd1d --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/RemoveSoul.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class RemoveSoul extends mage.sets.tenthedition.RemoveSoul { + + public RemoveSoul(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "CHR"; + } + + public RemoveSoul(final RemoveSoul card) { + super(card); + } + + @Override + public RemoveSoul copy() { + return new RemoveSoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/RepentantBlacksmith.java b/Mage.Sets/src/mage/sets/chronicles/RepentantBlacksmith.java new file mode 100644 index 00000000000..8b2c4969154 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/RepentantBlacksmith.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class RepentantBlacksmith extends mage.sets.fifthedition.RepentantBlacksmith { + + public RepentantBlacksmith(UUID ownerId) { + super(ownerId); + this.cardNumber = 67; + this.expansionSetCode = "CHR"; + } + + public RepentantBlacksmith(final RepentantBlacksmith card) { + super(card); + } + + @Override + public RepentantBlacksmith copy() { + return new RepentantBlacksmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Revelation.java b/Mage.Sets/src/mage/sets/chronicles/Revelation.java new file mode 100644 index 00000000000..4da02eed941 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Revelation.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Revelation extends mage.sets.legends.Revelation { + + public Revelation(UUID ownerId) { + super(ownerId); + this.cardNumber = 87; + this.expansionSetCode = "CHR"; + } + + public Revelation(final Revelation card) { + super(card); + } + + @Override + public Revelation copy() { + return new Revelation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/RubiniaSoulsinger.java b/Mage.Sets/src/mage/sets/chronicles/RubiniaSoulsinger.java new file mode 100644 index 00000000000..09bfe646c1e --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/RubiniaSoulsinger.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class RubiniaSoulsinger extends mage.sets.commander2013.RubiniaSoulsinger { + + public RubiniaSoulsinger(UUID ownerId) { + super(ownerId); + this.cardNumber = 118; + this.expansionSetCode = "CHR"; + } + + public RubiniaSoulsinger(final RubiniaSoulsinger card) { + super(card); + } + + @Override + public RubiniaSoulsinger copy() { + return new RubiniaSoulsinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/SafeHaven.java b/Mage.Sets/src/mage/sets/chronicles/SafeHaven.java new file mode 100644 index 00000000000..e46fba9d594 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/SafeHaven.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SafeHaven extends mage.sets.thedark.SafeHaven { + + public SafeHaven(UUID ownerId) { + super(ownerId); + this.cardNumber = 93; + this.expansionSetCode = "CHR"; + } + + public SafeHaven(final SafeHaven card) { + super(card); + } + + @Override + public SafeHaven copy() { + return new SafeHaven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/ScavengerFolk.java b/Mage.Sets/src/mage/sets/chronicles/ScavengerFolk.java new file mode 100644 index 00000000000..5949e815c89 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/ScavengerFolk.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ScavengerFolk extends mage.sets.fifthedition.ScavengerFolk { + + public ScavengerFolk(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "CHR"; + } + + public ScavengerFolk(final ScavengerFolk card) { + super(card); + } + + @Override + public ScavengerFolk copy() { + return new ScavengerFolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Sentinel.java b/Mage.Sets/src/mage/sets/chronicles/Sentinel.java new file mode 100644 index 00000000000..f0804924335 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Sentinel.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Sentinel extends mage.sets.legends.Sentinel { + + public Sentinel(UUID ownerId) { + super(ownerId); + this.cardNumber = 281; + this.expansionSetCode = "CHR"; + } + + public Sentinel(final Sentinel card) { + super(card); + } + + @Override + public Sentinel copy() { + return new Sentinel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/ShieldWall.java b/Mage.Sets/src/mage/sets/chronicles/ShieldWall.java new file mode 100644 index 00000000000..5c3fb0ba3a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/ShieldWall.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ShieldWall extends mage.sets.legends.ShieldWall { + + public ShieldWall(UUID ownerId) { + super(ownerId); + this.cardNumber = 68; + this.expansionSetCode = "CHR"; + } + + public ShieldWall(final ShieldWall card) { + super(card); + } + + @Override + public ShieldWall copy() { + return new ShieldWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/SivitriScarzam.java b/Mage.Sets/src/mage/sets/chronicles/SivitriScarzam.java new file mode 100644 index 00000000000..def65aa7fc1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/SivitriScarzam.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SivitriScarzam extends mage.sets.legends.SivitriScarzam { + + public SivitriScarzam(UUID ownerId) { + super(ownerId); + this.cardNumber = 119; + this.expansionSetCode = "CHR"; + } + + public SivitriScarzam(final SivitriScarzam card) { + super(card); + } + + @Override + public SivitriScarzam copy() { + return new SivitriScarzam(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/SolkanarTheSwampKing.java b/Mage.Sets/src/mage/sets/chronicles/SolkanarTheSwampKing.java new file mode 100644 index 00000000000..99081a82801 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/SolkanarTheSwampKing.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class SolkanarTheSwampKing extends mage.sets.timeshifted.SolkanarTheSwampKing { + + public SolkanarTheSwampKing(UUID ownerId) { + super(ownerId); + this.cardNumber = 120; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.RARE; + } + + public SolkanarTheSwampKing(final SolkanarTheSwampKing card) { + super(card); + } + + @Override + public SolkanarTheSwampKing copy() { + return new SolkanarTheSwampKing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/StormSeeker.java b/Mage.Sets/src/mage/sets/chronicles/StormSeeker.java new file mode 100644 index 00000000000..8d0515a2542 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/StormSeeker.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class StormSeeker extends mage.sets.mastersedition.StormSeeker { + + public StormSeeker(UUID ownerId) { + super(ownerId); + this.cardNumber = 42; + this.expansionSetCode = "CHR"; + } + + public StormSeeker(final StormSeeker card) { + super(card); + } + + @Override + public StormSeeker copy() { + return new StormSeeker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/TheWretched.java b/Mage.Sets/src/mage/sets/chronicles/TheWretched.java new file mode 100644 index 00000000000..1b2326ce759 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/TheWretched.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class TheWretched extends mage.sets.fifthedition.TheWretched { + + public TheWretched(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "CHR"; + } + + public TheWretched(final TheWretched card) { + super(card); + } + + @Override + public TheWretched copy() { + return new TheWretched(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/TobiasAndrion.java b/Mage.Sets/src/mage/sets/chronicles/TobiasAndrion.java new file mode 100644 index 00000000000..0ab33718406 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/TobiasAndrion.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class TobiasAndrion extends mage.sets.legends.TobiasAndrion { + + public TobiasAndrion(UUID ownerId) { + super(ownerId); + this.cardNumber = 122; + this.expansionSetCode = "CHR"; + } + + public TobiasAndrion(final TobiasAndrion card) { + super(card); + } + + @Override + public TobiasAndrion copy() { + return new TobiasAndrion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/TorWauki.java b/Mage.Sets/src/mage/sets/chronicles/TorWauki.java new file mode 100644 index 00000000000..4bc994b5666 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/TorWauki.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class TorWauki extends mage.sets.legends.TorWauki { + + public TorWauki(UUID ownerId) { + super(ownerId); + this.cardNumber = 123; + this.expansionSetCode = "CHR"; + } + + public TorWauki(final TorWauki card) { + super(card); + } + + @Override + public TorWauki copy() { + return new TorWauki(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/TormodsCrypt.java b/Mage.Sets/src/mage/sets/chronicles/TormodsCrypt.java new file mode 100644 index 00000000000..a6d5dc22cff --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/TormodsCrypt.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class TormodsCrypt extends mage.sets.timeshifted.TormodsCrypt { + + public TormodsCrypt(UUID ownerId) { + super(ownerId); + this.cardNumber = 89; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.COMMON; + } + + public TormodsCrypt(final TormodsCrypt card) { + super(card); + } + + @Override + public TormodsCrypt copy() { + return new TormodsCrypt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/Transmutation.java b/Mage.Sets/src/mage/sets/chronicles/Transmutation.java new file mode 100644 index 00000000000..a111c343cbe --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/Transmutation.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Transmutation extends mage.sets.legends.Transmutation { + + public Transmutation(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "CHR"; + } + + public Transmutation(final Transmutation card) { + super(card); + } + + @Override + public Transmutation copy() { + return new Transmutation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/TriassicEgg.java b/Mage.Sets/src/mage/sets/chronicles/TriassicEgg.java new file mode 100644 index 00000000000..c847ab3d56e --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/TriassicEgg.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class TriassicEgg extends mage.sets.legends.TriassicEgg { + + public TriassicEgg(UUID ownerId) { + super(ownerId); + this.cardNumber = 90; + this.expansionSetCode = "CHR"; + } + + public TriassicEgg(final TriassicEgg card) { + super(card); + } + + @Override + public TriassicEgg copy() { + return new TriassicEgg(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/UrzasMine.java b/Mage.Sets/src/mage/sets/chronicles/UrzasMine.java new file mode 100644 index 00000000000..f72d01b125e --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/UrzasMine.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class UrzasMine extends mage.sets.fifthedition.UrzasMine { + + public UrzasMine(UUID ownerId) { + super(ownerId); + this.cardNumber = 94; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public UrzasMine(final UrzasMine card) { + super(card); + } + + @Override + public UrzasMine copy() { + return new UrzasMine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/UrzasPowerPlant.java b/Mage.Sets/src/mage/sets/chronicles/UrzasPowerPlant.java new file mode 100644 index 00000000000..69f0205044c --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/UrzasPowerPlant.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class UrzasPowerPlant extends mage.sets.fifthedition.UrzasPowerPlant { + + public UrzasPowerPlant(UUID ownerId) { + super(ownerId); + this.cardNumber = 98; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public UrzasPowerPlant(final UrzasPowerPlant card) { + super(card); + } + + @Override + public UrzasPowerPlant copy() { + return new UrzasPowerPlant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/UrzasTower.java b/Mage.Sets/src/mage/sets/chronicles/UrzasTower.java new file mode 100644 index 00000000000..ffdca13343a --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/UrzasTower.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class UrzasTower extends mage.sets.fifthedition.UrzasTower { + + public UrzasTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 102; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public UrzasTower(final UrzasTower card) { + super(card); + } + + @Override + public UrzasTower copy() { + return new UrzasTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/VaevictisAsmadi.java b/Mage.Sets/src/mage/sets/chronicles/VaevictisAsmadi.java new file mode 100644 index 00000000000..595eb6b55ae --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/VaevictisAsmadi.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class VaevictisAsmadi extends mage.sets.masterseditioniii.VaevictisAsmadi { + + public VaevictisAsmadi(UUID ownerId) { + super(ownerId); + this.cardNumber = 124; + this.expansionSetCode = "CHR"; + } + + public VaevictisAsmadi(final VaevictisAsmadi card) { + super(card); + } + + @Override + public VaevictisAsmadi copy() { + return new VaevictisAsmadi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/WallOfHeat.java b/Mage.Sets/src/mage/sets/chronicles/WallOfHeat.java new file mode 100644 index 00000000000..25c84670ea7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/WallOfHeat.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class WallOfHeat extends mage.sets.legends.WallOfHeat { + + public WallOfHeat(UUID ownerId) { + super(ownerId); + this.cardNumber = 55; + this.expansionSetCode = "CHR"; + } + + public WallOfHeat(final WallOfHeat card) { + super(card); + } + + @Override + public WallOfHeat copy() { + return new WallOfHeat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/WallOfWonder.java b/Mage.Sets/src/mage/sets/chronicles/WallOfWonder.java new file mode 100644 index 00000000000..2aafbe3e6b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/WallOfWonder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WallOfWonder extends mage.sets.seventhedition.WallOfWonder { + + public WallOfWonder(UUID ownerId) { + super(ownerId); + this.cardNumber = 28; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public WallOfWonder(final WallOfWonder card) { + super(card); + } + + @Override + public WallOfWonder copy() { + return new WallOfWonder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/WitchHunter.java b/Mage.Sets/src/mage/sets/chronicles/WitchHunter.java new file mode 100644 index 00000000000..d2fb61367f5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/WitchHunter.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.chronicles; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WitchHunter extends mage.sets.thedark.WitchHunter { + + public WitchHunter(UUID ownerId) { + super(ownerId); + this.cardNumber = 70; + this.expansionSetCode = "CHR"; + this.rarity = Rarity.UNCOMMON; + } + + public WitchHunter(final WitchHunter card) { + super(card); + } + + @Override + public WitchHunter copy() { + return new WitchHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/chronicles/XiraArien.java b/Mage.Sets/src/mage/sets/chronicles/XiraArien.java new file mode 100644 index 00000000000..32e258892c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/chronicles/XiraArien.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.sets.chronicles; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class XiraArien extends mage.sets.legends.XiraArien { + + public XiraArien(UUID ownerId) { + super(ownerId); + this.cardNumber = 125; + this.expansionSetCode = "CHR"; + } + + public XiraArien(final XiraArien card) { + super(card); + } + + @Override + public XiraArien copy() { + return new XiraArien(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/AdarkarWindform.java b/Mage.Sets/src/mage/sets/coldsnap/AdarkarWindform.java new file mode 100644 index 00000000000..8d37e4cf9bb --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/AdarkarWindform.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.sets.coldsnap; + +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.continuous.LoseAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class AdarkarWindform extends CardImpl { + + public AdarkarWindform(UUID ownerId) { + super(ownerId, 26, "Adarkar Windform", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Illusion"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {1}{S}: Target creature loses flying until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAbilityTargetEffect( + FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{S}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public AdarkarWindform(final AdarkarWindform card) { + super(card); + } + + @Override + public AdarkarWindform copy() { + return new AdarkarWindform(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/AurochsHerd.java b/Mage.Sets/src/mage/sets/coldsnap/AurochsHerd.java new file mode 100644 index 00000000000..c22028e8bea --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/AurochsHerd.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LoneFox + */ +public class AurochsHerd extends CardImpl { + + private static final FilterCard filter1 = new FilterCard("Aurocs card"); + private static final FilterAttackingCreature filter2 = new FilterAttackingCreature("other attacking Aurochs"); + + static { + filter1.add(new SubtypePredicate("Aurochs")); + filter2.add(new SubtypePredicate("Aurochs")); + filter2.add(new AnotherPredicate()); + } + + public AurochsHerd(UUID ownerId) { + super(ownerId, 103, "Aurochs Herd", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{G}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Aurochs"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // When Aurochs Herd enters the battlefield, you may search your library for an Aurochs card, reveal it, and put it into your hand. If you do, shuffle your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect( + new TargetCardInLibrary(filter1), true), true)); + // Whenever Aurochs Herd attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. + PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter2, 1); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + } + + public AurochsHerd(final AurochsHerd card) { + super(card); + } + + @Override + public AurochsHerd copy() { + return new AurochsHerd(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/BorealCentaur.java b/Mage.Sets/src/mage/sets/coldsnap/BorealCentaur.java new file mode 100644 index 00000000000..dfd766231be --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/BorealCentaur.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.sets.coldsnap; + +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class BorealCentaur extends CardImpl { + + public BorealCentaur(UUID ownerId) { + super(ownerId, 104, "Boreal Centaur", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Centaur"); + this.subtype.add("Warrior"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {S}: Boreal Centaur gets +1/+1 until end of turn. Activate this ability only once each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{S}"))); + } + + public BorealCentaur(final BorealCentaur card) { + super(card); + } + + @Override + public BorealCentaur copy() { + return new BorealCentaur(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/BorealGriffin.java b/Mage.Sets/src/mage/sets/coldsnap/BorealGriffin.java new file mode 100644 index 00000000000..713afdec699 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/BorealGriffin.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.sets.coldsnap; + +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.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class BorealGriffin extends CardImpl { + + public BorealGriffin(UUID ownerId) { + super(ownerId, 2, "Boreal Griffin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Griffin"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {S}: Boreal Griffin gains first strike until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect( + FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{S}"))); + } + + public BorealGriffin(final BorealGriffin card) { + super(card); + } + + @Override + public BorealGriffin copy() { + return new BorealGriffin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/BraidOfFire.java b/Mage.Sets/src/mage/sets/coldsnap/BraidOfFire.java index e08dc4e32f9..7cd6701a5bf 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/BraidOfFire.java +++ b/Mage.Sets/src/mage/sets/coldsnap/BraidOfFire.java @@ -75,7 +75,7 @@ class BraidOfFireCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { Player player = game.getPlayer(controllerId); - player.getManaPool().addMana(Mana.RedMana, game, ability); + player.getManaPool().addMana(Mana.RedMana(1), game, ability); paid = true; return true; } diff --git a/Mage.Sets/src/mage/sets/coldsnap/BullAurochs.java b/Mage.Sets/src/mage/sets/coldsnap/BullAurochs.java new file mode 100644 index 00000000000..0d1ed967d00 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/BullAurochs.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LoneFox + */ +public class BullAurochs extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Aurochs"); + + static { + filter.add(new SubtypePredicate("Aurochs")); + filter.add(new AnotherPredicate()); + } + + public BullAurochs(UUID ownerId) { + super(ownerId, 107, "Bull Aurochs", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Aurochs"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Whenever Bull Aurochs attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. + PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, 1); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + } + + public BullAurochs(final BullAurochs card) { + super(card); + } + + @Override + public BullAurochs copy() { + return new BullAurochs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/ChillToTheBone.java b/Mage.Sets/src/mage/sets/coldsnap/ChillToTheBone.java new file mode 100644 index 00000000000..45d1b5b365e --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/ChillToTheBone.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.sets.coldsnap; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ChillToTheBone extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonsnow creature"); + + static { + filter.add(Predicates.not(new SupertypePredicate("Snow"))); + } + + public ChillToTheBone(UUID ownerId) { + super(ownerId, 52, "Chill to the Bone", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{B}"); + this.expansionSetCode = "CSP"; + + // Destroy target nonsnow creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public ChillToTheBone(final ChillToTheBone card) { + super(card); + } + + @Override + public ChillToTheBone copy() { + return new ChillToTheBone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/ChillingShade.java b/Mage.Sets/src/mage/sets/coldsnap/ChillingShade.java new file mode 100644 index 00000000000..7b528f7e90c --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/ChillingShade.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.sets.coldsnap; + +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.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class ChillingShade extends CardImpl { + + public ChillingShade(UUID ownerId) { + super(ownerId, 53, "Chilling Shade", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Shade"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {S}: Chilling Shade gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{S}"))); + } + + public ChillingShade(final ChillingShade card) { + super(card); + } + + @Override + public ChillingShade copy() { + return new ChillingShade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/ColdsteelHeart.java b/Mage.Sets/src/mage/sets/coldsnap/ColdsteelHeart.java index 14bfb69089a..73bcef4442d 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/ColdsteelHeart.java +++ b/Mage.Sets/src/mage/sets/coldsnap/ColdsteelHeart.java @@ -60,8 +60,8 @@ public class ColdsteelHeart extends CardImpl { // Coldsteel Heart enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // As Coldsteel Heart enters the battlefield, choose a color. - this.addAbility(new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral))); - // {tap}: Add one mana of the chosen color to your mana pool. + this.addAbility(new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral), null, "As {this} enters the battlefield, choose a color.", null)); + // {T}: Add one mana of the chosen color to your mana pool. this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new ColdsteelHeartManaEffect(), new TapSourceCost())); } @@ -90,7 +90,7 @@ class ColdsteelHeartManaEffect extends ManaEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - player.getManaPool().addMana(getMana(game, source), game, source); + player.getManaPool().addMana(getMana(game, source), game, source); } return true; } @@ -109,4 +109,4 @@ class ColdsteelHeartManaEffect extends ManaEffect { public ColdsteelHeartManaEffect copy() { return new ColdsteelHeartManaEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/DiamondFaerie.java b/Mage.Sets/src/mage/sets/coldsnap/DiamondFaerie.java new file mode 100644 index 00000000000..0edd7386510 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/DiamondFaerie.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; + +/** + * + * @author LoneFox + */ +public class DiamondFaerie extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Snow creatures"); + + static { + filter.add(new SupertypePredicate("Snow")); + } + + public DiamondFaerie(UUID ownerId) { + super(ownerId, 128, "Diamond Faerie", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{W}{U}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Faerie"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {1}{S}: Snow creatures you control get +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, + Duration.EndOfTurn, filter), new ManaCostsImpl("{1}{S}"))); + } + + public DiamondFaerie(final DiamondFaerie card) { + super(card); + } + + @Override + public DiamondFaerie copy() { + return new DiamondFaerie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/Drelnoch.java b/Mage.Sets/src/mage/sets/coldsnap/Drelnoch.java new file mode 100644 index 00000000000..d13ed83c9be --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/Drelnoch.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Drelnoch extends CardImpl { + + public Drelnoch(UUID ownerId) { + super(ownerId, 32, "Drelnoch", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Yeti"); + this.subtype.add("Mutant"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Drelnoch becomes blocked, you may draw two cards. + this.addAbility(new BecomesBlockedTriggeredAbility(new DrawCardSourceControllerEffect(2), true)); + } + + public Drelnoch(final Drelnoch card) { + super(card); + } + + @Override + public Drelnoch copy() { + return new Drelnoch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/FrostRaptor.java b/Mage.Sets/src/mage/sets/coldsnap/FrostRaptor.java new file mode 100644 index 00000000000..b355fcbd3cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/FrostRaptor.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.sets.coldsnap; + +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.FlyingAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class FrostRaptor extends CardImpl { + + public FrostRaptor(UUID ownerId) { + super(ownerId, 34, "Frost Raptor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Bird"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {S}{S}: Frost Raptor gains shroud until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect( + ShroudAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{S}{S}"))); + } + + public FrostRaptor(final FrostRaptor card) { + super(card); + } + + @Override + public FrostRaptor copy() { + return new FrostRaptor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/GreaterStoneSpirit.java b/Mage.Sets/src/mage/sets/coldsnap/GreaterStoneSpirit.java new file mode 100644 index 00000000000..44c03edc0f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/GreaterStoneSpirit.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.sets.coldsnap; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GreaterStoneSpirit extends mage.sets.venservskoth.GreaterStoneSpirit { + + public GreaterStoneSpirit(UUID ownerId) { + super(ownerId); + this.cardNumber = 84; + this.expansionSetCode = "CSP"; + } + + public GreaterStoneSpirit(final GreaterStoneSpirit card) { + super(card); + } + + @Override + public GreaterStoneSpirit copy() { + return new GreaterStoneSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/GristleGrinner.java b/Mage.Sets/src/mage/sets/coldsnap/GristleGrinner.java new file mode 100644 index 00000000000..46edb011e8b --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/GristleGrinner.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class GristleGrinner extends CardImpl { + + public GristleGrinner(UUID ownerId) { + super(ownerId, 59, "Gristle Grinner", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Zombie"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever a creature dies, Gristle Grinner gets +2/+2 until end of turn. + this.addAbility(new DiesCreatureTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + } + + public GristleGrinner(final GristleGrinner card) { + super(card); + } + + @Override + public GristleGrinner copy() { + return new GristleGrinner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/GutlessGhoul.java b/Mage.Sets/src/mage/sets/coldsnap/GutlessGhoul.java new file mode 100644 index 00000000000..61c564f1459 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/GutlessGhoul.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.sets.coldsnap; + +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.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GutlessGhoul extends CardImpl { + + public GutlessGhoul(UUID ownerId) { + super(ownerId, 60, "Gutless Ghoul", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}, Sacrifice a creature: You gain 2 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new ManaCostsImpl("{1}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); + this.addAbility(ability); + } + + public GutlessGhoul(final GutlessGhoul card) { + super(card); + } + + @Override + public GutlessGhoul copy() { + return new GutlessGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/Jokulmorder.java b/Mage.Sets/src/mage/sets/coldsnap/Jokulmorder.java new file mode 100644 index 00000000000..f35509c7ac3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/Jokulmorder.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author fireshoes + */ +public class Jokulmorder extends CardImpl { + + public Jokulmorder(UUID ownerId) { + super(ownerId, 37, "Jokulmorder", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}{U}{U}"); + this.expansionSetCode = "CSP"; + this.subtype.add("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()); + } + + public Jokulmorder(final Jokulmorder card) { + super(card); + } + + @Override + public Jokulmorder copy() { + return new Jokulmorder(this); + } +} + +class JokulmorderTriggeredAbility extends TriggeredAbilityImpl { + + JokulmorderTriggeredAbility() { + super(Zone.BATTLEFIELD, new UntapSourceEffect(), true); + } + + JokulmorderTriggeredAbility(JokulmorderTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.LAND_PLAYED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent land = game.getPermanent(event.getTargetId()); + return land.getSubtype().contains("Island") + && land.getControllerId().equals(this.controllerId); + } + + @Override + public JokulmorderTriggeredAbility copy() { + return new JokulmorderTriggeredAbility(this); + } + + @Override + public String getRule() { + return "When you play an Island, you may untap {this}"; + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/KjeldoranOutrider.java b/Mage.Sets/src/mage/sets/coldsnap/KjeldoranOutrider.java new file mode 100644 index 00000000000..f7fe42c7c35 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/KjeldoranOutrider.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.sets.coldsnap; + +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.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class KjeldoranOutrider extends CardImpl { + + public KjeldoranOutrider(UUID ownerId) { + super(ownerId, 12, "Kjeldoran Outrider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {W}: Kjeldoran Outrider gets +0/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 1, Duration.EndOfTurn), new ManaCostsImpl("{W}"))); + } + + public KjeldoranOutrider(final KjeldoranOutrider card) { + super(card); + } + + @Override + public KjeldoranOutrider copy() { + return new KjeldoranOutrider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/LightningSerpent.java b/Mage.Sets/src/mage/sets/coldsnap/LightningSerpent.java new file mode 100644 index 00000000000..fb07bb59cd7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/LightningSerpent.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class LightningSerpent extends CardImpl { + + public LightningSerpent(UUID ownerId) { + super(ownerId, 88, "Lightning Serpent", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{X}{R}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Elemental"); + this.subtype.add("Serpent"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Haste + this.addAbility(HasteAbility.getInstance()); + // 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)); + } + + public LightningSerpent(final LightningSerpent card) { + super(card); + } + + @Override + public LightningSerpent copy() { + return new LightningSerpent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfBones.java b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfBones.java index a08beb1ada4..0c017fd3786 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/MartyrOfBones.java +++ b/Mage.Sets/src/mage/sets/coldsnap/MartyrOfBones.java @@ -57,6 +57,8 @@ import mage.target.common.TargetCardInHand; */ public class MartyrOfBones extends CardImpl { + private final UUID originalId; + public MartyrOfBones(UUID ownerId) { super(ownerId, 65, "Martyr of Bones", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); this.expansionSetCode = "CSP"; @@ -72,16 +74,18 @@ public class MartyrOfBones extends CardImpl { ability.addCost(new RevealVariableBlackCardsFromHandCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCardInASingleGraveyard(0, 1, new FilterCard("cards in a single graveyard"))); + originalId = ability.getOriginalId(); this.addAbility(ability); } - + public MartyrOfBones(final MartyrOfBones card) { super(card); + this.originalId = card.originalId; } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + if (ability.getOriginalId().equals(originalId)) { int amount = 0; for (Cost cost : ability.getCosts()) { if (cost instanceof RevealVariableBlackCardsFromHandCost) { @@ -100,36 +104,37 @@ public class MartyrOfBones extends CardImpl { } class RevealVariableBlackCardsFromHandCost extends VariableCostImpl { - + private static final FilterCard filter = new FilterCard("X black cards from your hand"); + static { filter.add(new ColorPredicate(ObjectColor.BLACK)); } - + RevealVariableBlackCardsFromHandCost() { super("black cards to reveal"); this.text = new StringBuilder("Reveal ").append(xText).append(" black cards from {this}").toString(); } - + RevealVariableBlackCardsFromHandCost(final RevealVariableBlackCardsFromHandCost cost) { super(cost); } - + @Override public RevealVariableBlackCardsFromHandCost copy() { return new RevealVariableBlackCardsFromHandCost(this); } - + @Override public Cost getFixedCostsFromAnnouncedValue(int xValue) { return new RevealTargetFromHandCost(new TargetCardInHand(0, xValue, filter)); } - + @Override public int getMinValue(Ability source, Game game) { return 0; } - + @Override public int getMaxValue(Ability source, Game game) { Player player = game.getPlayer(source.getControllerId()); @@ -138,4 +143,4 @@ class RevealVariableBlackCardsFromHandCost extends VariableCostImpl { } return 0; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/MouthOfRonom.java b/Mage.Sets/src/mage/sets/coldsnap/MouthOfRonom.java index 97e51075d93..b4ea1d2ab05 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/MouthOfRonom.java +++ b/Mage.Sets/src/mage/sets/coldsnap/MouthOfRonom.java @@ -52,15 +52,15 @@ public class MouthOfRonom extends CardImpl { this.expansionSetCode = "CSP"; this.supertype.add("Snow"); - // {tap}: Add {1} to your mana pool. + // {T}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); - // {4}{snow}, {tap}, Sacrifice Mouth of Ronom: Mouth of Ronom deals 4 damage to target creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new ManaCostsImpl("{4}{snow}")); + // {4}{S}, {T}, Sacrifice Mouth of Ronom: Mouth of Ronom deals 4 damage to target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new ManaCostsImpl("{4}{S}")); ability.addTarget(new TargetCreaturePermanent()); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); - + } public MouthOfRonom(final MouthOfRonom card) { diff --git a/Mage.Sets/src/mage/sets/coldsnap/OhranYeti.java b/Mage.Sets/src/mage/sets/coldsnap/OhranYeti.java new file mode 100644 index 00000000000..cd5fcb64786 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/OhranYeti.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.sets.coldsnap; + +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.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class OhranYeti extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("snow creature"); + + static { + filter.add(new SupertypePredicate("Snow")); + } + + public OhranYeti(UUID ownerId) { + super(ownerId, 93, "Ohran Yeti", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Yeti"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}{S}: Target snow creature gains first strike until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect( + FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{2}{S}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public OhranYeti(final OhranYeti card) { + super(card); + } + + @Override + public OhranYeti copy() { + return new OhranYeti(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/PhyrexianIronfoot.java b/Mage.Sets/src/mage/sets/coldsnap/PhyrexianIronfoot.java index e647764b4ac..978939a710d 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/PhyrexianIronfoot.java +++ b/Mage.Sets/src/mage/sets/coldsnap/PhyrexianIronfoot.java @@ -55,9 +55,9 @@ public class PhyrexianIronfoot extends CardImpl { // Phyrexian Ironfoot doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - - // {1}{snow}: Untap Phyrexian Ironfoot. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{1}{snow}"))); + + // {1}{S}: Untap Phyrexian Ironfoot. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{1}{S}"))); } public PhyrexianIronfoot(final PhyrexianIronfoot card) { diff --git a/Mage.Sets/src/mage/sets/coldsnap/PhyrexianSnowcrusher.java b/Mage.Sets/src/mage/sets/coldsnap/PhyrexianSnowcrusher.java new file mode 100644 index 00000000000..5d72c75fddc --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/PhyrexianSnowcrusher.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.sets.coldsnap; + +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.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class PhyrexianSnowcrusher extends CardImpl { + + public PhyrexianSnowcrusher(UUID ownerId) { + super(ownerId, 140, "Phyrexian Snowcrusher", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Juggernaut"); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Phyrexian Snowcrusher attacks each turn if able. + this.addAbility(new AttacksEachTurnStaticAbility()); + // {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}"))); + } + + public PhyrexianSnowcrusher(final PhyrexianSnowcrusher card) { + super(card); + } + + @Override + public PhyrexianSnowcrusher copy() { + return new PhyrexianSnowcrusher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/RimeTransfusion.java b/Mage.Sets/src/mage/sets/coldsnap/RimeTransfusion.java index 8bef2a6f1ea..9e0941fbcfa 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/RimeTransfusion.java +++ b/Mage.Sets/src/mage/sets/coldsnap/RimeTransfusion.java @@ -57,9 +57,9 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class RimeTransfusion extends CardImpl { - - static final String rule = "and has \"{snow}: This creature can't be blocked this turn except by snow creatures.\""; - + + static final String rule = "and has \"{S}: This creature can't be blocked this turn except by snow creatures.\""; + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("except by snow creatures until end of turn"); static { @@ -78,10 +78,10 @@ public class RimeTransfusion extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - - // Enchanted creature gets +2/+1 and has "{snow}: This creature can't be blocked this turn except by snow creatures." + + // Enchanted creature gets +2/+1 and has "{S}: This creature can't be blocked this turn except by snow creatures." SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 1, Duration.WhileOnBattlefield)); - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.EndOfTurn))),new ManaCostsImpl("{snow}")); + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.EndOfTurn))),new ManaCostsImpl("{S}")); ability2.addEffect(new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, rule)); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/sets/coldsnap/RimeboundDead.java b/Mage.Sets/src/mage/sets/coldsnap/RimeboundDead.java new file mode 100644 index 00000000000..f204b09e073 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/RimeboundDead.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class RimeboundDead extends CardImpl { + + public RimeboundDead(UUID ownerId) { + super(ownerId, 69, "Rimebound Dead", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Skeleton"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {S}: Regenerate Rimebound Dead. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{S}"))); + } + + public RimeboundDead(final RimeboundDead card) { + super(card); + } + + @Override + public RimeboundDead copy() { + return new RimeboundDead(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/ScryingSheets.java b/Mage.Sets/src/mage/sets/coldsnap/ScryingSheets.java index 2669da9ec02..0aaf3714f36 100644 --- a/Mage.Sets/src/mage/sets/coldsnap/ScryingSheets.java +++ b/Mage.Sets/src/mage/sets/coldsnap/ScryingSheets.java @@ -59,8 +59,8 @@ public class ScryingSheets extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); - // {1}{snow}, {tap}: Look at the top card of your library. If that card is snow, you may reveal it and put it into your hand. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryingSheetsEffect(), new ManaCostsImpl<>("{1}{snow}")); + // {1}{S}, {T}: Look at the top card of your library. If that card is snow, you may reveal it and put it into your hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryingSheetsEffect(), new ManaCostsImpl<>("{1}{S}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/coldsnap/SimianBrawler.java b/Mage.Sets/src/mage/sets/coldsnap/SimianBrawler.java new file mode 100644 index 00000000000..937acb55a3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/SimianBrawler.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandCard; + +/** + * + * @author LoneFox + */ +public class SimianBrawler extends CardImpl { + + public SimianBrawler(UUID ownerId) { + super(ownerId, 122, "Simian Brawler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Ape"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Discard a land card: Simian Brawler gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), + new DiscardCardCost(new FilterLandCard("a land card")))); + } + + public SimianBrawler(final SimianBrawler card) { + super(card); + } + + @Override + public SimianBrawler copy() { + return new SimianBrawler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/Sunscour.java b/Mage.Sets/src/mage/sets/coldsnap/Sunscour.java new file mode 100644 index 00000000000..0a9426135c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/Sunscour.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.sets.coldsnap; + +import java.util.UUID; + +import mage.ObjectColor; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.ExileFromHandCost; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCardInHand; + +/** + * + * @author andyfries + */ +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) { + super(ownerId, 19, "Sunscour", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{W}{W}"); + this.expansionSetCode = "CSP"; + + // 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())); + } + + public Sunscour(final Sunscour card) { + super(card); + } + + @Override + public Sunscour copy() { + return new Sunscour(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/SurgingAEther.java b/Mage.Sets/src/mage/sets/coldsnap/SurgingAEther.java new file mode 100644 index 00000000000..49a2b4d0791 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/SurgingAEther.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.sets.coldsnap; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.RippleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class SurgingAEther extends CardImpl { + + public SurgingAEther(UUID ownerId) { + super(ownerId, 47, "Surging AEther", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{U}"); + this.expansionSetCode = "CSP"; + + // Ripple 4 + this.addAbility(new RippleAbility(4)); + // Return target permanent to its owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent()); + } + + public SurgingAEther(final SurgingAEther card) { + super(card); + } + + @Override + public SurgingAEther copy() { + return new SurgingAEther(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/SurgingFlame.java b/Mage.Sets/src/mage/sets/coldsnap/SurgingFlame.java new file mode 100644 index 00000000000..3976ad6ba80 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/SurgingFlame.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.sets.coldsnap; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.RippleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class SurgingFlame extends CardImpl { + + public SurgingFlame(UUID ownerId) { + super(ownerId, 99, "Surging Flame", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "CSP"; + + // Ripple 4 + this.addAbility(new RippleAbility(4)); + // Surging Flame deals 2 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(2)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public SurgingFlame(final SurgingFlame card) { + super(card); + } + + @Override + public SurgingFlame copy() { + return new SurgingFlame(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/SurgingMight.java b/Mage.Sets/src/mage/sets/coldsnap/SurgingMight.java new file mode 100644 index 00000000000..b932abbe517 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/SurgingMight.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.sets.coldsnap; + +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.keyword.EnchantAbility; +import mage.abilities.keyword.RippleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SurgingMight extends CardImpl { + + public SurgingMight(UUID ownerId) { + super(ownerId, 125, "Surging Might", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "CSP"; + 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 gets +2/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); + // Ripple 4 + this.addAbility(new RippleAbility(4)); + } + + public SurgingMight(final SurgingMight card) { + super(card); + } + + @Override + public SurgingMight copy() { + return new SurgingMight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/SurgingSentinels.java b/Mage.Sets/src/mage/sets/coldsnap/SurgingSentinels.java new file mode 100644 index 00000000000..01ef0154caa --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/SurgingSentinels.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.keyword.RippleAbility; + +/** + * + * @author LoneFox + */ +public class SurgingSentinels extends CardImpl { + + public SurgingSentinels(UUID ownerId) { + super(ownerId, 20, "Surging Sentinels", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // Ripple 4 + this.addAbility(new RippleAbility(4)); + } + + public SurgingSentinels(final SurgingSentinels card) { + super(card); + } + + @Override + public SurgingSentinels copy() { + return new SurgingSentinels(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/Thermopod.java b/Mage.Sets/src/mage/sets/coldsnap/Thermopod.java new file mode 100644 index 00000000000..910a63f366b --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/Thermopod.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Thermopod extends CardImpl { + + public Thermopod(UUID ownerId) { + super(ownerId, 100, "Thermopod", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Snow"); + this.subtype.add("Slug"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // {S}: Thermopod gains haste until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect( + HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{S}"))); + // Sacrifice a creature: Add {R} to your mana pool. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new SacrificeTargetCost( + new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))))); + } + + public Thermopod(final Thermopod card) { + super(card); + } + + @Override + public Thermopod copy() { + return new Thermopod(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/WildernessElemental.java b/Mage.Sets/src/mage/sets/coldsnap/WildernessElemental.java new file mode 100644 index 00000000000..97909523dff --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/WildernessElemental.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LoneFox + */ +public class WildernessElemental extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic lands your opponents control"); + + static { + filter.add(Predicates.not(new SupertypePredicate("Basic"))); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public WildernessElemental(UUID ownerId) { + super(ownerId, 134, "Wilderness Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Elemental"); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Wilderness Elemental's power is equal to the number of nonbasic lands your opponents control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); + } + + public WildernessElemental(final WildernessElemental card) { + super(card); + } + + @Override + public WildernessElemental copy() { + return new WildernessElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/WoollyRazorback.java b/Mage.Sets/src/mage/sets/coldsnap/WoollyRazorback.java new file mode 100644 index 00000000000..9183bf81de9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/WoollyRazorback.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceHasCounterCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalReplacementEffect; +import mage.abilities.effects.common.PreventCombatDamageBySourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class WoollyRazorback extends CardImpl { + + public WoollyRazorback(UUID ownerId) { + super(ownerId, 25, "Woolly Razorback", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Boar"); + this.subtype.add("Beast"); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // Woolly Razorback enters the battlefield with three ice counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.ICE.createInstance(3)), + "with three ice counters on it")); + // As long as Woolly Razorback has an ice counter on it, prevent all combat damage it would deal and it has defender. + ConditionalReplacementEffect effect = new ConditionalReplacementEffect(new PreventCombatDamageBySourceEffect(Duration.WhileOnBattlefield), + new SourceHasCounterCondition(CounterType.ICE)); + effect.setText("as long as {this} has an ice counter on it, prevent all combat damage it would deal"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalReplacementEffect(effect)); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance()), + new SourceHasCounterCondition(CounterType.ICE), "and it has defender")); + this.addAbility(ability); + // Whenever Woolly Razorback blocks, remove an ice counter from it. + this.addAbility(new BlocksTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ICE.createInstance()), false)); + } + + public WoollyRazorback(final WoollyRazorback card) { + super(card); + } + + @Override + public WoollyRazorback copy() { + return new WoollyRazorback(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/AcornCatapult.java b/Mage.Sets/src/mage/sets/commander/AcornCatapult.java new file mode 100644 index 00000000000..c1bcbce94e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/AcornCatapult.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.sets.commander; + +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.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.SquirrelToken; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class AcornCatapult extends CardImpl { + + public AcornCatapult(UUID ownerId) { + super(ownerId, 241, "Acorn Catapult", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "CMD"; + + // {1}, {tap}: Acorn Catapult deals 1 damage to target creature or player. That creature's controller or that player puts a 1/1 green Squirrel creature token onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addEffect(new AcornCatapultEffect()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public AcornCatapult(final AcornCatapult card) { + super(card); + } + + @Override + public AcornCatapult copy() { + return new AcornCatapult(this); + } +} + + +class AcornCatapultEffect extends OneShotEffect { + + public AcornCatapultEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "that creature's controller or that player puts a 1/1 green Squirrel creature token onto the battlefield"; + } + + public AcornCatapultEffect(final AcornCatapultEffect effect) { + super(effect); + } + + @Override + public AcornCatapultEffect copy() { + return new AcornCatapultEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID targetId = getTargetPointer().getFirst(game, source); + Player player = game.getPlayer(targetId); + if(player == null) { + Permanent permanent = game.getPermanent(targetId); + if(permanent != null) { + player = game.getPlayer(permanent.getControllerId()); + } + } + + if(player != null) { + new SquirrelToken().putOntoBattlefield(1, game, source.getSourceId(), player.getId()); + return true; + } + + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander/KaaliaOfTheVast.java b/Mage.Sets/src/mage/sets/commander/KaaliaOfTheVast.java index bc05511f481..ab1c397d693 100644 --- a/Mage.Sets/src/mage/sets/commander/KaaliaOfTheVast.java +++ b/Mage.Sets/src/mage/sets/commander/KaaliaOfTheVast.java @@ -160,7 +160,6 @@ class KaaliaOfTheVastEffect extends OneShotEffect { if (card != null && game.getCombat() != null) { UUID defenderId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game); if (defenderId != null) { - controller.getHand().remove(card); controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null); Permanent creature = game.getPermanent(cardId); if (creature != null) { diff --git a/Mage.Sets/src/mage/sets/commander/MagusOfTheVineyard.java b/Mage.Sets/src/mage/sets/commander/MagusOfTheVineyard.java index 247ceade7da..d9ce97b49c2 100644 --- a/Mage.Sets/src/mage/sets/commander/MagusOfTheVineyard.java +++ b/Mage.Sets/src/mage/sets/commander/MagusOfTheVineyard.java @@ -29,7 +29,7 @@ package mage.sets.commander; import java.util.UUID; import mage.MageInt; -import static mage.Mana.GreenMana; +import mage.Mana; import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility; import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; import mage.cards.CardImpl; @@ -55,7 +55,7 @@ public class MagusOfTheVineyard extends CardImpl { // At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool. this.addAbility(new BeginningOfPreCombatMainTriggeredAbility( - Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(GreenMana(2), "that player's"), TargetController.ANY, false, true)); + Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(2), "that player's"), TargetController.ANY, false, true)); } public MagusOfTheVineyard(final MagusOfTheVineyard card) { diff --git a/Mage.Sets/src/mage/sets/commander/ReinsOfPower.java b/Mage.Sets/src/mage/sets/commander/ReinsOfPower.java new file mode 100644 index 00000000000..5d5f0064b44 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/ReinsOfPower.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.sets.commander; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class ReinsOfPower extends mage.sets.stronghold.ReinsOfPower { + + public ReinsOfPower(UUID ownerId) { + super(ownerId); + this.cardNumber = 57; + this.expansionSetCode = "CMD"; + } + + public ReinsOfPower(final ReinsOfPower card) { + super(card); + } + + @Override + public ReinsOfPower copy() { + return new ReinsOfPower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/SpellCrumple.java b/Mage.Sets/src/mage/sets/commander/SpellCrumple.java index 08c38924c81..1f1c8bd5f31 100644 --- a/Mage.Sets/src/mage/sets/commander/SpellCrumple.java +++ b/Mage.Sets/src/mage/sets/commander/SpellCrumple.java @@ -28,28 +28,17 @@ package mage.sets.commander; import java.util.UUID; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.ReturnToLibrarySpellEffect; -import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Duration; import mage.constants.Outcome; -import mage.constants.PhaseStep; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.ZoneChangeEvent; -import mage.game.stack.Spell; -import mage.game.stack.StackObject; import mage.players.Player; import mage.target.TargetSpell; -import mage.target.targetpointer.FixedTarget; /** * @@ -63,7 +52,7 @@ public class SpellCrumple extends CardImpl { // Counter target spell. If that spell is countered this way, put it on the bottom of its owner's library instead of into that player's graveyard. Put Spell Crumple on the bottom of its owner's library. this.getSpellAbility().addTarget(new TargetSpell()); - this.getSpellAbility().addEffect(new SpellCrumpleCounterEffect()); + this.getSpellAbility().addEffect(new SpellCrumpleCounterEffect()); this.getSpellAbility().addEffect(new ReturnToLibrarySpellEffect(false)); } @@ -95,99 +84,10 @@ class SpellCrumpleCounterEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - UUID objectId = source.getFirstTarget(); - UUID sourceId = source.getSourceId(); - // counter code from SpellStack - StackObject stackObject = game.getStack().getStackObject(objectId); - MageObject sourceObject = game.getObject(sourceId); - if (stackObject != null && sourceObject != null) { - if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) { - if ( stackObject instanceof Spell ) { - game.rememberLKI(objectId, Zone.STACK, (Spell)stackObject); - } - // Spell Crumple specific code - ReplacementEffectImpl effect = new SpellCrumpleReplacementEffect(); - effect.setTargetPointer(new FixedTarget(stackObject.getId())); - game.addEffect(effect, source); - // Spell Crumple specific code end - game.informPlayers(new StringBuilder(stackObject.getName()).append(" is countered by ").append(sourceObject.getLogName()).toString()); - game.getStack().remove(stackObject); - stackObject.counter(sourceId, game); // tries to move to graveyard - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId())); - } else { - game.informPlayers(new StringBuilder(stackObject.getName()).append(" could not be countered by ").append(sourceObject.getLogName()).toString()); - } - return true; - } - return false; - // counter code from SpellStack end - } -} - -class SpellCrumpleReplacementEffect extends ReplacementEffectImpl { - - private PhaseStep phaseStep; - - public SpellCrumpleReplacementEffect() { - super(Duration.OneUse, Outcome.Benefit); - staticText = "If that spell is countered this way, put it on the bottom of its owner's library instead of into that player's graveyard"; - phaseStep = null; - } - - public SpellCrumpleReplacementEffect(final SpellCrumpleReplacementEffect effect) { - super(effect); - phaseStep = effect.phaseStep; - } - - @Override - public SpellCrumpleReplacementEffect copy() { - return new SpellCrumpleReplacementEffect(this); - } - - @Override - public boolean isInactive(Ability source, Game game) { - if (!game.getPhase().getStep().getType().equals(phaseStep)) { - return true; - } - return super.isInactive(source, game); - } - - @Override - public void init(Ability source, Game game) { - phaseStep = game.getPhase().getStep().getType(); - super.init(source, game); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - MageObject targetObject = game.getObject(event.getTargetId()); - if (targetObject instanceof Card) { - Card card = (Card) targetObject; - if (card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false, event.getAppliedEffects())) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - game.informPlayers(controller.getLogName() + " has put " + card.getName() + " on the bottom of the library."); - } - return true; - } - } - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.ZONE_CHANGE; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (((ZoneChangeEvent)event).getToZone().equals(Zone.GRAVEYARD)) { - MageObject mageObject = game.getLastKnownInformation(getTargetPointer().getFirst(game, source), Zone.STACK); - if (mageObject instanceof Spell) { - return ((Spell)mageObject).getSourceId().equals(event.getTargetId()); - } + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.LIBRARY, false, false); } return false; } - } diff --git a/Mage.Sets/src/mage/sets/commander/TheMimeoplasm.java b/Mage.Sets/src/mage/sets/commander/TheMimeoplasm.java index 7ff4058deb2..f5d7604ef74 100644 --- a/Mage.Sets/src/mage/sets/commander/TheMimeoplasm.java +++ b/Mage.Sets/src/mage/sets/commander/TheMimeoplasm.java @@ -112,7 +112,7 @@ class TheMimeoplasmEffect extends OneShotEffect { Cards cardsToExile = new CardsImpl(); cardsToExile.add(cardToCopy); cardsToExile.add(cardForCounters); - controller.moveCards(cardsToExile, Zone.GRAVEYARD, Zone.EXILED, source, game); + controller.moveCards(cardsToExile, Zone.EXILED, source, game); CopyEffect copyEffect = new CopyEffect(Duration.Custom, cardToCopy, source.getSourceId()); game.addEffect(copyEffect, source); permanent.addCounters(CounterType.P1P1.createInstance(cardForCounters.getPower().getValue()), game); diff --git a/Mage.Sets/src/mage/sets/commander/TrenchGorger.java b/Mage.Sets/src/mage/sets/commander/TrenchGorger.java index cc5820767c1..b9ca2c24126 100644 --- a/Mage.Sets/src/mage/sets/commander/TrenchGorger.java +++ b/Mage.Sets/src/mage/sets/commander/TrenchGorger.java @@ -40,6 +40,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.common.FilterLandCard; import mage.game.Game; @@ -100,13 +101,13 @@ class TrenchGorgerEffect extends OneShotEffect { TargetCardInLibrary target = new TargetCardInLibrary(0, Integer.MAX_VALUE, new FilterLandCard("any number of land cards")); target.choose(outcome, controller.getId(), controller.getId(), game); int count = 0; - for (UUID cardId: target.getTargets()) { + for (UUID cardId : target.getTargets()) { Card card = game.getCard(cardId); controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true); count++; } controller.shuffleLibrary(game); - game.addEffect(new SetPowerToughnessSourceEffect(count, count, Duration.EndOfGame), source); + game.addEffect(new SetPowerToughnessSourceEffect(count, count, Duration.EndOfGame, SubLayer.SetPT_7b), source); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/commander2013/DeepfireElemental.java b/Mage.Sets/src/mage/sets/commander2013/DeepfireElemental.java index e49ad954f6c..d3b093498b2 100644 --- a/Mage.Sets/src/mage/sets/commander2013/DeepfireElemental.java +++ b/Mage.Sets/src/mage/sets/commander2013/DeepfireElemental.java @@ -52,11 +52,14 @@ 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))); } - + public DeepfireElemental(UUID ownerId) { super(ownerId, 185, "Deepfire Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}{R}"); this.expansionSetCode = "C13"; @@ -68,12 +71,13 @@ 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(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + 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()); @@ -85,6 +89,7 @@ public class DeepfireElemental extends CardImpl { public DeepfireElemental(final DeepfireElemental card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/commander2013/EndrekSahrMasterBreeder.java b/Mage.Sets/src/mage/sets/commander2013/EndrekSahrMasterBreeder.java index dfed94b5507..a0f9f59306a 100644 --- a/Mage.Sets/src/mage/sets/commander2013/EndrekSahrMasterBreeder.java +++ b/Mage.Sets/src/mage/sets/commander2013/EndrekSahrMasterBreeder.java @@ -45,7 +45,7 @@ import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.ThrullToken; import mage.game.stack.Spell; import mage.target.targetpointer.FixedTarget; @@ -114,22 +114,10 @@ class EndrekSahrMasterBreederEffect extends OneShotEffect { if (spell != null) { int cmc = spell.getConvertedManaCost(); if (cmc > 0) { - return new CreateTokenEffect(new EndrekSahrMasterBreederThrullToken(), cmc).apply(game, source); + return new CreateTokenEffect(new ThrullToken(), cmc).apply(game, source); } return true; } return false; } } - -class EndrekSahrMasterBreederThrullToken extends Token { - - public EndrekSahrMasterBreederThrullToken() { - super("Thrull", "1/1 black Thrull creature token"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Thrull"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/commander2013/KirtarsWrath.java b/Mage.Sets/src/mage/sets/commander2013/KirtarsWrath.java index 1fd341cdece..0ace8899522 100644 --- a/Mage.Sets/src/mage/sets/commander2013/KirtarsWrath.java +++ b/Mage.Sets/src/mage/sets/commander2013/KirtarsWrath.java @@ -59,7 +59,7 @@ public class KirtarsWrath extends CardImpl { new KirtarsWrathEffect(), new DestroyAllEffect(new FilterCreaturePermanent("all creatures"), true), new CardsInControllerGraveCondition(7), - "Destroy all creatures. They can't be regenerated.

Threshold - If seven or more cards are in your graveyard, instead destroy all creatures, then put two 1/1 white Spirit creature tokens with flying onto the battlefield. Creatures destroyed this way can't be regenerated")); + "Destroy all creatures. They can't be regenerated.

Threshold - If seven or more cards are in your graveyard, instead destroy all creatures, then put two 1/1 white Spirit creature tokens with flying onto the battlefield. Creatures destroyed this way can't be regenerated")); } diff --git a/Mage.Sets/src/mage/sets/commander2013/LeafdrakeRoost.java b/Mage.Sets/src/mage/sets/commander2013/LeafdrakeRoost.java index 97101a89d01..b8ee63186e4 100644 --- a/Mage.Sets/src/mage/sets/commander2013/LeafdrakeRoost.java +++ b/Mage.Sets/src/mage/sets/commander2013/LeafdrakeRoost.java @@ -70,7 +70,7 @@ public class LeafdrakeRoost extends CardImpl { this.addAbility(ability); // Enchanted land has "{G}{U}, {tap}: Put a 2/2 green and blue Drake creature token with flying onto the battlefield." - Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LeafdrakeRoostDragonToken()), new ManaCostsImpl("{G}{U}")); + Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LeafdrakeRoostDrakeToken()), new ManaCostsImpl("{G}{U}")); abilityToGain.addCost(new TapSourceCost()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(abilityToGain, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted land has \"{G}{U}, {t}: Put a 2/2 green and blue Drake creature token with flying onto the battlefield.\""))); @@ -87,14 +87,14 @@ public class LeafdrakeRoost extends CardImpl { } } -class LeafdrakeRoostDragonToken extends Token { +class LeafdrakeRoostDrakeToken extends Token { - public LeafdrakeRoostDragonToken() { - super("Dragon", "2/2 green and blue Drake creature token with flying"); + public LeafdrakeRoostDrakeToken() { + super("Drake", "2/2 green and blue Drake creature token with flying"); cardType.add(CardType.CREATURE); color.setGreen(true); color.setBlue(true); - subtype.add("Dragon"); + subtype.add("Drake"); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/commander2013/Mirari.java b/Mage.Sets/src/mage/sets/commander2013/Mirari.java index a0ed6f66ee0..a2129f2259d 100644 --- a/Mage.Sets/src/mage/sets/commander2013/Mirari.java +++ b/Mage.Sets/src/mage/sets/commander2013/Mirari.java @@ -30,6 +30,7 @@ package mage.sets.commander2013; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.CopyTargetSpellEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; @@ -44,6 +45,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.target.TargetSpell; +import mage.target.targetpointer.FixedTarget; /** * @@ -71,7 +73,6 @@ public class Mirari extends CardImpl { } } - class MirariTriggeredAbility extends TriggeredAbilityImpl { private static final FilterSpell filter = new FilterSpell(); @@ -106,8 +107,9 @@ class MirariTriggeredAbility extends TriggeredAbilityImpl { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (isControlledInstantOrSorcery(spell)) { - this.getTargets().get(0).clearChosen(); - this.getTargets().get(0).add(spell.getId(), game); + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(spell.getId())); + } return true; } } @@ -115,9 +117,9 @@ class MirariTriggeredAbility extends TriggeredAbilityImpl { } private boolean isControlledInstantOrSorcery(Spell spell) { - return spell != null && - (spell.getControllerId().equals(this.getControllerId())) && - (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + return spell != null + && (spell.getControllerId().equals(this.getControllerId())) + && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); } @Override diff --git a/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java b/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java index 4143523f77c..64a2febb12e 100644 --- a/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java +++ b/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java @@ -131,7 +131,7 @@ class NayaSoulbeastReplacementEffect extends ReplacementEffectImpl { public static final String SOURCE_CAST_SPELL_ABILITY = "sourceCastSpellAbility"; public NayaSoulbeastReplacementEffect() { - super(Duration.OneUse, Outcome.BoostCreature, true); + super(Duration.OneUse, Outcome.BoostCreature); staticText = "{this} enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way"; } diff --git a/Mage.Sets/src/mage/sets/commander2013/TerraRavager.java b/Mage.Sets/src/mage/sets/commander2013/TerraRavager.java index 79aa1e48467..0dda70fa4d0 100644 --- a/Mage.Sets/src/mage/sets/commander2013/TerraRavager.java +++ b/Mage.Sets/src/mage/sets/commander2013/TerraRavager.java @@ -106,6 +106,6 @@ class TerraRavagerLandCount implements DynamicValue { @Override public String getMessage() { - return "land defending player controls"; + return "the number of lands defending player controls"; } } diff --git a/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java b/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java index a0f13d131dd..9dad251209d 100644 --- a/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java +++ b/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java @@ -99,7 +99,7 @@ class LifebloodHydraEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Permanent diedPermanent = (Permanent) getValue("diedPermanent"); + Permanent diedPermanent = (Permanent) getValue("permanentLeftBattlefield"); if (diedPermanent != null) { controller.gainLife(diedPermanent.getPower().getValue(), game); controller.drawCards(diedPermanent.getPower().getValue(), game); diff --git a/Mage.Sets/src/mage/sets/commander2014/MagusOfTheCoffers.java b/Mage.Sets/src/mage/sets/commander2014/MagusOfTheCoffers.java index 9ed457f47ef..e8518a18fab 100644 --- a/Mage.Sets/src/mage/sets/commander2014/MagusOfTheCoffers.java +++ b/Mage.Sets/src/mage/sets/commander2014/MagusOfTheCoffers.java @@ -63,7 +63,7 @@ public class MagusOfTheCoffers extends CardImpl { this.toughness = new MageInt(4); // {2}, {T}: Add {B} to your mana pool for each Swamp you control. - Ability ability = new DynamicManaAbility(Mana.BlackMana, new PermanentsOnBattlefieldCount(filter), new GenericManaCost(2)); + Ability ability = new DynamicManaAbility(Mana.BlackMana(1), new PermanentsOnBattlefieldCount(filter), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java b/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java index eb480233616..0e303f39bcf 100644 --- a/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java +++ b/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java @@ -129,20 +129,22 @@ class NahiriTheLithomancerFirstAbilityEffect extends OneShotEffect { if (controller != null) { Token token = new KorSoldierToken(); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { - Permanent tokenPermanent = game.getPermanent(token.getLastAddedToken()); - if (tokenPermanent != null) { - //TODO: Make sure the Equipment can legally enchant the token, preferably on targetting. - Target target = new TargetControlledPermanent(0, 1, filter, true); - if (target.canChoose(source.getSourceId(), controller.getId(), game) - && controller.chooseUse(outcome, "Attach an Equipment you control to the created Token?", source, game)) { - if (target.choose(Outcome.Neutral, source.getControllerId(), source.getSourceId(), game)) { - Permanent equipmentPermanent = game.getPermanent(target.getFirstTarget()); - if (equipmentPermanent != null) { - Permanent attachedTo = game.getPermanent(equipmentPermanent.getAttachedTo()); - if (attachedTo != null) { - attachedTo.removeAttachment(equipmentPermanent.getId(), game); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + //TODO: Make sure the Equipment can legally enchant the token, preferably on targetting. + Target target = new TargetControlledPermanent(0, 1, filter, true); + if (target.canChoose(source.getSourceId(), controller.getId(), game) + && controller.chooseUse(outcome, "Attach an Equipment you control to the created " + tokenPermanent.getIdName() + "?", source, game)) { + if (target.choose(Outcome.Neutral, source.getControllerId(), source.getSourceId(), game)) { + Permanent equipmentPermanent = game.getPermanent(target.getFirstTarget()); + if (equipmentPermanent != null) { + Permanent attachedTo = game.getPermanent(equipmentPermanent.getAttachedTo()); + if (attachedTo != null) { + attachedTo.removeAttachment(equipmentPermanent.getId(), game); + } + tokenPermanent.addAttachment(equipmentPermanent.getId(), game); } - tokenPermanent.addAttachment(equipmentPermanent.getId(), game); } } } diff --git a/Mage.Sets/src/mage/sets/commander2014/RushOfKnowledge.java b/Mage.Sets/src/mage/sets/commander2014/RushOfKnowledge.java index fbaf91c4549..e288a020a36 100644 --- a/Mage.Sets/src/mage/sets/commander2014/RushOfKnowledge.java +++ b/Mage.Sets/src/mage/sets/commander2014/RushOfKnowledge.java @@ -28,15 +28,11 @@ package mage.sets.commander2014; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -48,10 +44,10 @@ public class RushOfKnowledge extends CardImpl { super(ownerId, 123, "Rush of Knowledge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{U}"); this.expansionSetCode = "C14"; - // Draw cards equal to the highest converted mana cost among permanents you control. - this.getSpellAbility().addEffect(new RushOfKnowledgeEffect()); - + DrawCardSourceControllerEffect effect = new DrawCardSourceControllerEffect(new HighestConvertedManaCostValue()); + effect.setText("Draw cards equal to the highest converted mana cost among permanents you control"); + this.getSpellAbility().addEffect(effect); } public RushOfKnowledge(final RushOfKnowledge card) { @@ -63,41 +59,3 @@ public class RushOfKnowledge extends CardImpl { return new RushOfKnowledge(this); } } - -class RushOfKnowledgeEffect extends OneShotEffect { - - public RushOfKnowledgeEffect() { - super(Outcome.DrawCard); - this.staticText = "Draw cards equal to the highest converted mana cost among permanents you control"; - } - - public RushOfKnowledgeEffect(final RushOfKnowledgeEffect effect) { - super(effect); - } - - @Override - public RushOfKnowledgeEffect copy() { - return new RushOfKnowledgeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - int highCMC = 0; - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { - if (permanent.getSpellAbility() != null) { - int cmc = permanent.getSpellAbility().getManaCosts().convertedManaCost(); - if (cmc > highCMC) { - highCMC = cmc; - } - } - } - if (highCMC > 0) { - controller.drawCards(highCMC, game); - } - return true; - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/commander2014/ScrapMastery.java b/Mage.Sets/src/mage/sets/commander2014/ScrapMastery.java index f2512b5b703..badafeb966f 100644 --- a/Mage.Sets/src/mage/sets/commander2014/ScrapMastery.java +++ b/Mage.Sets/src/mage/sets/commander2014/ScrapMastery.java @@ -33,9 +33,8 @@ 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.Cards; -import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; @@ -90,12 +89,12 @@ class ScrapMasteryEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Map> exiledCards = new HashMap<>(); + Map> exiledCards = new HashMap<>(); // exile artifacts from graveyard for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - Set cards = player.getGraveyard().getCards(new FilterArtifactCard(), game); + Set cards = player.getGraveyard().getCards(new FilterArtifactCard(), game); controller.moveCards(cards, Zone.EXILED, source, game); exiledCards.put(player.getId(), cards); } @@ -113,8 +112,7 @@ class ScrapMasteryEffect extends OneShotEffect { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - Cards playersExiledCards = new CardsImpl(exiledCards.get(playerId)); - controller.moveCards(playersExiledCards, Zone.BATTLEFIELD, source, game); + controller.moveCards(exiledCards.get(playerId), Zone.BATTLEFIELD, source, game); } } return true; diff --git a/Mage.Sets/src/mage/sets/commander2014/TyrantsFamiliar.java b/Mage.Sets/src/mage/sets/commander2014/TyrantsFamiliar.java index df09c2e46e2..38017589d07 100644 --- a/Mage.Sets/src/mage/sets/commander2014/TyrantsFamiliar.java +++ b/Mage.Sets/src/mage/sets/commander2014/TyrantsFamiliar.java @@ -38,7 +38,6 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; -import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.Rarity; import mage.filter.common.FilterCreaturePermanent; @@ -52,6 +51,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class TyrantsFamiliar extends CardImpl { + private final UUID originalId; + public TyrantsFamiliar(UUID ownerId) { super(ownerId, 39, "Tyrant's Familiar", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); this.expansionSetCode = "C14"; @@ -62,30 +63,32 @@ public class TyrantsFamiliar extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - + // Haste this.addAbility(HasteAbility.getInstance()); - + // Lieutenant - As long as you control your commander, Tyrant's Familiar gets +2/+2 and has "Whenever Tyrant's Familiar attacks, it deals 7 damage to target creature defending player controls." Ability gainedAbility = new AttacksTriggeredAbility(new DamageTargetEffect(7), false); gainedAbility.addTarget(new TargetCreaturePermanent()); ContinuousEffect effect = new GainAbilitySourceEffect(gainedAbility); effect.setText("and has \"Whenever {this} attacks, it deals 7 damage to target creature defending player controls\""); + originalId = gainedAbility.getOriginalId(); this.addAbility(new LieutenantAbility(effect)); } public TyrantsFamiliar(final TyrantsFamiliar card) { super(card); + this.originalId = card.originalId; } @Override public TyrantsFamiliar copy() { return new TyrantsFamiliar(this); } - + @Override public void adjustTargets(Ability ability, Game game) { - if (ability.getAbilityType().equals(AbilityType.TRIGGERED)) { + if (ability.getOriginalId().equals(originalId)) { ability.getTargets().clear(); FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls"); UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId()); diff --git a/Mage.Sets/src/mage/sets/commander2014/WordOfSeizing.java b/Mage.Sets/src/mage/sets/commander2014/WordOfSeizing.java index 2688c3eb3c0..f503d13fd3d 100644 --- a/Mage.Sets/src/mage/sets/commander2014/WordOfSeizing.java +++ b/Mage.Sets/src/mage/sets/commander2014/WordOfSeizing.java @@ -50,17 +50,16 @@ public class WordOfSeizing extends CardImpl { super(ownerId, 185, "Word of Seizing", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{R}{R}"); this.expansionSetCode = "C14"; - // Split second this.addAbility(new SplitSecondAbility()); // Untap target permanent and gain control of it until end of turn. It gains haste until end of turn. this.getSpellAbility().addEffect(new UntapTargetEffect()); Effect effect = new GainControlTargetEffect(Duration.EndOfTurn); - effect.setText("and gain control of it until end of turn. "); + effect.setText("and gain control of it until end of turn"); this.getSpellAbility().addEffect(effect); effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); - effect.setText("It gains haste until end of turn. "); + effect.setText("It gains haste until end of turn"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetPermanent()); diff --git a/Mage.Sets/src/mage/sets/commander2015/AEtherize.java b/Mage.Sets/src/mage/sets/commander2015/AEtherize.java new file mode 100644 index 00000000000..685ee6dd1f5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AEtherize.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AEtherize extends mage.sets.gatecrash.AEtherize { + + public AEtherize(UUID ownerId) { + super(ownerId); + this.cardNumber = 85; + this.expansionSetCode = "C15"; + } + + public AEtherize(final AEtherize card) { + super(card); + } + + @Override + public AEtherize copy() { + return new AEtherize(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AEthersnatch.java b/Mage.Sets/src/mage/sets/commander2015/AEthersnatch.java new file mode 100644 index 00000000000..c54aef189ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AEthersnatch.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author emerald000 + */ +public class AEthersnatch extends CardImpl { + + public AEthersnatch(UUID ownerId) { + super(ownerId, 9, "AEthersnatch", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{4}{U}{U}"); + this.expansionSetCode = "C15"; + + // Gain control of target spell. You may choose new targets for it. + this.getSpellAbility().addEffect(new AEthersnatchEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public AEthersnatch(final AEthersnatch card) { + super(card); + } + + @Override + public AEthersnatch copy() { + return new AEthersnatch(this); + } +} + +class AEthersnatchEffect extends OneShotEffect { + + AEthersnatchEffect() { + super(Outcome.GainControl); + this.staticText = "Gain control of target spell. You may choose new targets for it"; + } + + AEthersnatchEffect(final AEthersnatchEffect effect) { + super(effect); + } + + @Override + public AEthersnatchEffect copy() { + return new AEthersnatchEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source)); + if (controller != null && spell != null) { + spell.setControllerId(controller.getId()); + spell.chooseNewTargets(game, controller.getId(), false, false, null); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AcidicSlime.java b/Mage.Sets/src/mage/sets/commander2015/AcidicSlime.java new file mode 100644 index 00000000000..945b3012712 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AcidicSlime.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AcidicSlime extends mage.sets.magic2010.AcidicSlime { + + public AcidicSlime(UUID ownerId) { + super(ownerId); + this.cardNumber = 173; + this.expansionSetCode = "C15"; + } + + public AcidicSlime(final AcidicSlime card) { + super(card); + } + + @Override + public AcidicSlime copy() { + return new AcidicSlime(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ActOfAggression.java b/Mage.Sets/src/mage/sets/commander2015/ActOfAggression.java new file mode 100644 index 00000000000..2720002549c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ActOfAggression.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ActOfAggression extends mage.sets.newphyrexia.ActOfAggression { + + public ActOfAggression(UUID ownerId) { + super(ownerId); + this.cardNumber = 141; + this.expansionSetCode = "C15"; + } + + public ActOfAggression(final ActOfAggression card) { + super(card); + } + + @Override + public ActOfAggression copy() { + return new ActOfAggression(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AjanisChosen.java b/Mage.Sets/src/mage/sets/commander2015/AjanisChosen.java new file mode 100644 index 00000000000..aac099f95e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AjanisChosen.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AjanisChosen extends mage.sets.magic2014.AjanisChosen { + + public AjanisChosen(UUID ownerId) { + super(ownerId); + this.cardNumber = 57; + this.expansionSetCode = "C15"; + } + + public AjanisChosen(final AjanisChosen card) { + super(card); + } + + @Override + public AjanisChosen copy() { + return new AjanisChosen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AltarsReap.java b/Mage.Sets/src/mage/sets/commander2015/AltarsReap.java new file mode 100644 index 00000000000..70e3023ad7e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AltarsReap.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AltarsReap extends mage.sets.innistrad.AltarsReap { + + public AltarsReap(UUID ownerId) { + super(ownerId); + this.cardNumber = 112; + this.expansionSetCode = "C15"; + } + + public AltarsReap(final AltarsReap card) { + super(card); + } + + @Override + public AltarsReap copy() { + return new AltarsReap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AmbitionsCost.java b/Mage.Sets/src/mage/sets/commander2015/AmbitionsCost.java new file mode 100644 index 00000000000..b0ebdb59ca0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AmbitionsCost.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AmbitionsCost extends mage.sets.eighthedition.AmbitionsCost { + + public AmbitionsCost(UUID ownerId) { + super(ownerId); + this.cardNumber = 113; + this.expansionSetCode = "C15"; + } + + public AmbitionsCost(final AmbitionsCost card) { + super(card); + } + + @Override + public AmbitionsCost copy() { + return new AmbitionsCost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AncientAmphitheater.java b/Mage.Sets/src/mage/sets/commander2015/AncientAmphitheater.java new file mode 100644 index 00000000000..21a5f92ec76 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AncientAmphitheater.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AncientAmphitheater extends mage.sets.lorwyn.AncientAmphitheater { + + public AncientAmphitheater(UUID ownerId) { + super(ownerId); + this.cardNumber = 276; + this.expansionSetCode = "C15"; + } + + public AncientAmphitheater(final AncientAmphitheater card) { + super(card); + } + + @Override + public AncientAmphitheater copy() { + return new AncientAmphitheater(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AncientCraving.java b/Mage.Sets/src/mage/sets/commander2015/AncientCraving.java new file mode 100644 index 00000000000..ec231cde4a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AncientCraving.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AncientCraving extends mage.sets.starter1999.AncientCraving { + + public AncientCraving(UUID ownerId) { + super(ownerId); + this.cardNumber = 114; + this.expansionSetCode = "C15"; + } + + public AncientCraving(final AncientCraving card) { + super(card); + } + + @Override + public AncientCraving copy() { + return new AncientCraving(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AngelOfSerenity.java b/Mage.Sets/src/mage/sets/commander2015/AngelOfSerenity.java new file mode 100644 index 00000000000..f20decba2c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AngelOfSerenity.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AngelOfSerenity extends mage.sets.returntoravnica.AngelOfSerenity { + + public AngelOfSerenity(UUID ownerId) { + super(ownerId); + this.cardNumber = 58; + this.expansionSetCode = "C15"; + } + + public AngelOfSerenity(final AngelOfSerenity card) { + super(card); + } + + @Override + public AngelOfSerenity copy() { + return new AngelOfSerenity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AnyaMercilessAngel.java b/Mage.Sets/src/mage/sets/commander2015/AnyaMercilessAngel.java new file mode 100644 index 00000000000..1bb34a90c3e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AnyaMercilessAngel.java @@ -0,0 +1,144 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +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.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author emerald000 + */ +public class AnyaMercilessAngel extends CardImpl { + + public AnyaMercilessAngel(UUID ownerId) { + super(ownerId, 41, "Anya, Merciless Angel", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Angel"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Anya, Merciless Angel gets +3/+3 for each opponent whose life total is less than half his or her starting life total. + DynamicValue dValue = new MultipliedValue(new AnyaMercilessAngelDynamicValue(), 3); + Effect effect = new BoostSourceEffect(dValue, dValue, Duration.WhileOnBattlefield); + effect.setText("{this{ gets +3/+3 for each opponent whose life total is less than half his or her starting life total"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(dValue, dValue, Duration.WhileOnBattlefield))); + + // As long as an opponent's life total is less than half his or her starting life total, Anya has indestructible. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield), + AnyaMercilessAngelCondition.getInstance(), + "As long as an opponent's life total is less than half his or her starting life total, {this} has indestructible"))); + } + + public AnyaMercilessAngel(final AnyaMercilessAngel card) { + super(card); + } + + @Override + public AnyaMercilessAngel copy() { + return new AnyaMercilessAngel(this); + } +} + +class AnyaMercilessAngelDynamicValue implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int opponentCount = 0; + Player controller = game.getPlayer(sourceAbility.getControllerId()); + if (controller != null) { + int startingLifeTotal = game.getLife(); + for (UUID opponentId : game.getOpponents(controller.getId())) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null && opponent.getLife() < startingLifeTotal / 2) { + opponentCount++; + } + } + } + return opponentCount; + } + + @Override + public AnyaMercilessAngelDynamicValue copy() { + return new AnyaMercilessAngelDynamicValue(); + } + + @Override + public String getMessage() { + return "number of opponents whose life total is less than half his or her starting life total"; + } + + @Override + public String toString() { + return "X"; + } +} + +class AnyaMercilessAngelCondition implements Condition { + + private static final AnyaMercilessAngelCondition fInstance = new AnyaMercilessAngelCondition(); + + public static AnyaMercilessAngelCondition getInstance() { + return fInstance; + }; + + private AnyaMercilessAngelCondition() {} + + @Override + public boolean apply(Game game, Ability source) { + return new AnyaMercilessAngelDynamicValue().calculate(game, source, null) > 0; + } + + @Override + public String toString() { + return "an opponent's life total is less than half his or her starting life total"; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Arachnogenesis.java b/Mage.Sets/src/mage/sets/commander2015/Arachnogenesis.java new file mode 100644 index 00000000000..3f500fc132e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Arachnogenesis.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.PreventAllDamageByAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.permanent.token.SpiderToken; + +/** + * + * @author fireshoes + */ +public class Arachnogenesis extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Spider creatures"); + + static { + filter.add(Predicates.not(new SubtypePredicate("Spider"))); + } + + public Arachnogenesis(UUID ownerId) { + super(ownerId, 32, "Arachnogenesis", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "C15"; + + // Put X 1/2 green Spider creature tokens with reach onto the battlefield, where X is the number of creatures attacking you. + Effect effect = new CreateTokenEffect(new SpiderToken(), new ArachnogenesisCount()); + effect.setText("Put X 1/2 green Spider creature tokens with reach onto the battlefield, where X is the number of creatures attacking you"); + this.getSpellAbility().addEffect(effect); + + // Prevent all combat damage that would be dealt this turn by non-Spider creatures. + this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(filter, Duration.EndOfTurn, true)); + } + + public Arachnogenesis(final Arachnogenesis card) { + super(card); + } + + @Override + public Arachnogenesis copy() { + return new Arachnogenesis(this); + } +} + +class ArachnogenesisCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int count = 0; + for (CombatGroup combatGroup : game.getCombat().getGroups()) { + if (combatGroup.getDefenderId().equals(sourceAbility.getControllerId())) { + count += combatGroup.getAttackers().size(); + } + } + return count; + } + + @Override + public DynamicValue copy() { + return this; + } + + @Override + public String getMessage() { + return "creatures attacking you"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2015/ArbiterOfKnollridge.java b/Mage.Sets/src/mage/sets/commander2015/ArbiterOfKnollridge.java new file mode 100644 index 00000000000..9c0a178294d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ArbiterOfKnollridge.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ArbiterOfKnollridge extends mage.sets.lorwyn.ArbiterOfKnollridge { + + public ArbiterOfKnollridge(UUID ownerId) { + super(ownerId); + this.cardNumber = 59; + this.expansionSetCode = "C15"; + } + + public ArbiterOfKnollridge(final ArbiterOfKnollridge card) { + super(card); + } + + @Override + public ArbiterOfKnollridge copy() { + return new ArbiterOfKnollridge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ArborColossus.java b/Mage.Sets/src/mage/sets/commander2015/ArborColossus.java new file mode 100644 index 00000000000..9c70b372a2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ArborColossus.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ArborColossus extends mage.sets.theros.ArborColossus { + + public ArborColossus(UUID ownerId) { + super(ownerId); + this.cardNumber = 174; + this.expansionSetCode = "C15"; + } + + public ArborColossus(final ArborColossus card) { + super(card); + } + + @Override + public ArborColossus copy() { + return new ArborColossus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ArjunTheShiftingFlame.java b/Mage.Sets/src/mage/sets/commander2015/ArjunTheShiftingFlame.java new file mode 100644 index 00000000000..2c146818d31 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ArjunTheShiftingFlame.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author fireshoes + */ +public class ArjunTheShiftingFlame extends CardImpl { + + public ArjunTheShiftingFlame(UUID ownerId) { + super(ownerId, 42, "Arjun, the Shifting Flame", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{U}{R}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Sphinx"); + this.subtype.add("Wizard"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever you cast a spell, put the cards in your hand on the bottom of your library in any order, then draw that many cards. + this.addAbility(new SpellCastControllerTriggeredAbility(new ArjunTheShiftingFlameEffect(), false)); + } + + public ArjunTheShiftingFlame(final ArjunTheShiftingFlame card) { + super(card); + } + + @Override + public ArjunTheShiftingFlame copy() { + return new ArjunTheShiftingFlame(this); + } +} + +class ArjunTheShiftingFlameEffect extends OneShotEffect { + + public ArjunTheShiftingFlameEffect() { + super(Outcome.Neutral); + staticText = "put the cards in your hand on the bottom of your library in any order, then draw that many cards"; + } + + public ArjunTheShiftingFlameEffect(final ArjunTheShiftingFlameEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + if (you != null) { + int count = you.getHand().size(); + Cards cards = new CardsImpl(); + for (Card card : you.getHand().getCards(game)) { + cards.add(card.getId()); + } + TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library")); + while (you.canRespond() && cards.size() > 1) { + you.choose(Outcome.Neutral, cards, target, game); + Card card = cards.get(target.getFirstTarget(), game); + if (card != null) { + cards.remove(card); + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); + } + target.clearChosen(); + } + if (cards.size() == 1) { + Card card = cards.get(cards.iterator().next(), game); + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); + } + you.getHand().clear(); + you.drawCards(count, game); + } + return true; + } + + @Override + public ArjunTheShiftingFlameEffect copy() { + return new ArjunTheShiftingFlameEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2015/AuraOfSilence.java b/Mage.Sets/src/mage/sets/commander2015/AuraOfSilence.java new file mode 100644 index 00000000000..bde64e9122e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AuraOfSilence.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AuraOfSilence extends mage.sets.weatherlight.AuraOfSilence { + + public AuraOfSilence(UUID ownerId) { + super(ownerId); + this.cardNumber = 60; + this.expansionSetCode = "C15"; + } + + public AuraOfSilence(final AuraOfSilence card) { + super(card); + } + + @Override + public AuraOfSilence copy() { + return new AuraOfSilence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/AwakenTheSkyTyrant.java b/Mage.Sets/src/mage/sets/commander2015/AwakenTheSkyTyrant.java new file mode 100644 index 00000000000..8f9a09481cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/AwakenTheSkyTyrant.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.token.DragonToken2; + +/** + * + * @author LevelX2 + */ +public class AwakenTheSkyTyrant extends CardImpl { + + public AwakenTheSkyTyrant(UUID ownerId) { + super(ownerId, 24, "Awaken the Sky Tyrant", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); + this.expansionSetCode = "C15"; + + // When a source an opponent controls deals damage to you, sacrifice Awaken the Sky Tyrant. If you do, put a 5/5 red Dragon creature token with flying onto the battlefield. + this.addAbility(new AwakenTheSkyTyrantTriggeredAbility()); + } + + public AwakenTheSkyTyrant(final AwakenTheSkyTyrant card) { + super(card); + } + + @Override + public AwakenTheSkyTyrant copy() { + return new AwakenTheSkyTyrant(this); + } +} + +class AwakenTheSkyTyrantTriggeredAbility extends TriggeredAbilityImpl { + + public AwakenTheSkyTyrantTriggeredAbility() { + super(Zone.BATTLEFIELD, new DoIfCostPaid(new CreateTokenEffect(new DragonToken2(), 1), new SacrificeSourceCost(), null, false), false); + } + + public AwakenTheSkyTyrantTriggeredAbility(final AwakenTheSkyTyrantTriggeredAbility ability) { + super(ability); + } + + @java.lang.Override + public AwakenTheSkyTyrantTriggeredAbility copy() { + return new AwakenTheSkyTyrantTriggeredAbility(this); + } + + @java.lang.Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType().equals(GameEvent.EventType.DAMAGED_PLAYER); + } + + @java.lang.Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getTargetId().equals(controllerId)) { + UUID sourceControllerId = game.getControllerId(event.getSourceId()); + if (sourceControllerId != null && game.getOpponents(getControllerId()).contains(sourceControllerId)) { + return true; + } + } + return false; + } + + @java.lang.Override + public String getRule() { + return "When a source an opponent controls deals damage to you, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BaneOfProgress.java b/Mage.Sets/src/mage/sets/commander2015/BaneOfProgress.java new file mode 100644 index 00000000000..470b1b0d020 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BaneOfProgress.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BaneOfProgress extends mage.sets.commander2013.BaneOfProgress { + + public BaneOfProgress(UUID ownerId) { + super(ownerId); + this.cardNumber = 175; + this.expansionSetCode = "C15"; + } + + public BaneOfProgress(final BaneOfProgress card) { + super(card); + } + + @Override + public BaneOfProgress copy() { + return new BaneOfProgress(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BanishingLight.java b/Mage.Sets/src/mage/sets/commander2015/BanishingLight.java new file mode 100644 index 00000000000..56f19fe651f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BanishingLight.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BanishingLight extends mage.sets.journeyintonyx.BanishingLight { + + public BanishingLight(UUID ownerId) { + super(ownerId); + this.cardNumber = 61; + this.expansionSetCode = "C15"; + } + + public BanishingLight(final BanishingLight card) { + super(card); + } + + @Override + public BanishingLight copy() { + return new BanishingLight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BansheeOfTheDreadChoir.java b/Mage.Sets/src/mage/sets/commander2015/BansheeOfTheDreadChoir.java new file mode 100644 index 00000000000..061d769c8ce --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BansheeOfTheDreadChoir.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.MyriadAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BansheeOfTheDreadChoir extends CardImpl { + + public BansheeOfTheDreadChoir(UUID ownerId) { + super(ownerId, 16, "Banshee of the Dread Choir", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "C15"; + this.subtype.add("Spirit"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Myriad + this.addAbility(new MyriadAbility()); + // Whenever Banshee of the Dread Choir deals combat damage to a player, that player discards a card. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1), false, true)); + } + + public BansheeOfTheDreadChoir(final BansheeOfTheDreadChoir card) { + super(card); + } + + @Override + public BansheeOfTheDreadChoir copy() { + return new BansheeOfTheDreadChoir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BarrenMoor.java b/Mage.Sets/src/mage/sets/commander2015/BarrenMoor.java new file mode 100644 index 00000000000..95a642c1e9d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BarrenMoor.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BarrenMoor extends mage.sets.onslaught.BarrenMoor { + + public BarrenMoor(UUID ownerId) { + super(ownerId); + this.cardNumber = 277; + this.expansionSetCode = "C15"; + } + + public BarrenMoor(final BarrenMoor card) { + super(card); + } + + @Override + public BarrenMoor copy() { + return new BarrenMoor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BarterInBlood.java b/Mage.Sets/src/mage/sets/commander2015/BarterInBlood.java new file mode 100644 index 00000000000..88b004a8537 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BarterInBlood.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BarterInBlood extends mage.sets.avacynrestored.BarterInBlood { + + public BarterInBlood(UUID ownerId) { + super(ownerId); + this.cardNumber = 115; + this.expansionSetCode = "C15"; + } + + public BarterInBlood(final BarterInBlood card) { + super(card); + } + + @Override + public BarterInBlood copy() { + return new BarterInBlood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BasaltMonolith.java b/Mage.Sets/src/mage/sets/commander2015/BasaltMonolith.java new file mode 100644 index 00000000000..8caccf89593 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BasaltMonolith.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BasaltMonolith extends mage.sets.limitedalpha.BasaltMonolith { + + public BasaltMonolith(UUID ownerId) { + super(ownerId); + this.cardNumber = 244; + this.expansionSetCode = "C15"; + } + + public BasaltMonolith(final BasaltMonolith card) { + super(card); + } + + @Override + public BasaltMonolith copy() { + return new BasaltMonolith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BastionProtector.java b/Mage.Sets/src/mage/sets/commander2015/BastionProtector.java new file mode 100644 index 00000000000..0293878ca10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BastionProtector.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.CommanderPredicate; + +/** + * + * @author LevelX2 + */ +public class BastionProtector extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Commander creatures you control"); + + static { + filter.add(new CommanderPredicate()); + } + + public BastionProtector(UUID ownerId) { + super(ownerId, 1, "Bastion Protector", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "C15"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Commander creatures you control get +2/+2 and have indestructible. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, filter)); + Effect effect = new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter); + effect.setText("and have indestructible"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public BastionProtector(final BastionProtector card) { + super(card); + } + + @Override + public BastionProtector copy() { + return new BastionProtector(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BeastmasterAscension.java b/Mage.Sets/src/mage/sets/commander2015/BeastmasterAscension.java new file mode 100644 index 00000000000..86569950108 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BeastmasterAscension.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BeastmasterAscension extends mage.sets.zendikar.BeastmasterAscension { + + public BeastmasterAscension(UUID ownerId) { + super(ownerId); + this.cardNumber = 176; + this.expansionSetCode = "C15"; + } + + public BeastmasterAscension(final BeastmasterAscension card) { + super(card); + } + + @Override + public BeastmasterAscension copy() { + return new BeastmasterAscension(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BidentOfThassa.java b/Mage.Sets/src/mage/sets/commander2015/BidentOfThassa.java new file mode 100644 index 00000000000..3423b6dc814 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BidentOfThassa.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BidentOfThassa extends mage.sets.theros.BidentOfThassa { + + public BidentOfThassa(UUID ownerId) { + super(ownerId); + this.cardNumber = 86; + this.expansionSetCode = "C15"; + } + + public BidentOfThassa(final BidentOfThassa card) { + super(card); + } + + @Override + public BidentOfThassa copy() { + return new BidentOfThassa(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BiomanticMastery.java b/Mage.Sets/src/mage/sets/commander2015/BiomanticMastery.java new file mode 100644 index 00000000000..971dd0f6fe0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BiomanticMastery.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BiomanticMastery extends mage.sets.dissension.BiomanticMastery { + + public BiomanticMastery(UUID ownerId) { + super(ownerId); + this.cardNumber = 239; + this.expansionSetCode = "C15"; + } + + public BiomanticMastery(final BiomanticMastery card) { + super(card); + } + + @Override + public BiomanticMastery copy() { + return new BiomanticMastery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BlackMarket.java b/Mage.Sets/src/mage/sets/commander2015/BlackMarket.java new file mode 100644 index 00000000000..e957cb54e9e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BlackMarket.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BlackMarket extends mage.sets.mercadianmasques.BlackMarket { + + public BlackMarket(UUID ownerId) { + super(ownerId); + this.cardNumber = 116; + this.expansionSetCode = "C15"; + } + + public BlackMarket(final BlackMarket card) { + super(card); + } + + @Override + public BlackMarket copy() { + return new BlackMarket(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BladeOfSelves.java b/Mage.Sets/src/mage/sets/commander2015/BladeOfSelves.java new file mode 100644 index 00000000000..440c76269a2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BladeOfSelves.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.MyriadAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class BladeOfSelves extends CardImpl { + + public BladeOfSelves(UUID ownerId) { + super(ownerId, 51, "Blade of Selves", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "C15"; + this.subtype.add("Equipment"); + + // Equipped creature has myriad. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new MyriadAbility(), AttachmentType.EQUIPMENT))); + + // Equip {4} + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(4))); + } + + public BladeOfSelves(final BladeOfSelves card) { + super(card); + } + + @Override + public BladeOfSelves copy() { + return new BladeOfSelves(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BlastedLandscape.java b/Mage.Sets/src/mage/sets/commander2015/BlastedLandscape.java new file mode 100644 index 00000000000..8a3be219592 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BlastedLandscape.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BlastedLandscape extends mage.sets.urzassaga.BlastedLandscape { + + public BlastedLandscape(UUID ownerId) { + super(ownerId); + this.cardNumber = 278; + this.expansionSetCode = "C15"; + } + + public BlastedLandscape(final BlastedLandscape card) { + super(card); + } + + @Override + public BlastedLandscape copy() { + return new BlastedLandscape(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BlatantThievery.java b/Mage.Sets/src/mage/sets/commander2015/BlatantThievery.java new file mode 100644 index 00000000000..d201393e233 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BlatantThievery.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BlatantThievery extends mage.sets.onslaught.BlatantThievery { + + public BlatantThievery(UUID ownerId) { + super(ownerId); + this.cardNumber = 87; + this.expansionSetCode = "C15"; + } + + public BlatantThievery(final BlatantThievery card) { + super(card); + } + + @Override + public BlatantThievery copy() { + return new BlatantThievery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BloodBairn.java b/Mage.Sets/src/mage/sets/commander2015/BloodBairn.java new file mode 100644 index 00000000000..a6572bd9fb2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BloodBairn.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BloodBairn extends mage.sets.magic2014.BloodBairn { + + public BloodBairn(UUID ownerId) { + super(ownerId); + this.cardNumber = 117; + this.expansionSetCode = "C15"; + } + + public BloodBairn(final BloodBairn card) { + super(card); + } + + @Override + public BloodBairn copy() { + return new BloodBairn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BloodsporeThrinax.java b/Mage.Sets/src/mage/sets/commander2015/BloodsporeThrinax.java new file mode 100644 index 00000000000..5a5d699db54 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BloodsporeThrinax.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.DevourEffect; +import mage.abilities.keyword.DevourAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.EntersTheBattlefieldEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; + +/** + * + * @author fireshoes + */ +public class BloodsporeThrinax extends CardImpl { + + public BloodsporeThrinax(UUID ownerId) { + super(ownerId, 33, "Bloodspore Thrinax", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "C15"; + this.subtype.add("Lizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Devour 1 + this.addAbility(new DevourAbility(DevourEffect.DevourFactor.Devour1)); + + // Each other creature you control enters the battlefield with an additional X +1/+1 counters on it, where X is the number of +1/+1 counters on Bloodspire Thrinax. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BloodsporeThrinaxEntersBattlefieldEffect())); + } + + public BloodsporeThrinax(final BloodsporeThrinax card) { + super(card); + } + + @Override + public BloodsporeThrinax copy() { + return new BloodsporeThrinax(this); + } +} + +class BloodsporeThrinaxEntersBattlefieldEffect extends ReplacementEffectImpl { + + public BloodsporeThrinaxEntersBattlefieldEffect() { + super(Duration.WhileOnBattlefield, Outcome.BoostCreature); + staticText = "Each other creature you control enters the battlefield with an additional X +1/+1 counters on it, where X is the number of +1/+1 counters on {this}"; + } + + public BloodsporeThrinaxEntersBattlefieldEffect(BloodsporeThrinaxEntersBattlefieldEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.ENTERS_THE_BATTLEFIELD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); + return creature != null && creature.getControllerId().equals(source.getControllerId()) + && creature.getCardType().contains(CardType.CREATURE) + && !event.getTargetId().equals(source.getSourceId()); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent sourceCreature = game.getPermanent(source.getSourceId()); + Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); + if (sourceCreature != null && creature != null) { + int amount = sourceCreature.getCounters().getCount(CounterType.P1P1); + if (amount > 0) { + creature.addCounters(CounterType.P1P1.createInstance(amount), game); + } + } + return false; + } + + @Override + public BloodsporeThrinaxEntersBattlefieldEffect copy() { + return new BloodsporeThrinaxEntersBattlefieldEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BlueSunsZenith.java b/Mage.Sets/src/mage/sets/commander2015/BlueSunsZenith.java new file mode 100644 index 00000000000..2b03a31ef30 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BlueSunsZenith.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BlueSunsZenith extends mage.sets.mirrodinbesieged.BlueSunsZenith { + + public BlueSunsZenith(UUID ownerId) { + super(ownerId); + this.cardNumber = 88; + this.expansionSetCode = "C15"; + } + + public BlueSunsZenith(final BlueSunsZenith card) { + super(card); + } + + @Override + public BlueSunsZenith copy() { + return new BlueSunsZenith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Blustersquall.java b/Mage.Sets/src/mage/sets/commander2015/Blustersquall.java new file mode 100644 index 00000000000..0277432714b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Blustersquall.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Blustersquall extends mage.sets.returntoravnica.Blustersquall { + + public Blustersquall(UUID ownerId) { + super(ownerId); + this.cardNumber = 89; + this.expansionSetCode = "C15"; + } + + public Blustersquall(final Blustersquall card) { + super(card); + } + + @Override + public Blustersquall copy() { + return new Blustersquall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Bonehoard.java b/Mage.Sets/src/mage/sets/commander2015/Bonehoard.java new file mode 100644 index 00000000000..1594dc38220 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Bonehoard.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Bonehoard extends mage.sets.mirrodinbesieged.Bonehoard { + + public Bonehoard(UUID ownerId) { + super(ownerId); + this.cardNumber = 245; + this.expansionSetCode = "C15"; + } + + public Bonehoard(final Bonehoard card) { + super(card); + } + + @Override + public Bonehoard copy() { + return new Bonehoard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BorderlandBehemoth.java b/Mage.Sets/src/mage/sets/commander2015/BorderlandBehemoth.java new file mode 100644 index 00000000000..dc851589646 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BorderlandBehemoth.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; + +/** + * + * @author fireshoes + */ +public class BorderlandBehemoth extends CardImpl { + + public BorderlandBehemoth(UUID ownerId) { + super(ownerId, 142, "Borderland Behemoth", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "C15"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Borderland Behemoth gets +4/+4 for each other Giant you control. + FilterCreaturePermanent filter = new FilterCreaturePermanent("other Giant you control"); + filter.add(new SubtypePredicate("Giant")); + filter.add(Predicates.not(new PermanentIdPredicate(this.getId()))); + filter.add(new ControllerPredicate(TargetController.YOU)); + DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, 4); + Effect effect = new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield, false); + effect.setText("{this} gets +4/+4 for each other Giant you control"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public BorderlandBehemoth(final BorderlandBehemoth card) { + super(card); + } + + @Override + public BorderlandBehemoth copy() { + return new BorderlandBehemoth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BorosCluestone.java b/Mage.Sets/src/mage/sets/commander2015/BorosCluestone.java new file mode 100644 index 00000000000..c6b00359f38 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BorosCluestone.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BorosCluestone extends mage.sets.dragonsmaze.BorosCluestone { + + public BorosCluestone(UUID ownerId) { + super(ownerId); + this.cardNumber = 246; + this.expansionSetCode = "C15"; + } + + public BorosCluestone(final BorosCluestone card) { + super(card); + } + + @Override + public BorosCluestone copy() { + return new BorosCluestone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BorosGarrison.java b/Mage.Sets/src/mage/sets/commander2015/BorosGarrison.java new file mode 100644 index 00000000000..4228b3b0c76 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BorosGarrison.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BorosGarrison extends mage.sets.planechase.BorosGarrison { + + public BorosGarrison(UUID ownerId) { + super(ownerId); + this.cardNumber = 279; + this.expansionSetCode = "C15"; + } + + public BorosGarrison(final BorosGarrison card) { + super(card); + } + + @Override + public BorosGarrison copy() { + return new BorosGarrison(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BorosGuildgate.java b/Mage.Sets/src/mage/sets/commander2015/BorosGuildgate.java new file mode 100644 index 00000000000..e0358daa1e3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BorosGuildgate.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BorosGuildgate extends mage.sets.gatecrash.BorosGuildgate { + + public BorosGuildgate(UUID ownerId) { + super(ownerId); + this.cardNumber = 280; + this.expansionSetCode = "C15"; + } + + public BorosGuildgate(final BorosGuildgate card) { + super(card); + } + + @Override + public BorosGuildgate copy() { + return new BorosGuildgate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BorosSignet.java b/Mage.Sets/src/mage/sets/commander2015/BorosSignet.java new file mode 100644 index 00000000000..c5ff28ea13d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BorosSignet.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BorosSignet extends mage.sets.ravnica.BorosSignet { + + public BorosSignet(UUID ownerId) { + super(ownerId); + this.cardNumber = 247; + this.expansionSetCode = "C15"; + } + + public BorosSignet(final BorosSignet card) { + super(card); + } + + @Override + public BorosSignet copy() { + return new BorosSignet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Brainstorm.java b/Mage.Sets/src/mage/sets/commander2015/Brainstorm.java new file mode 100644 index 00000000000..d7eed4c41d6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Brainstorm.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Brainstorm extends mage.sets.fifthedition.Brainstorm { + + public Brainstorm(UUID ownerId) { + super(ownerId); + this.cardNumber = 90; + this.expansionSetCode = "C15"; + } + + public Brainstorm(final Brainstorm card) { + super(card); + } + + @Override + public Brainstorm copy() { + return new Brainstorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BreathOfDarigaaz.java b/Mage.Sets/src/mage/sets/commander2015/BreathOfDarigaaz.java new file mode 100644 index 00000000000..004bec7ae2c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BreathOfDarigaaz.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BreathOfDarigaaz extends mage.sets.commander.BreathOfDarigaaz { + + public BreathOfDarigaaz(UUID ownerId) { + super(ownerId); + this.cardNumber = 143; + this.expansionSetCode = "C15"; + } + + public BreathOfDarigaaz(final BreathOfDarigaaz card) { + super(card); + } + + @Override + public BreathOfDarigaaz copy() { + return new BreathOfDarigaaz(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BroodbirthViper.java b/Mage.Sets/src/mage/sets/commander2015/BroodbirthViper.java new file mode 100644 index 00000000000..4f4c3d16d12 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BroodbirthViper.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.MyriadAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BroodbirthViper extends CardImpl { + + public BroodbirthViper(UUID ownerId) { + super(ownerId, 10, "Broodbirth Viper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "C15"; + this.subtype.add("Snake"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Myriad + this.addAbility(new MyriadAbility()); + // Whenever Broodbirth Viper deals combat damage to a player, you may draw a card. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), true, false)); + } + + public BroodbirthViper(final BroodbirthViper card) { + super(card); + } + + @Override + public BroodbirthViper copy() { + return new BroodbirthViper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/BurnishedHart.java b/Mage.Sets/src/mage/sets/commander2015/BurnishedHart.java new file mode 100644 index 00000000000..37d613e3eca --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/BurnishedHart.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BurnishedHart extends mage.sets.theros.BurnishedHart { + + public BurnishedHart(UUID ownerId) { + super(ownerId); + this.cardNumber = 248; + this.expansionSetCode = "C15"; + } + + public BurnishedHart(final BurnishedHart card) { + super(card); + } + + @Override + public BurnishedHart copy() { + return new BurnishedHart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ButcherOfMalakir.java b/Mage.Sets/src/mage/sets/commander2015/ButcherOfMalakir.java new file mode 100644 index 00000000000..cc13809840e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ButcherOfMalakir.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ButcherOfMalakir extends mage.sets.worldwake.ButcherOfMalakir { + + public ButcherOfMalakir(UUID ownerId) { + super(ownerId); + this.cardNumber = 118; + this.expansionSetCode = "C15"; + } + + public ButcherOfMalakir(final ButcherOfMalakir card) { + super(card); + } + + @Override + public ButcherOfMalakir copy() { + return new ButcherOfMalakir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CageOfHands.java b/Mage.Sets/src/mage/sets/commander2015/CageOfHands.java new file mode 100644 index 00000000000..b66d7722b73 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CageOfHands.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CageOfHands extends mage.sets.championsofkamigawa.CageOfHands { + + public CageOfHands(UUID ownerId) { + super(ownerId); + this.cardNumber = 62; + this.expansionSetCode = "C15"; + } + + public CageOfHands(final CageOfHands card) { + super(card); + } + + @Override + public CageOfHands copy() { + return new CageOfHands(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CallTheSkybreaker.java b/Mage.Sets/src/mage/sets/commander2015/CallTheSkybreaker.java new file mode 100644 index 00000000000..6fc69f0e5aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CallTheSkybreaker.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CallTheSkybreaker extends mage.sets.commander.CallTheSkybreaker { + + public CallTheSkybreaker(UUID ownerId) { + super(ownerId); + this.cardNumber = 240; + this.expansionSetCode = "C15"; + } + + public CallTheSkybreaker(final CallTheSkybreaker card) { + super(card); + } + + @Override + public CallTheSkybreaker copy() { + return new CallTheSkybreaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CallerOfTheClaw.java b/Mage.Sets/src/mage/sets/commander2015/CallerOfTheClaw.java new file mode 100644 index 00000000000..00e1be423a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CallerOfTheClaw.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CallerOfTheClaw extends mage.sets.legions.CallerOfTheClaw { + + public CallerOfTheClaw(UUID ownerId) { + super(ownerId); + this.cardNumber = 177; + this.expansionSetCode = "C15"; + } + + public CallerOfTheClaw(final CallerOfTheClaw card) { + super(card); + } + + @Override + public CallerOfTheClaw copy() { + return new CallerOfTheClaw(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CallerOfThePack.java b/Mage.Sets/src/mage/sets/commander2015/CallerOfThePack.java new file mode 100644 index 00000000000..c3d55334a4a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CallerOfThePack.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MyriadAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class CallerOfThePack extends CardImpl { + + public CallerOfThePack(UUID ownerId) { + super(ownerId, 34, "Caller of the Pack", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + this.expansionSetCode = "C15"; + this.subtype.add("Beast"); + this.power = new MageInt(8); + this.toughness = new MageInt(6); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Myriad (Whenever this creature attacks, for each opponent other than the defending player, put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile those tokens at the end of combat.) + this.addAbility(new MyriadAbility()); + + } + + public CallerOfThePack(final CallerOfThePack card) { + super(card); + } + + @Override + public CallerOfThePack copy() { + return new CallerOfThePack(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CelestialAncient.java b/Mage.Sets/src/mage/sets/commander2015/CelestialAncient.java new file mode 100644 index 00000000000..0d4a44192b2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CelestialAncient.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CelestialAncient extends mage.sets.dissension.CelestialAncient { + + public CelestialAncient(UUID ownerId) { + super(ownerId); + this.cardNumber = 63; + this.expansionSetCode = "C15"; + } + + public CelestialAncient(final CelestialAncient card) { + super(card); + } + + @Override + public CelestialAncient copy() { + return new CelestialAncient(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CelestialArchon.java b/Mage.Sets/src/mage/sets/commander2015/CelestialArchon.java new file mode 100644 index 00000000000..efc1c6bcef5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CelestialArchon.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CelestialArchon extends mage.sets.theros.CelestialArchon { + + public CelestialArchon(UUID ownerId) { + super(ownerId); + this.cardNumber = 64; + this.expansionSetCode = "C15"; + } + + public CelestialArchon(final CelestialArchon card) { + super(card); + } + + @Override + public CelestialArchon copy() { + return new CelestialArchon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CentaurVinecrasher.java b/Mage.Sets/src/mage/sets/commander2015/CentaurVinecrasher.java new file mode 100644 index 00000000000..cb5b90bf3be --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CentaurVinecrasher.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterLandCard; + +/** + * + * @author LevelX2 + */ +public class CentaurVinecrasher extends CardImpl { + + public CentaurVinecrasher(UUID ownerId) { + super(ownerId, 35, "Centaur Vinecrasher", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "C15"; + this.subtype.add("Plant"); + this.subtype.add("Centaur"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Centaur Vinecrasher enters the battlefield with a number of +1/+1 counters on it equal to the number of land cards in all graveyards. + Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new CardsInAllGraveyardsCount(new FilterLandCard()), true); + effect.setText("with a number of +1/+1 counters on it equal to the number of land cards in all graveyards"); + this.addAbility(new EntersBattlefieldAbility(effect)); + // Whenever a land card is put into a graveyard from anywhere, you may pay {G}{G}. If you do, return Centaur Vinecrasher from your graveyard to your hand. + this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility( + new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{G}{G}")), + false, new FilterLandCard("a land card"), TargetController.ANY + )); + } + + public CentaurVinecrasher(final CentaurVinecrasher card) { + super(card); + } + + @Override + public CentaurVinecrasher copy() { + return new CentaurVinecrasher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ChainReaction.java b/Mage.Sets/src/mage/sets/commander2015/ChainReaction.java new file mode 100644 index 00000000000..f4a7e53e109 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ChainReaction.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ChainReaction extends mage.sets.worldwake.ChainReaction { + + public ChainReaction(UUID ownerId) { + super(ownerId); + this.cardNumber = 144; + this.expansionSetCode = "C15"; + } + + public ChainReaction(final ChainReaction card) { + super(card); + } + + @Override + public ChainReaction copy() { + return new ChainReaction(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ChameleonColossus.java b/Mage.Sets/src/mage/sets/commander2015/ChameleonColossus.java new file mode 100644 index 00000000000..93d764688fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ChameleonColossus.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ChameleonColossus extends mage.sets.morningtide.ChameleonColossus { + + public ChameleonColossus(UUID ownerId) { + super(ownerId); + this.cardNumber = 178; + this.expansionSetCode = "C15"; + } + + public ChameleonColossus(final ChameleonColossus card) { + super(card); + } + + @Override + public ChameleonColossus copy() { + return new ChameleonColossus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ChampionOfStraySouls.java b/Mage.Sets/src/mage/sets/commander2015/ChampionOfStraySouls.java new file mode 100644 index 00000000000..de9ca779824 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ChampionOfStraySouls.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ChampionOfStraySouls extends mage.sets.bornofthegods.ChampionOfStraySouls { + + public ChampionOfStraySouls(UUID ownerId) { + super(ownerId); + this.cardNumber = 119; + this.expansionSetCode = "C15"; + } + + public ChampionOfStraySouls(final ChampionOfStraySouls card) { + super(card); + } + + @Override + public ChampionOfStraySouls copy() { + return new ChampionOfStraySouls(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CharmbreakerDevils.java b/Mage.Sets/src/mage/sets/commander2015/CharmbreakerDevils.java new file mode 100644 index 00000000000..932ff9b7e47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CharmbreakerDevils.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CharmbreakerDevils extends mage.sets.innistrad.CharmbreakerDevils { + + public CharmbreakerDevils(UUID ownerId) { + super(ownerId); + this.cardNumber = 145; + this.expansionSetCode = "C15"; + } + + public CharmbreakerDevils(final CharmbreakerDevils card) { + super(card); + } + + @Override + public CharmbreakerDevils copy() { + return new CharmbreakerDevils(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Cloudthresher.java b/Mage.Sets/src/mage/sets/commander2015/Cloudthresher.java new file mode 100644 index 00000000000..8cded421966 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Cloudthresher.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Cloudthresher extends mage.sets.lorwyn.Cloudthresher { + + public Cloudthresher(UUID ownerId) { + super(ownerId); + this.cardNumber = 179; + this.expansionSetCode = "C15"; + } + + public Cloudthresher(final Cloudthresher card) { + super(card); + } + + @Override + public Cloudthresher copy() { + return new Cloudthresher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CobraTrap.java b/Mage.Sets/src/mage/sets/commander2015/CobraTrap.java new file mode 100644 index 00000000000..d8a6571c1df --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CobraTrap.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CobraTrap extends mage.sets.zendikar.CobraTrap { + + public CobraTrap(UUID ownerId) { + super(ownerId); + this.cardNumber = 180; + this.expansionSetCode = "C15"; + } + + public CobraTrap(final CobraTrap card) { + super(card); + } + + @Override + public CobraTrap copy() { + return new CobraTrap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CoilingOracle.java b/Mage.Sets/src/mage/sets/commander2015/CoilingOracle.java new file mode 100644 index 00000000000..43d7eaa1642 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CoilingOracle.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CoilingOracle extends mage.sets.dissension.CoilingOracle { + + public CoilingOracle(UUID ownerId) { + super(ownerId); + this.cardNumber = 213; + this.expansionSetCode = "C15"; + } + + public CoilingOracle(final CoilingOracle card) { + super(card); + } + + @Override + public CoilingOracle copy() { + return new CoilingOracle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ColdEyedSelkie.java b/Mage.Sets/src/mage/sets/commander2015/ColdEyedSelkie.java new file mode 100644 index 00000000000..adb74c1e18e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ColdEyedSelkie.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ColdEyedSelkie extends mage.sets.eventide.ColdEyedSelkie { + + public ColdEyedSelkie(UUID ownerId) { + super(ownerId); + this.cardNumber = 241; + this.expansionSetCode = "C15"; + } + + public ColdEyedSelkie(final ColdEyedSelkie card) { + super(card); + } + + @Override + public ColdEyedSelkie copy() { + return new ColdEyedSelkie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ColdsteelHeart.java b/Mage.Sets/src/mage/sets/commander2015/ColdsteelHeart.java new file mode 100644 index 00000000000..af66575ecae --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ColdsteelHeart.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ColdsteelHeart extends mage.sets.coldsnap.ColdsteelHeart { + + public ColdsteelHeart(UUID ownerId) { + super(ownerId); + this.cardNumber = 249; + this.expansionSetCode = "C15"; + } + + public ColdsteelHeart(final ColdsteelHeart card) { + super(card); + } + + @Override + public ColdsteelHeart copy() { + return new ColdsteelHeart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CometStorm.java b/Mage.Sets/src/mage/sets/commander2015/CometStorm.java new file mode 100644 index 00000000000..2da821aaf9a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CometStorm.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CometStorm extends mage.sets.worldwake.CometStorm { + + public CometStorm(UUID ownerId) { + super(ownerId); + this.cardNumber = 146; + this.expansionSetCode = "C15"; + } + + public CometStorm(final CometStorm card) { + super(card); + } + + @Override + public CometStorm copy() { + return new CometStorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CommandBeacon.java b/Mage.Sets/src/mage/sets/commander2015/CommandBeacon.java new file mode 100644 index 00000000000..9d7004c9e3b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CommandBeacon.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.sets.commander2015; + +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.effects.OneShotEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author emerald000 + */ +public class CommandBeacon extends CardImpl { + + public CommandBeacon(UUID ownerId) { + super(ownerId, 56, "Command Beacon", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "C15"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + // {T}, Sacrifice Command Beacon: Put your commander into your hand from the command zone. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CommandBeaconEffect(), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public CommandBeacon(final CommandBeacon card) { + super(card); + } + + @Override + public CommandBeacon copy() { + return new CommandBeacon(this); + } +} + +class CommandBeaconEffect extends OneShotEffect { + + CommandBeaconEffect() { + super(Outcome.ReturnToHand); + this.staticText = "Put your commander into your hand from the command zone"; + } + + CommandBeaconEffect(final CommandBeaconEffect effect) { + super(effect); + } + + @Override + public CommandBeaconEffect copy() { + return new CommandBeaconEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card commander = game.getCard(controller.getCommanderId()); + if (commander != null && game.getState().getZone(commander.getId()) == Zone.COMMAND) { + controller.moveCards(commander, Zone.HAND, source, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CommandTower.java b/Mage.Sets/src/mage/sets/commander2015/CommandTower.java new file mode 100644 index 00000000000..c49aab943d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CommandTower.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CommandTower extends mage.sets.commander2013.CommandTower { + + public CommandTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 281; + this.expansionSetCode = "C15"; + } + + public CommandTower(final CommandTower card) { + super(card); + } + + @Override + public CommandTower copy() { + return new CommandTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CorpseAugur.java b/Mage.Sets/src/mage/sets/commander2015/CorpseAugur.java new file mode 100644 index 00000000000..28a05b4c32f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CorpseAugur.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.dynamicvalue.common.CardsInTargetPlayersGraveyardCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class CorpseAugur extends CardImpl { + + public CorpseAugur(UUID ownerId) { + super(ownerId, 17, "Corpse Augur", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "C15"; + this.subtype.add("Zombie"); + this.subtype.add("Wizard"); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // When Corpse Augur dies, you draw X cards and you lose X life, where X is the number of creature cards in target player's graveyard. + Effect effect = new DrawCardSourceControllerEffect(new CardsInTargetPlayersGraveyardCount()); + effect.setText("You draw X cards"); + Ability ability = new DiesTriggeredAbility(effect, false); + effect = new LoseLifeSourceControllerEffect(new CardsInTargetPlayersGraveyardCount()); + effect.setText("and you lose X life, where X is the number of creature cards in target player's graveyard"); + ability.addEffect(effect); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public CorpseAugur(final CorpseAugur card) { + super(card); + } + + @Override + public CorpseAugur copy() { + return new CorpseAugur(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Counterflux.java b/Mage.Sets/src/mage/sets/commander2015/Counterflux.java new file mode 100644 index 00000000000..97bb07599db --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Counterflux.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Counterflux extends mage.sets.returntoravnica.Counterflux { + + public Counterflux(UUID ownerId) { + super(ownerId); + this.cardNumber = 214; + this.expansionSetCode = "C15"; + } + + public Counterflux(final Counterflux card) { + super(card); + } + + @Override + public Counterflux copy() { + return new Counterflux(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CribSwap.java b/Mage.Sets/src/mage/sets/commander2015/CribSwap.java new file mode 100644 index 00000000000..6a8f7f533af --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CribSwap.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CribSwap extends mage.sets.lorwyn.CribSwap { + + public CribSwap(UUID ownerId) { + super(ownerId); + this.cardNumber = 65; + this.expansionSetCode = "C15"; + } + + public CribSwap(final CribSwap card) { + super(card); + } + + @Override + public CribSwap copy() { + return new CribSwap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CrystalChimes.java b/Mage.Sets/src/mage/sets/commander2015/CrystalChimes.java new file mode 100644 index 00000000000..8de0ce6f940 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CrystalChimes.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.sets.commander2015; + +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.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterEnchantmentCard; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class CrystalChimes extends CardImpl { + + public CrystalChimes(UUID ownerId) { + super(ownerId, 250, "Crystal Chimes", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "C15"; + + // {3}, {tap}, Sacrifice Crystal Chimes: Return all enchantment cards from your graveyard to your hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CrystalChimesEffect(), new GenericManaCost(3)); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public CrystalChimes(final CrystalChimes card) { + super(card); + } + + @Override + public CrystalChimes copy() { + return new CrystalChimes(this); + } +} + +class CrystalChimesEffect extends OneShotEffect { + + CrystalChimesEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "Return all enchantment cards from your graveyard to your hand"; + } + + CrystalChimesEffect(final CrystalChimesEffect effect) { + super(effect); + } + + @Override + public CrystalChimesEffect copy() { + return new CrystalChimesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + return controller.moveCards(controller.getGraveyard().getCards(new FilterEnchantmentCard(), source.getSourceId(), + source.getControllerId(), game), Zone.HAND, source, game); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/CurseOfTheNightlyHunt.java b/Mage.Sets/src/mage/sets/commander2015/CurseOfTheNightlyHunt.java new file mode 100644 index 00000000000..51092b5411b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/CurseOfTheNightlyHunt.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CurseOfTheNightlyHunt extends mage.sets.innistrad.CurseOfTheNightlyHunt { + + public CurseOfTheNightlyHunt(UUID ownerId) { + super(ownerId); + this.cardNumber = 147; + this.expansionSetCode = "C15"; + } + + public CurseOfTheNightlyHunt(final CurseOfTheNightlyHunt card) { + super(card); + } + + @Override + public CurseOfTheNightlyHunt copy() { + return new CurseOfTheNightlyHunt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DarksteelIngot.java b/Mage.Sets/src/mage/sets/commander2015/DarksteelIngot.java new file mode 100644 index 00000000000..02be9f3a793 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DarksteelIngot.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commander2015; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DarksteelIngot extends mage.sets.darksteel.DarksteelIngot { + + public DarksteelIngot(UUID ownerId) { + super(ownerId); + this.cardNumber = 251; + this.expansionSetCode = "C15"; + this.rarity = Rarity.UNCOMMON; + } + + public DarksteelIngot(final DarksteelIngot card) { + super(card); + } + + @Override + public DarksteelIngot copy() { + return new DarksteelIngot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DawnToDusk.java b/Mage.Sets/src/mage/sets/commander2015/DawnToDusk.java new file mode 100644 index 00000000000..49ebac93230 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DawnToDusk.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DawnToDusk extends mage.sets.bornofthegods.DawnToDusk { + + public DawnToDusk(UUID ownerId) { + super(ownerId); + this.cardNumber = 66; + this.expansionSetCode = "C15"; + } + + public DawnToDusk(final DawnToDusk card) { + super(card); + } + + @Override + public DawnToDusk copy() { + return new DawnToDusk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DawnbreakReclaimer.java b/Mage.Sets/src/mage/sets/commander2015/DawnbreakReclaimer.java new file mode 100644 index 00000000000..6e47df60283 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DawnbreakReclaimer.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.sets.commander2015; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +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.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInOpponentsGraveyard; +import mage.util.MessageToClient; + +/** + * + * @author LevelX2 + */ +public class DawnbreakReclaimer extends CardImpl { + + public DawnbreakReclaimer(UUID ownerId) { + super(ownerId, 2, "Dawnbreak Reclaimer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "C15"; + this.subtype.add("Angel"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // At the beginning of your end step, choose a creature card in an opponent's graveyard, then that player chooses a creature card in your graveyard. + // You may return those cards to the battlefield under their owners' control. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new DawnbreakReclaimerEffect(), TargetController.YOU, false)); + } + + public DawnbreakReclaimer(final DawnbreakReclaimer card) { + super(card); + } + + @Override + public DawnbreakReclaimer copy() { + return new DawnbreakReclaimer(this); + } +} + +class DawnbreakReclaimerEffect extends OneShotEffect { + + public DawnbreakReclaimerEffect() { + super(Outcome.Detriment); + this.staticText = "choose a creature card in an opponent's graveyard, then that player chooses a creature card in your graveyard. You may return those cards to the battlefield under their owners' control"; + } + + public DawnbreakReclaimerEffect(final DawnbreakReclaimerEffect effect) { + super(effect); + } + + @Override + public DawnbreakReclaimerEffect copy() { + return new DawnbreakReclaimerEffect(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) { + TargetCardInOpponentsGraveyard targetCreature = new TargetCardInOpponentsGraveyard(new FilterCreatureCard("a creature card in an opponent's graveyard")); + if (controller.choose(Outcome.Detriment, targetCreature, source.getSourceId(), game)) { + Card creatureCard = game.getCard(targetCreature.getFirstTarget()); + Player opponent = game.getPlayer(creatureCard.getOwnerId()); + if (opponent != null) { + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen " + creatureCard.getIdName() + " of " + opponent.getLogName()); + FilterCreatureCard filter = new FilterCreatureCard("a creature card in " + controller.getName() + "'s the graveyard"); + filter.add(new OwnerIdPredicate(controller.getId())); + TargetCardInGraveyard targetCard = new TargetCardInGraveyard(filter); + targetCard.setNotTarget(true); + if (opponent.choose(outcome, targetCard, source.getSourceId(), game)) { + Card controllerCreatureCard = game.getCard(targetCard.getFirstTarget()); + if (controllerCreatureCard != null) { + MessageToClient message = new MessageToClient("Return those cards to the battlefield under their owners' control?", + "Opponent's creature card: " + creatureCard.getLogName() + " - Your creature: " + controllerCreatureCard.getLogName()); + if (controller.chooseUse(outcome, message, source, game)) { + Set cards = new HashSet<>(); + cards.add(creatureCard); + cards.add(controllerCreatureCard); + opponent.moveCards(cards, Zone.BATTLEFIELD, source, game, false, false, true, null); + } + } + } + } + } + return true; + } + return false; + + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DawnglareInvoker.java b/Mage.Sets/src/mage/sets/commander2015/DawnglareInvoker.java new file mode 100644 index 00000000000..9fbb403666b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DawnglareInvoker.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DawnglareInvoker extends mage.sets.riseoftheeldrazi.DawnglareInvoker { + + public DawnglareInvoker(UUID ownerId) { + super(ownerId); + this.cardNumber = 67; + this.expansionSetCode = "C15"; + } + + public DawnglareInvoker(final DawnglareInvoker card) { + super(card); + } + + @Override + public DawnglareInvoker copy() { + return new DawnglareInvoker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DaxosTheReturned.java b/Mage.Sets/src/mage/sets/commander2015/DaxosTheReturned.java new file mode 100644 index 00000000000..f0909282109 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DaxosTheReturned.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class DaxosTheReturned extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("an enchantment spell"); + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + } + + public DaxosTheReturned(UUID ownerId) { + super(ownerId, 43, "Daxos the Returned", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{W}{B}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Zombie"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever you cast an enchantment spell, you get an experience counter. + Effect effect = new AddCountersControllerEffect(CounterType.EXPERIENCE.createInstance(1), false); + effect.setText("you get an experience counter"); + Ability ability = new SpellCastControllerTriggeredAbility(effect, filter, false); + this.addAbility(ability); + + // {1}{W}{B}: Put a white and black Spirit enchantment creature token onto the battlefield. It has + // "This creature's power and toughness are each equal to the number of experience counters you have." + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DaxosSpiritToken(), 1), new ManaCostsImpl("{1}{W}{B}"))); + } + + public DaxosTheReturned(final DaxosTheReturned card) { + super(card); + } + + @Override + public DaxosTheReturned copy() { + return new DaxosTheReturned(this); + } +} + + +class DaxosSpiritToken extends Token { + DaxosSpiritToken() { + super("Spirit", "white and black Spirit enchantment creature token with \"This creature's power and toughness are each equal to the number of experience counters you have.\""); + this.setOriginalExpansionSetCode("C15"); + cardType.add(CardType.CREATURE); + cardType.add(CardType.ENCHANTMENT); + color.setWhite(true); + color.setBlack(true); + subtype.add("Spirit"); + power = new MageInt(0); + toughness = new MageInt(0); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DaxosSpiritSetPTEffect())); + } +} + +class DaxosSpiritSetPTEffect extends ContinuousEffectImpl { + + public DaxosSpiritSetPTEffect() { + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + staticText = "This creature's power and toughness are each equal to the number of experience counters you have"; + } + + public DaxosSpiritSetPTEffect(final DaxosSpiritSetPTEffect effect) { + super(effect); + } + + @Override + public DaxosSpiritSetPTEffect copy() { + return new DaxosSpiritSetPTEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null && new MageObjectReference(source.getSourceObject(game), game).refersTo(permanent, game)) { + int amount = controller.getCounters().getCount(CounterType.EXPERIENCE); + permanent.getPower().setValue(amount); + permanent.getToughness().setValue(amount); + return true; + } else { + discard(); + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2015/DaxossTorment.java b/Mage.Sets/src/mage/sets/commander2015/DaxossTorment.java new file mode 100644 index 00000000000..1ef4d5f4059 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DaxossTorment.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.permanent.token.Token; + +/** + * + * @author fireshoes + */ +public class DaxossTorment extends CardImpl { + + public DaxossTorment(UUID ownerId) { + super(ownerId, 18, "Daxos's Torment", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + this.expansionSetCode = "C15"; + + // Constellation - Whenever Daxos's Torment or another enchantment enters the battlefield under your control, Daxos's Torment becomes a 5/5 Demon creature with flying and haste until end of turn in addition to its other types. + this.addAbility(new ConstellationAbility(new BecomesCreatureSourceEffect(new DaxossTormentToken(), "", Duration.EndOfTurn))); + } + + public DaxossTorment(final DaxossTorment card) { + super(card); + } + + @Override + public DaxossTorment copy() { + return new DaxossTorment(this); + } +} + +class DaxossTormentToken extends Token { + + public DaxossTormentToken() { + super("", "a 5/5 Demon creature with flying and haste"); + cardType.add(CardType.CREATURE); + + subtype.add("Demon"); + power = new MageInt(5); + toughness = new MageInt(5); + addAbility(FlyingAbility.getInstance()); + addAbility(HasteAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DayOfTheDragons.java b/Mage.Sets/src/mage/sets/commander2015/DayOfTheDragons.java new file mode 100644 index 00000000000..8e29a7a39d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DayOfTheDragons.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DayOfTheDragons extends mage.sets.scourge.DayOfTheDragons { + + public DayOfTheDragons(UUID ownerId) { + super(ownerId); + this.cardNumber = 91; + this.expansionSetCode = "C15"; + } + + public DayOfTheDragons(final DayOfTheDragons card) { + super(card); + } + + @Override + public DayOfTheDragons copy() { + return new DayOfTheDragons(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DeadlyTempest.java b/Mage.Sets/src/mage/sets/commander2015/DeadlyTempest.java new file mode 100644 index 00000000000..7af864bd0f1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DeadlyTempest.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.sets.commander2015; + +import java.util.HashMap; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class DeadlyTempest extends CardImpl { + + public DeadlyTempest(UUID ownerId) { + super(ownerId, 19, "Deadly Tempest", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "C15"; + + // Destroy all creatures. Each player loses life equal to the number of creatures he or she controlled that were destroyed this way. + getSpellAbility().addEffect(new DeadlyTempestEffect()); + } + + public DeadlyTempest(final DeadlyTempest card) { + super(card); + } + + @Override + public DeadlyTempest copy() { + return new DeadlyTempest(this); + } +} + +class DeadlyTempestEffect extends OneShotEffect { + + public DeadlyTempestEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy all creatures. Each player loses life equal to the number of creatures he or she controlled that were destroyed this way"; + } + + public DeadlyTempestEffect(final DeadlyTempestEffect effect) { + super(effect); + } + + @Override + public DeadlyTempestEffect copy() { + return new DeadlyTempestEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + HashMap destroyedCreatures = new HashMap<>(); + for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) { + if (permanent.destroy(source.getSourceId(), game, false)) { + int count = destroyedCreatures.containsKey(permanent.getControllerId()) ? destroyedCreatures.get(permanent.getControllerId()) : 0; + destroyedCreatures.put(permanent.getControllerId(), count + 1); + } + } + for (UUID playerId : game.getState().getPlayerList(source.getControllerId())) { + int count = destroyedCreatures.containsKey(playerId) ? destroyedCreatures.get(playerId) : 0; + if (count > 0) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.damage(count, playerId, game, false, true); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DeathGrasp.java b/Mage.Sets/src/mage/sets/commander2015/DeathGrasp.java new file mode 100644 index 00000000000..55f24816b8e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DeathGrasp.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DeathGrasp extends mage.sets.apocalypse.DeathGrasp { + + public DeathGrasp(UUID ownerId) { + super(ownerId); + this.cardNumber = 215; + this.expansionSetCode = "C15"; + } + + public DeathGrasp(final DeathGrasp card) { + super(card); + } + + @Override + public DeathGrasp copy() { + return new DeathGrasp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DesertTwister.java b/Mage.Sets/src/mage/sets/commander2015/DesertTwister.java new file mode 100644 index 00000000000..bd7d8a64ff2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DesertTwister.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DesertTwister extends mage.sets.revisededition.DesertTwister { + + public DesertTwister(UUID ownerId) { + super(ownerId); + this.cardNumber = 181; + this.expansionSetCode = "C15"; + } + + public DesertTwister(final DesertTwister card) { + super(card); + } + + @Override + public DesertTwister copy() { + return new DesertTwister(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DesolationGiant.java b/Mage.Sets/src/mage/sets/commander2015/DesolationGiant.java new file mode 100644 index 00000000000..76982a9f582 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DesolationGiant.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DesolationGiant extends mage.sets.apocalypse.DesolationGiant { + + public DesolationGiant(UUID ownerId) { + super(ownerId); + this.cardNumber = 148; + this.expansionSetCode = "C15"; + } + + public DesolationGiant(final DesolationGiant card) { + super(card); + } + + @Override + public DesolationGiant copy() { + return new DesolationGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DesperateRavings.java b/Mage.Sets/src/mage/sets/commander2015/DesperateRavings.java new file mode 100644 index 00000000000..2991bbcb075 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DesperateRavings.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DesperateRavings extends mage.sets.innistrad.DesperateRavings { + + public DesperateRavings(UUID ownerId) { + super(ownerId); + this.cardNumber = 149; + this.expansionSetCode = "C15"; + } + + public DesperateRavings(final DesperateRavings card) { + super(card); + } + + @Override + public DesperateRavings copy() { + return new DesperateRavings(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DiabolicServitude.java b/Mage.Sets/src/mage/sets/commander2015/DiabolicServitude.java new file mode 100644 index 00000000000..7e226b8f4cd --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DiabolicServitude.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DiabolicServitude extends mage.sets.urzassaga.DiabolicServitude { + + public DiabolicServitude(UUID ownerId) { + super(ownerId); + this.cardNumber = 120; + this.expansionSetCode = "C15"; + } + + public DiabolicServitude(final DiabolicServitude card) { + super(card); + } + + @Override + public DiabolicServitude copy() { + return new DiabolicServitude(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DictateOfHeliod.java b/Mage.Sets/src/mage/sets/commander2015/DictateOfHeliod.java new file mode 100644 index 00000000000..e78f9123474 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DictateOfHeliod.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DictateOfHeliod extends mage.sets.journeyintonyx.DictateOfHeliod { + + public DictateOfHeliod(UUID ownerId) { + super(ownerId); + this.cardNumber = 68; + this.expansionSetCode = "C15"; + } + + public DictateOfHeliod(final DictateOfHeliod card) { + super(card); + } + + @Override + public DictateOfHeliod copy() { + return new DictateOfHeliod(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DisasterRadius.java b/Mage.Sets/src/mage/sets/commander2015/DisasterRadius.java new file mode 100644 index 00000000000..cfb6de05ba2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DisasterRadius.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DisasterRadius extends mage.sets.riseoftheeldrazi.DisasterRadius { + + public DisasterRadius(UUID ownerId) { + super(ownerId); + this.cardNumber = 150; + this.expansionSetCode = "C15"; + } + + public DisasterRadius(final DisasterRadius card) { + super(card); + } + + @Override + public DisasterRadius copy() { + return new DisasterRadius(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Dominate.java b/Mage.Sets/src/mage/sets/commander2015/Dominate.java new file mode 100644 index 00000000000..8a6c392e218 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Dominate.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Dominate extends mage.sets.nemesis.Dominate { + + public Dominate(UUID ownerId) { + super(ownerId); + this.cardNumber = 92; + this.expansionSetCode = "C15"; + } + + public Dominate(final Dominate card) { + super(card); + } + + @Override + public Dominate copy() { + return new Dominate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DoomwakeGiant.java b/Mage.Sets/src/mage/sets/commander2015/DoomwakeGiant.java new file mode 100644 index 00000000000..e4fcc3a412c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DoomwakeGiant.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DoomwakeGiant extends mage.sets.journeyintonyx.DoomwakeGiant { + + public DoomwakeGiant(UUID ownerId) { + super(ownerId); + this.cardNumber = 121; + this.expansionSetCode = "C15"; + } + + public DoomwakeGiant(final DoomwakeGiant card) { + super(card); + } + + @Override + public DoomwakeGiant copy() { + return new DoomwakeGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DragonMage.java b/Mage.Sets/src/mage/sets/commander2015/DragonMage.java new file mode 100644 index 00000000000..985eeb5a07a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DragonMage.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DragonMage extends mage.sets.scourge.DragonMage { + + public DragonMage(UUID ownerId) { + super(ownerId); + this.cardNumber = 151; + this.expansionSetCode = "C15"; + } + + public DragonMage(final DragonMage card) { + super(card); + } + + @Override + public DragonMage copy() { + return new DragonMage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DreadSummons.java b/Mage.Sets/src/mage/sets/commander2015/DreadSummons.java new file mode 100644 index 00000000000..4f2b645a370 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DreadSummons.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.sets.commander2015; + +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.token.ZombieToken; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class DreadSummons extends CardImpl { + + public DreadSummons(UUID ownerId) { + super(ownerId, 20, "Dread Summons", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{B}{B}"); + this.expansionSetCode = "C15"; + + // Each player puts the top X cards of his or her library into his or her graveyard. For each creature card put into a graveyard this way, you put a 2/2 black Zombie creature token onto the battlefield tapped. + getSpellAbility().addEffect(new DreadSummonsEffect()); + } + + public DreadSummons(final DreadSummons card) { + super(card); + } + + @Override + public DreadSummons copy() { + return new DreadSummons(this); + } +} + +class DreadSummonsEffect extends OneShotEffect { + + public DreadSummonsEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Each player puts the top X cards of his or her library into his or her graveyard. For each creature card put into a graveyard this way, you put a 2/2 black Zombie creature token onto the battlefield tapped"; + } + + public DreadSummonsEffect(final DreadSummonsEffect effect) { + super(effect); + } + + @Override + public DreadSummonsEffect copy() { + return new DreadSummonsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int numberOfCards = source.getManaCostsToPay().getX(); + if (numberOfCards > 0) { + int numberOfCreatureCards = 0; + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + Set movedCards = player.moveCardsToGraveyardWithInfo(player.getLibrary().getTopCards(game, numberOfCards), source, game, Zone.LIBRARY); + for (Card card : movedCards) { + if (card.getCardType().contains(CardType.CREATURE)) { + numberOfCreatureCards++; + } + } + } + } + if (numberOfCreatureCards > 0) { + return new CreateTokenEffect(new ZombieToken(), numberOfCreatureCards, true, false).apply(game, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DreadbringerLampads.java b/Mage.Sets/src/mage/sets/commander2015/DreadbringerLampads.java new file mode 100644 index 00000000000..40bd277c596 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DreadbringerLampads.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DreadbringerLampads extends mage.sets.journeyintonyx.DreadbringerLampads { + + public DreadbringerLampads(UUID ownerId) { + super(ownerId); + this.cardNumber = 122; + this.expansionSetCode = "C15"; + } + + public DreadbringerLampads(final DreadbringerLampads card) { + super(card); + } + + @Override + public DreadbringerLampads copy() { + return new DreadbringerLampads(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DreamPillager.java b/Mage.Sets/src/mage/sets/commander2015/DreamPillager.java new file mode 100644 index 00000000000..e3845f46a27 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DreamPillager.java @@ -0,0 +1,190 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; +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.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class DreamPillager extends CardImpl { + + public DreamPillager(UUID ownerId) { + super(ownerId, 25, "Dream Pillager", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "C15"; + this.subtype.add("Dragon"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever Dream Pillager deals combat damage to a player, exile that many cards from the top of your library. Until end of turn, you may cast nonland cards exiled this way. + this.addAbility(new DreamPillagerTriggeredAbility()); + } + + public DreamPillager(final DreamPillager card) { + super(card); + } + + @Override + public DreamPillager copy() { + return new DreamPillager(this); + } +} + +class DreamPillagerTriggeredAbility extends TriggeredAbilityImpl { + + public DreamPillagerTriggeredAbility() { + super(Zone.BATTLEFIELD, new DreamPillagerEffect(), false); + } + + public DreamPillagerTriggeredAbility(final DreamPillagerTriggeredAbility ability) { + super(ability); + } + + @Override + public DreamPillagerTriggeredAbility copy() { + return new DreamPillagerTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getSourceId().equals(this.sourceId) && ((DamagedPlayerEvent) event).isCombatDamage()) { + for (Effect effect : getEffects()) { + effect.setValue("damage", event.getAmount()); + } + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} deals combat damage to a player, exile that many cards from the top of your library. Until end of turn, you may cast nonland cards exiled this way."; + } +} + +class DreamPillagerEffect extends OneShotEffect { + + public DreamPillagerEffect() { + super(Outcome.Benefit); + this.staticText = "exile that many cards from the top of your library. Until end of turn, you may cast nonland cards exiled this way"; + } + + public DreamPillagerEffect(final DreamPillagerEffect effect) { + super(effect); + } + + @Override + public DreamPillagerEffect copy() { + return new DreamPillagerEffect(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) { + int amount = (Integer) getValue("damage"); + if (amount > 0) { + Set cards = controller.getLibrary().getTopCards(game, amount); + if (!cards.isEmpty()) { + controller.moveCards(cards, Zone.EXILED, source, game); + for (Card card : cards) { + if (!card.getCardType().contains(CardType.LAND)) { + ContinuousEffect effect = new DreamPillagerCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + game.addEffect(effect, source); + } + } + } + return true; + } + return true; + } + return false; + } +} + +class DreamPillagerCastFromExileEffect extends AsThoughEffectImpl { + + public DreamPillagerCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); + staticText = "You may play the card from exile"; + } + + public DreamPillagerCastFromExileEffect(final DreamPillagerCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public DreamPillagerCastFromExileEffect copy() { + return new DreamPillagerCastFromExileEffect(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/sets/commander2015/DreamstoneHedron.java b/Mage.Sets/src/mage/sets/commander2015/DreamstoneHedron.java new file mode 100644 index 00000000000..75d8d6a1a21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DreamstoneHedron.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DreamstoneHedron extends mage.sets.riseoftheeldrazi.DreamstoneHedron { + + public DreamstoneHedron(UUID ownerId) { + super(ownerId); + this.cardNumber = 252; + this.expansionSetCode = "C15"; + } + + public DreamstoneHedron(final DreamstoneHedron card) { + super(card); + } + + @Override + public DreamstoneHedron copy() { + return new DreamstoneHedron(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/DriftingMeadow.java b/Mage.Sets/src/mage/sets/commander2015/DriftingMeadow.java new file mode 100644 index 00000000000..3f456bfd3bd --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/DriftingMeadow.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DriftingMeadow extends mage.sets.urzassaga.DriftingMeadow { + + public DriftingMeadow(UUID ownerId) { + super(ownerId); + this.cardNumber = 282; + this.expansionSetCode = "C15"; + } + + public DriftingMeadow(final DriftingMeadow card) { + super(card); + } + + @Override + public DriftingMeadow copy() { + return new DriftingMeadow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Earthquake.java b/Mage.Sets/src/mage/sets/commander2015/Earthquake.java new file mode 100644 index 00000000000..bb54ec42ef4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Earthquake.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Earthquake extends mage.sets.magic2010.Earthquake { + + public Earthquake(UUID ownerId) { + super(ownerId); + this.cardNumber = 152; + this.expansionSetCode = "C15"; + } + + public Earthquake(final Earthquake card) { + super(card); + } + + @Override + public Earthquake copy() { + return new Earthquake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/EaterOfHope.java b/Mage.Sets/src/mage/sets/commander2015/EaterOfHope.java new file mode 100644 index 00000000000..b044d9823fc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EaterOfHope.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EaterOfHope extends mage.sets.bornofthegods.EaterOfHope { + + public EaterOfHope(UUID ownerId) { + super(ownerId); + this.cardNumber = 123; + this.expansionSetCode = "C15"; + } + + public EaterOfHope(final EaterOfHope card) { + super(card); + } + + @Override + public EaterOfHope copy() { + return new EaterOfHope(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/EchoingTruth.java b/Mage.Sets/src/mage/sets/commander2015/EchoingTruth.java new file mode 100644 index 00000000000..db0fe308b0d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EchoingTruth.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EchoingTruth extends mage.sets.elspethvstezzeret.EchoingTruth { + + public EchoingTruth(UUID ownerId) { + super(ownerId); + this.cardNumber = 93; + this.expansionSetCode = "C15"; + } + + public EchoingTruth(final EchoingTruth card) { + super(card); + } + + @Override + public EchoingTruth copy() { + return new EchoingTruth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/EldraziMonument.java b/Mage.Sets/src/mage/sets/commander2015/EldraziMonument.java new file mode 100644 index 00000000000..ade27871472 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EldraziMonument.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EldraziMonument extends mage.sets.zendikar.EldraziMonument { + + public EldraziMonument(UUID ownerId) { + super(ownerId); + this.cardNumber = 253; + this.expansionSetCode = "C15"; + } + + public EldraziMonument(final EldraziMonument card) { + super(card); + } + + @Override + public EldraziMonument copy() { + return new EldraziMonument(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ElvishVisionary.java b/Mage.Sets/src/mage/sets/commander2015/ElvishVisionary.java new file mode 100644 index 00000000000..c06da388daa --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ElvishVisionary.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ElvishVisionary extends mage.sets.shardsofalara.ElvishVisionary { + + public ElvishVisionary(UUID ownerId) { + super(ownerId); + this.cardNumber = 182; + this.expansionSetCode = "C15"; + } + + public ElvishVisionary(final ElvishVisionary card) { + super(card); + } + + @Override + public ElvishVisionary copy() { + return new ElvishVisionary(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/EpicExperiment.java b/Mage.Sets/src/mage/sets/commander2015/EpicExperiment.java new file mode 100644 index 00000000000..dd720ca83b0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EpicExperiment.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EpicExperiment extends mage.sets.returntoravnica.EpicExperiment { + + public EpicExperiment(UUID ownerId) { + super(ownerId); + this.cardNumber = 216; + this.expansionSetCode = "C15"; + } + + public EpicExperiment(final EpicExperiment card) { + super(card); + } + + @Override + public EpicExperiment copy() { + return new EpicExperiment(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/EtheriumHornSorcerer.java b/Mage.Sets/src/mage/sets/commander2015/EtheriumHornSorcerer.java new file mode 100644 index 00000000000..82017cf6a11 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EtheriumHornSorcerer.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EtheriumHornSorcerer extends mage.sets.planechase2012.EtheriumHornSorcerer { + + public EtheriumHornSorcerer(UUID ownerId) { + super(ownerId); + this.cardNumber = 217; + this.expansionSetCode = "C15"; + } + + public EtheriumHornSorcerer(final EtheriumHornSorcerer card) { + super(card); + } + + @Override + public EtheriumHornSorcerer copy() { + return new EtheriumHornSorcerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/EvolvingWilds.java b/Mage.Sets/src/mage/sets/commander2015/EvolvingWilds.java new file mode 100644 index 00000000000..aa2e84982df --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EvolvingWilds.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EvolvingWilds extends mage.sets.riseoftheeldrazi.EvolvingWilds { + + public EvolvingWilds(UUID ownerId) { + super(ownerId); + this.cardNumber = 283; + this.expansionSetCode = "C15"; + } + + public EvolvingWilds(final EvolvingWilds card) { + super(card); + } + + @Override + public EvolvingWilds copy() { + return new EvolvingWilds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ExperimentOne.java b/Mage.Sets/src/mage/sets/commander2015/ExperimentOne.java new file mode 100644 index 00000000000..4f670a31e1b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ExperimentOne.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ExperimentOne extends mage.sets.gatecrash.ExperimentOne { + + public ExperimentOne(UUID ownerId) { + super(ownerId); + this.cardNumber = 184; + this.expansionSetCode = "C15"; + } + + public ExperimentOne(final ExperimentOne card) { + super(card); + } + + @Override + public ExperimentOne copy() { + return new ExperimentOne(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ExtractorDemon.java b/Mage.Sets/src/mage/sets/commander2015/ExtractorDemon.java new file mode 100644 index 00000000000..36ea2095660 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ExtractorDemon.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ExtractorDemon extends mage.sets.conflux.ExtractorDemon { + + public ExtractorDemon(UUID ownerId) { + super(ownerId); + this.cardNumber = 124; + this.expansionSetCode = "C15"; + } + + public ExtractorDemon(final ExtractorDemon card) { + super(card); + } + + @Override + public ExtractorDemon copy() { + return new ExtractorDemon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/EzuriClawOfProgress.java b/Mage.Sets/src/mage/sets/commander2015/EzuriClawOfProgress.java new file mode 100644 index 00000000000..7c26e6acfa2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EzuriClawOfProgress.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.Filter; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class EzuriClawOfProgress extends CardImpl { + + final private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); + final private static FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent(); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter2.add(new AnotherPredicate()); + } + + String rule = "Whenever a creature with power 2 or less enters the battlefield under your control, you get an experience counter."; + + public EzuriClawOfProgress(UUID ownerId) { + super(ownerId, 44, "Ezuri, Claw of Progress", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever a creature with power 2 or less enters the battlefield under your control, you get an experience counter. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new AddCountersControllerEffect( + CounterType.EXPERIENCE.createInstance(1), false), filter, false, rule, true)); + + // At the beginning of combat on your turn, put X +1/+1 counters on another target creature you control, where X is the number of experience counters you have. + Ability ability = new BeginningOfCombatTriggeredAbility(new EzuriClawOfProgressEffect(), TargetController.YOU, false); + ability.addTarget(new TargetControlledCreaturePermanent(filter2)); + this.addAbility(ability); + } + + public EzuriClawOfProgress(final EzuriClawOfProgress card) { + super(card); + } + + @Override + public EzuriClawOfProgress copy() { + return new EzuriClawOfProgress(this); + } +} + +class EzuriClawOfProgressEffect extends OneShotEffect { + + public EzuriClawOfProgressEffect() { + super(Outcome.Benefit); + this.staticText = "put X +1/+1 counters on another target creature you control, where X is the number of experience counters you have"; + } + + public EzuriClawOfProgressEffect(final EzuriClawOfProgressEffect effect) { + super(effect); + } + + @Override + public EzuriClawOfProgressEffect copy() { + return new EzuriClawOfProgressEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent target = game.getPermanent(source.getFirstTarget()); + if (target == null) { + return false; + } + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int amount = controller.getCounters().getCount(CounterType.EXPERIENCE); + target.addCounters(CounterType.P1P1.createInstance(amount), game); + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2015/EzurisPredation.java b/Mage.Sets/src/mage/sets/commander2015/EzurisPredation.java new file mode 100644 index 00000000000..3cf34bdbca4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/EzurisPredation.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.sets.commander2015; + +import java.util.List; +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.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +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.game.permanent.token.BeastToken2; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class EzurisPredation extends CardImpl { + + public EzurisPredation(UUID ownerId) { + super(ownerId, 36, "Ezuri's Predation", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{G}{G}{G}"); + this.expansionSetCode = "C15"; + + // For each creature your opponents control, put a 4/4 green Beast creature token onto the battlefield. Each of those Beasts fights a different one of those creatures. + this.getSpellAbility().addEffect(new EzurisPredationEffect()); + } + + public EzurisPredation(final EzurisPredation card) { + super(card); + } + + @Override + public EzurisPredation copy() { + return new EzurisPredation(this); + } +} + +class EzurisPredationEffect extends OneShotEffect { + + public EzurisPredationEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "For each creature your opponents control, put a 4/4 green Beast creature token onto the battlefield. Each of those Beasts fights a different one of those creatures"; + } + + public EzurisPredationEffect(final EzurisPredationEffect effect) { + super(effect); + } + + @Override + public EzurisPredationEffect copy() { + return new EzurisPredationEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + /* + * Players can't cast spells or activate any abilities in between the + * Beasts entering the battlefield and fighting the other creatures. + * Ifthe Beasts entering the battlefield cause any abilities to trigger, + * those abilities will be put onto the stack after Ezuri's Predation is + * finished resolving. + * You choose which Beast is fighting which creature + * an opponent controls. Each of the "fights" happens at the same time. + * If Ezuri's Predation creates more than one token for any given + * creature (due to an effect such as the one Doubling Season creates), + * the extra tokens won't fight any creature. + */ + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + FilterCreaturePermanent filterCreature = new FilterCreaturePermanent(); + filterCreature.add(new ControllerPredicate(TargetController.OPPONENT)); + List creaturesOfOpponents = game.getBattlefield().getActivePermanents(filterCreature, source.getControllerId(), source.getSourceId(), game); + if (!creaturesOfOpponents.isEmpty()) { + CreateTokenEffect effect = new CreateTokenEffect(new BeastToken2(), creaturesOfOpponents.size()); + effect.apply(game, source); + for (UUID tokenId : effect.getLastAddedTokenIds()) { + Permanent token = game.getPermanent(tokenId); + if (token != null) { + if (creaturesOfOpponents.isEmpty()) { + break; + } + Permanent opponentCreature = creaturesOfOpponents.iterator().next(); + creaturesOfOpponents.remove(opponentCreature); + token.fight(opponentCreature, source, game); + game.informPlayers(token.getLogName() + " fights " + opponentCreature.getLogName()); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FactOrFiction.java b/Mage.Sets/src/mage/sets/commander2015/FactOrFiction.java new file mode 100644 index 00000000000..388260e835d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FactOrFiction.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FactOrFiction extends mage.sets.invasion.FactOrFiction { + + public FactOrFiction(UUID ownerId) { + super(ownerId); + this.cardNumber = 94; + this.expansionSetCode = "C15"; + } + + public FactOrFiction(final FactOrFiction card) { + super(card); + } + + @Override + public FactOrFiction copy() { + return new FactOrFiction(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FaithlessLooting.java b/Mage.Sets/src/mage/sets/commander2015/FaithlessLooting.java new file mode 100644 index 00000000000..e6ca2d645d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FaithlessLooting.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FaithlessLooting extends mage.sets.darkascension.FaithlessLooting { + + public FaithlessLooting(UUID ownerId) { + super(ownerId); + this.cardNumber = 153; + this.expansionSetCode = "C15"; + } + + public FaithlessLooting(final FaithlessLooting card) { + super(card); + } + + @Override + public FaithlessLooting copy() { + return new FaithlessLooting(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FaithsFetters.java b/Mage.Sets/src/mage/sets/commander2015/FaithsFetters.java new file mode 100644 index 00000000000..533bef26454 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FaithsFetters.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FaithsFetters extends mage.sets.divinevsdemonic.FaithsFetters { + + public FaithsFetters(UUID ownerId) { + super(ownerId); + this.cardNumber = 69; + this.expansionSetCode = "C15"; + } + + public FaithsFetters(final FaithsFetters card) { + super(card); + } + + @Override + public FaithsFetters copy() { + return new FaithsFetters(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FallOfTheHammer.java b/Mage.Sets/src/mage/sets/commander2015/FallOfTheHammer.java new file mode 100644 index 00000000000..0d1ec478b72 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FallOfTheHammer.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FallOfTheHammer extends mage.sets.bornofthegods.FallOfTheHammer { + + public FallOfTheHammer(UUID ownerId) { + super(ownerId); + this.cardNumber = 154; + this.expansionSetCode = "C15"; + } + + public FallOfTheHammer(final FallOfTheHammer card) { + super(card); + } + + @Override + public FallOfTheHammer copy() { + return new FallOfTheHammer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FallenIdeal.java b/Mage.Sets/src/mage/sets/commander2015/FallenIdeal.java new file mode 100644 index 00000000000..e5efb44f102 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FallenIdeal.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FallenIdeal extends mage.sets.timespiral.FallenIdeal { + + public FallenIdeal(UUID ownerId) { + super(ownerId); + this.cardNumber = 125; + this.expansionSetCode = "C15"; + } + + public FallenIdeal(final FallenIdeal card) { + super(card); + } + + @Override + public FallenIdeal copy() { + return new FallenIdeal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FateUnraveler.java b/Mage.Sets/src/mage/sets/commander2015/FateUnraveler.java new file mode 100644 index 00000000000..f176fee9136 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FateUnraveler.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FateUnraveler extends mage.sets.bornofthegods.FateUnraveler { + + public FateUnraveler(UUID ownerId) { + super(ownerId); + this.cardNumber = 126; + this.expansionSetCode = "C15"; + } + + public FateUnraveler(final FateUnraveler card) { + super(card); + } + + @Override + public FateUnraveler copy() { + return new FateUnraveler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FellwarStone.java b/Mage.Sets/src/mage/sets/commander2015/FellwarStone.java new file mode 100644 index 00000000000..94c57e79de3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FellwarStone.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FellwarStone extends mage.sets.ninthedition.FellwarStone { + + public FellwarStone(UUID ownerId) { + super(ownerId); + this.cardNumber = 254; + this.expansionSetCode = "C15"; + } + + public FellwarStone(final FellwarStone card) { + super(card); + } + + @Override + public FellwarStone copy() { + return new FellwarStone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FieryConfluence.java b/Mage.Sets/src/mage/sets/commander2015/FieryConfluence.java new file mode 100644 index 00000000000..29491222bbc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FieryConfluence.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author fireshoes + */ +public class FieryConfluence extends CardImpl { + + public FieryConfluence(UUID ownerId) { + super(ownerId, 26, "Fiery Confluence", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); + this.expansionSetCode = "C15"; + + // Choose three. You may choose the same mode more than once. + this.getSpellAbility().getModes().setMinModes(3); + this.getSpellAbility().getModes().setMaxModes(3); + this.getSpellAbility().getModes().setEachModeMoreThanOnce(true); + + // - Fiery Confluence deals 1 damage to each creature; + this.getSpellAbility().addEffect(new DamageAllEffect(1, new FilterCreaturePermanent())); + + // Fiery Confluence deals 2 damage to each opponent; + Mode mode = new Mode(); + mode.getEffects().add(new DamagePlayersEffect(2, TargetController.OPPONENT)); + this.getSpellAbility().getModes().addMode(mode); + + // Destroy target artifact. + mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + mode.getTargets().add(new TargetArtifactPermanent()); + this.getSpellAbility().getModes().addMode(mode); + } + + public FieryConfluence(final FieryConfluence card) { + super(card); + } + + @Override + public FieryConfluence copy() { + return new FieryConfluence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FiremindsForesight.java b/Mage.Sets/src/mage/sets/commander2015/FiremindsForesight.java new file mode 100644 index 00000000000..4d5b379d655 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FiremindsForesight.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FiremindsForesight extends mage.sets.returntoravnica.FiremindsForesight { + + public FiremindsForesight(UUID ownerId) { + super(ownerId); + this.cardNumber = 218; + this.expansionSetCode = "C15"; + } + + public FiremindsForesight(final FiremindsForesight card) { + super(card); + } + + @Override + public FiremindsForesight copy() { + return new FiremindsForesight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Forest1.java b/Mage.Sets/src/mage/sets/commander2015/Forest1.java new file mode 100644 index 00000000000..57e1a2f25d2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Forest1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId, 339); + this.expansionSetCode = "C15"; + } + + public Forest1(final Forest1 card) { + super(card); + } + + @Override + public Forest1 copy() { + return new Forest1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Forest2.java b/Mage.Sets/src/mage/sets/commander2015/Forest2.java new file mode 100644 index 00000000000..f38f60ee4d9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Forest2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId, 340); + this.expansionSetCode = "C15"; + } + + public Forest2(final Forest2 card) { + super(card); + } + + @Override + public Forest2 copy() { + return new Forest2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Forest3.java b/Mage.Sets/src/mage/sets/commander2015/Forest3.java new file mode 100644 index 00000000000..e8b284ad208 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Forest3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId, 341); + this.expansionSetCode = "C15"; + } + + public Forest3(final Forest3 card) { + super(card); + } + + @Override + public Forest3 copy() { + return new Forest3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Forest4.java b/Mage.Sets/src/mage/sets/commander2015/Forest4.java new file mode 100644 index 00000000000..4ae9df6c82c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Forest4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId, 342); + this.expansionSetCode = "C15"; + } + + public Forest4(final Forest4 card) { + super(card); + } + + @Override + public Forest4 copy() { + return new Forest4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ForgottenAncient.java b/Mage.Sets/src/mage/sets/commander2015/ForgottenAncient.java new file mode 100644 index 00000000000..b056f39142b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ForgottenAncient.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ForgottenAncient extends mage.sets.scourge.ForgottenAncient { + + public ForgottenAncient(UUID ownerId) { + super(ownerId); + this.cardNumber = 185; + this.expansionSetCode = "C15"; + } + + public ForgottenAncient(final ForgottenAncient card) { + super(card); + } + + @Override + public ForgottenAncient copy() { + return new ForgottenAncient(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ForgottenCave.java b/Mage.Sets/src/mage/sets/commander2015/ForgottenCave.java new file mode 100644 index 00000000000..4fd1f75ed06 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ForgottenCave.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ForgottenCave extends mage.sets.onslaught.ForgottenCave { + + public ForgottenCave(UUID ownerId) { + super(ownerId); + this.cardNumber = 284; + this.expansionSetCode = "C15"; + } + + public ForgottenCave(final ForgottenCave card) { + super(card); + } + + @Override + public ForgottenCave copy() { + return new ForgottenCave(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/FumikoTheLowblood.java b/Mage.Sets/src/mage/sets/commander2015/FumikoTheLowblood.java new file mode 100644 index 00000000000..08db13e13b1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/FumikoTheLowblood.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FumikoTheLowblood extends mage.sets.betrayersofkamigawa.FumikoTheLowblood { + + public FumikoTheLowblood(UUID ownerId) { + super(ownerId); + this.cardNumber = 155; + this.expansionSetCode = "C15"; + } + + public FumikoTheLowblood(final FumikoTheLowblood card) { + super(card); + } + + @Override + public FumikoTheLowblood copy() { + return new FumikoTheLowblood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GhostQuarter.java b/Mage.Sets/src/mage/sets/commander2015/GhostQuarter.java new file mode 100644 index 00000000000..d1e13df5a1a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GhostQuarter.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GhostQuarter extends mage.sets.innistrad.GhostQuarter { + + public GhostQuarter(UUID ownerId) { + super(ownerId); + this.cardNumber = 285; + this.expansionSetCode = "C15"; + } + + public GhostQuarter(final GhostQuarter card) { + super(card); + } + + @Override + public GhostQuarter copy() { + return new GhostQuarter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GhostbladeEidolon.java b/Mage.Sets/src/mage/sets/commander2015/GhostbladeEidolon.java new file mode 100644 index 00000000000..5f0ab56bf8a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GhostbladeEidolon.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GhostbladeEidolon extends mage.sets.bornofthegods.GhostbladeEidolon { + + public GhostbladeEidolon(UUID ownerId) { + super(ownerId); + this.cardNumber = 70; + this.expansionSetCode = "C15"; + } + + public GhostbladeEidolon(final GhostbladeEidolon card) { + super(card); + } + + @Override + public GhostbladeEidolon copy() { + return new GhostbladeEidolon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Gigantoplasm.java b/Mage.Sets/src/mage/sets/commander2015/Gigantoplasm.java new file mode 100644 index 00000000000..d7e6e9a85db --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Gigantoplasm.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +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.Effect; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.util.functions.ApplyToPermanent; + +/** + * + * @author fireshoes + */ +public class Gigantoplasm extends CardImpl { + + public Gigantoplasm(UUID ownerId) { + super(ownerId, 11, "Gigantoplasm", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "C15"; + this.subtype.add("Shapeshifter"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // You may have Gigantoplasm enter the battlefield as a copy of any creature on the battlefield except it gains "{X}: This creature has base power and toughness X/X." + Effect effect = new CopyPermanentEffect(new FilterCreaturePermanent(), new GigantoplasmApplyToPermanent()); + effect.setText("a copy of any creature on the battlefield except it gains \"{X}: This creature has base power and toughness X/X.\""); + this.addAbility(new EntersBattlefieldAbility(effect, true)); + } + + public Gigantoplasm(final Gigantoplasm card) { + super(card); + } + + @Override + public Gigantoplasm copy() { + return new Gigantoplasm(this); + } +} + +class GigantoplasmApplyToPermanent extends ApplyToPermanent { + + @Override + public Boolean apply(Game game, Permanent permanent) { + DynamicValue variableMana = new ManacostVariableValue(); + Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b); + effect.setText("This creature has base power and toughness X/X"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); + permanent.getAbilities().add(ability); + return true; + } + + @Override + public Boolean apply(Game game, MageObject mageObject) { + DynamicValue variableMana = new ManacostVariableValue(); + Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b); + effect.setText("This creature has base power and toughness X/X"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); + mageObject.getAbilities().add(ability); + return true; + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Gild.java b/Mage.Sets/src/mage/sets/commander2015/Gild.java new file mode 100644 index 00000000000..1131c232dbc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Gild.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Gild extends mage.sets.bornofthegods.Gild { + + public Gild(UUID ownerId) { + super(ownerId); + this.cardNumber = 127; + this.expansionSetCode = "C15"; + } + + public Gild(final Gild card) { + super(card); + } + + @Override + public Gild copy() { + return new Gild(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GiselaBladeOfGoldnight.java b/Mage.Sets/src/mage/sets/commander2015/GiselaBladeOfGoldnight.java new file mode 100644 index 00000000000..4f76ad72e2b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GiselaBladeOfGoldnight.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GiselaBladeOfGoldnight extends mage.sets.avacynrestored.GiselaBladeOfGoldnight { + + public GiselaBladeOfGoldnight(UUID ownerId) { + super(ownerId); + this.cardNumber = 219; + this.expansionSetCode = "C15"; + } + + public GiselaBladeOfGoldnight(final GiselaBladeOfGoldnight card) { + super(card); + } + + @Override + public GiselaBladeOfGoldnight copy() { + return new GiselaBladeOfGoldnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GoblinElectromancer.java b/Mage.Sets/src/mage/sets/commander2015/GoblinElectromancer.java new file mode 100644 index 00000000000..27b2012a43a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GoblinElectromancer.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GoblinElectromancer extends mage.sets.returntoravnica.GoblinElectromancer { + + public GoblinElectromancer(UUID ownerId) { + super(ownerId); + this.cardNumber = 220; + this.expansionSetCode = "C15"; + } + + public GoblinElectromancer(final GoblinElectromancer card) { + super(card); + } + + @Override + public GoblinElectromancer copy() { + return new GoblinElectromancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GolgariCharm.java b/Mage.Sets/src/mage/sets/commander2015/GolgariCharm.java new file mode 100644 index 00000000000..9df10beca4d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GolgariCharm.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GolgariCharm extends mage.sets.returntoravnica.GolgariCharm { + + public GolgariCharm(UUID ownerId) { + super(ownerId); + this.cardNumber = 221; + this.expansionSetCode = "C15"; + } + + public GolgariCharm(final GolgariCharm card) { + super(card); + } + + @Override + public GolgariCharm copy() { + return new GolgariCharm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GolgariGuildgate.java b/Mage.Sets/src/mage/sets/commander2015/GolgariGuildgate.java new file mode 100644 index 00000000000..cf2660d6772 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GolgariGuildgate.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GolgariGuildgate extends mage.sets.returntoravnica.GolgariGuildgate { + + public GolgariGuildgate(UUID ownerId) { + super(ownerId); + this.cardNumber = 286; + this.expansionSetCode = "C15"; + } + + public GolgariGuildgate(final GolgariGuildgate card) { + super(card); + } + + @Override + public GolgariGuildgate copy() { + return new GolgariGuildgate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GolgariRotFarm.java b/Mage.Sets/src/mage/sets/commander2015/GolgariRotFarm.java new file mode 100644 index 00000000000..cfe7028460f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GolgariRotFarm.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GolgariRotFarm extends mage.sets.ravnica.GolgariRotFarm { + + public GolgariRotFarm(UUID ownerId) { + super(ownerId); + this.cardNumber = 287; + this.expansionSetCode = "C15"; + } + + public GolgariRotFarm(final GolgariRotFarm card) { + super(card); + } + + @Override + public GolgariRotFarm copy() { + return new GolgariRotFarm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GolgariSignet.java b/Mage.Sets/src/mage/sets/commander2015/GolgariSignet.java new file mode 100644 index 00000000000..21269b7641e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GolgariSignet.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GolgariSignet extends mage.sets.ravnica.GolgariSignet { + + public GolgariSignet(UUID ownerId) { + super(ownerId); + this.cardNumber = 255; + this.expansionSetCode = "C15"; + } + + public GolgariSignet(final GolgariSignet card) { + super(card); + } + + @Override + public GolgariSignet copy() { + return new GolgariSignet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GraspOfFate.java b/Mage.Sets/src/mage/sets/commander2015/GraspOfFate.java new file mode 100644 index 00000000000..2849a7d5c53 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GraspOfFate.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import static mage.filter.predicate.permanent.ControllerControlsIslandPredicate.filter; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.util.CardUtil; + +/** + * + * @author fireshoes + */ +public class GraspOfFate extends CardImpl { + + public GraspOfFate(UUID ownerId) { + super(ownerId, 3, "Grasp of Fate", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.expansionSetCode = "C15"; + + // When Grasp of Fate enters the battlefield, for each opponent, exile up to one target nonland permanent that player controls until Grasp of Fate leaves the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new GraspOfFateExileEffect()); + ability.addTarget(new TargetPermanent(filter)); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); + this.addAbility(ability); + } + + public GraspOfFate(final GraspOfFate card) { + super(card); + } + + @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) { + FilterPermanent filter = new FilterPermanent("nonland permanent from opponent " + opponent.getLogName()); + filter.add(new ControllerIdPredicate(opponentId)); + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + TargetPermanent target = new TargetPermanent(0, 1, filter,false); + ability.addTarget(target); + } + } + } + } + + @Override + public GraspOfFate copy() { + return new GraspOfFate(this); + } +} + +class GraspOfFateExileEffect extends OneShotEffect { + + public GraspOfFateExileEffect() { + super(Outcome.Benefit); + this.staticText = "exile up to one target nonland permanent that player controls until {this} leaves the battlefield"; + } + + public GraspOfFateExileEffect(final GraspOfFateExileEffect effect) { + super(effect); + } + + @Override + public GraspOfFateExileEffect copy() { + return new GraspOfFateExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GravePeril.java b/Mage.Sets/src/mage/sets/commander2015/GravePeril.java new file mode 100644 index 00000000000..dfe28a2ea02 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GravePeril.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class GravePeril extends mage.sets.futuresight.GravePeril { + + public GravePeril(UUID ownerId) { + super(ownerId); + this.cardNumber = 128; + this.expansionSetCode = "C15"; + } + + public GravePeril(final GravePeril card) { + super(card); + } + + @Override + public GravePeril copy() { + return new GravePeril(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GreatOakGuardian.java b/Mage.Sets/src/mage/sets/commander2015/GreatOakGuardian.java new file mode 100644 index 00000000000..3ed072bed0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GreatOakGuardian.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.sets.commander2015; + +import java.util.Iterator; +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class GreatOakGuardian extends CardImpl { + + public GreatOakGuardian(UUID ownerId) { + super(ownerId, 37, "Great Oak Guardian", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{G}"); + this.expansionSetCode = "C15"; + this.subtype.add("Treefolk"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // When Great Oak Guardian enters the battlefield, creatures target player controls get +2/+2 until end of turn. Untap them. + Ability ability = new EntersBattlefieldTriggeredAbility(new GreatOakGuardianEffect(), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public GreatOakGuardian(final GreatOakGuardian card) { + super(card); + } + + @Override + public GreatOakGuardian copy() { + return new GreatOakGuardian(this); + } +} + +class GreatOakGuardianEffect extends ContinuousEffectImpl { + + public GreatOakGuardianEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + staticText = "creatures target player controls get +2/+2 until end of turn. Untap them"; + } + + public GreatOakGuardianEffect(final GreatOakGuardianEffect effect) { + super(effect); + } + + @Override + public GreatOakGuardianEffect copy() { + return new GreatOakGuardianEffect(this); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + if (this.affectedObjectsSet) { + List creatures = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getFirstTarget(), game); + for (Permanent creature : creatures) { + affectedObjectList.add(new MageObjectReference(creature, game)); + } + } + } + + @Override + public boolean apply(Game game, Ability source) { + for (Iterator it = affectedObjectList.iterator(); it.hasNext();) { + Permanent permanent = it.next().getPermanent(game); + if (permanent != null) { + permanent.addPower(2); + permanent.addToughness(2); + permanent.untap(game); + } else { + it.remove(); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GrimBackwoods.java b/Mage.Sets/src/mage/sets/commander2015/GrimBackwoods.java new file mode 100644 index 00000000000..a2d518a782b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GrimBackwoods.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GrimBackwoods extends mage.sets.darkascension.GrimBackwoods { + + public GrimBackwoods(UUID ownerId) { + super(ownerId); + this.cardNumber = 288; + this.expansionSetCode = "C15"; + } + + public GrimBackwoods(final GrimBackwoods card) { + super(card); + } + + @Override + public GrimBackwoods copy() { + return new GrimBackwoods(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/GrislySalvage.java b/Mage.Sets/src/mage/sets/commander2015/GrislySalvage.java new file mode 100644 index 00000000000..8e1ef1e8103 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/GrislySalvage.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GrislySalvage extends mage.sets.returntoravnica.GrislySalvage { + + public GrislySalvage(UUID ownerId) { + super(ownerId); + this.cardNumber = 222; + this.expansionSetCode = "C15"; + } + + public GrislySalvage(final GrislySalvage card) { + super(card); + } + + @Override + public GrislySalvage copy() { + return new GrislySalvage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/HamletbackGoliath.java b/Mage.Sets/src/mage/sets/commander2015/HamletbackGoliath.java new file mode 100644 index 00000000000..cf996481c2b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/HamletbackGoliath.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class HamletbackGoliath extends mage.sets.magic2013.HamletbackGoliath { + + public HamletbackGoliath(UUID ownerId) { + super(ownerId); + this.cardNumber = 156; + this.expansionSetCode = "C15"; + } + + public HamletbackGoliath(final HamletbackGoliath card) { + super(card); + } + + @Override + public HamletbackGoliath copy() { + return new HamletbackGoliath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/HammerfistGiant.java b/Mage.Sets/src/mage/sets/commander2015/HammerfistGiant.java new file mode 100644 index 00000000000..2b4697036a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/HammerfistGiant.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class HammerfistGiant extends mage.sets.ravnica.HammerfistGiant { + + public HammerfistGiant(UUID ownerId) { + super(ownerId); + this.cardNumber = 157; + this.expansionSetCode = "C15"; + } + + public HammerfistGiant(final HammerfistGiant card) { + super(card); + } + + @Override + public HammerfistGiant copy() { + return new HammerfistGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/HeraldOfTheHost.java b/Mage.Sets/src/mage/sets/commander2015/HeraldOfTheHost.java new file mode 100644 index 00000000000..662c7ff1228 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/HeraldOfTheHost.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.abilities.keyword.MyriadAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class HeraldOfTheHost extends CardImpl { + + public HeraldOfTheHost(UUID ownerId) { + super(ownerId, 4, "Herald of the Host", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "C15"; + this.subtype.add("Angel"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + // Myriad + this.addAbility(new MyriadAbility()); + } + + public HeraldOfTheHost(final HeraldOfTheHost card) { + super(card); + } + + @Override + public HeraldOfTheHost copy() { + return new HeraldOfTheHost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/HighMarket.java b/Mage.Sets/src/mage/sets/commander2015/HighMarket.java new file mode 100644 index 00000000000..48b361b8b11 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/HighMarket.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class HighMarket extends mage.sets.mercadianmasques.HighMarket { + + public HighMarket(UUID ownerId) { + super(ownerId); + this.cardNumber = 289; + this.expansionSetCode = "C15"; + } + + public HighMarket(final HighMarket card) { + super(card); + } + + @Override + public HighMarket copy() { + return new HighMarket(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Hostility.java b/Mage.Sets/src/mage/sets/commander2015/Hostility.java new file mode 100644 index 00000000000..e4573dede9c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Hostility.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Hostility extends mage.sets.jacevschandra.Hostility { + + public Hostility(UUID ownerId) { + super(ownerId); + this.cardNumber = 158; + this.expansionSetCode = "C15"; + } + + public Hostility(final Hostility card) { + super(card); + } + + @Override + public Hostility copy() { + return new Hostility(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/HuntedDragon.java b/Mage.Sets/src/mage/sets/commander2015/HuntedDragon.java new file mode 100644 index 00000000000..994af27c70d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/HuntedDragon.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class HuntedDragon extends mage.sets.ravnica.HuntedDragon { + + public HuntedDragon(UUID ownerId) { + super(ownerId); + this.cardNumber = 159; + this.expansionSetCode = "C15"; + } + + public HuntedDragon(final HuntedDragon card) { + super(card); + } + + @Override + public HuntedDragon copy() { + return new HuntedDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/IllusoryAmbusher.java b/Mage.Sets/src/mage/sets/commander2015/IllusoryAmbusher.java new file mode 100644 index 00000000000..78cd559b0db --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/IllusoryAmbusher.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class IllusoryAmbusher extends CardImpl { + + public IllusoryAmbusher(UUID ownerId) { + super(ownerId, 12, "Illusory Ambusher", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "C15"; + this.subtype.add("Cat"); + this.subtype.add("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)); + } + + public IllusoryAmbusher(final IllusoryAmbusher card) { + super(card); + } + + @Override + public IllusoryAmbusher copy() { + return new IllusoryAmbusher(this); + } +} + +class IllusoryAmbusherDealtDamageEffect extends OneShotEffect { + + public IllusoryAmbusherDealtDamageEffect() { + super(Outcome.Damage); + this.staticText = "draw that many cards"; + } + + public IllusoryAmbusherDealtDamageEffect(final IllusoryAmbusherDealtDamageEffect effect) { + super(effect); + } + + @Override + public IllusoryAmbusherDealtDamageEffect copy() { + return new IllusoryAmbusherDealtDamageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + int amount = (Integer) getValue("damage"); + if (amount > 0) { + player.drawCards(amount, game); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2015/IndrikStomphowler.java b/Mage.Sets/src/mage/sets/commander2015/IndrikStomphowler.java new file mode 100644 index 00000000000..ebd219d35a9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/IndrikStomphowler.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class IndrikStomphowler extends mage.sets.dissension.IndrikStomphowler { + + public IndrikStomphowler(UUID ownerId) { + super(ownerId); + this.cardNumber = 186; + this.expansionSetCode = "C15"; + } + + public IndrikStomphowler(final IndrikStomphowler card) { + super(card); + } + + @Override + public IndrikStomphowler copy() { + return new IndrikStomphowler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/InfernoTitan.java b/Mage.Sets/src/mage/sets/commander2015/InfernoTitan.java new file mode 100644 index 00000000000..332a7608c70 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/InfernoTitan.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class InfernoTitan extends mage.sets.magic2011.InfernoTitan { + + public InfernoTitan(UUID ownerId) { + super(ownerId); + this.cardNumber = 160; + this.expansionSetCode = "C15"; + } + + public InfernoTitan(final InfernoTitan card) { + super(card); + } + + @Override + public InfernoTitan copy() { + return new InfernoTitan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Island1.java b/Mage.Sets/src/mage/sets/commander2015/Island1.java new file mode 100644 index 00000000000..4bf7f900120 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Island1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId, 327); + this.expansionSetCode = "C15"; + } + + public Island1(final Island1 card) { + super(card); + } + + @Override + public Island1 copy() { + return new Island1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Island2.java b/Mage.Sets/src/mage/sets/commander2015/Island2.java new file mode 100644 index 00000000000..4981eb8d8ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Island2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId, 328); + this.expansionSetCode = "C15"; + } + + public Island2(final Island2 card) { + super(card); + } + + @Override + public Island2 copy() { + return new Island2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Island3.java b/Mage.Sets/src/mage/sets/commander2015/Island3.java new file mode 100644 index 00000000000..57a1ab281de --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Island3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId, 329); + this.expansionSetCode = "C15"; + } + + public Island3(final Island3 card) { + super(card); + } + + @Override + public Island3 copy() { + return new Island3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Island4.java b/Mage.Sets/src/mage/sets/commander2015/Island4.java new file mode 100644 index 00000000000..40faa87d88a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Island4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId, 330); + this.expansionSetCode = "C15"; + } + + public Island4(final Island4 card) { + super(card); + } + + @Override + public Island4 copy() { + return new Island4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/IzzetBoilerworks.java b/Mage.Sets/src/mage/sets/commander2015/IzzetBoilerworks.java new file mode 100644 index 00000000000..0c13f02a235 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/IzzetBoilerworks.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class IzzetBoilerworks extends mage.sets.guildpact.IzzetBoilerworks { + + public IzzetBoilerworks(UUID ownerId) { + super(ownerId); + this.cardNumber = 290; + this.expansionSetCode = "C15"; + } + + public IzzetBoilerworks(final IzzetBoilerworks card) { + super(card); + } + + @Override + public IzzetBoilerworks copy() { + return new IzzetBoilerworks(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/IzzetGuildgate.java b/Mage.Sets/src/mage/sets/commander2015/IzzetGuildgate.java new file mode 100644 index 00000000000..4b3e168dae1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/IzzetGuildgate.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class IzzetGuildgate extends mage.sets.returntoravnica.IzzetGuildgate { + + public IzzetGuildgate(UUID ownerId) { + super(ownerId); + this.cardNumber = 291; + this.expansionSetCode = "C15"; + } + + public IzzetGuildgate(final IzzetGuildgate card) { + super(card); + } + + @Override + public IzzetGuildgate copy() { + return new IzzetGuildgate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/IzzetSignet.java b/Mage.Sets/src/mage/sets/commander2015/IzzetSignet.java new file mode 100644 index 00000000000..93ef94f95ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/IzzetSignet.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class IzzetSignet extends mage.sets.guildpact.IzzetSignet { + + public IzzetSignet(UUID ownerId) { + super(ownerId); + this.cardNumber = 256; + this.expansionSetCode = "C15"; + } + + public IzzetSignet(final IzzetSignet card) { + super(card); + } + + @Override + public IzzetSignet copy() { + return new IzzetSignet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/JacesArchivist.java b/Mage.Sets/src/mage/sets/commander2015/JacesArchivist.java new file mode 100644 index 00000000000..536237f18ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/JacesArchivist.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class JacesArchivist extends mage.sets.magic2012.JacesArchivist { + + public JacesArchivist(UUID ownerId) { + super(ownerId); + this.cardNumber = 95; + this.expansionSetCode = "C15"; + } + + public JacesArchivist(final JacesArchivist card) { + super(card); + } + + @Override + public JacesArchivist copy() { + return new JacesArchivist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/JaradGolgariLichLord.java b/Mage.Sets/src/mage/sets/commander2015/JaradGolgariLichLord.java new file mode 100644 index 00000000000..111783a9e5e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/JaradGolgariLichLord.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class JaradGolgariLichLord extends mage.sets.returntoravnica.JaradGolgariLichLord { + + public JaradGolgariLichLord(UUID ownerId) { + super(ownerId); + this.cardNumber = 223; + this.expansionSetCode = "C15"; + } + + public JaradGolgariLichLord(final JaradGolgariLichLord card) { + super(card); + } + + @Override + public JaradGolgariLichLord copy() { + return new JaradGolgariLichLord(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/JarethLeonineTitan.java b/Mage.Sets/src/mage/sets/commander2015/JarethLeonineTitan.java new file mode 100644 index 00000000000..fcfe6a64726 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/JarethLeonineTitan.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class JarethLeonineTitan extends mage.sets.onslaught.JarethLeonineTitan { + + public JarethLeonineTitan(UUID ownerId) { + super(ownerId); + this.cardNumber = 71; + this.expansionSetCode = "C15"; + } + + public JarethLeonineTitan(final JarethLeonineTitan card) { + super(card); + } + + @Override + public JarethLeonineTitan copy() { + return new JarethLeonineTitan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/JungleHollow.java b/Mage.Sets/src/mage/sets/commander2015/JungleHollow.java new file mode 100644 index 00000000000..459a994596a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/JungleHollow.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class JungleHollow extends mage.sets.khansoftarkir.JungleHollow { + + public JungleHollow(UUID ownerId) { + super(ownerId); + this.cardNumber = 292; + this.expansionSetCode = "C15"; + } + + public JungleHollow(final JungleHollow card) { + super(card); + } + + @Override + public JungleHollow copy() { + return new JungleHollow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KalemneDiscipleOfIroas.java b/Mage.Sets/src/mage/sets/commander2015/KalemneDiscipleOfIroas.java index bd681bd53b1..eb779a5b60a 100644 --- a/Mage.Sets/src/mage/sets/commander2015/KalemneDiscipleOfIroas.java +++ b/Mage.Sets/src/mage/sets/commander2015/KalemneDiscipleOfIroas.java @@ -56,16 +56,16 @@ import mage.players.Player; * @author fireshoes */ public class KalemneDiscipleOfIroas extends CardImpl { - + private static final FilterSpell filterSpell = new FilterSpell("a creature spell with converted mana cost 5 or greater"); static { filterSpell.add(new CardTypePredicate(CardType.CREATURE)); - filterSpell.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 4)); + filterSpell.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 4)); } public KalemneDiscipleOfIroas(UUID ownerId) { - super(ownerId, 999, "Kalemne, Disciple of Iroas", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); + super(ownerId, 45, "Kalemne, Disciple of Iroas", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); this.expansionSetCode = "C15"; this.supertype.add("Legendary"); this.subtype.add("Giant"); @@ -75,16 +75,16 @@ public class KalemneDiscipleOfIroas extends CardImpl { // Double strike this.addAbility(DoubleStrikeAbility.getInstance()); - + // Vigilance this.addAbility(VigilanceAbility.getInstance()); - + // Whenever you cast a creature spell with converted mana cost 5 or greater, you get an experience counter. Effect effect = new AddCountersControllerEffect(CounterType.EXPERIENCE.createInstance(1), false); effect.setText("you get an experience counter"); Ability ability = new SpellCastControllerTriggeredAbility(effect, filterSpell, false); this.addAbility(ability); - + // Kalemne, Disciple of Iroas gets +1/+1 for each experience counter you have. DynamicValue value = new SourceControllerExperienceCountersCount(); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(value, value, Duration.WhileOnBattlefield))); @@ -107,13 +107,13 @@ class SourceControllerExperienceCountersCount implements DynamicValue { int amount = 0; Player player = game.getPlayer(sourceAbility.getControllerId()); if (player != null) { - amount = player.getCounters().getCount(CounterType.EXPERIENCE); - } + amount = player.getCounters().getCount(CounterType.EXPERIENCE); + } return amount; } @Override - public DynamicValue copy() { + public SourceControllerExperienceCountersCount copy() { return new SourceControllerExperienceCountersCount(); } diff --git a/Mage.Sets/src/mage/sets/commander2015/KalemnesCaptain.java b/Mage.Sets/src/mage/sets/commander2015/KalemnesCaptain.java new file mode 100644 index 00000000000..f6db27fa069 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KalemnesCaptain.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; +import mage.abilities.effects.common.ExileAllEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author fireshoes + */ +public class KalemnesCaptain extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifacts and enchantments"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.ENCHANTMENT))); + } + + public KalemnesCaptain(UUID ownerId) { + super(ownerId, 5, "Kalemne's Captain", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "C15"; + this.subtype.add("Giant"); + this.subtype.add("Soldier"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // {5}{W}{W}: Monstrosity 3. + this.addAbility(new MonstrosityAbility("{5}{W}{W}", 3)); + + // When Kalemne's Captain becomes monstrous, exile all artifacts and enchantments. + this.addAbility(new BecomesMonstrousSourceTriggeredAbility(new ExileAllEffect(filter))); + } + + public KalemnesCaptain(final KalemnesCaptain card) { + super(card); + } + + @Override + public KalemnesCaptain copy() { + return new KalemnesCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KarlovOfTheGhostCouncil.java b/Mage.Sets/src/mage/sets/commander2015/KarlovOfTheGhostCouncil.java new file mode 100644 index 00000000000..673e4f155d2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KarlovOfTheGhostCouncil.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class KarlovOfTheGhostCouncil extends CardImpl { + + public KarlovOfTheGhostCouncil(UUID ownerId) { + super(ownerId, 46, "Karlov of the Ghost Council", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{W}{B}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Spirit"); + this.subtype.add("Advisor"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever you gain life, put two +1/+1 counter on Karlov of the Ghost Council. + this.addAbility(new GainLifeControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), false)); + + // {W}{B}, Remove six +1/+1 counters from Karlov of the Ghost Council: Exile target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{W}{B}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(6))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public KarlovOfTheGhostCouncil(final KarlovOfTheGhostCouncil card) { + super(card); + } + + @Override + public KarlovOfTheGhostCouncil copy() { + return new KarlovOfTheGhostCouncil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KarmicJustice.java b/Mage.Sets/src/mage/sets/commander2015/KarmicJustice.java new file mode 100644 index 00000000000..fa59189a762 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KarmicJustice.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KarmicJustice extends mage.sets.odyssey.KarmicJustice { + + public KarmicJustice(UUID ownerId) { + super(ownerId); + this.cardNumber = 72; + this.expansionSetCode = "C15"; + } + + public KarmicJustice(final KarmicJustice card) { + super(card); + } + + @Override + public KarmicJustice copy() { + return new KarmicJustice(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KasetoOrochiArchmage.java b/Mage.Sets/src/mage/sets/commander2015/KasetoOrochiArchmage.java new file mode 100644 index 00000000000..02f9e111977 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KasetoOrochiArchmage.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.sets.commander2015; + +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.combat.CantBeBlockedTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class KasetoOrochiArchmage extends CardImpl { + + public KasetoOrochiArchmage(UUID ownerId) { + super(ownerId, 47, "Kaseto, Orochi Archmage", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{G}{U}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Snake"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {G}{U}: Target creature can't be blocked this turn. If that creature is a Snake, it gets +2/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KasetoEffect(), new ManaCostsImpl<>("{G}{U}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public KasetoOrochiArchmage(final KasetoOrochiArchmage card) { + super(card); + } + + @Override + public KasetoOrochiArchmage copy() { + return new KasetoOrochiArchmage(this); + } +} + +class KasetoEffect extends OneShotEffect { + + public KasetoEffect() { + super(Outcome.BoostCreature); + staticText = "Target creature can't be blocked this turn. If that creature is a Snake, it gets +2/+2 until end of turn"; + } + + public KasetoEffect(final KasetoEffect effect) { + super(effect); + } + + @Override + public KasetoEffect copy() { + return new KasetoEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent != null) { + game.addEffect(new CantBeBlockedTargetEffect(Duration.EndOfTurn), source); + if (permanent.getSubtype().contains("Snake")) { + game.addEffect(new BoostTargetEffect(2,2,Duration.EndOfTurn), source); + } + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2015/KessigCagebreakers.java b/Mage.Sets/src/mage/sets/commander2015/KessigCagebreakers.java new file mode 100644 index 00000000000..c8853c1200d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KessigCagebreakers.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KessigCagebreakers extends mage.sets.innistrad.KessigCagebreakers { + + public KessigCagebreakers(UUID ownerId) { + super(ownerId); + this.cardNumber = 187; + this.expansionSetCode = "C15"; + } + + public KessigCagebreakers(final KessigCagebreakers card) { + super(card); + } + + @Override + public KessigCagebreakers copy() { + return new KessigCagebreakers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KodamasReach.java b/Mage.Sets/src/mage/sets/commander2015/KodamasReach.java new file mode 100644 index 00000000000..578869279f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KodamasReach.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KodamasReach extends mage.sets.commander.KodamasReach { + + public KodamasReach(UUID ownerId) { + super(ownerId); + this.cardNumber = 188; + this.expansionSetCode = "C15"; + } + + public KodamasReach(final KodamasReach card) { + super(card); + } + + @Override + public KodamasReach copy() { + return new KodamasReach(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KorSanctifiers.java b/Mage.Sets/src/mage/sets/commander2015/KorSanctifiers.java new file mode 100644 index 00000000000..55363b484fc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KorSanctifiers.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KorSanctifiers extends mage.sets.zendikar.KorSanctifiers { + + public KorSanctifiers(UUID ownerId) { + super(ownerId); + this.cardNumber = 73; + this.expansionSetCode = "C15"; + } + + public KorSanctifiers(final KorSanctifiers card) { + super(card); + } + + @Override + public KorSanctifiers copy() { + return new KorSanctifiers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KorozdaGuildmage.java b/Mage.Sets/src/mage/sets/commander2015/KorozdaGuildmage.java new file mode 100644 index 00000000000..de30f3299b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KorozdaGuildmage.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KorozdaGuildmage extends mage.sets.returntoravnica.KorozdaGuildmage { + + public KorozdaGuildmage(UUID ownerId) { + super(ownerId); + this.cardNumber = 224; + this.expansionSetCode = "C15"; + } + + public KorozdaGuildmage(final KorozdaGuildmage card) { + super(card); + } + + @Override + public KorozdaGuildmage copy() { + return new KorozdaGuildmage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/KrosanGrip.java b/Mage.Sets/src/mage/sets/commander2015/KrosanGrip.java new file mode 100644 index 00000000000..218786c9fdc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/KrosanGrip.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KrosanGrip extends mage.sets.timespiral.KrosanGrip { + + public KrosanGrip(UUID ownerId) { + super(ownerId); + this.cardNumber = 189; + this.expansionSetCode = "C15"; + } + + public KrosanGrip(final KrosanGrip card) { + super(card); + } + + @Override + public KrosanGrip copy() { + return new KrosanGrip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/LightningGreaves.java b/Mage.Sets/src/mage/sets/commander2015/LightningGreaves.java new file mode 100644 index 00000000000..c3bb0358be0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/LightningGreaves.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class LightningGreaves extends mage.sets.mirrodin.LightningGreaves { + + public LightningGreaves(UUID ownerId) { + super(ownerId); + this.cardNumber = 257; + this.expansionSetCode = "C15"; + } + + public LightningGreaves(final LightningGreaves card) { + super(card); + } + + @Override + public LightningGreaves copy() { + return new LightningGreaves(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/LlanowarReborn.java b/Mage.Sets/src/mage/sets/commander2015/LlanowarReborn.java new file mode 100644 index 00000000000..0186c1edf6c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/LlanowarReborn.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class LlanowarReborn extends mage.sets.heroesvsmonsters.LlanowarReborn { + + public LlanowarReborn(UUID ownerId) { + super(ownerId); + this.cardNumber = 293; + this.expansionSetCode = "C15"; + } + + public LlanowarReborn(final LlanowarReborn card) { + super(card); + } + + @Override + public LlanowarReborn copy() { + return new LlanowarReborn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/LoamingShaman.java b/Mage.Sets/src/mage/sets/commander2015/LoamingShaman.java new file mode 100644 index 00000000000..e40d9147cb0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/LoamingShaman.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class LoamingShaman extends mage.sets.dissension.LoamingShaman { + + public LoamingShaman(UUID ownerId) { + super(ownerId); + this.cardNumber = 190; + this.expansionSetCode = "C15"; + } + + public LoamingShaman(final LoamingShaman card) { + super(card); + } + + @Override + public LoamingShaman copy() { + return new LoamingShaman(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/LoneRevenant.java b/Mage.Sets/src/mage/sets/commander2015/LoneRevenant.java new file mode 100644 index 00000000000..5f209497ea5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/LoneRevenant.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class LoneRevenant extends mage.sets.avacynrestored.LoneRevenant { + + public LoneRevenant(UUID ownerId) { + super(ownerId); + this.cardNumber = 96; + this.expansionSetCode = "C15"; + } + + public LoneRevenant(final LoneRevenant card) { + super(card); + } + + @Override + public LoneRevenant copy() { + return new LoneRevenant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/LorescaleCoatl.java b/Mage.Sets/src/mage/sets/commander2015/LorescaleCoatl.java new file mode 100644 index 00000000000..974ff8433cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/LorescaleCoatl.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class LorescaleCoatl extends mage.sets.alarareborn.LorescaleCoatl { + + public LorescaleCoatl(UUID ownerId) { + super(ownerId); + this.cardNumber = 225; + this.expansionSetCode = "C15"; + } + + public LorescaleCoatl(final LorescaleCoatl card) { + super(card); + } + + @Override + public LorescaleCoatl copy() { + return new LorescaleCoatl(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/LotlethTroll.java b/Mage.Sets/src/mage/sets/commander2015/LotlethTroll.java new file mode 100644 index 00000000000..9ee92a7b725 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/LotlethTroll.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class LotlethTroll extends mage.sets.returntoravnica.LotlethTroll { + + public LotlethTroll(UUID ownerId) { + super(ownerId); + this.cardNumber = 226; + this.expansionSetCode = "C15"; + } + + public LotlethTroll(final LotlethTroll card) { + super(card); + } + + @Override + public LotlethTroll copy() { + return new LotlethTroll(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/LoxodonWarhammer.java b/Mage.Sets/src/mage/sets/commander2015/LoxodonWarhammer.java new file mode 100644 index 00000000000..eb96bcf7997 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/LoxodonWarhammer.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class LoxodonWarhammer extends mage.sets.planechase.LoxodonWarhammer { + + public LoxodonWarhammer(UUID ownerId) { + super(ownerId); + this.cardNumber = 258; + this.expansionSetCode = "C15"; + } + + public LoxodonWarhammer(final LoxodonWarhammer card) { + super(card); + } + + @Override + public LoxodonWarhammer copy() { + return new LoxodonWarhammer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MagmaGiant.java b/Mage.Sets/src/mage/sets/commander2015/MagmaGiant.java new file mode 100644 index 00000000000..050fa02e2ab --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MagmaGiant.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MagmaGiant extends mage.sets.portalsecondage.MagmaGiant { + + public MagmaGiant(UUID ownerId) { + super(ownerId); + this.cardNumber = 161; + this.expansionSetCode = "C15"; + } + + public MagmaGiant(final MagmaGiant card) { + super(card); + } + + @Override + public MagmaGiant copy() { + return new MagmaGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Magmaquake.java b/Mage.Sets/src/mage/sets/commander2015/Magmaquake.java new file mode 100644 index 00000000000..3c4691c3713 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Magmaquake.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Magmaquake extends mage.sets.magic2013.Magmaquake { + + public Magmaquake(UUID ownerId) { + super(ownerId); + this.cardNumber = 162; + this.expansionSetCode = "C15"; + } + + public Magmaquake(final Magmaquake card) { + super(card); + } + + @Override + public Magmaquake copy() { + return new Magmaquake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MagusOfTheWheel.java b/Mage.Sets/src/mage/sets/commander2015/MagusOfTheWheel.java new file mode 100644 index 00000000000..d27a4a3acfe --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MagusOfTheWheel.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.sets.commander2015; + +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.Effect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.effects.common.discard.DiscardHandAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class MagusOfTheWheel extends CardImpl { + + public MagusOfTheWheel(UUID ownerId) { + super(ownerId, 27, "Magus of the Wheel", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "C15"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {1}{R}, {T}, Sacrifice Magus of the Wheel: Each player discards his or her hand, then draws seven cards. + Effect effect = new DrawCardAllEffect(7); + effect.setText(", then draws seven cards"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardHandAllEffect(), new ManaCostsImpl("{1}{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addEffect(effect); + this.addAbility(ability); + } + + public MagusOfTheWheel(final MagusOfTheWheel card) { + super(card); + } + + @Override + public MagusOfTheWheel copy() { + return new MagusOfTheWheel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MarshalsAnthem.java b/Mage.Sets/src/mage/sets/commander2015/MarshalsAnthem.java new file mode 100644 index 00000000000..7478fe0e180 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MarshalsAnthem.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MarshalsAnthem extends mage.sets.worldwake.MarshalsAnthem { + + public MarshalsAnthem(UUID ownerId) { + super(ownerId); + this.cardNumber = 74; + this.expansionSetCode = "C15"; + } + + public MarshalsAnthem(final MarshalsAnthem card) { + super(card); + } + + @Override + public MarshalsAnthem copy() { + return new MarshalsAnthem(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MazirekKraulDeathPriest.java b/Mage.Sets/src/mage/sets/commander2015/MazirekKraulDeathPriest.java new file mode 100644 index 00000000000..522f1c383f1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MazirekKraulDeathPriest.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author fireshoes + */ +public class MazirekKraulDeathPriest extends CardImpl { + + public MazirekKraulDeathPriest(UUID ownerId) { + super(ownerId, 48, "Mazirek, Kraul Death Priest", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{B}{G}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Insect"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever a player sacrifices another permanent, put a +1/+1 counter on each creature you control. + this.addAbility(new PlayerSacrificesPermanentTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), false)); + } + + public MazirekKraulDeathPriest(final MazirekKraulDeathPriest card) { + super(card); + } + + @Override + public MazirekKraulDeathPriest copy() { + return new MazirekKraulDeathPriest(this); + } +} + +class PlayerSacrificesPermanentTriggeredAbility extends TriggeredAbilityImpl { + + public PlayerSacrificesPermanentTriggeredAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public PlayerSacrificesPermanentTriggeredAbility(final PlayerSacrificesPermanentTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.SACRIFICED_PERMANENT; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + MageObject mageObject = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); + return mageObject != null && !event.getTargetId().equals(this.getSourceId()); + } + + @Override + public String getRule() { + return "Whenever a player sacrifices a permanent, " + super.getRule(); + } + + @Override + public PlayerSacrificesPermanentTriggeredAbility copy() { + return new PlayerSacrificesPermanentTriggeredAbility(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2015/MelekIzzetParagon.java b/Mage.Sets/src/mage/sets/commander2015/MelekIzzetParagon.java new file mode 100644 index 00000000000..1ddf055d2d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MelekIzzetParagon.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MelekIzzetParagon extends mage.sets.dragonsmaze.MelekIzzetParagon { + + public MelekIzzetParagon(UUID ownerId) { + super(ownerId); + this.cardNumber = 227; + this.expansionSetCode = "C15"; + } + + public MelekIzzetParagon(final MelekIzzetParagon card) { + super(card); + } + + @Override + public MelekIzzetParagon copy() { + return new MelekIzzetParagon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MerenOfClanNelToth.java b/Mage.Sets/src/mage/sets/commander2015/MerenOfClanNelToth.java new file mode 100644 index 00000000000..fc4a496309f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MerenOfClanNelToth.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class MerenOfClanNelToth extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public MerenOfClanNelToth(UUID ownerId) { + super(ownerId, 49, "Meren of Clan Nel Toth", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{B}{G}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Whenever another creature you control dies, you get an experience counter. + Effect effect = new AddCountersControllerEffect(CounterType.EXPERIENCE.createInstance(1), false); + effect.setText("you get an experience counter"); + this.addAbility(new DiesCreatureTriggeredAbility(effect, false, filter)); + + // At the beginning of your end step, choose target creature card in your graveyard. + // If that card's converted mana cost is less than or equal to the number of experience counters you have, return it to the battlefield. Otherwise, put it into your hand. + Target target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card in your graveyard")); + Ability ability = new BeginningOfYourEndStepTriggeredAbility(new MerenOfClanNelTothEffect(), false); + ability.addTarget(target); + this.addAbility(ability); + } + + public MerenOfClanNelToth(final MerenOfClanNelToth card) { + super(card); + } + + @Override + public MerenOfClanNelToth copy() { + return new MerenOfClanNelToth(this); + } +} + +class MerenOfClanNelTothEffect extends OneShotEffect { + + public MerenOfClanNelTothEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "choose target creature card in your graveyard. If that card's converted mana cost is less than or equal to the number of experience counters you have, return it to the battlefield. Otherwise, put it into your hand"; + } + + public MerenOfClanNelTothEffect(final MerenOfClanNelTothEffect effect) { + super(effect); + } + + @Override + public MerenOfClanNelTothEffect copy() { + return new MerenOfClanNelTothEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + int amount = player.getCounters().getCount(CounterType.EXPERIENCE); + Card card = game.getCard(targetPointer.getFirst(game, source)); + if (card != null) { + Zone targetZone = Zone.HAND; + String text = " put into hand of "; + if (card.getManaCost().convertedManaCost() <= amount) { + targetZone = Zone.BATTLEFIELD; + text = " put onto battlefield for "; + } + card.moveToZone(targetZone, source.getSourceId(), game, false); + game.informPlayers(new StringBuilder("Meren of Clan Nel Toth: ").append(card.getName()).append(text).append(player.getLogName()).toString()); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MesaEnchantress.java b/Mage.Sets/src/mage/sets/commander2015/MesaEnchantress.java new file mode 100644 index 00000000000..c2d51b3c8be --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MesaEnchantress.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MesaEnchantress extends mage.sets.magic2010.MesaEnchantress { + + public MesaEnchantress(UUID ownerId) { + super(ownerId); + this.cardNumber = 75; + this.expansionSetCode = "C15"; + } + + public MesaEnchantress(final MesaEnchantress card) { + super(card); + } + + @Override + public MesaEnchantress copy() { + return new MesaEnchantress(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MeteorBlast.java b/Mage.Sets/src/mage/sets/commander2015/MeteorBlast.java new file mode 100644 index 00000000000..91f6998f97c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MeteorBlast.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class MeteorBlast extends CardImpl { + + public MeteorBlast(UUID ownerId) { + super(ownerId, 28, "Meteor Blast", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{R}{R}{R}"); + this.expansionSetCode = "C15"; + + // Meteor Blast deals 4 damage to each of X target creatures and/or players. + this.getSpellAbility().addEffect(new MeteorBlastEffect()); + } + + public MeteorBlast(final MeteorBlast card) { + super(card); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + int xValue = ability.getManaCostsToPay().getX(); + if (xValue > 0) { + Target target = new TargetCreatureOrPlayer(xValue); + ability.addTarget(target); + } + } + + @Override + public MeteorBlast copy() { + return new MeteorBlast(this); + } +} + +class MeteorBlastEffect extends OneShotEffect { + + public MeteorBlastEffect() { + super(Outcome.Damage); + staticText = "{this} deals 4 damage to each of X target creatures and/or players"; + } + + public MeteorBlastEffect(final MeteorBlastEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (source.getTargets().size() > 0) { + for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { + Permanent creature = game.getPermanent(targetId); + if (creature != null) { + creature.damage(4, source.getSourceId(), game, false, true); + } else { + Player player = game.getPlayer(targetId); + if (player != null) { + player.damage(4, source.getSourceId(), game, false, true); + } + } + } + } + return true; + } + return false; + } + + @Override + public MeteorBlastEffect copy() { + return new MeteorBlastEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MindStone.java b/Mage.Sets/src/mage/sets/commander2015/MindStone.java new file mode 100644 index 00000000000..3b699f31480 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MindStone.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MindStone extends mage.sets.tenthedition.MindStone { + + public MindStone(UUID ownerId) { + super(ownerId); + this.cardNumber = 259; + this.expansionSetCode = "C15"; + } + + public MindStone(final MindStone card) { + super(card); + } + + @Override + public MindStone copy() { + return new MindStone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MirrorMatch.java b/Mage.Sets/src/mage/sets/commander2015/MirrorMatch.java new file mode 100644 index 00000000000..dcff7fbe257 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MirrorMatch.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class MirrorMatch extends CardImpl { + + public MirrorMatch(UUID ownerId) { + super(ownerId, 13, "Mirror Match", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{U}{U}"); + this.expansionSetCode = "C15"; + + // Cast Mirror Match only during the declare blockers step. + Ability ability = new SimpleStaticAbility(Zone.ALL, new MirrorMatchRuleModifyingEffect()); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // For each creature attacking you or a planeswalker you control, put a token that's a copy of that creature onto the battlefield blocking that creature. Exile those tokens at end of combat. + this.getSpellAbility().addEffect(new MirrorMatchEffect()); + + } + + public MirrorMatch(final MirrorMatch card) { + super(card); + } + + @Override + public MirrorMatch copy() { + return new MirrorMatch(this); + } +} + +class MirrorMatchRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { + + MirrorMatchRuleModifyingEffect() { + super(Duration.EndOfGame, Outcome.Detriment); + staticText = "Cast {this} only during the declare blockers step"; + } + + MirrorMatchRuleModifyingEffect(final MirrorMatchRuleModifyingEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return GameEvent.EventType.CAST_SPELL.equals(event.getType()); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getSourceId().equals(source.getSourceId())) { + return !game.getTurn().getStepType().equals(PhaseStep.DECLARE_BLOCKERS); + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public MirrorMatchRuleModifyingEffect copy() { + return new MirrorMatchRuleModifyingEffect(this); + } +} + +class MirrorMatchEffect extends OneShotEffect { + + public MirrorMatchEffect() { + super(Outcome.Benefit); + this.staticText = "For each creature attacking you or a planeswalker you control, put a token that's a copy of that creature onto the battlefield blocking that creature. Exile those tokens at end of combat"; + } + + public MirrorMatchEffect(final MirrorMatchEffect effect) { + super(effect); + } + + @Override + public MirrorMatchEffect copy() { + return new MirrorMatchEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID attackerId : game.getCombat().getAttackers()) { + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null + && source.getControllerId().equals(game.getCombat().getDefendingPlayerId(attackerId, game))) { + PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false); + effect.setTargetPointer(new FixedTarget(attacker, game)); + effect.apply(game, source); + CombatGroup group = game.getCombat().findGroup(attacker.getId()); + boolean isCreature = false; + if (group != null) { + for (Permanent addedToken : effect.getAddedPermanent()) { + if (addedToken.getCardType().contains(CardType.CREATURE)) { + group.addBlockerToGroup(addedToken.getId(), attackerId, game); + isCreature = true; + } + ExileTargetEffect exileEffect = new ExileTargetEffect("Exile the token at end of combat"); + exileEffect.setTargetPointer(new FixedTarget(addedToken, game)); + game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect), source); + } + if (isCreature) { + group.pickBlockerOrder(attacker.getControllerId(), game); + } + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MizziumMortars.java b/Mage.Sets/src/mage/sets/commander2015/MizziumMortars.java new file mode 100644 index 00000000000..1c7969c8a00 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MizziumMortars.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MizziumMortars extends mage.sets.returntoravnica.MizziumMortars { + + public MizziumMortars(UUID ownerId) { + super(ownerId); + this.cardNumber = 163; + this.expansionSetCode = "C15"; + } + + public MizziumMortars(final MizziumMortars card) { + super(card); + } + + @Override + public MizziumMortars copy() { + return new MizziumMortars(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MizzixOfTheIzmagnus.java b/Mage.Sets/src/mage/sets/commander2015/MizzixOfTheIzmagnus.java new file mode 100644 index 00000000000..32b287c0cbf --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MizzixOfTheIzmagnus.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.abilities.effects.common.counter.AddCountersControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.filter.common.FilterInstantOrSorcerySpell; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author emerald000 + */ +public class MizzixOfTheIzmagnus extends CardImpl { + + private static final FilterInstantOrSorcerySpell filter = new FilterInstantOrSorcerySpell("an instant or sorcery spell with converted mana cost greater than the number of experience counters you have"); + + static { + filter.add(new MizzixOfTheIzmagnusPredicate()); + } + + public MizzixOfTheIzmagnus(UUID ownerId) { + super(ownerId, 50, "Mizzix of the Izmagnus", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{U}{R}"); + this.expansionSetCode = "C15"; + this.supertype.add("Legendary"); + this.subtype.add("Goblin"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever you cast an instant or sorcery spell with converted mana cost greater than the number of experience counters you have, you get an experience counter. + this.addAbility(new SpellCastControllerTriggeredAbility( + new AddCountersControllerEffect(CounterType.EXPERIENCE.createInstance(1), false), filter, false)); + + // Instant and sorcery spells you cast cost {1} less to cast for each experience counter you have. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MizzixOfTheIzmagnusCostReductionEffect())); + } + + public MizzixOfTheIzmagnus(final MizzixOfTheIzmagnus card) { + super(card); + } + + @Override + public MizzixOfTheIzmagnus copy() { + return new MizzixOfTheIzmagnus(this); + } +} + +class MizzixOfTheIzmagnusPredicate implements Predicate { + + @Override + public boolean apply(MageObject input, Game game) { + Spell spell = game.getStack().getSpell(input.getId()); + if (spell != null) { + Player controller = game.getPlayer(spell.getControllerId()); + if (controller != null) { + if (spell.getConvertedManaCost() > controller.getCounters().getCount(CounterType.EXPERIENCE)) { + return true; + } + } + } + return false; + } + + @Override + public String toString() { + return "VariableManaCost"; + } +} + +class MizzixOfTheIzmagnusCostReductionEffect extends CostModificationEffectImpl { + + MizzixOfTheIzmagnusCostReductionEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); + staticText = "Instant and sorcery spells you cast cost {1} less to cast for each experience counter you have"; + } + + MizzixOfTheIzmagnusCostReductionEffect(MizzixOfTheIzmagnusCostReductionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + SpellAbility spellAbility = (SpellAbility) abilityToModify; + CardUtil.adjustCost(spellAbility, controller.getCounters().getCount(CounterType.EXPERIENCE)); + return true; + } + return false; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + if (abilityToModify instanceof SpellAbility && abilityToModify.getControllerId().equals(source.getControllerId())) { + Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId()); + if (spell != null) { + return new FilterInstantOrSorceryCard().match(spell, source.getSourceId(), source.getControllerId(), game); + } 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 && new FilterInstantOrSorceryCard().match(sourceCard, source.getSourceId(), source.getControllerId(), game); + } + } + return false; + } + + @Override + public MizzixOfTheIzmagnusCostReductionEffect copy() { + return new MizzixOfTheIzmagnusCostReductionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MizzixsMastery.java b/Mage.Sets/src/mage/sets/commander2015/MizzixsMastery.java new file mode 100644 index 00000000000..52032c63ce5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MizzixsMastery.java @@ -0,0 +1,168 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileSpellEffect; +import mage.abilities.keyword.OverloadAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class MizzixsMastery extends CardImpl { + + public MizzixsMastery(UUID ownerId) { + super(ownerId, 29, "Mizzix's Mastery", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "C15"; + + // Exile target card that's an instant or sorcery from your graveyard. For each card exiled this way, copy it, and you may cast the copy without paying its mana cost. Exile Mizzix's Mastery. + this.getSpellAbility().addEffect(new MizzixsMasteryEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("card that's an instant or sorcery from your graveyard"))); + this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); + + // Overload {5}{R}{R}{R} + Ability ability = new OverloadAbility(this, new MizzixsMasteryOverloadEffect(), new ManaCostsImpl("{5}{R}{R}{R}"), TimingRule.SORCERY); + ability.addEffect(ExileSpellEffect.getInstance()); + this.addAbility(ability); + } + + public MizzixsMastery(final MizzixsMastery card) { + super(card); + } + + @Override + public MizzixsMastery copy() { + return new MizzixsMastery(this); + } +} + +class MizzixsMasteryEffect extends OneShotEffect { + + public MizzixsMasteryEffect() { + super(Outcome.PlayForFree); + this.staticText = "Exile target card that's an instant or sorcery from your graveyard. For each card exiled this way, copy it, and you may cast the copy without paying its mana cost"; + } + + public MizzixsMasteryEffect(final MizzixsMasteryEffect effect) { + super(effect); + } + + @Override + public MizzixsMasteryEffect copy() { + return new MizzixsMasteryEffect(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) { + if (controller.moveCards(card, Zone.EXILED, source, game)) { + Card cardCopy = game.copyCard(card, source, source.getControllerId()); + if (cardCopy.getSpellAbility().canChooseTarget(game) + && controller.chooseUse(outcome, "Cast copy of " + card.getName() + " without paying its mana cost?", source, game)) { + controller.cast(cardCopy.getSpellAbility(), game, true); + } + } + } + return true; + } + return false; + } +} + +class MizzixsMasteryOverloadEffect extends OneShotEffect { + + public MizzixsMasteryOverloadEffect() { + super(Outcome.PlayForFree); + this.staticText = "Exile each card that's an instant or sorcery from your graveyard. For each card exiled this way, copy it, and you may cast the copy without paying its mana cost. Exile {this}"; + } + + public MizzixsMasteryOverloadEffect(final MizzixsMasteryOverloadEffect effect) { + super(effect); + } + + @Override + public MizzixsMasteryOverloadEffect copy() { + return new MizzixsMasteryOverloadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Set cardsToExile = controller.getGraveyard().getCards(new FilterInstantOrSorceryCard(), source.getId(), source.getControllerId(), game); + if (!cardsToExile.isEmpty()) { + if (controller.moveCards(cardsToExile, Zone.EXILED, source, game)) { + Cards copiedCards = new CardsImpl(); + for (Card card : cardsToExile) { + copiedCards.add(game.copyCard(card, source, source.getControllerId())); + } + boolean continueCasting = true; + while (continueCasting) { + TargetCard targetCard = new TargetCard(0, 1, Zone.EXILED, new FilterCard("copied card to cast without paying its mana cost?")); + targetCard.setNotTarget(true); + if (controller.choose(outcome, copiedCards, targetCard, game)) { + Card selectedCard = game.getCard(targetCard.getFirstTarget()); + if (selectedCard != null && selectedCard.getSpellAbility().canChooseTarget(game)) { + if (controller.cast(selectedCard.getSpellAbility(), game, true)) { + copiedCards.remove(selectedCard); + } + } + } + continueCasting = copiedCards.size() > 0 + && controller.chooseUse(outcome, "Cast one of the copied cards without paying its mana cost?", source, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MonkIdealist.java b/Mage.Sets/src/mage/sets/commander2015/MonkIdealist.java new file mode 100644 index 00000000000..91dac8c97ec --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MonkIdealist.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MonkIdealist extends mage.sets.urzassaga.MonkIdealist { + + public MonkIdealist(UUID ownerId) { + super(ownerId); + this.cardNumber = 76; + this.expansionSetCode = "C15"; + } + + public MonkIdealist(final MonkIdealist card) { + super(card); + } + + @Override + public MonkIdealist copy() { + return new MonkIdealist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MosswortBridge.java b/Mage.Sets/src/mage/sets/commander2015/MosswortBridge.java new file mode 100644 index 00000000000..a67796f6cc0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MosswortBridge.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MosswortBridge extends mage.sets.commander2013.MosswortBridge { + + public MosswortBridge(UUID ownerId) { + super(ownerId); + this.cardNumber = 294; + this.expansionSetCode = "C15"; + } + + public MosswortBridge(final MosswortBridge card) { + super(card); + } + + @Override + public MosswortBridge copy() { + return new MosswortBridge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Mountain1.java b/Mage.Sets/src/mage/sets/commander2015/Mountain1.java new file mode 100644 index 00000000000..653e03ee182 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Mountain1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain1 extends mage.cards.basiclands.Mountain { + + public Mountain1(UUID ownerId) { + super(ownerId, 335); + this.expansionSetCode = "C15"; + } + + public Mountain1(final Mountain1 card) { + super(card); + } + + @Override + public Mountain1 copy() { + return new Mountain1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Mountain2.java b/Mage.Sets/src/mage/sets/commander2015/Mountain2.java new file mode 100644 index 00000000000..2abb1ad2b3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Mountain2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain2 extends mage.cards.basiclands.Mountain { + + public Mountain2(UUID ownerId) { + super(ownerId, 336); + this.expansionSetCode = "C15"; + } + + public Mountain2(final Mountain2 card) { + super(card); + } + + @Override + public Mountain2 copy() { + return new Mountain2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Mountain3.java b/Mage.Sets/src/mage/sets/commander2015/Mountain3.java new file mode 100644 index 00000000000..02af3e46f1c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Mountain3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain3 extends mage.cards.basiclands.Mountain { + + public Mountain3(UUID ownerId) { + super(ownerId, 337); + this.expansionSetCode = "C15"; + } + + public Mountain3(final Mountain3 card) { + super(card); + } + + @Override + public Mountain3 copy() { + return new Mountain3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Mountain4.java b/Mage.Sets/src/mage/sets/commander2015/Mountain4.java new file mode 100644 index 00000000000..ea3e2e7f8aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Mountain4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain4 extends mage.cards.basiclands.Mountain { + + public Mountain4(UUID ownerId) { + super(ownerId, 338); + this.expansionSetCode = "C15"; + } + + public Mountain4(final Mountain4 card) { + super(card); + } + + @Override + public Mountain4 copy() { + return new Mountain4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Mulch.java b/Mage.Sets/src/mage/sets/commander2015/Mulch.java new file mode 100644 index 00000000000..d5eab8ce891 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Mulch.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mulch extends mage.sets.innistrad.Mulch { + + public Mulch(UUID ownerId) { + super(ownerId); + this.cardNumber = 191; + this.expansionSetCode = "C15"; + } + + public Mulch(final Mulch card) { + super(card); + } + + @Override + public Mulch copy() { + return new Mulch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Mulldrifter.java b/Mage.Sets/src/mage/sets/commander2015/Mulldrifter.java new file mode 100644 index 00000000000..b916017ea3e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Mulldrifter.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commander2015; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Mulldrifter extends mage.sets.commander.Mulldrifter { + + public Mulldrifter(UUID ownerId) { + super(ownerId); + this.cardNumber = 97; + this.expansionSetCode = "C15"; + this.rarity = Rarity.UNCOMMON; + } + + public Mulldrifter(final Mulldrifter card) { + super(card); + } + + @Override + public Mulldrifter copy() { + return new Mulldrifter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Mycoloth.java b/Mage.Sets/src/mage/sets/commander2015/Mycoloth.java new file mode 100644 index 00000000000..5174b44b871 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Mycoloth.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mycoloth extends mage.sets.shardsofalara.Mycoloth { + + public Mycoloth(UUID ownerId) { + super(ownerId); + this.cardNumber = 192; + this.expansionSetCode = "C15"; + } + + public Mycoloth(final Mycoloth card) { + super(card); + } + + @Override + public Mycoloth copy() { + return new Mycoloth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MysticConfluence.java b/Mage.Sets/src/mage/sets/commander2015/MysticConfluence.java new file mode 100644 index 00000000000..cd6e2f946ea --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MysticConfluence.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetSpell; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class MysticConfluence extends CardImpl { + + public MysticConfluence(UUID ownerId) { + super(ownerId, 14, "Mystic Confluence", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); + this.expansionSetCode = "C15"; + + // Choose three. You may choose the same mode more than once. + this.getSpellAbility().getModes().setMinModes(3); + this.getSpellAbility().getModes().setMaxModes(3); + this.getSpellAbility().getModes().setEachModeMoreThanOnce(true); + + // - Counter target spell unless its controller pays {3}; + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(3))); + this.getSpellAbility().addTarget(new TargetSpell()); + + // Return target creature to its owner's hand; + Mode mode = new Mode(); + mode.getEffects().add(new ReturnToHandTargetEffect()); + mode.getTargets().add(new TargetCreaturePermanent()); + this.getSpellAbility().getModes().addMode(mode); + + // Draw a card. + mode = new Mode(); + mode.getEffects().add(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().getModes().addMode(mode); + } + + public MysticConfluence(final MysticConfluence card) { + super(card); + } + + @Override + public MysticConfluence copy() { + return new MysticConfluence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MysticRetrieval.java b/Mage.Sets/src/mage/sets/commander2015/MysticRetrieval.java new file mode 100644 index 00000000000..68841139585 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MysticRetrieval.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MysticRetrieval extends mage.sets.darkascension.MysticRetrieval { + + public MysticRetrieval(UUID ownerId) { + super(ownerId); + this.cardNumber = 98; + this.expansionSetCode = "C15"; + } + + public MysticRetrieval(final MysticRetrieval card) { + super(card); + } + + @Override + public MysticRetrieval copy() { + return new MysticRetrieval(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/MysticSnake.java b/Mage.Sets/src/mage/sets/commander2015/MysticSnake.java new file mode 100644 index 00000000000..7f52cfdad5a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/MysticSnake.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MysticSnake extends mage.sets.apocalypse.MysticSnake { + + public MysticSnake(UUID ownerId) { + super(ownerId); + this.cardNumber = 228; + this.expansionSetCode = "C15"; + } + + public MysticSnake(final MysticSnake card) { + super(card); + } + + @Override + public MysticSnake copy() { + return new MysticSnake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/NecromancersCovenant.java b/Mage.Sets/src/mage/sets/commander2015/NecromancersCovenant.java new file mode 100644 index 00000000000..4e33f502456 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/NecromancersCovenant.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class NecromancersCovenant extends mage.sets.alarareborn.NecromancersCovenant { + + public NecromancersCovenant(UUID ownerId) { + super(ownerId); + this.cardNumber = 229; + this.expansionSetCode = "C15"; + } + + public NecromancersCovenant(final NecromancersCovenant card) { + super(card); + } + + @Override + public NecromancersCovenant copy() { + return new NecromancersCovenant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/NewBenalia.java b/Mage.Sets/src/mage/sets/commander2015/NewBenalia.java new file mode 100644 index 00000000000..25f45dcb9cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/NewBenalia.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class NewBenalia extends mage.sets.futuresight.NewBenalia { + + public NewBenalia(UUID ownerId) { + super(ownerId); + this.cardNumber = 295; + this.expansionSetCode = "C15"; + } + + public NewBenalia(final NewBenalia card) { + super(card); + } + + @Override + public NewBenalia copy() { + return new NewBenalia(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Nighthowler.java b/Mage.Sets/src/mage/sets/commander2015/Nighthowler.java new file mode 100644 index 00000000000..35fb765437d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Nighthowler.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Nighthowler extends mage.sets.theros.Nighthowler { + + public Nighthowler(UUID ownerId) { + super(ownerId); + this.cardNumber = 129; + this.expansionSetCode = "C15"; + } + + public Nighthowler(final Nighthowler card) { + super(card); + } + + @Override + public Nighthowler copy() { + return new Nighthowler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/NinjaOfTheDeepHours.java b/Mage.Sets/src/mage/sets/commander2015/NinjaOfTheDeepHours.java new file mode 100644 index 00000000000..e3e028c6240 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/NinjaOfTheDeepHours.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class NinjaOfTheDeepHours extends mage.sets.betrayersofkamigawa.NinjaOfTheDeepHours { + + public NinjaOfTheDeepHours(UUID ownerId) { + super(ownerId); + this.cardNumber = 99; + this.expansionSetCode = "C15"; + } + + public NinjaOfTheDeepHours(final NinjaOfTheDeepHours card) { + super(card); + } + + @Override + public NinjaOfTheDeepHours copy() { + return new NinjaOfTheDeepHours(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/NobleQuarry.java b/Mage.Sets/src/mage/sets/commander2015/NobleQuarry.java new file mode 100644 index 00000000000..29d430a5a0b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/NobleQuarry.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class NobleQuarry extends mage.sets.bornofthegods.NobleQuarry { + + public NobleQuarry(UUID ownerId) { + super(ownerId); + this.cardNumber = 193; + this.expansionSetCode = "C15"; + } + + public NobleQuarry(final NobleQuarry card) { + super(card); + } + + @Override + public NobleQuarry copy() { + return new NobleQuarry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/NovijenHeartOfProgress.java b/Mage.Sets/src/mage/sets/commander2015/NovijenHeartOfProgress.java new file mode 100644 index 00000000000..d1863b2f480 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/NovijenHeartOfProgress.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class NovijenHeartOfProgress extends mage.sets.dissension.NovijenHeartOfProgress { + + public NovijenHeartOfProgress(UUID ownerId) { + super(ownerId); + this.cardNumber = 296; + this.expansionSetCode = "C15"; + } + + public NovijenHeartOfProgress(final NovijenHeartOfProgress card) { + super(card); + } + + @Override + public NovijenHeartOfProgress copy() { + return new NovijenHeartOfProgress(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OhranViper.java b/Mage.Sets/src/mage/sets/commander2015/OhranViper.java new file mode 100644 index 00000000000..2b7dbbef605 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OhranViper.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OhranViper extends mage.sets.jacevsvraska.OhranViper { + + public OhranViper(UUID ownerId) { + super(ownerId); + this.cardNumber = 194; + this.expansionSetCode = "C15"; + } + + public OhranViper(final OhranViper card) { + super(card); + } + + @Override + public OhranViper copy() { + return new OhranViper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OpenTheVaults.java b/Mage.Sets/src/mage/sets/commander2015/OpenTheVaults.java new file mode 100644 index 00000000000..4cf2f4529b7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OpenTheVaults.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OpenTheVaults extends mage.sets.magic2010.OpenTheVaults { + + public OpenTheVaults(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "C15"; + } + + public OpenTheVaults(final OpenTheVaults card) { + super(card); + } + + @Override + public OpenTheVaults copy() { + return new OpenTheVaults(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OranRiefTheVastwood.java b/Mage.Sets/src/mage/sets/commander2015/OranRiefTheVastwood.java new file mode 100644 index 00000000000..3ddc215763b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OranRiefTheVastwood.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OranRiefTheVastwood extends mage.sets.zendikar.OranRiefTheVastwood { + + public OranRiefTheVastwood(UUID ownerId) { + super(ownerId); + this.cardNumber = 297; + this.expansionSetCode = "C15"; + } + + public OranRiefTheVastwood(final OranRiefTheVastwood card) { + super(card); + } + + @Override + public OranRiefTheVastwood copy() { + return new OranRiefTheVastwood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OreskosExplorer.java b/Mage.Sets/src/mage/sets/commander2015/OreskosExplorer.java new file mode 100644 index 00000000000..2eaff4701ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OreskosExplorer.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +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.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class OreskosExplorer extends CardImpl { + + public OreskosExplorer(UUID ownerId) { + super(ownerId, 6, "Oreskos Explorer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "C15"; + this.subtype.add("Cat"); + this.subtype.add("Scout"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Oreskos Explorer enters the battlefield, search your library for up to X Plains cards, + // where X is the number of players who control more lands than you. Reveal those cards, put them into your hand, then shuffle your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new OreskosExplorerEffect())); + + } + + public OreskosExplorer(final OreskosExplorer card) { + super(card); + } + + @Override + public OreskosExplorer copy() { + return new OreskosExplorer(this); + } +} + +class OreskosExplorerEffect extends OneShotEffect { + + public OreskosExplorerEffect() { + super(Outcome.PutLandInPlay); + this.staticText = "search your library for up to X Plains cards, where X is the number of players who control more lands than you. Reveal those cards, put them into your hand, then shuffle your library"; + } + + public OreskosExplorerEffect(final OreskosExplorerEffect effect) { + super(effect); + } + + @Override + public OreskosExplorerEffect copy() { + return new OreskosExplorerEffect(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) { + return false; + } + + int controllerLands = game.getBattlefield().countAll(new FilterLandPermanent(), controller.getId(), game); + int landsToSearch = 0; + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + if (!playerId.equals(controller.getId())) { + if (controllerLands < game.getBattlefield().countAll(new FilterLandPermanent(), playerId, game)) { + landsToSearch++; + } + } + } + if (landsToSearch > 0) { + FilterBasicLandCard filterPlains = new FilterBasicLandCard("up to " + landsToSearch + " Plains cards"); + filterPlains.add(new ControllerPredicate(TargetController.YOU)); + filterPlains.add(new SubtypePredicate("Plains")); + TargetCardInLibrary target = new TargetCardInLibrary(0, landsToSearch, filterPlains); + if (controller.searchLibrary(target, game)) { + Cards cards = new CardsImpl(target.getTargets()); + controller.revealCards(sourceObject.getIdName(), cards, game); + controller.moveCards(cards.getCards(game), Zone.HAND, source, game); + } + } + controller.shuffleLibrary(game); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OrimsThunder.java b/Mage.Sets/src/mage/sets/commander2015/OrimsThunder.java new file mode 100644 index 00000000000..d729ba66a6e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OrimsThunder.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrimsThunder extends mage.sets.apocalypse.OrimsThunder { + + public OrimsThunder(UUID ownerId) { + super(ownerId); + this.cardNumber = 78; + this.expansionSetCode = "C15"; + } + + public OrimsThunder(final OrimsThunder card) { + super(card); + } + + @Override + public OrimsThunder copy() { + return new OrimsThunder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OrochiHatchery.java b/Mage.Sets/src/mage/sets/commander2015/OrochiHatchery.java new file mode 100644 index 00000000000..fd94f987e1f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OrochiHatchery.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrochiHatchery extends mage.sets.championsofkamigawa.OrochiHatchery { + + public OrochiHatchery(UUID ownerId) { + super(ownerId); + this.cardNumber = 260; + this.expansionSetCode = "C15"; + } + + public OrochiHatchery(final OrochiHatchery card) { + super(card); + } + + @Override + public OrochiHatchery copy() { + return new OrochiHatchery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OrzhovBasilica.java b/Mage.Sets/src/mage/sets/commander2015/OrzhovBasilica.java new file mode 100644 index 00000000000..8415f299711 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OrzhovBasilica.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrzhovBasilica extends mage.sets.guildpact.OrzhovBasilica { + + public OrzhovBasilica(UUID ownerId) { + super(ownerId); + this.cardNumber = 298; + this.expansionSetCode = "C15"; + } + + public OrzhovBasilica(final OrzhovBasilica card) { + super(card); + } + + @Override + public OrzhovBasilica copy() { + return new OrzhovBasilica(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OrzhovCluestone.java b/Mage.Sets/src/mage/sets/commander2015/OrzhovCluestone.java new file mode 100644 index 00000000000..0849f9dfee0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OrzhovCluestone.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrzhovCluestone extends mage.sets.dragonsmaze.OrzhovCluestone { + + public OrzhovCluestone(UUID ownerId) { + super(ownerId); + this.cardNumber = 261; + this.expansionSetCode = "C15"; + } + + public OrzhovCluestone(final OrzhovCluestone card) { + super(card); + } + + @Override + public OrzhovCluestone copy() { + return new OrzhovCluestone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OrzhovGuildgate.java b/Mage.Sets/src/mage/sets/commander2015/OrzhovGuildgate.java new file mode 100644 index 00000000000..ecbb8a36281 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OrzhovGuildgate.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrzhovGuildgate extends mage.sets.gatecrash.OrzhovGuildgate { + + public OrzhovGuildgate(UUID ownerId) { + super(ownerId); + this.cardNumber = 299; + this.expansionSetCode = "C15"; + } + + public OrzhovGuildgate(final OrzhovGuildgate card) { + super(card); + } + + @Override + public OrzhovGuildgate copy() { + return new OrzhovGuildgate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OrzhovSignet.java b/Mage.Sets/src/mage/sets/commander2015/OrzhovSignet.java new file mode 100644 index 00000000000..50ac955686b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OrzhovSignet.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrzhovSignet extends mage.sets.guildpact.OrzhovSignet { + + public OrzhovSignet(UUID ownerId) { + super(ownerId); + this.cardNumber = 262; + this.expansionSetCode = "C15"; + } + + public OrzhovSignet(final OrzhovSignet card) { + super(card); + } + + @Override + public OrzhovSignet copy() { + return new OrzhovSignet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Overrun.java b/Mage.Sets/src/mage/sets/commander2015/Overrun.java new file mode 100644 index 00000000000..cb335fa682e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Overrun.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Overrun extends mage.sets.magic2010.Overrun { + + public Overrun(UUID ownerId) { + super(ownerId); + this.cardNumber = 195; + this.expansionSetCode = "C15"; + } + + public Overrun(final Overrun card) { + super(card); + } + + @Override + public Overrun copy() { + return new Overrun(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/OverwhelmingStampede.java b/Mage.Sets/src/mage/sets/commander2015/OverwhelmingStampede.java new file mode 100644 index 00000000000..83b92aa7745 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/OverwhelmingStampede.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OverwhelmingStampede extends mage.sets.magic2011.OverwhelmingStampede { + + public OverwhelmingStampede(UUID ownerId) { + super(ownerId); + this.cardNumber = 196; + this.expansionSetCode = "C15"; + } + + public OverwhelmingStampede(final OverwhelmingStampede card) { + super(card); + } + + @Override + public OverwhelmingStampede copy() { + return new OverwhelmingStampede(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PatagiaViper.java b/Mage.Sets/src/mage/sets/commander2015/PatagiaViper.java new file mode 100644 index 00000000000..1a4949fe0be --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PatagiaViper.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PatagiaViper extends mage.sets.dissension.PatagiaViper { + + public PatagiaViper(UUID ownerId) { + super(ownerId); + this.cardNumber = 197; + this.expansionSetCode = "C15"; + } + + public PatagiaViper(final PatagiaViper card) { + super(card); + } + + @Override + public PatagiaViper copy() { + return new PatagiaViper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PathbreakerIbex.java b/Mage.Sets/src/mage/sets/commander2015/PathbreakerIbex.java new file mode 100644 index 00000000000..6b04e6a228f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PathbreakerIbex.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author fireshoes + */ +public class PathbreakerIbex extends CardImpl { + + public PathbreakerIbex(UUID ownerId) { + super(ownerId, 38, "Pathbreaker Ibex", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "C15"; + this.subtype.add("Goat"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Pathbreaker Ibex attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control. + this.addAbility(new AttacksTriggeredAbility(new PathbreakerIbexEffect(), false)); + } + + public PathbreakerIbex(final PathbreakerIbex card) { + super(card); + } + + @Override + public PathbreakerIbex copy() { + return new PathbreakerIbex(this); + } +} + +class PathbreakerIbexEffect extends OneShotEffect { + + public PathbreakerIbexEffect() { + super(Outcome.BoostCreature); + this.staticText = "creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control"; + } + + public PathbreakerIbexEffect(final PathbreakerIbexEffect effect) { + super(effect); + } + + @Override + public PathbreakerIbexEffect copy() { + return new PathbreakerIbexEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int maxPower = 0; + for (Permanent perm: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) { + if (perm.getPower().getValue() > maxPower) { + maxPower = perm.getPower().getValue(); + } + } + ContinuousEffect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfStep, new FilterCreaturePermanent()); + game.addEffect(effect, source); + if (maxPower != 0) { + effect = new BoostControlledEffect(maxPower, maxPower, Duration.EndOfTurn); + game.addEffect(effect, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PhyrexianArena.java b/Mage.Sets/src/mage/sets/commander2015/PhyrexianArena.java new file mode 100644 index 00000000000..5d56aca5124 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PhyrexianArena.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PhyrexianArena extends mage.sets.apocalypse.PhyrexianArena { + + public PhyrexianArena(UUID ownerId) { + super(ownerId); + this.cardNumber = 130; + this.expansionSetCode = "C15"; + } + + public PhyrexianArena(final PhyrexianArena card) { + super(card); + } + + @Override + public PhyrexianArena copy() { + return new PhyrexianArena(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PhyrexianPlaguelord.java b/Mage.Sets/src/mage/sets/commander2015/PhyrexianPlaguelord.java new file mode 100644 index 00000000000..07d62c005ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PhyrexianPlaguelord.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PhyrexianPlaguelord extends mage.sets.urzaslegacy.PhyrexianPlaguelord { + + public PhyrexianPlaguelord(UUID ownerId) { + super(ownerId); + this.cardNumber = 131; + this.expansionSetCode = "C15"; + } + + public PhyrexianPlaguelord(final PhyrexianPlaguelord card) { + super(card); + } + + @Override + public PhyrexianPlaguelord copy() { + return new PhyrexianPlaguelord(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PhyrexianRager.java b/Mage.Sets/src/mage/sets/commander2015/PhyrexianRager.java new file mode 100644 index 00000000000..c7bbc39f9b8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PhyrexianRager.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PhyrexianRager extends mage.sets.tenthedition.PhyrexianRager { + + public PhyrexianRager(UUID ownerId) { + super(ownerId); + this.cardNumber = 132; + this.expansionSetCode = "C15"; + } + + public PhyrexianRager(final PhyrexianRager card) { + super(card); + } + + @Override + public PhyrexianRager copy() { + return new PhyrexianRager(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PhyrexianReclamation.java b/Mage.Sets/src/mage/sets/commander2015/PhyrexianReclamation.java new file mode 100644 index 00000000000..09c579380e7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PhyrexianReclamation.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PhyrexianReclamation extends mage.sets.urzaslegacy.PhyrexianReclamation { + + public PhyrexianReclamation(UUID ownerId) { + super(ownerId); + this.cardNumber = 133; + this.expansionSetCode = "C15"; + } + + public PhyrexianReclamation(final PhyrexianReclamation card) { + super(card); + } + + @Override + public PhyrexianReclamation copy() { + return new PhyrexianReclamation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Plains1.java b/Mage.Sets/src/mage/sets/commander2015/Plains1.java new file mode 100644 index 00000000000..6df3c22bdf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Plains1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains1 extends mage.cards.basiclands.Plains { + + public Plains1(UUID ownerId) { + super(ownerId, 323); + this.expansionSetCode = "C15"; + } + + public Plains1(final Plains1 card) { + super(card); + } + + @Override + public Plains1 copy() { + return new Plains1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Plains2.java b/Mage.Sets/src/mage/sets/commander2015/Plains2.java new file mode 100644 index 00000000000..656f5074bd8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Plains2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains2 extends mage.cards.basiclands.Plains { + + public Plains2(UUID ownerId) { + super(ownerId, 324); + this.expansionSetCode = "C15"; + } + + public Plains2(final Plains2 card) { + super(card); + } + + @Override + public Plains2 copy() { + return new Plains2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Plains3.java b/Mage.Sets/src/mage/sets/commander2015/Plains3.java new file mode 100644 index 00000000000..fdd6a0e8f15 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Plains3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains3 extends mage.cards.basiclands.Plains { + + public Plains3(UUID ownerId) { + super(ownerId, 325); + this.expansionSetCode = "C15"; + } + + public Plains3(final Plains3 card) { + super(card); + } + + @Override + public Plains3 copy() { + return new Plains3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Plains4.java b/Mage.Sets/src/mage/sets/commander2015/Plains4.java new file mode 100644 index 00000000000..630aab930c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Plains4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains4 extends mage.cards.basiclands.Plains { + + public Plains4(UUID ownerId) { + super(ownerId, 326); + this.expansionSetCode = "C15"; + } + + public Plains4(final Plains4 card) { + super(card); + } + + @Override + public Plains4 copy() { + return new Plains4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Plaxmanta.java b/Mage.Sets/src/mage/sets/commander2015/Plaxmanta.java new file mode 100644 index 00000000000..1526d4e5c6d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Plaxmanta.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plaxmanta extends mage.sets.dissension.Plaxmanta { + + public Plaxmanta(UUID ownerId) { + super(ownerId); + this.cardNumber = 100; + this.expansionSetCode = "C15"; + } + + public Plaxmanta(final Plaxmanta card) { + super(card); + } + + @Override + public Plaxmanta copy() { + return new Plaxmanta(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PollutedMire.java b/Mage.Sets/src/mage/sets/commander2015/PollutedMire.java new file mode 100644 index 00000000000..558092f2ec0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PollutedMire.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PollutedMire extends mage.sets.urzassaga.PollutedMire { + + public PollutedMire(UUID ownerId) { + super(ownerId); + this.cardNumber = 300; + this.expansionSetCode = "C15"; + } + + public PollutedMire(final PollutedMire card) { + super(card); + } + + @Override + public PollutedMire copy() { + return new PollutedMire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Preordain.java b/Mage.Sets/src/mage/sets/commander2015/Preordain.java new file mode 100644 index 00000000000..0bbe13d95f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Preordain.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Preordain extends mage.sets.magic2011.Preordain { + + public Preordain(UUID ownerId) { + super(ownerId); + this.cardNumber = 101; + this.expansionSetCode = "C15"; + } + + public Preordain(final Preordain card) { + super(card); + } + + @Override + public Preordain copy() { + return new Preordain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PrimalGrowth.java b/Mage.Sets/src/mage/sets/commander2015/PrimalGrowth.java new file mode 100644 index 00000000000..67fafd594ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PrimalGrowth.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PrimalGrowth extends mage.sets.planeshift.PrimalGrowth { + + public PrimalGrowth(UUID ownerId) { + super(ownerId); + this.cardNumber = 198; + this.expansionSetCode = "C15"; + } + + public PrimalGrowth(final PrimalGrowth card) { + super(card); + } + + @Override + public PrimalGrowth copy() { + return new PrimalGrowth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PrimeSpeakerZegana.java b/Mage.Sets/src/mage/sets/commander2015/PrimeSpeakerZegana.java new file mode 100644 index 00000000000..df10f933722 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PrimeSpeakerZegana.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PrimeSpeakerZegana extends mage.sets.gatecrash.PrimeSpeakerZegana { + + public PrimeSpeakerZegana(UUID ownerId) { + super(ownerId); + this.cardNumber = 230; + this.expansionSetCode = "C15"; + } + + public PrimeSpeakerZegana(final PrimeSpeakerZegana card) { + super(card); + } + + @Override + public PrimeSpeakerZegana copy() { + return new PrimeSpeakerZegana(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PropheticBolt.java b/Mage.Sets/src/mage/sets/commander2015/PropheticBolt.java new file mode 100644 index 00000000000..bd9a87ca73e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PropheticBolt.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PropheticBolt extends mage.sets.commander.PropheticBolt { + + public PropheticBolt(UUID ownerId) { + super(ownerId); + this.cardNumber = 231; + this.expansionSetCode = "C15"; + } + + public PropheticBolt(final PropheticBolt card) { + super(card); + } + + @Override + public PropheticBolt copy() { + return new PropheticBolt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/PsychosisCrawler.java b/Mage.Sets/src/mage/sets/commander2015/PsychosisCrawler.java new file mode 100644 index 00000000000..745fa7cdfa1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/PsychosisCrawler.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PsychosisCrawler extends mage.sets.mirrodinbesieged.PsychosisCrawler { + + public PsychosisCrawler(UUID ownerId) { + super(ownerId); + this.cardNumber = 263; + this.expansionSetCode = "C15"; + } + + public PsychosisCrawler(final PsychosisCrawler card) { + super(card); + } + + @Override + public PsychosisCrawler copy() { + return new PsychosisCrawler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Putrefy.java b/Mage.Sets/src/mage/sets/commander2015/Putrefy.java new file mode 100644 index 00000000000..b2f063a6f08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Putrefy.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Putrefy extends mage.sets.ravnica.Putrefy { + + public Putrefy(UUID ownerId) { + super(ownerId); + this.cardNumber = 232; + this.expansionSetCode = "C15"; + } + + public Putrefy(final Putrefy card) { + super(card); + } + + @Override + public Putrefy copy() { + return new Putrefy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/RampantGrowth.java b/Mage.Sets/src/mage/sets/commander2015/RampantGrowth.java new file mode 100644 index 00000000000..2905ac935b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/RampantGrowth.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RampantGrowth extends mage.sets.magic2010.RampantGrowth { + + public RampantGrowth(UUID ownerId) { + super(ownerId); + this.cardNumber = 199; + this.expansionSetCode = "C15"; + } + + public RampantGrowth(final RampantGrowth card) { + super(card); + } + + @Override + public RampantGrowth copy() { + return new RampantGrowth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/RapidHybridization.java b/Mage.Sets/src/mage/sets/commander2015/RapidHybridization.java new file mode 100644 index 00000000000..8a781f07163 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/RapidHybridization.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RapidHybridization extends mage.sets.gatecrash.RapidHybridization { + + public RapidHybridization(UUID ownerId) { + super(ownerId); + this.cardNumber = 102; + this.expansionSetCode = "C15"; + } + + public RapidHybridization(final RapidHybridization card) { + super(card); + } + + @Override + public RapidHybridization copy() { + return new RapidHybridization(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ReinsOfPower.java b/Mage.Sets/src/mage/sets/commander2015/ReinsOfPower.java new file mode 100644 index 00000000000..ad4a9c1826e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ReinsOfPower.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class ReinsOfPower extends mage.sets.stronghold.ReinsOfPower { + + public ReinsOfPower(UUID ownerId) { + super(ownerId); + this.cardNumber = 103; + this.expansionSetCode = "C15"; + } + + public ReinsOfPower(final ReinsOfPower card) { + super(card); + } + + @Override + public ReinsOfPower copy() { + return new ReinsOfPower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ReliquaryTower.java b/Mage.Sets/src/mage/sets/commander2015/ReliquaryTower.java new file mode 100644 index 00000000000..b9590f51361 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ReliquaryTower.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ReliquaryTower extends mage.sets.conflux.ReliquaryTower { + + public ReliquaryTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 301; + this.expansionSetCode = "C15"; + } + + public ReliquaryTower(final ReliquaryTower card) { + super(card); + } + + @Override + public ReliquaryTower copy() { + return new ReliquaryTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Repeal.java b/Mage.Sets/src/mage/sets/commander2015/Repeal.java new file mode 100644 index 00000000000..cb707e76bff --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Repeal.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Repeal extends mage.sets.guildpact.Repeal { + + public Repeal(UUID ownerId) { + super(ownerId); + this.cardNumber = 104; + this.expansionSetCode = "C15"; + } + + public Repeal(final Repeal card) { + super(card); + } + + @Override + public Repeal copy() { + return new Repeal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/RighteousConfluence.java b/Mage.Sets/src/mage/sets/commander2015/RighteousConfluence.java new file mode 100644 index 00000000000..1edf38b36f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/RighteousConfluence.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.KnightToken; +import mage.target.common.TargetEnchantmentPermanent; + +/** + * + * @author LevelX2 + */ +public class RighteousConfluence extends CardImpl { + + public RighteousConfluence(UUID ownerId) { + super(ownerId, 7, "Righteous Confluence", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{W}{W}"); + this.expansionSetCode = "C15"; + + // Choose three - You may choose the same mode more than once. + this.getSpellAbility().getModes().setMinModes(3); + this.getSpellAbility().getModes().setMaxModes(3); + this.getSpellAbility().getModes().setEachModeMoreThanOnce(true); + + // - Put a 2/2 white Knight creature token with vigilance onto the battlefield; + this.getSpellAbility().addEffect(new CreateTokenEffect(new KnightToken())); + + // - Exile target enchantment; + Mode mode = new Mode(); + mode.getEffects().add(new ExileTargetEffect()); + mode.getTargets().add(new TargetEnchantmentPermanent()); + this.getSpellAbility().getModes().addMode(mode); + + // You gain 5 life; + mode = new Mode(); + mode.getEffects().add(new GainLifeEffect(5)); + this.getSpellAbility().getModes().addMode(mode); + } + + public RighteousConfluence(final RighteousConfluence card) { + super(card); + } + + @Override + public RighteousConfluence copy() { + return new RighteousConfluence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/RiseFromTheGrave.java b/Mage.Sets/src/mage/sets/commander2015/RiseFromTheGrave.java new file mode 100644 index 00000000000..8ff6e8908b8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/RiseFromTheGrave.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RiseFromTheGrave extends mage.sets.magic2010.RiseFromTheGrave { + + public RiseFromTheGrave(UUID ownerId) { + super(ownerId); + this.cardNumber = 134; + this.expansionSetCode = "C15"; + } + + public RiseFromTheGrave(final RiseFromTheGrave card) { + super(card); + } + + @Override + public RiseFromTheGrave copy() { + return new RiseFromTheGrave(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/RiteOfReplication.java b/Mage.Sets/src/mage/sets/commander2015/RiteOfReplication.java new file mode 100644 index 00000000000..59d33de7632 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/RiteOfReplication.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RiteOfReplication extends mage.sets.zendikar.RiteOfReplication { + + public RiteOfReplication(UUID ownerId) { + super(ownerId); + this.cardNumber = 105; + this.expansionSetCode = "C15"; + } + + public RiteOfReplication(final RiteOfReplication card) { + super(card); + } + + @Override + public RiteOfReplication copy() { + return new RiteOfReplication(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/RiteOfTheRagingStorm.java b/Mage.Sets/src/mage/sets/commander2015/RiteOfTheRagingStorm.java new file mode 100644 index 00000000000..00bba6e1e66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/RiteOfTheRagingStorm.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.combat.CantAttackYouOrPlaneswalkerAllEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class RiteOfTheRagingStorm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures named Lightning Rager"); + + static { + filter.add(new NamePredicate("Lightning Rager")); + } + + public RiteOfTheRagingStorm(UUID ownerId) { + super(ownerId, 30, "Rite of the Raging Storm", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}"); + this.expansionSetCode = "C15"; + + // Creatures named Lightning Rager can't attack you or planeswalkers you control. + Effect effect = new CantAttackYouOrPlaneswalkerAllEffect(Duration.WhileOnBattlefield, filter); + effect.setText("Creatures named Lightning Rager can't attack you or planeswalkers you control"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + // At the beginning of each player's upkeep, that player puts a 5/1 red Elemental creature token named Lightning Rager onto the battlefield. + // It has trample, haste, and "At the beginning of the end step, sacrifice this creature." + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new RiteOfTheRagingStormEffect(), TargetController.ANY, false)); + } + + public RiteOfTheRagingStorm(final RiteOfTheRagingStorm card) { + super(card); + } + + @Override + public RiteOfTheRagingStorm copy() { + return new RiteOfTheRagingStorm(this); + } +} + +class RiteOfTheRagingStormEffect extends OneShotEffect { + + private static final String effectText = "that player puts a 5/1 red Elemental creature token named Lightning Rager onto the battlefield. " + + "It has trample, haste, and \"At the beginning of the end step, sacrifice this creature.\""; + + RiteOfTheRagingStormEffect() { + super(Outcome.Sacrifice); + staticText = effectText; + } + + RiteOfTheRagingStormEffect(RiteOfTheRagingStormEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + Token lightningRagerToken = new LightningRagerToken(); + lightningRagerToken.putOntoBattlefield(1, game, this.getId(), player.getId()); + } + return false; + } + + @Override + public RiteOfTheRagingStormEffect copy() { + return new RiteOfTheRagingStormEffect(this); + } +} + +class LightningRagerToken extends Token { + + LightningRagerToken() { + super("Lightning Rager", "5/1 red Elemental creature token named Lightning Rager onto the battlefield." + + "It has trample, haste, and \"At the beginning of the end step, sacrifice this creature.\""); + this.setOriginalExpansionSetCode("C15"); + cardType.add(CardType.CREATURE); + color.setRed(true); + subtype.add("Elemental"); + power = new MageInt(5); + toughness = new MageInt(1); + addAbility(TrampleAbility.getInstance()); + addAbility(HasteAbility.getInstance()); + this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.NEXT, false)); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/RoguesPassage.java b/Mage.Sets/src/mage/sets/commander2015/RoguesPassage.java new file mode 100644 index 00000000000..021d39a08aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/RoguesPassage.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RoguesPassage extends mage.sets.returntoravnica.RoguesPassage { + + public RoguesPassage(UUID ownerId) { + super(ownerId); + this.cardNumber = 302; + this.expansionSetCode = "C15"; + } + + public RoguesPassage(final RoguesPassage card) { + super(card); + } + + @Override + public RoguesPassage copy() { + return new RoguesPassage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SakuraTribeElder.java b/Mage.Sets/src/mage/sets/commander2015/SakuraTribeElder.java new file mode 100644 index 00000000000..c291e2e14fc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SakuraTribeElder.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SakuraTribeElder extends mage.sets.championsofkamigawa.SakuraTribeElder { + + public SakuraTribeElder(UUID ownerId) { + super(ownerId); + this.cardNumber = 200; + this.expansionSetCode = "C15"; + } + + public SakuraTribeElder(final SakuraTribeElder card) { + super(card); + } + + @Override + public SakuraTribeElder copy() { + return new SakuraTribeElder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SandstoneOracle.java b/Mage.Sets/src/mage/sets/commander2015/SandstoneOracle.java new file mode 100644 index 00000000000..d8b5e75178a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SandstoneOracle.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author emerald000 + */ +public class SandstoneOracle extends CardImpl { + + public SandstoneOracle(UUID ownerId) { + super(ownerId, 52, "Sandstone Oracle", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); + this.expansionSetCode = "C15"; + this.subtype.add("Sphinx"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Sandstone Oracle enters the battlefield, choose an opponent. If that player has more cards in hand that you, draw cards equal to the difference. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SandstoneOracleEffect())); + } + + public SandstoneOracle(final SandstoneOracle card) { + super(card); + } + + @Override + public SandstoneOracle copy() { + return new SandstoneOracle(this); + } +} + +class SandstoneOracleEffect extends OneShotEffect { + + SandstoneOracleEffect() { + super(Outcome.DrawCard); + this.staticText = "choose an opponent. If that player has more cards in hand than you, draw cards equal to the difference"; + } + + SandstoneOracleEffect(final SandstoneOracleEffect effect) { + super(effect); + } + + @Override + public SandstoneOracleEffect copy() { + return new SandstoneOracleEffect(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) { + TargetOpponent target = new TargetOpponent(true); + if (controller.choose(Outcome.DrawCard, target, source.getSourceId(), game)) { + Player opponent = game.getPlayer(target.getFirstTarget()); + if (opponent != null) { + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen " + opponent.getLogName()); + int cardsDiff = opponent.getHand().size() - controller.getHand().size(); + if (cardsDiff > 0) { + controller.drawCards(cardsDiff, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SatyrWayfinder.java b/Mage.Sets/src/mage/sets/commander2015/SatyrWayfinder.java new file mode 100644 index 00000000000..61aebcfce3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SatyrWayfinder.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SatyrWayfinder extends mage.sets.bornofthegods.SatyrWayfinder { + + public SatyrWayfinder(UUID ownerId) { + super(ownerId); + this.cardNumber = 201; + this.expansionSetCode = "C15"; + } + + public SatyrWayfinder(final SatyrWayfinder card) { + super(card); + } + + @Override + public SatyrWayfinder copy() { + return new SatyrWayfinder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ScouredBarrens.java b/Mage.Sets/src/mage/sets/commander2015/ScouredBarrens.java new file mode 100644 index 00000000000..217cf672c24 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ScouredBarrens.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ScouredBarrens extends mage.sets.khansoftarkir.ScouredBarrens { + + public ScouredBarrens(UUID ownerId) { + super(ownerId); + this.cardNumber = 302; + this.expansionSetCode = "C15"; + } + + public ScouredBarrens(final ScouredBarrens card) { + super(card); + } + + @Override + public ScouredBarrens copy() { + return new ScouredBarrens(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ScourgeOfNelToth.java b/Mage.Sets/src/mage/sets/commander2015/ScourgeOfNelToth.java new file mode 100644 index 00000000000..38eaaf4a7ea --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ScourgeOfNelToth.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ScourgeOfNelToth extends CardImpl { + + public ScourgeOfNelToth(UUID ownerId) { + super(ownerId, 21, "Scourge of Nel Toth", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); + this.expansionSetCode = "C15"; + this.subtype.add("Zombie"); + this.subtype.add("Dragon"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // You may cast Scourge of Nel Toth from your graveyard by paying {B}{B} and sacrificing two creatures rather than paying its mana cost. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new ScourgeOfNelTothPlayEffect())); + } + + public ScourgeOfNelToth(final ScourgeOfNelToth card) { + super(card); + } + + @Override + public ScourgeOfNelToth copy() { + return new ScourgeOfNelToth(this); + } +} + +class ScourgeOfNelTothPlayEffect extends AsThoughEffectImpl { + + public ScourgeOfNelTothPlayEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); + staticText = "You may cast {this} from your graveyard by paying {B}{B} and sacrificing two creatures rather than paying its mana cost"; + } + + public ScourgeOfNelTothPlayEffect(final ScourgeOfNelTothPlayEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ScourgeOfNelTothPlayEffect copy() { + return new ScourgeOfNelTothPlayEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + if (sourceId.equals(source.getSourceId()) && source.getControllerId().equals(affectedControllerId)) { + if (game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) { + Player player = game.getPlayer(affectedControllerId); + if (player != null) { + // can sometimes be cast with base mana cost from grave???? + Costs costs = new CostsImpl<>(); + costs.add(new SacrificeTargetCost(new TargetControlledCreaturePermanent(2))); + player.setCastSourceIdWithAlternateMana(sourceId, new ManaCostsImpl<>("{B}{B}"), costs); + return true; + } + } + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java b/Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java new file mode 100644 index 00000000000..33aff6d7103 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java @@ -0,0 +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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.LivingWeaponAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +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.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author fireshoes + */ +public class Scytheclaw extends CardImpl { + + public Scytheclaw(UUID ownerId) { + super(ownerId, 53, "Scytheclaw", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}"); + this.expansionSetCode = "C15"; + this.subtype.add("Equipment"); + + // Living weapon + this.addAbility(new LivingWeaponAbility()); + + // Equipped creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); + + // Whenever equipped creature deals combat damage to a player, that player loses half of his or her life, round up. + this.addAbility(new ScytheclawTriggeredAbility()); + + // Equip {3} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); + } + + public Scytheclaw(final Scytheclaw card) { + super(card); + } + + @Override + public Scytheclaw copy() { + return new Scytheclaw(this); + } +} + +class ScytheclawTriggeredAbility extends TriggeredAbilityImpl { + + public ScytheclawTriggeredAbility() { + super(Zone.BATTLEFIELD, new ScytheclawEffect()); + } + + public ScytheclawTriggeredAbility(final ScytheclawTriggeredAbility ability) { + super(ability); + } + + @Override + public ScytheclawTriggeredAbility copy() { + return new ScytheclawTriggeredAbility(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; + Permanent p = game.getPermanent(event.getSourceId()); + if (damageEvent.isCombatDamage() && p != null && p.getAttachments().contains(this.getSourceId())) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getPlayerId())); + } + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever equipped creature deals combat damage to a player, " + super.getRule(); + } +} + +class ScytheclawEffect extends OneShotEffect { + + public ScytheclawEffect() { + super(Outcome.Damage); + this.staticText = "that player loses half his or her life, rounded up"; + } + + public ScytheclawEffect(final ScytheclawEffect effect) { + super(effect); + } + + @Override + public ScytheclawEffect copy() { + return new ScytheclawEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (player != null) { + Integer amount = (int) Math.ceil(player.getLife() / 2f); + if (amount > 0) { + player.loseLife(amount, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SealOfCleansing.java b/Mage.Sets/src/mage/sets/commander2015/SealOfCleansing.java new file mode 100644 index 00000000000..244feeb52a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SealOfCleansing.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SealOfCleansing extends mage.sets.nemesis.SealOfCleansing { + + public SealOfCleansing(UUID ownerId) { + super(ownerId); + this.cardNumber = 79; + this.expansionSetCode = "C15"; + } + + public SealOfCleansing(final SealOfCleansing card) { + super(card); + } + + @Override + public SealOfCleansing copy() { + return new SealOfCleansing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SealOfDoom.java b/Mage.Sets/src/mage/sets/commander2015/SealOfDoom.java new file mode 100644 index 00000000000..5012cadab1d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SealOfDoom.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SealOfDoom extends mage.sets.dissension.SealOfDoom { + + public SealOfDoom(UUID ownerId) { + super(ownerId); + this.cardNumber = 135; + this.expansionSetCode = "C15"; + } + + public SealOfDoom(final SealOfDoom card) { + super(card); + } + + @Override + public SealOfDoom copy() { + return new SealOfDoom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SealOfTheGuildpact.java b/Mage.Sets/src/mage/sets/commander2015/SealOfTheGuildpact.java new file mode 100644 index 00000000000..11cf25b89ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SealOfTheGuildpact.java @@ -0,0 +1,190 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.choices.ChoiceColor; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author emerald000 + */ +public class SealOfTheGuildpact extends CardImpl { + + public SealOfTheGuildpact(UUID ownerId) { + super(ownerId, 54, "Seal of the Guildpact", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}"); + this.expansionSetCode = "C15"; + + // As Seal of the Guildpact enters the battlefield, choose two colors. + this.addAbility(new EntersBattlefieldAbility(new SealOfTheGuildpactChooseColorEffect())); + + // Each spell you cast costs {1} less to cast for each of the chosen colors it is. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SealOfTheGuildpactCostReductionEffect())); + } + + public SealOfTheGuildpact(final SealOfTheGuildpact card) { + super(card); + } + + @Override + public SealOfTheGuildpact copy() { + return new SealOfTheGuildpact(this); + } +} + +class SealOfTheGuildpactChooseColorEffect extends OneShotEffect { + + SealOfTheGuildpactChooseColorEffect() { + super(Outcome.Benefit); + this.staticText = "choose two colors"; + } + + SealOfTheGuildpactChooseColorEffect(final SealOfTheGuildpactChooseColorEffect effect) { + super(effect); + } + + @Override + public SealOfTheGuildpactChooseColorEffect copy() { + return new SealOfTheGuildpactChooseColorEffect(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) { + ChoiceColor choice1 = new ChoiceColor(); + while (!choice1.isChosen()) { + controller.choose(Outcome.Benefit, choice1, game); + if (!controller.canRespond()) { + return false; + } + } + String color1 = choice1.getChoice(); + Set choices2 = new HashSet<>(); + if (!color1.equals("White")) { + choices2.add("White"); + } + if (!color1.equals("Blue")) { + choices2.add("Blue"); + } + if (!color1.equals("Black")) { + choices2.add("Black"); + } + if (!color1.equals("Red")) { + choices2.add("Red"); + } + if (!color1.equals("Green")) { + choices2.add("Green"); + } + ChoiceColor choice2 = new ChoiceColor(); + choice2.setChoices(choices2); + while (!choice2.isChosen()) { + controller.choose(Outcome.Benefit, choice2, game); + if (!controller.canRespond()) { + return false; + } + } + String color2 = choice2.getChoice(); + if (!game.isSimulation()) { + game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + color1 + " and " + color2 + "."); + } + game.getState().setValue(mageObject.getId() + "_color1", choice1.getColor()); + game.getState().setValue(mageObject.getId() + "_color2", choice2.getColor()); + ((Card) mageObject).addInfo("chosen colors", CardUtil.addToolTipMarkTags("Chosen colors: " + color1 + " and " + color2), game); + return true; + } + return false; + } +} + +class SealOfTheGuildpactCostReductionEffect extends CostModificationEffectImpl { + + SealOfTheGuildpactCostReductionEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); + staticText = "Each spell you cast costs {1} less to cast for each of the chosen colors it is"; + } + + SealOfTheGuildpactCostReductionEffect(SealOfTheGuildpactCostReductionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + MageObject sourceObject = game.getObject(abilityToModify.getSourceId()); + if (sourceObject != null) { + ObjectColor color1 = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color1"); + ObjectColor color2 = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color2"); + int amount = 0; + if (color1 != null && sourceObject.getColor(game).contains(color1)) { + amount++; + } + if (color2 != null && sourceObject.getColor(game).contains(color2)) { + amount++; + } + if (amount > 0) { + SpellAbility spellAbility = (SpellAbility) abilityToModify; + CardUtil.adjustCost(spellAbility, amount); + } + return true; + } + return false; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + return abilityToModify.getControllerId().equals(source.getControllerId()) && + abilityToModify instanceof SpellAbility; + } + + @Override + public SealOfTheGuildpactCostReductionEffect copy() { + return new SealOfTheGuildpactCostReductionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SecludedSteppe.java b/Mage.Sets/src/mage/sets/commander2015/SecludedSteppe.java new file mode 100644 index 00000000000..6443d1f85cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SecludedSteppe.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SecludedSteppe extends mage.sets.onslaught.SecludedSteppe { + + public SecludedSteppe(UUID ownerId) { + super(ownerId); + this.cardNumber = 303; + this.expansionSetCode = "C15"; + } + + public SecludedSteppe(final SecludedSteppe card) { + super(card); + } + + @Override + public SecludedSteppe copy() { + return new SecludedSteppe(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SeersSundial.java b/Mage.Sets/src/mage/sets/commander2015/SeersSundial.java new file mode 100644 index 00000000000..42c73d2a695 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SeersSundial.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SeersSundial extends mage.sets.worldwake.SeersSundial { + + public SeersSundial(UUID ownerId) { + super(ownerId); + this.cardNumber = 264; + this.expansionSetCode = "C15"; + } + + public SeersSundial(final SeersSundial card) { + super(card); + } + + @Override + public SeersSundial copy() { + return new SeersSundial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SeverTheBloodline.java b/Mage.Sets/src/mage/sets/commander2015/SeverTheBloodline.java new file mode 100644 index 00000000000..74b87eef069 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SeverTheBloodline.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SeverTheBloodline extends mage.sets.innistrad.SeverTheBloodline { + + public SeverTheBloodline(UUID ownerId) { + super(ownerId); + this.cardNumber = 136; + this.expansionSetCode = "C15"; + } + + public SeverTheBloodline(final SeverTheBloodline card) { + super(card); + } + + @Override + public SeverTheBloodline copy() { + return new SeverTheBloodline(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ShieldedByFaith.java b/Mage.Sets/src/mage/sets/commander2015/ShieldedByFaith.java new file mode 100644 index 00000000000..c88b135a944 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ShieldedByFaith.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ShieldedByFaith extends CardImpl { + + public ShieldedByFaith(UUID ownerId) { + super(ownerId, 8, "Shielded by Faith", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.expansionSetCode = "C15"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // Enchanted creature has indestructible. + Effect effect = new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield); + effect.setText("Enchanted creature has indestructible"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + // Whenever a creature enters the battlefield, you may attach Shielded by Faith to that creature. + this.addAbility(new EntersBattlefieldAllTriggeredAbility( + Zone.BATTLEFIELD, new AttachEffect(Outcome.Neutral, "attach {source} to that creature"), + new FilterCreaturePermanent("a creature"), true, SetTargetPointer.PERMANENT, null, false)); + } + + public ShieldedByFaith(final ShieldedByFaith card) { + super(card); + } + + @Override + public ShieldedByFaith copy() { + return new ShieldedByFaith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Shriekmaw.java b/Mage.Sets/src/mage/sets/commander2015/Shriekmaw.java new file mode 100644 index 00000000000..025aad0dbf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Shriekmaw.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Shriekmaw extends mage.sets.commander.Shriekmaw { + + public Shriekmaw(UUID ownerId) { + super(ownerId); + this.cardNumber = 137; + this.expansionSetCode = "C15"; + } + + public Shriekmaw(final Shriekmaw card) { + super(card); + } + + @Override + public Shriekmaw copy() { + return new Shriekmaw(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SigilOfTheEmptyThrone.java b/Mage.Sets/src/mage/sets/commander2015/SigilOfTheEmptyThrone.java new file mode 100644 index 00000000000..c78877b3f84 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SigilOfTheEmptyThrone.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SigilOfTheEmptyThrone extends mage.sets.conflux.SigilOfTheEmptyThrone { + + public SigilOfTheEmptyThrone(UUID ownerId) { + super(ownerId); + this.cardNumber = 80; + this.expansionSetCode = "C15"; + } + + public SigilOfTheEmptyThrone(final SigilOfTheEmptyThrone card) { + super(card); + } + + @Override + public SigilOfTheEmptyThrone copy() { + return new SigilOfTheEmptyThrone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SilentSentinel.java b/Mage.Sets/src/mage/sets/commander2015/SilentSentinel.java new file mode 100644 index 00000000000..d608fe628c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SilentSentinel.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SilentSentinel extends mage.sets.bornofthegods.SilentSentinel { + + public SilentSentinel(UUID ownerId) { + super(ownerId); + this.cardNumber = 81; + this.expansionSetCode = "C15"; + } + + public SilentSentinel(final SilentSentinel card) { + super(card); + } + + @Override + public SilentSentinel copy() { + return new SilentSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SimicGrowthChamber.java b/Mage.Sets/src/mage/sets/commander2015/SimicGrowthChamber.java new file mode 100644 index 00000000000..ef06b1b9f01 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SimicGrowthChamber.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SimicGrowthChamber extends mage.sets.dissension.SimicGrowthChamber { + + public SimicGrowthChamber(UUID ownerId) { + super(ownerId); + this.cardNumber = 305; + this.expansionSetCode = "C15"; + } + + public SimicGrowthChamber(final SimicGrowthChamber card) { + super(card); + } + + @Override + public SimicGrowthChamber copy() { + return new SimicGrowthChamber(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SimicGuildgate.java b/Mage.Sets/src/mage/sets/commander2015/SimicGuildgate.java new file mode 100644 index 00000000000..254b864fcb4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SimicGuildgate.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SimicGuildgate extends mage.sets.gatecrash.SimicGuildgate { + + public SimicGuildgate(UUID ownerId) { + super(ownerId); + this.cardNumber = 306; + this.expansionSetCode = "C15"; + } + + public SimicGuildgate(final SimicGuildgate card) { + super(card); + } + + @Override + public SimicGuildgate copy() { + return new SimicGuildgate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SimicKeyrune.java b/Mage.Sets/src/mage/sets/commander2015/SimicKeyrune.java new file mode 100644 index 00000000000..f1f1b75b73a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SimicKeyrune.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SimicKeyrune extends mage.sets.gatecrash.SimicKeyrune { + + public SimicKeyrune(UUID ownerId) { + super(ownerId); + this.cardNumber = 265; + this.expansionSetCode = "C15"; + } + + public SimicKeyrune(final SimicKeyrune card) { + super(card); + } + + @Override + public SimicKeyrune copy() { + return new SimicKeyrune(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SimicSignet.java b/Mage.Sets/src/mage/sets/commander2015/SimicSignet.java new file mode 100644 index 00000000000..771152803e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SimicSignet.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SimicSignet extends mage.sets.dissension.SimicSignet { + + public SimicSignet(UUID ownerId) { + super(ownerId); + this.cardNumber = 266; + this.expansionSetCode = "C15"; + } + + public SimicSignet(final SimicSignet card) { + super(card); + } + + @Override + public SimicSignet copy() { + return new SimicSignet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Skullclamp.java b/Mage.Sets/src/mage/sets/commander2015/Skullclamp.java new file mode 100644 index 00000000000..88b37bc1598 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Skullclamp.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Skullclamp extends mage.sets.darksteel.Skullclamp { + + public Skullclamp(UUID ownerId) { + super(ownerId); + this.cardNumber = 267; + this.expansionSetCode = "C15"; + } + + public Skullclamp(final Skullclamp card) { + super(card); + } + + @Override + public Skullclamp copy() { + return new Skullclamp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Skullwinder.java b/Mage.Sets/src/mage/sets/commander2015/Skullwinder.java new file mode 100644 index 00000000000..b098242ec27 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Skullwinder.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class Skullwinder extends CardImpl { + + public Skullwinder(UUID ownerId) { + super(ownerId, 39, "Skullwinder", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "C15"; + this.subtype.add("Snake"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // When Skullwinder enters the battlefield, return target card from your graveyard to your hand, then choose an opponent. That player returns a card from his or her graveyard to his or her hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard()); + ability.addEffect(new SkullwinderEffect()); + this.addAbility(ability); + } + + public Skullwinder(final Skullwinder card) { + super(card); + } + + @Override + public Skullwinder copy() { + return new Skullwinder(this); + } +} + +class SkullwinderEffect extends OneShotEffect { + + public SkullwinderEffect() { + super(Outcome.Benefit); + this.staticText = ", then choose an opponent. That player returns a card from his or her graveyard to his or her hand"; + } + + public SkullwinderEffect(final SkullwinderEffect effect) { + super(effect); + } + + @Override + public SkullwinderEffect copy() { + return new SkullwinderEffect(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) { + TargetOpponent targetOpponent = new TargetOpponent(true); + if (controller.choose(Outcome.Detriment, targetOpponent, source.getSourceId(), game)) { + Player opponent = game.getPlayer(targetOpponent.getFirstTarget()); + if (opponent != null) { + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen " + opponent.getLogName()); + // That player returns a card from his or her graveyard to his or her hand + TargetCardInYourGraveyard targetCard = new TargetCardInYourGraveyard(new FilterCard("a card from your graveyard to return to your hand")); + targetCard.setNotTarget(true); + if (opponent.choose(outcome, targetCard, source.getSourceId(), game)) { + Card card = game.getCard(targetCard.getFirstTarget()); + if (card != null) { + opponent.moveCards(card, Zone.HAND, source, game); + } + } + } + } + return true; + } + return false; + + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Sleep.java b/Mage.Sets/src/mage/sets/commander2015/Sleep.java new file mode 100644 index 00000000000..00425abf8a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Sleep.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Sleep extends mage.sets.magic2010.Sleep { + + public Sleep(UUID ownerId) { + super(ownerId); + this.cardNumber = 106; + this.expansionSetCode = "C15"; + } + + public Sleep(final Sleep card) { + super(card); + } + + @Override + public Sleep copy() { + return new Sleep(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SlipperyKarst.java b/Mage.Sets/src/mage/sets/commander2015/SlipperyKarst.java new file mode 100644 index 00000000000..c1db1cdc6cc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SlipperyKarst.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SlipperyKarst extends mage.sets.urzassaga.SlipperyKarst { + + public SlipperyKarst(UUID ownerId) { + super(ownerId); + this.cardNumber = 307; + this.expansionSetCode = "C15"; + } + + public SlipperyKarst(final SlipperyKarst card) { + super(card); + } + + @Override + public SlipperyKarst copy() { + return new SlipperyKarst(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SmolderingCrater.java b/Mage.Sets/src/mage/sets/commander2015/SmolderingCrater.java new file mode 100644 index 00000000000..f8f6dac90bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SmolderingCrater.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SmolderingCrater extends mage.sets.urzassaga.SmolderingCrater { + + public SmolderingCrater(UUID ownerId) { + super(ownerId); + this.cardNumber = 308; + this.expansionSetCode = "C15"; + } + + public SmolderingCrater(final SmolderingCrater card) { + super(card); + } + + @Override + public SmolderingCrater copy() { + return new SmolderingCrater(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Snakeform.java b/Mage.Sets/src/mage/sets/commander2015/Snakeform.java new file mode 100644 index 00000000000..1d9be22ebf1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Snakeform.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Snakeform extends mage.sets.eventide.Snakeform { + + public Snakeform(UUID ownerId) { + super(ownerId); + this.cardNumber = 242; + this.expansionSetCode = "C15"; + } + + public Snakeform(final Snakeform card) { + super(card); + } + + @Override + public Snakeform copy() { + return new Snakeform(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SolRing.java b/Mage.Sets/src/mage/sets/commander2015/SolRing.java new file mode 100644 index 00000000000..e1f03fe39f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SolRing.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SolRing extends mage.sets.revisededition.SolRing { + + public SolRing(UUID ownerId) { + super(ownerId); + this.cardNumber = 268; + this.expansionSetCode = "C15"; + } + + public SolRing(final SolRing card) { + super(card); + } + + @Override + public SolRing copy() { + return new SolRing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SolemnSimulacrum.java b/Mage.Sets/src/mage/sets/commander2015/SolemnSimulacrum.java new file mode 100644 index 00000000000..c09472ce0ec --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SolemnSimulacrum.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SolemnSimulacrum extends mage.sets.magic2012.SolemnSimulacrum { + + public SolemnSimulacrum(UUID ownerId) { + super(ownerId); + this.cardNumber = 269; + this.expansionSetCode = "C15"; + } + + public SolemnSimulacrum(final SolemnSimulacrum card) { + super(card); + } + + @Override + public SolemnSimulacrum copy() { + return new SolemnSimulacrum(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SpiderSpawning.java b/Mage.Sets/src/mage/sets/commander2015/SpiderSpawning.java new file mode 100644 index 00000000000..d91b5c51fee --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SpiderSpawning.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SpiderSpawning extends mage.sets.innistrad.SpiderSpawning { + + public SpiderSpawning(UUID ownerId) { + super(ownerId); + this.cardNumber = 202; + this.expansionSetCode = "C15"; + } + + public SpiderSpawning(final SpiderSpawning card) { + super(card); + } + + @Override + public SpiderSpawning copy() { + return new SpiderSpawning(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SpinerockKnoll.java b/Mage.Sets/src/mage/sets/commander2015/SpinerockKnoll.java new file mode 100644 index 00000000000..979edfc61a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SpinerockKnoll.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SpinerockKnoll extends mage.sets.lorwyn.SpinerockKnoll { + + public SpinerockKnoll(UUID ownerId) { + super(ownerId); + this.cardNumber = 309; + this.expansionSetCode = "C15"; + } + + public SpinerockKnoll(final SpinerockKnoll card) { + super(card); + } + + @Override + public SpinerockKnoll copy() { + return new SpinerockKnoll(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/StaffOfNin.java b/Mage.Sets/src/mage/sets/commander2015/StaffOfNin.java new file mode 100644 index 00000000000..c3a33f04678 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/StaffOfNin.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StaffOfNin extends mage.sets.magic2013.StaffOfNin { + + public StaffOfNin(UUID ownerId) { + super(ownerId); + this.cardNumber = 270; + this.expansionSetCode = "C15"; + } + + public StaffOfNin(final StaffOfNin card) { + super(card); + } + + @Override + public StaffOfNin copy() { + return new StaffOfNin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SteamAugury.java b/Mage.Sets/src/mage/sets/commander2015/SteamAugury.java new file mode 100644 index 00000000000..e8a9b3bade3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SteamAugury.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SteamAugury extends mage.sets.theros.SteamAugury { + + public SteamAugury(UUID ownerId) { + super(ownerId); + this.cardNumber = 233; + this.expansionSetCode = "C15"; + } + + public SteamAugury(final SteamAugury card) { + super(card); + } + + @Override + public SteamAugury copy() { + return new SteamAugury(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/StingerflingSpider.java b/Mage.Sets/src/mage/sets/commander2015/StingerflingSpider.java new file mode 100644 index 00000000000..c4672e6683b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/StingerflingSpider.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StingerflingSpider extends mage.sets.magic2012.StingerflingSpider { + + public StingerflingSpider(UUID ownerId) { + super(ownerId); + this.cardNumber = 203; + this.expansionSetCode = "C15"; + } + + public StingerflingSpider(final StingerflingSpider card) { + super(card); + } + + @Override + public StingerflingSpider copy() { + return new StingerflingSpider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/StinkdrinkerDaredevil.java b/Mage.Sets/src/mage/sets/commander2015/StinkdrinkerDaredevil.java new file mode 100644 index 00000000000..9e8dacaa581 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/StinkdrinkerDaredevil.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StinkdrinkerDaredevil extends mage.sets.lorwyn.StinkdrinkerDaredevil { + + public StinkdrinkerDaredevil(UUID ownerId) { + super(ownerId); + this.cardNumber = 164; + this.expansionSetCode = "C15"; + } + + public StinkdrinkerDaredevil(final StinkdrinkerDaredevil card) { + super(card); + } + + @Override + public StinkdrinkerDaredevil copy() { + return new StinkdrinkerDaredevil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/StolenGoods.java b/Mage.Sets/src/mage/sets/commander2015/StolenGoods.java new file mode 100644 index 00000000000..a72735aaf60 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/StolenGoods.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StolenGoods extends mage.sets.avacynrestored.StolenGoods { + + public StolenGoods(UUID ownerId) { + super(ownerId); + this.cardNumber = 107; + this.expansionSetCode = "C15"; + } + + public StolenGoods(final StolenGoods card) { + super(card); + } + + @Override + public StolenGoods copy() { + return new StolenGoods(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/StoneshockGiant.java b/Mage.Sets/src/mage/sets/commander2015/StoneshockGiant.java new file mode 100644 index 00000000000..fdf6e9245c2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/StoneshockGiant.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StoneshockGiant extends mage.sets.theros.StoneshockGiant { + + public StoneshockGiant(UUID ownerId) { + super(ownerId); + this.cardNumber = 165; + this.expansionSetCode = "C15"; + } + + public StoneshockGiant(final StoneshockGiant card) { + super(card); + } + + @Override + public StoneshockGiant copy() { + return new StoneshockGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/StrokeOfGenius.java b/Mage.Sets/src/mage/sets/commander2015/StrokeOfGenius.java new file mode 100644 index 00000000000..79953c02aec --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/StrokeOfGenius.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StrokeOfGenius extends mage.sets.urzassaga.StrokeOfGenius { + + public StrokeOfGenius(UUID ownerId) { + super(ownerId); + this.cardNumber = 108; + this.expansionSetCode = "C15"; + } + + public StrokeOfGenius(final StrokeOfGenius card) { + super(card); + } + + @Override + public StrokeOfGenius copy() { + return new StrokeOfGenius(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SunTitan.java b/Mage.Sets/src/mage/sets/commander2015/SunTitan.java new file mode 100644 index 00000000000..1e359759529 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SunTitan.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SunTitan extends mage.sets.magic2011.SunTitan { + + public SunTitan(UUID ownerId) { + super(ownerId); + this.cardNumber = 82; + this.expansionSetCode = "C15"; + } + + public SunTitan(final SunTitan card) { + super(card); + } + + @Override + public SunTitan copy() { + return new SunTitan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SunriseSovereign.java b/Mage.Sets/src/mage/sets/commander2015/SunriseSovereign.java new file mode 100644 index 00000000000..bd0794d0e69 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SunriseSovereign.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SunriseSovereign extends mage.sets.lorwyn.SunriseSovereign { + + public SunriseSovereign(UUID ownerId) { + super(ownerId); + this.cardNumber = 166; + this.expansionSetCode = "C15"; + } + + public SunriseSovereign(final SunriseSovereign card) { + super(card); + } + + @Override + public SunriseSovereign copy() { + return new SunriseSovereign(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Swamp1.java b/Mage.Sets/src/mage/sets/commander2015/Swamp1.java new file mode 100644 index 00000000000..536d848d27f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Swamp1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp1 extends mage.cards.basiclands.Swamp { + + public Swamp1(UUID ownerId) { + super(ownerId, 331); + this.expansionSetCode = "C15"; + } + + public Swamp1(final Swamp1 card) { + super(card); + } + + @Override + public Swamp1 copy() { + return new Swamp1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Swamp2.java b/Mage.Sets/src/mage/sets/commander2015/Swamp2.java new file mode 100644 index 00000000000..9cca76feb1d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Swamp2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp2 extends mage.cards.basiclands.Swamp { + + public Swamp2(UUID ownerId) { + super(ownerId, 332); + this.expansionSetCode = "C15"; + } + + public Swamp2(final Swamp2 card) { + super(card); + } + + @Override + public Swamp2 copy() { + return new Swamp2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Swamp3.java b/Mage.Sets/src/mage/sets/commander2015/Swamp3.java new file mode 100644 index 00000000000..5c0449b2f4d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Swamp3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp3 extends mage.cards.basiclands.Swamp { + + public Swamp3(UUID ownerId) { + super(ownerId, 333); + this.expansionSetCode = "C15"; + } + + public Swamp3(final Swamp3 card) { + super(card); + } + + @Override + public Swamp3 copy() { + return new Swamp3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Swamp4.java b/Mage.Sets/src/mage/sets/commander2015/Swamp4.java new file mode 100644 index 00000000000..20be7ab8576 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Swamp4.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp4 extends mage.cards.basiclands.Swamp { + + public Swamp4(UUID ownerId) { + super(ownerId, 334); + this.expansionSetCode = "C15"; + } + + public Swamp4(final Swamp4 card) { + super(card); + } + + @Override + public Swamp4 copy() { + return new Swamp4(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SwiftfootBoots.java b/Mage.Sets/src/mage/sets/commander2015/SwiftfootBoots.java new file mode 100644 index 00000000000..de7e11c4be1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SwiftfootBoots.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SwiftfootBoots extends mage.sets.magic2012.SwiftfootBoots { + + public SwiftfootBoots(UUID ownerId) { + super(ownerId); + this.cardNumber = 271; + this.expansionSetCode = "C15"; + } + + public SwiftfootBoots(final SwiftfootBoots card) { + super(card); + } + + @Override + public SwiftfootBoots copy() { + return new SwiftfootBoots(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SwiftwaterCliffs.java b/Mage.Sets/src/mage/sets/commander2015/SwiftwaterCliffs.java new file mode 100644 index 00000000000..6ca4f2d7015 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SwiftwaterCliffs.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SwiftwaterCliffs extends mage.sets.khansoftarkir.SwiftwaterCliffs { + + public SwiftwaterCliffs(UUID ownerId) { + super(ownerId); + this.cardNumber = 310; + this.expansionSetCode = "C15"; + } + + public SwiftwaterCliffs(final SwiftwaterCliffs card) { + super(card); + } + + @Override + public SwiftwaterCliffs copy() { + return new SwiftwaterCliffs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SwordOfVengeance.java b/Mage.Sets/src/mage/sets/commander2015/SwordOfVengeance.java new file mode 100644 index 00000000000..b162c58e41b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SwordOfVengeance.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SwordOfVengeance extends mage.sets.magic2011.SwordOfVengeance { + + public SwordOfVengeance(UUID ownerId) { + super(ownerId); + this.cardNumber = 272; + this.expansionSetCode = "C15"; + } + + public SwordOfVengeance(final SwordOfVengeance card) { + super(card); + } + + @Override + public SwordOfVengeance copy() { + return new SwordOfVengeance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/SyntheticDestiny.java b/Mage.Sets/src/mage/sets/commander2015/SyntheticDestiny.java new file mode 100644 index 00000000000..142ddc269ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/SyntheticDestiny.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.sets.commander2015; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Set; +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.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class SyntheticDestiny extends CardImpl { + + public SyntheticDestiny(UUID ownerId) { + super(ownerId, 15, "Synthetic Destiny", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{4}{U}{U}"); + this.expansionSetCode = "C15"; + + // Exile all creatures you control. At the beginning of the next end step, reveal cards from the top of your library until you reveal that many creature cards, put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library. + getSpellAbility().addEffect(new SyntheticDestinyEffect()); + } + + public SyntheticDestiny(final SyntheticDestiny card) { + super(card); + } + + @Override + public SyntheticDestiny copy() { + return new SyntheticDestiny(this); + } +} + +class SyntheticDestinyEffect extends OneShotEffect { + + public SyntheticDestinyEffect() { + super(Outcome.Detriment); + this.staticText = "Exile all creatures you control. At the beginning of the next end step, reveal cards from the top of your library until you reveal that many creature cards, put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library"; + } + + public SyntheticDestinyEffect(final SyntheticDestinyEffect effect) { + super(effect); + } + + @Override + public SyntheticDestinyEffect copy() { + return new SyntheticDestinyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Set cardsToExile = new HashSet<>(); + cardsToExile.addAll(game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controller.getId(), game)); + controller.moveCards(cardsToExile, Zone.EXILED, source, game); + //Delayed ability + Effect effect = new SyntheticDestinyDelayedEffect(cardsToExile.size()); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + + return true; + } + return false; + } +} + +class SyntheticDestinyDelayedEffect extends OneShotEffect { + + protected int numberOfCards; + + public SyntheticDestinyDelayedEffect(int numberOfCards) { + super(Outcome.PutCreatureInPlay); + this.numberOfCards = numberOfCards; + this.staticText = "reveal cards from the top of your library until you reveal that many creature cards, put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library"; + } + + public SyntheticDestinyDelayedEffect(final SyntheticDestinyDelayedEffect effect) { + super(effect); + this.numberOfCards = effect.numberOfCards; + } + + @Override + public SyntheticDestinyDelayedEffect copy() { + return new SyntheticDestinyDelayedEffect(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 revealed = new CardsImpl(); + Set creatureCards = new LinkedHashSet<>(); + Cards nonCreatureCards = new CardsImpl(); + while (creatureCards.size() < numberOfCards && controller.getLibrary().size() > 0) { + Card card = controller.getLibrary().removeFromTop(game); + revealed.add(card); + if (card.getCardType().contains(CardType.CREATURE)) { + creatureCards.add(card); + } else { + nonCreatureCards.add(card); + } + } + controller.revealCards(sourceObject.getIdName(), revealed, game); + controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, true, null); + controller.putCardsOnTopOfLibrary(nonCreatureCards, game, source, false); + controller.shuffleLibrary(game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TaintedField.java b/Mage.Sets/src/mage/sets/commander2015/TaintedField.java new file mode 100644 index 00000000000..80dc39b9fd2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TaintedField.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TaintedField extends mage.sets.torment.TaintedField { + + public TaintedField(UUID ownerId) { + super(ownerId); + this.cardNumber = 311; + this.expansionSetCode = "C15"; + } + + public TaintedField(final TaintedField card) { + super(card); + } + + @Override + public TaintedField copy() { + return new TaintedField(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TaintedWood.java b/Mage.Sets/src/mage/sets/commander2015/TaintedWood.java new file mode 100644 index 00000000000..7a8e5798e46 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TaintedWood.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TaintedWood extends mage.sets.torment.TaintedWood { + + public TaintedWood(UUID ownerId) { + super(ownerId); + this.cardNumber = 312; + this.expansionSetCode = "C15"; + } + + public TaintedWood(final TaintedWood card) { + super(card); + } + + @Override + public TaintedWood copy() { + return new TaintedWood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TalrandSkySummoner.java b/Mage.Sets/src/mage/sets/commander2015/TalrandSkySummoner.java new file mode 100644 index 00000000000..7e67d277f57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TalrandSkySummoner.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TalrandSkySummoner extends mage.sets.magic2013.TalrandSkySummoner { + + public TalrandSkySummoner(UUID ownerId) { + super(ownerId); + this.cardNumber = 109; + this.expansionSetCode = "C15"; + } + + public TalrandSkySummoner(final TalrandSkySummoner card) { + super(card); + } + + @Override + public TalrandSkySummoner copy() { + return new TalrandSkySummoner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TaureanMauler.java b/Mage.Sets/src/mage/sets/commander2015/TaureanMauler.java new file mode 100644 index 00000000000..3647d880d93 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TaureanMauler.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TaureanMauler extends mage.sets.planechase.TaureanMauler { + + public TaureanMauler(UUID ownerId) { + super(ownerId); + this.cardNumber = 167; + this.expansionSetCode = "C15"; + } + + public TaureanMauler(final TaureanMauler card) { + super(card); + } + + @Override + public TaureanMauler copy() { + return new TaureanMauler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TempleOfTheFalseGod.java b/Mage.Sets/src/mage/sets/commander2015/TempleOfTheFalseGod.java new file mode 100644 index 00000000000..d981aea81dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TempleOfTheFalseGod.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TempleOfTheFalseGod extends mage.sets.commander2013.TempleOfTheFalseGod { + + public TempleOfTheFalseGod(UUID ownerId) { + super(ownerId); + this.cardNumber = 313; + this.expansionSetCode = "C15"; + } + + public TempleOfTheFalseGod(final TempleOfTheFalseGod card) { + super(card); + } + + @Override + public TempleOfTheFalseGod copy() { + return new TempleOfTheFalseGod(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Terastodon.java b/Mage.Sets/src/mage/sets/commander2015/Terastodon.java new file mode 100644 index 00000000000..b63951115bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Terastodon.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Terastodon extends mage.sets.worldwake.Terastodon { + + public Terastodon(UUID ownerId) { + super(ownerId); + this.cardNumber = 204; + this.expansionSetCode = "C15"; + } + + public Terastodon(final Terastodon card) { + super(card); + } + + @Override + public Terastodon copy() { + return new Terastodon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TerramorphicExpanse.java b/Mage.Sets/src/mage/sets/commander2015/TerramorphicExpanse.java new file mode 100644 index 00000000000..d3e55e22913 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TerramorphicExpanse.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TerramorphicExpanse extends mage.sets.tenthedition.TerramorphicExpanse { + + public TerramorphicExpanse(UUID ownerId) { + super(ownerId); + this.cardNumber = 314; + this.expansionSetCode = "C15"; + } + + public TerramorphicExpanse(final TerramorphicExpanse card) { + super(card); + } + + @Override + public TerramorphicExpanse copy() { + return new TerramorphicExpanse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TeysaEnvoyOfGhosts.java b/Mage.Sets/src/mage/sets/commander2015/TeysaEnvoyOfGhosts.java new file mode 100644 index 00000000000..c912353806a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TeysaEnvoyOfGhosts.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TeysaEnvoyOfGhosts extends mage.sets.dragonsmaze.TeysaEnvoyOfGhosts { + + public TeysaEnvoyOfGhosts(UUID ownerId) { + super(ownerId); + this.cardNumber = 234; + this.expansionSetCode = "C15"; + } + + public TeysaEnvoyOfGhosts(final TeysaEnvoyOfGhosts card) { + super(card); + } + + @Override + public TeysaEnvoyOfGhosts copy() { + return new TeysaEnvoyOfGhosts(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TheloniteHermit.java b/Mage.Sets/src/mage/sets/commander2015/TheloniteHermit.java new file mode 100644 index 00000000000..44bc0e0304b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TheloniteHermit.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TheloniteHermit extends mage.sets.timespiral.TheloniteHermit { + + public TheloniteHermit(UUID ownerId) { + super(ownerId); + this.cardNumber = 205; + this.expansionSetCode = "C15"; + } + + public TheloniteHermit(final TheloniteHermit card) { + super(card); + } + + @Override + public TheloniteHermit copy() { + return new TheloniteHermit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ThiefOfBlood.java b/Mage.Sets/src/mage/sets/commander2015/ThiefOfBlood.java new file mode 100644 index 00000000000..31d1c181cde --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ThiefOfBlood.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.counters.Counters; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author emerald000 + */ +public class ThiefOfBlood extends CardImpl { + + public ThiefOfBlood(UUID ownerId) { + super(ownerId, 22, "Thief of Blood", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "C15"; + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.subtype.add("Vampire"); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // As Thief of Blood enters the battlefield, remove all counters from all permanents. Thief of Blood enters the battlefield with a +1/+1 counter on it for each counter removed this way. + this.addAbility(new EntersBattlefieldAbility(new ThiefOfBloodEffect(), null, "As {this} enters the battlefield, remove all counters from all permanents. {this} enters the battlefield with a +1/+1 counter on it for each counter removed this way", null)); + } + + public ThiefOfBlood(final ThiefOfBlood card) { + super(card); + } + + @Override + public ThiefOfBlood copy() { + return new ThiefOfBlood(this); + } +} + +class ThiefOfBloodEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterPermanent("permanent with a counter"); + static { + filter.add(new CounterPredicate(null)); + } + + ThiefOfBloodEffect() { + super(Outcome.BoostCreature); + this.staticText = "remove all counters from all permanents. {this} enters the battlefield with a +1/+1 counter on it for each counter removed this way"; + } + + ThiefOfBloodEffect(final ThiefOfBloodEffect effect) { + super(effect); + } + + @Override + public ThiefOfBloodEffect copy() { + return new ThiefOfBloodEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int countersRemoved = 0; + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { + Counters counters = permanent.getCounters().copy(); + for (Counter counter : counters.values()) { + permanent.getCounters().removeCounter(counter.getName(), counter.getCount()); + countersRemoved += counter.getCount(); + } + } + if (countersRemoved > 0) { + Permanent sourcePermanent = game.getPermanentEntering(source.getSourceId()); + if (sourcePermanent != null) { + sourcePermanent.addCounters(CounterType.P1P1.createInstance(countersRemoved), game); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ThornwoodFalls.java b/Mage.Sets/src/mage/sets/commander2015/ThornwoodFalls.java new file mode 100644 index 00000000000..4c32317d1a5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ThornwoodFalls.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ThornwoodFalls extends mage.sets.khansoftarkir.ThornwoodFalls { + + public ThornwoodFalls(UUID ownerId) { + super(ownerId); + this.cardNumber = 315; + this.expansionSetCode = "C15"; + } + + public ThornwoodFalls(final ThornwoodFalls card) { + super(card); + } + + @Override + public ThornwoodFalls copy() { + return new ThornwoodFalls(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ThoughtReflection.java b/Mage.Sets/src/mage/sets/commander2015/ThoughtReflection.java new file mode 100644 index 00000000000..16f50b59ca6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ThoughtReflection.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ThoughtReflection extends mage.sets.shadowmoor.ThoughtReflection { + + public ThoughtReflection(UUID ownerId) { + super(ownerId); + this.cardNumber = 110; + this.expansionSetCode = "C15"; + } + + public ThoughtReflection(final ThoughtReflection card) { + super(card); + } + + @Override + public ThoughtReflection copy() { + return new ThoughtReflection(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ThoughtVessel.java b/Mage.Sets/src/mage/sets/commander2015/ThoughtVessel.java new file mode 100644 index 00000000000..d5437bbcb0e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ThoughtVessel.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class ThoughtVessel extends CardImpl { + + public ThoughtVessel(UUID ownerId) { + super(ownerId, 55, "Thought Vessel", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "C15"; + + // 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)); + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + } + + public ThoughtVessel(final ThoughtVessel card) { + super(card); + } + + @Override + public ThoughtVessel copy() { + return new ThoughtVessel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ThundercloudShaman.java b/Mage.Sets/src/mage/sets/commander2015/ThundercloudShaman.java new file mode 100644 index 00000000000..9de101c4d2e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ThundercloudShaman.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ThundercloudShaman extends mage.sets.modernmasters.ThundercloudShaman { + + public ThundercloudShaman(UUID ownerId) { + super(ownerId); + this.cardNumber = 168; + this.expansionSetCode = "C15"; + } + + public ThundercloudShaman(final ThundercloudShaman card) { + super(card); + } + + @Override + public ThundercloudShaman copy() { + return new ThundercloudShaman(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TreasuryThrull.java b/Mage.Sets/src/mage/sets/commander2015/TreasuryThrull.java new file mode 100644 index 00000000000..259f0d81ed7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TreasuryThrull.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TreasuryThrull extends mage.sets.gatecrash.TreasuryThrull { + + public TreasuryThrull(UUID ownerId) { + super(ownerId); + this.cardNumber = 235; + this.expansionSetCode = "C15"; + } + + public TreasuryThrull(final TreasuryThrull card) { + super(card); + } + + @Override + public TreasuryThrull copy() { + return new TreasuryThrull(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TributeToTheWild.java b/Mage.Sets/src/mage/sets/commander2015/TributeToTheWild.java new file mode 100644 index 00000000000..ab082b37efd --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TributeToTheWild.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TributeToTheWild extends mage.sets.commander.TributeToTheWild { + + public TributeToTheWild(UUID ownerId) { + super(ownerId); + this.cardNumber = 206; + this.expansionSetCode = "C15"; + } + + public TributeToTheWild(final TributeToTheWild card) { + super(card); + } + + @Override + public TributeToTheWild copy() { + return new TributeToTheWild(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/TrygonPredator.java b/Mage.Sets/src/mage/sets/commander2015/TrygonPredator.java new file mode 100644 index 00000000000..f1f1b43982f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/TrygonPredator.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TrygonPredator extends mage.sets.modernmasters.TrygonPredator { + + public TrygonPredator(UUID ownerId) { + super(ownerId); + this.cardNumber = 236; + this.expansionSetCode = "C15"; + } + + public TrygonPredator(final TrygonPredator card) { + super(card); + } + + @Override + public TrygonPredator copy() { + return new TrygonPredator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/UnderworldCoinsmith.java b/Mage.Sets/src/mage/sets/commander2015/UnderworldCoinsmith.java new file mode 100644 index 00000000000..28e3ee5185f --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/UnderworldCoinsmith.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class UnderworldCoinsmith extends mage.sets.journeyintonyx.UnderworldCoinsmith { + + public UnderworldCoinsmith(UUID ownerId) { + super(ownerId); + this.cardNumber = 237; + this.expansionSetCode = "C15"; + } + + public UnderworldCoinsmith(final UnderworldCoinsmith card) { + super(card); + } + + @Override + public UnderworldCoinsmith copy() { + return new UnderworldCoinsmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/UnderworldConnections.java b/Mage.Sets/src/mage/sets/commander2015/UnderworldConnections.java new file mode 100644 index 00000000000..fc9588828f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/UnderworldConnections.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class UnderworldConnections extends mage.sets.returntoravnica.UnderworldConnections { + + public UnderworldConnections(UUID ownerId) { + super(ownerId); + this.cardNumber = 138; + this.expansionSetCode = "C15"; + } + + public UnderworldConnections(final UnderworldConnections card) { + super(card); + } + + @Override + public UnderworldConnections copy() { + return new UnderworldConnections(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/UrzasIncubator.java b/Mage.Sets/src/mage/sets/commander2015/UrzasIncubator.java new file mode 100644 index 00000000000..3dc8bf90d6e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/UrzasIncubator.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class UrzasIncubator extends mage.sets.urzasdestiny.UrzasIncubator { + + public UrzasIncubator(UUID ownerId) { + super(ownerId); + this.cardNumber = 273; + this.expansionSetCode = "C15"; + } + + public UrzasIncubator(final UrzasIncubator card) { + super(card); + } + + @Override + public UrzasIncubator copy() { + return new UrzasIncubator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/UrzasRage.java b/Mage.Sets/src/mage/sets/commander2015/UrzasRage.java new file mode 100644 index 00000000000..bfd24ac640d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/UrzasRage.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commander2015; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class UrzasRage extends mage.sets.phyrexiavsthecoalition.UrzasRage { + + public UrzasRage(UUID ownerId) { + super(ownerId); + this.cardNumber = 169; + this.expansionSetCode = "C15"; + this.rarity = Rarity.RARE; + } + + public UrzasRage(final UrzasRage card) { + super(card); + } + + @Override + public UrzasRage copy() { + return new UrzasRage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Vandalblast.java b/Mage.Sets/src/mage/sets/commander2015/Vandalblast.java new file mode 100644 index 00000000000..5d4f5905b80 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Vandalblast.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Vandalblast extends mage.sets.returntoravnica.Vandalblast { + + public Vandalblast(UUID ownerId) { + super(ownerId); + this.cardNumber = 170; + this.expansionSetCode = "C15"; + } + + public Vandalblast(final Vandalblast card) { + super(card); + } + + @Override + public Vandalblast copy() { + return new Vandalblast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VerdantConfluence.java b/Mage.Sets/src/mage/sets/commander2015/VerdantConfluence.java new file mode 100644 index 00000000000..31e616feb40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VerdantConfluence.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterBasicLandCard; +import mage.filter.common.FilterPermanentCard; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class VerdantConfluence extends CardImpl { + + public VerdantConfluence(UUID ownerId) { + super(ownerId, 40, "Verdant Confluence", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{G}{G}"); + this.expansionSetCode = "C15"; + + // Choose three. You may choose the same mode more than once. + this.getSpellAbility().getModes().setMinModes(3); + this.getSpellAbility().getModes().setMaxModes(3); + this.getSpellAbility().getModes().setEachModeMoreThanOnce(true); + + // - Put two +1/+1 counters on target creature; + this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Return target permanent card from your graveyard to your hand; + Mode mode = new Mode(); + mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect()); + mode.getTargets().add(new TargetCardInYourGraveyard(new FilterPermanentCard())); + this.getSpellAbility().getModes().addMode(mode); + + // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + mode = new Mode(); + mode.getEffects().add(new SearchLibraryPutInPlayEffect(target, true)); + this.getSpellAbility().getModes().addMode(mode); + } + + public VerdantConfluence(final VerdantConfluence card) { + super(card); + } + + @Override + public VerdantConfluence copy() { + return new VerdantConfluence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VerdantForce.java b/Mage.Sets/src/mage/sets/commander2015/VerdantForce.java new file mode 100644 index 00000000000..fa57889476a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VerdantForce.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VerdantForce extends mage.sets.tempest.VerdantForce { + + public VerdantForce(UUID ownerId) { + super(ownerId); + this.cardNumber = 207; + this.expansionSetCode = "C15"; + } + + public VerdantForce(final VerdantForce card) { + super(card); + } + + @Override + public VerdantForce copy() { + return new VerdantForce(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Victimize.java b/Mage.Sets/src/mage/sets/commander2015/Victimize.java new file mode 100644 index 00000000000..a0f2bee200e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Victimize.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Victimize extends mage.sets.conspiracy.Victimize { + + public Victimize(UUID ownerId) { + super(ownerId); + this.cardNumber = 139; + this.expansionSetCode = "C15"; + } + + public Victimize(final Victimize card) { + super(card); + } + + @Override + public Victimize copy() { + return new Victimize(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VictorysHerald.java b/Mage.Sets/src/mage/sets/commander2015/VictorysHerald.java new file mode 100644 index 00000000000..6d6de19b30b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VictorysHerald.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VictorysHerald extends mage.sets.mirrodinbesieged.VictorysHerald { + + public VictorysHerald(UUID ownerId) { + super(ownerId); + this.cardNumber = 83; + this.expansionSetCode = "C15"; + } + + public VictorysHerald(final VictorysHerald card) { + super(card); + } + + @Override + public VictorysHerald copy() { + return new VictorysHerald(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ViridianEmissary.java b/Mage.Sets/src/mage/sets/commander2015/ViridianEmissary.java new file mode 100644 index 00000000000..b053b67fa3e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ViridianEmissary.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ViridianEmissary extends mage.sets.mirrodinbesieged.ViridianEmissary { + + public ViridianEmissary(UUID ownerId) { + super(ownerId); + this.cardNumber = 208; + this.expansionSetCode = "C15"; + } + + public ViridianEmissary(final ViridianEmissary card) { + super(card); + } + + @Override + public ViridianEmissary copy() { + return new ViridianEmissary(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ViridianShaman.java b/Mage.Sets/src/mage/sets/commander2015/ViridianShaman.java new file mode 100644 index 00000000000..786f1301556 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ViridianShaman.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ViridianShaman extends mage.sets.tenthedition.ViridianShaman { + + public ViridianShaman(UUID ownerId) { + super(ownerId); + this.cardNumber = 209; + this.expansionSetCode = "C15"; + } + + public ViridianShaman(final ViridianShaman card) { + super(card); + } + + @Override + public ViridianShaman copy() { + return new ViridianShaman(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ViridianZealot.java b/Mage.Sets/src/mage/sets/commander2015/ViridianZealot.java new file mode 100644 index 00000000000..c5887475312 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ViridianZealot.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ViridianZealot extends mage.sets.darksteel.ViridianZealot { + + public ViridianZealot(UUID ownerId) { + super(ownerId); + this.cardNumber = 210; + this.expansionSetCode = "C15"; + } + + public ViridianZealot(final ViridianZealot card) { + super(card); + } + + @Override + public ViridianZealot copy() { + return new ViridianZealot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VividCrag.java b/Mage.Sets/src/mage/sets/commander2015/VividCrag.java new file mode 100644 index 00000000000..af972132ec5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VividCrag.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VividCrag extends mage.sets.lorwyn.VividCrag { + + public VividCrag(UUID ownerId) { + super(ownerId); + this.cardNumber = 316; + this.expansionSetCode = "C15"; + } + + public VividCrag(final VividCrag card) { + super(card); + } + + @Override + public VividCrag copy() { + return new VividCrag(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VividCreek.java b/Mage.Sets/src/mage/sets/commander2015/VividCreek.java new file mode 100644 index 00000000000..5f40f37d310 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VividCreek.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VividCreek extends mage.sets.lorwyn.VividCreek { + + public VividCreek(UUID ownerId) { + super(ownerId); + this.cardNumber = 317; + this.expansionSetCode = "C15"; + } + + public VividCreek(final VividCreek card) { + super(card); + } + + @Override + public VividCreek copy() { + return new VividCreek(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VividGrove.java b/Mage.Sets/src/mage/sets/commander2015/VividGrove.java new file mode 100644 index 00000000000..df5490213ef --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VividGrove.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VividGrove extends mage.sets.lorwyn.VividGrove { + + public VividGrove(UUID ownerId) { + super(ownerId); + this.cardNumber = 318; + this.expansionSetCode = "C15"; + } + + public VividGrove(final VividGrove card) { + super(card); + } + + @Override + public VividGrove copy() { + return new VividGrove(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VividMarsh.java b/Mage.Sets/src/mage/sets/commander2015/VividMarsh.java new file mode 100644 index 00000000000..84a2b6309ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VividMarsh.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VividMarsh extends mage.sets.lorwyn.VividMarsh { + + public VividMarsh(UUID ownerId) { + super(ownerId); + this.cardNumber = 319; + this.expansionSetCode = "C15"; + } + + public VividMarsh(final VividMarsh card) { + super(card); + } + + @Override + public VividMarsh copy() { + return new VividMarsh(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VividMeadow.java b/Mage.Sets/src/mage/sets/commander2015/VividMeadow.java new file mode 100644 index 00000000000..f4261c57aa2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VividMeadow.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VividMeadow extends mage.sets.lorwyn.VividMeadow { + + public VividMeadow(UUID ownerId) { + super(ownerId); + this.cardNumber = 320; + this.expansionSetCode = "C15"; + } + + public VividMeadow(final VividMeadow card) { + super(card); + } + + @Override + public VividMeadow copy() { + return new VividMeadow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VowOfDuty.java b/Mage.Sets/src/mage/sets/commander2015/VowOfDuty.java new file mode 100644 index 00000000000..77bc9a7d50c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VowOfDuty.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VowOfDuty extends mage.sets.commander.VowOfDuty { + + public VowOfDuty(UUID ownerId) { + super(ownerId); + this.cardNumber = 84; + this.expansionSetCode = "C15"; + } + + public VowOfDuty(final VowOfDuty card) { + super(card); + } + + @Override + public VowOfDuty copy() { + return new VowOfDuty(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VowOfMalice.java b/Mage.Sets/src/mage/sets/commander2015/VowOfMalice.java new file mode 100644 index 00000000000..0b95284416d --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VowOfMalice.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VowOfMalice extends mage.sets.commander.VowOfMalice { + + public VowOfMalice(UUID ownerId) { + super(ownerId); + this.cardNumber = 140; + this.expansionSetCode = "C15"; + } + + public VowOfMalice(final VowOfMalice card) { + super(card); + } + + @Override + public VowOfMalice copy() { + return new VowOfMalice(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/VulturousZombie.java b/Mage.Sets/src/mage/sets/commander2015/VulturousZombie.java new file mode 100644 index 00000000000..a6676ea2c81 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/VulturousZombie.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VulturousZombie extends mage.sets.commander.VulturousZombie { + + public VulturousZombie(UUID ownerId) { + super(ownerId); + this.cardNumber = 238; + this.expansionSetCode = "C15"; + } + + public VulturousZombie(final VulturousZombie card) { + super(card); + } + + @Override + public VulturousZombie copy() { + return new VulturousZombie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WallOfBlossoms.java b/Mage.Sets/src/mage/sets/commander2015/WallOfBlossoms.java new file mode 100644 index 00000000000..49cf49d3a98 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WallOfBlossoms.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WallOfBlossoms extends mage.sets.stronghold.WallOfBlossoms { + + public WallOfBlossoms(UUID ownerId) { + super(ownerId); + this.cardNumber = 211; + this.expansionSetCode = "C15"; + } + + public WallOfBlossoms(final WallOfBlossoms card) { + super(card); + } + + @Override + public WallOfBlossoms copy() { + return new WallOfBlossoms(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WarchiefGiant.java b/Mage.Sets/src/mage/sets/commander2015/WarchiefGiant.java new file mode 100644 index 00000000000..57f272644da --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WarchiefGiant.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.sets.commander2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.MyriadAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WarchiefGiant extends CardImpl { + + public WarchiefGiant(UUID ownerId) { + super(ownerId, 31, "Warchief Giant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "C15"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Haste + this.addAbility(HasteAbility.getInstance()); + // Myriad + this.addAbility(new MyriadAbility()); + } + + public WarchiefGiant(final WarchiefGiant card) { + super(card); + } + + @Override + public WarchiefGiant copy() { + return new WarchiefGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WarstormSurge.java b/Mage.Sets/src/mage/sets/commander2015/WarstormSurge.java new file mode 100644 index 00000000000..8783c693805 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WarstormSurge.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WarstormSurge extends mage.sets.magic2012.WarstormSurge { + + public WarstormSurge(UUID ownerId) { + super(ownerId); + this.cardNumber = 171; + this.expansionSetCode = "C15"; + } + + public WarstormSurge(final WarstormSurge card) { + super(card); + } + + @Override + public WarstormSurge copy() { + return new WarstormSurge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WayfarersBauble.java b/Mage.Sets/src/mage/sets/commander2015/WayfarersBauble.java new file mode 100644 index 00000000000..9d3dcccc2a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WayfarersBauble.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WayfarersBauble extends mage.sets.commander2013.WayfarersBauble { + + public WayfarersBauble(UUID ownerId) { + super(ownerId); + this.cardNumber = 274; + this.expansionSetCode = "C15"; + } + + public WayfarersBauble(final WayfarersBauble card) { + super(card); + } + + @Override + public WayfarersBauble copy() { + return new WayfarersBauble(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WindScarredCrag.java b/Mage.Sets/src/mage/sets/commander2015/WindScarredCrag.java new file mode 100644 index 00000000000..36eefa8c030 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WindScarredCrag.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WindScarredCrag extends mage.sets.khansoftarkir.WindScarredCrag { + + public WindScarredCrag(UUID ownerId) { + super(ownerId); + this.cardNumber = 321; + this.expansionSetCode = "C15"; + } + + public WindScarredCrag(final WindScarredCrag card) { + super(card); + } + + @Override + public WindScarredCrag copy() { + return new WindScarredCrag(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/Windfall.java b/Mage.Sets/src/mage/sets/commander2015/Windfall.java new file mode 100644 index 00000000000..33003e65c58 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/Windfall.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Windfall extends mage.sets.urzassaga.Windfall { + + public Windfall(UUID ownerId) { + super(ownerId); + this.cardNumber = 111; + this.expansionSetCode = "C15"; + } + + public Windfall(final Windfall card) { + super(card); + } + + @Override + public Windfall copy() { + return new Windfall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WistfulSelkie.java b/Mage.Sets/src/mage/sets/commander2015/WistfulSelkie.java new file mode 100644 index 00000000000..a6b80795e14 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WistfulSelkie.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WistfulSelkie extends mage.sets.eventide.WistfulSelkie { + + public WistfulSelkie(UUID ownerId) { + super(ownerId); + this.cardNumber = 243; + this.expansionSetCode = "C15"; + } + + public WistfulSelkie(final WistfulSelkie card) { + super(card); + } + + @Override + public WistfulSelkie copy() { + return new WistfulSelkie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WoodElves.java b/Mage.Sets/src/mage/sets/commander2015/WoodElves.java new file mode 100644 index 00000000000..9f1cfb554eb --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WoodElves.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WoodElves extends mage.sets.ninthedition.WoodElves { + + public WoodElves(UUID ownerId) { + super(ownerId); + this.cardNumber = 212; + this.expansionSetCode = "C15"; + } + + public WoodElves(final WoodElves card) { + super(card); + } + + @Override + public WoodElves copy() { + return new WoodElves(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WordOfSeizing.java b/Mage.Sets/src/mage/sets/commander2015/WordOfSeizing.java new file mode 100644 index 00000000000..eafa2533010 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WordOfSeizing.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WordOfSeizing extends mage.sets.commander2014.WordOfSeizing { + + public WordOfSeizing(UUID ownerId) { + super(ownerId); + this.cardNumber = 172; + this.expansionSetCode = "C15"; + } + + public WordOfSeizing(final WordOfSeizing card) { + super(card); + } + + @Override + public WordOfSeizing copy() { + return new WordOfSeizing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WornPowerstone.java b/Mage.Sets/src/mage/sets/commander2015/WornPowerstone.java new file mode 100644 index 00000000000..a4cc625b82e --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WornPowerstone.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WornPowerstone extends mage.sets.urzassaga.WornPowerstone { + + public WornPowerstone(UUID ownerId) { + super(ownerId); + this.cardNumber = 275; + this.expansionSetCode = "C15"; + } + + public WornPowerstone(final WornPowerstone card) { + super(card); + } + + @Override + public WornPowerstone copy() { + return new WornPowerstone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/WretchedConfluence.java b/Mage.Sets/src/mage/sets/commander2015/WretchedConfluence.java new file mode 100644 index 00000000000..f4c162edce1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/WretchedConfluence.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.sets.commander2015; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.TargetPlayer; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class WretchedConfluence extends CardImpl { + + public WretchedConfluence(UUID ownerId) { + super(ownerId, 23, "Wretched Confluence", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{B}{B}"); + this.expansionSetCode = "C15"; + + // Choose three. You may choose the same mode more than once. + this.getSpellAbility().getModes().setMinModes(3); + this.getSpellAbility().getModes().setMaxModes(3); + this.getSpellAbility().getModes().setEachModeMoreThanOnce(true); + + // - Target player draws a card and loses 1 life; + Effect effect = new LoseLifeTargetEffect(1); + effect.setText("and loses 1 life"); + this.getSpellAbility().addEffect(new DrawCardTargetEffect(1)); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Target creature gets -2/-2 until end of turn; + Mode mode = new Mode(); + mode.getEffects().add(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)); + mode.getTargets().add(new TargetCreaturePermanent()); + this.getSpellAbility().getModes().addMode(mode); + + // Return target creature card from your graveyard to your hand. + mode = new Mode(); + mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect()); + mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + this.getSpellAbility().getModes().addMode(mode); + } + + public WretchedConfluence(final WretchedConfluence card) { + super(card); + } + + @Override + public WretchedConfluence copy() { + return new WretchedConfluence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander2015/ZoeticCavern.java b/Mage.Sets/src/mage/sets/commander2015/ZoeticCavern.java new file mode 100644 index 00000000000..745eb97f48c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander2015/ZoeticCavern.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.sets.commander2015; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ZoeticCavern extends mage.sets.commander2014.ZoeticCavern { + + public ZoeticCavern(UUID ownerId) { + super(ownerId); + this.cardNumber = 322; + this.expansionSetCode = "C15"; + } + + public ZoeticCavern(final ZoeticCavern card) { + super(card); + } + + @Override + public ZoeticCavern copy() { + return new ZoeticCavern(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/ChaosWarp.java b/Mage.Sets/src/mage/sets/commandersarsenal/ChaosWarp.java new file mode 100644 index 00000000000..a22bfaae0de --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/ChaosWarp.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ChaosWarp extends mage.sets.vintagemasters.ChaosWarp { + + public ChaosWarp(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public ChaosWarp(final ChaosWarp card) { + super(card); + } + + @Override + public ChaosWarp copy() { + return new ChaosWarp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/CommandTower.java b/Mage.Sets/src/mage/sets/commandersarsenal/CommandTower.java new file mode 100644 index 00000000000..6cba89b8867 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/CommandTower.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.sets.commandersarsenal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CommandTower extends mage.sets.commander2013.CommandTower { + + public CommandTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "CMA"; + } + + public CommandTower(final CommandTower card) { + super(card); + } + + @Override + public CommandTower copy() { + return new CommandTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/DecreeOfPain.java b/Mage.Sets/src/mage/sets/commandersarsenal/DecreeOfPain.java new file mode 100644 index 00000000000..97a2fb58182 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/DecreeOfPain.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DecreeOfPain extends mage.sets.commander2013.DecreeOfPain { + + public DecreeOfPain(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public DecreeOfPain(final DecreeOfPain card) { + super(card); + } + + @Override + public DecreeOfPain copy() { + return new DecreeOfPain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/Desertion.java b/Mage.Sets/src/mage/sets/commandersarsenal/Desertion.java new file mode 100644 index 00000000000..5d17a60851b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/Desertion.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Desertion extends mage.sets.visions.Desertion { + + public Desertion(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public Desertion(final Desertion card) { + super(card); + } + + @Override + public Desertion copy() { + return new Desertion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/DiaochanArtfulBeauty.java b/Mage.Sets/src/mage/sets/commandersarsenal/DiaochanArtfulBeauty.java new file mode 100644 index 00000000000..fc567e98c86 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/DiaochanArtfulBeauty.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DiaochanArtfulBeauty extends mage.sets.portalthreekingdoms.DiaochanArtfulBeauty { + + public DiaochanArtfulBeauty(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public DiaochanArtfulBeauty(final DiaochanArtfulBeauty card) { + super(card); + } + + @Override + public DiaochanArtfulBeauty copy() { + return new DiaochanArtfulBeauty(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/DragonlairSpider.java b/Mage.Sets/src/mage/sets/commandersarsenal/DragonlairSpider.java new file mode 100644 index 00000000000..9dd65f1d9a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/DragonlairSpider.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DragonlairSpider extends mage.sets.planechase2012.DragonlairSpider { + + public DragonlairSpider(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public DragonlairSpider(final DragonlairSpider card) { + super(card); + } + + @Override + public DragonlairSpider copy() { + return new DragonlairSpider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/Duplicant.java b/Mage.Sets/src/mage/sets/commandersarsenal/Duplicant.java new file mode 100644 index 00000000000..3b155c3e56b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/Duplicant.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Duplicant extends mage.sets.mirrodin.Duplicant { + + public Duplicant(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public Duplicant(final Duplicant card) { + super(card); + } + + @Override + public Duplicant copy() { + return new Duplicant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/EdricSpymasterOfTrest.java b/Mage.Sets/src/mage/sets/commandersarsenal/EdricSpymasterOfTrest.java new file mode 100644 index 00000000000..c365b213e7b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/EdricSpymasterOfTrest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class EdricSpymasterOfTrest extends mage.sets.commander.EdricSpymasterOfTrest { + + public EdricSpymasterOfTrest(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public EdricSpymasterOfTrest(final EdricSpymasterOfTrest card) { + super(card); + } + + @Override + public EdricSpymasterOfTrest copy() { + return new EdricSpymasterOfTrest(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/KaaliaOfTheVast.java b/Mage.Sets/src/mage/sets/commandersarsenal/KaaliaOfTheVast.java new file mode 100644 index 00000000000..a57e4ad69b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/KaaliaOfTheVast.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class KaaliaOfTheVast extends mage.sets.commander.KaaliaOfTheVast { + + public KaaliaOfTheVast(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public KaaliaOfTheVast(final KaaliaOfTheVast card) { + super(card); + } + + @Override + public KaaliaOfTheVast copy() { + return new KaaliaOfTheVast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/LoyalRetainers.java b/Mage.Sets/src/mage/sets/commandersarsenal/LoyalRetainers.java new file mode 100644 index 00000000000..59b1a841754 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/LoyalRetainers.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class LoyalRetainers extends mage.sets.portalthreekingdoms.LoyalRetainers { + + public LoyalRetainers(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public LoyalRetainers(final LoyalRetainers card) { + super(card); + } + + @Override + public LoyalRetainers copy() { + return new LoyalRetainers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/MaelstromWanderer.java b/Mage.Sets/src/mage/sets/commandersarsenal/MaelstromWanderer.java new file mode 100644 index 00000000000..ceb630335d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/MaelstromWanderer.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MaelstromWanderer extends mage.sets.planechase2012.MaelstromWanderer { + + public MaelstromWanderer(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public MaelstromWanderer(final MaelstromWanderer card) { + super(card); + } + + @Override + public MaelstromWanderer copy() { + return new MaelstromWanderer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/MindsEye.java b/Mage.Sets/src/mage/sets/commandersarsenal/MindsEye.java new file mode 100644 index 00000000000..26de77df97c --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/MindsEye.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MindsEye extends mage.sets.mirrodin.MindsEye { + + public MindsEye(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public MindsEye(final MindsEye card) { + super(card); + } + + @Override + public MindsEye copy() { + return new MindsEye(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/MirarisWake.java b/Mage.Sets/src/mage/sets/commandersarsenal/MirarisWake.java new file mode 100644 index 00000000000..3f1f40c49c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/MirarisWake.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MirarisWake extends mage.sets.judgment.MirarisWake { + + public MirarisWake(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public MirarisWake(final MirarisWake card) { + super(card); + } + + @Override + public MirarisWake copy() { + return new MirarisWake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/RhysticStudy.java b/Mage.Sets/src/mage/sets/commandersarsenal/RhysticStudy.java new file mode 100644 index 00000000000..677146bba1a --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/RhysticStudy.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.sets.commandersarsenal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RhysticStudy extends mage.sets.prophecy.RhysticStudy { + + public RhysticStudy(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "CMA"; + } + + public RhysticStudy(final RhysticStudy card) { + super(card); + } + + @Override + public RhysticStudy copy() { + return new RhysticStudy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/ScrollRack.java b/Mage.Sets/src/mage/sets/commandersarsenal/ScrollRack.java new file mode 100644 index 00000000000..a0e6b82f542 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/ScrollRack.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ScrollRack extends mage.sets.tempest.ScrollRack { + + public ScrollRack(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public ScrollRack(final ScrollRack card) { + super(card); + } + + @Override + public ScrollRack copy() { + return new ScrollRack(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/SylvanLibrary.java b/Mage.Sets/src/mage/sets/commandersarsenal/SylvanLibrary.java new file mode 100644 index 00000000000..20603b7d234 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/SylvanLibrary.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SylvanLibrary extends mage.sets.fifthedition.SylvanLibrary { + + public SylvanLibrary(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public SylvanLibrary(final SylvanLibrary card) { + super(card); + } + + @Override + public SylvanLibrary copy() { + return new SylvanLibrary(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/TheMimeoplasm.java b/Mage.Sets/src/mage/sets/commandersarsenal/TheMimeoplasm.java new file mode 100644 index 00000000000..2cf1b459631 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/TheMimeoplasm.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class TheMimeoplasm extends mage.sets.commander.TheMimeoplasm { + + public TheMimeoplasm(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public TheMimeoplasm(final TheMimeoplasm card) { + super(card); + } + + @Override + public TheMimeoplasm copy() { + return new TheMimeoplasm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commandersarsenal/VelaTheNightClad.java b/Mage.Sets/src/mage/sets/commandersarsenal/VelaTheNightClad.java new file mode 100644 index 00000000000..7b2e1a01f2b --- /dev/null +++ b/Mage.Sets/src/mage/sets/commandersarsenal/VelaTheNightClad.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commandersarsenal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class VelaTheNightClad extends mage.sets.planechase2012.VelaTheNightClad { + + public VelaTheNightClad(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "CMA"; + this.rarity = Rarity.SPECIAL; + } + + public VelaTheNightClad(final VelaTheNightClad card) { + super(card); + } + + @Override + public VelaTheNightClad copy() { + return new VelaTheNightClad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java b/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java index 608418d7828..afe5461a9fa 100644 --- a/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java +++ b/Mage.Sets/src/mage/sets/conflux/KnotvineMystic.java @@ -46,7 +46,7 @@ import mage.constants.Rarity; public class KnotvineMystic extends CardImpl{ public KnotvineMystic(UUID ownerId) { - super(ownerId, 114, "Knotvine Mystic", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}{R}{G}"); + super(ownerId, 114, "Knotvine Mystic", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}{G}{W}"); this.expansionSetCode = "CON"; diff --git a/Mage.Sets/src/mage/sets/conspiracy/BoldwyrIntimidator.java b/Mage.Sets/src/mage/sets/conspiracy/BoldwyrIntimidator.java new file mode 100644 index 00000000000..2ab7eb29e08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/BoldwyrIntimidator.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.sets.conspiracy; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BoldwyrIntimidator extends mage.sets.morningtide.BoldwyrIntimidator { + + public BoldwyrIntimidator(UUID ownerId) { + super(ownerId); + this.cardNumber = 137; + this.expansionSetCode = "CNS"; + } + + public BoldwyrIntimidator(final BoldwyrIntimidator card) { + super(card); + } + + @Override + public BoldwyrIntimidator copy() { + return new BoldwyrIntimidator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java b/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java index 855d62758c7..ddc3e84d5a7 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java +++ b/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java @@ -100,9 +100,9 @@ class GrenzoDungeonWardenEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (controller.getLibrary().size() > 0) { - Card card = controller.getLibrary().removeFromBottom(game); + Card card = controller.getLibrary().getFromBottom(game); if (card != null) { - controller.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, source, game); + controller.moveCards(card, Zone.GRAVEYARD, source, game); if (card.getCardType().contains(CardType.CREATURE)) { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourcePermanent != null && card.getPower().getValue() <= sourcePermanent.getPower().getValue()) { diff --git a/Mage.Sets/src/mage/sets/conspiracy/ManaGeyser.java b/Mage.Sets/src/mage/sets/conspiracy/ManaGeyser.java index abd2426a49a..579c836fd29 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/ManaGeyser.java +++ b/Mage.Sets/src/mage/sets/conspiracy/ManaGeyser.java @@ -56,7 +56,7 @@ public class ManaGeyser extends CardImpl { // Add {R} to your mana pool for each tapped land your opponents control. - this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(filter))); + this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), new PermanentsOnBattlefieldCount(filter))); } public ManaGeyser(final ManaGeyser card) { diff --git a/Mage.Sets/src/mage/sets/conspiracy/ReignOfThePit.java b/Mage.Sets/src/mage/sets/conspiracy/ReignOfThePit.java new file mode 100644 index 00000000000..da60b466e3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/ReignOfThePit.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.sets.conspiracy; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class ReignOfThePit extends mage.sets.vintagemasters.ReignOfThePit { + + public ReignOfThePit(UUID ownerId) { + super(ownerId); + this.cardNumber = 29; + this.expansionSetCode = "CNS"; + } + + public ReignOfThePit(final ReignOfThePit card) { + super(card); + } + + @Override + public ReignOfThePit copy() { + return new ReignOfThePit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/RousingOfSouls.java b/Mage.Sets/src/mage/sets/conspiracy/RousingOfSouls.java new file mode 100644 index 00000000000..419e0d0a3fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/RousingOfSouls.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.sets.conspiracy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.ParleyCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.token.SpiritWhiteToken; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class RousingOfSouls extends CardImpl { + + public RousingOfSouls(UUID ownerId) { + super(ownerId, 19, "Rousing of Souls", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "CNS"; + + // Parley - Each player reveals the top card of his or her library. For each nonland card revealed this way, + // you put a 1/1 white Spirit creature token with flying onto the battlefield. Then each player draws a card. + this.getSpellAbility().addEffect(new RousingOfSoulsEffect()); + Effect effect = new DrawCardAllEffect(1); + effect.setText("Then each player draws a card"); + this.getSpellAbility().addEffect(effect); + } + + public RousingOfSouls(final RousingOfSouls card) { + super(card); + } + + @Override + public RousingOfSouls copy() { + return new RousingOfSouls(this); + } +} + +class RousingOfSoulsEffect extends OneShotEffect { + + public RousingOfSoulsEffect() { + super(Outcome.Benefit); + this.staticText = "Parley — Each player reveals the top card of his or her library. For each nonland card revealed this way, you put a 1/1 white Spirit creature token with flying onto the battlefield"; + } + + public RousingOfSoulsEffect(final RousingOfSoulsEffect effect) { + super(effect); + } + + @Override + public RousingOfSoulsEffect copy() { + return new RousingOfSoulsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int parley = ParleyCount.getInstance().calculate(game, source, this); + if (parley > 0) { + new CreateTokenEffect(new SpiritWhiteToken(), parley).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/SelvalasCharge.java b/Mage.Sets/src/mage/sets/conspiracy/SelvalasCharge.java new file mode 100644 index 00000000000..ea2b5291118 --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/SelvalasCharge.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.sets.conspiracy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.ParleyCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.token.ElephantToken; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class SelvalasCharge extends CardImpl { + + public SelvalasCharge(UUID ownerId) { + super(ownerId, 39, "Selvala's Charge", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{G}"); + this.expansionSetCode = "CNS"; + + // Parley - Each player reveals the top card of his or her library. For each nonland card revealed this way, you put a 3/3 green Elephant creature token onto the battlefield. Then each player draws a card. + this.getSpellAbility().addEffect(new SelvalasChargeEffect()); + Effect effect = new DrawCardAllEffect(1); + effect.setText("Then each player draws a card"); + this.getSpellAbility().addEffect(effect); + } + + public SelvalasCharge(final SelvalasCharge card) { + super(card); + } + + @Override + public SelvalasCharge copy() { + return new SelvalasCharge(this); + } +} + +class SelvalasChargeEffect extends OneShotEffect { + + public SelvalasChargeEffect() { + super(Outcome.Benefit); + this.staticText = "Parley — Each player reveals the top card of his or her library. For each nonland card revealed this way, you put a 3/3 green Elephant creature token onto the battlefield"; + } + + public SelvalasChargeEffect(final SelvalasChargeEffect effect) { + super(effect); + } + + @Override + public SelvalasChargeEffect copy() { + return new SelvalasChargeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int parley = ParleyCount.getInstance().calculate(game, source, this); + if (parley > 0) { + new CreateTokenEffect(new ElephantToken(), parley).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/SelvalasEnforcer.java b/Mage.Sets/src/mage/sets/conspiracy/SelvalasEnforcer.java new file mode 100644 index 00000000000..c846d64caa0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/SelvalasEnforcer.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.sets.conspiracy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.ParleyCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class SelvalasEnforcer extends CardImpl { + + public SelvalasEnforcer(UUID ownerId) { + super(ownerId, 40, "Selvala's Enforcer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "CNS"; + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Parley - When Selvala's Enforcer enters the battlefield, each player reveals the top card of his or her library. + // For each nonland card revealed this way, put a +1/+1 counter on Selvala's Enforcer. Then each player draws a card. + Ability ability = new EntersBattlefieldTriggeredAbility(new SelvalasEnforcerEffect(), false, "Parley — "); + Effect effect = new DrawCardAllEffect(1); + effect.setText("Then each player draws a card"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public SelvalasEnforcer(final SelvalasEnforcer card) { + super(card); + } + + @Override + public SelvalasEnforcer copy() { + return new SelvalasEnforcer(this); + } +} + +class SelvalasEnforcerEffect extends OneShotEffect { + + public SelvalasEnforcerEffect() { + super(Outcome.Benefit); + this.staticText = "each player reveals the top card of his or her library. For each nonland card revealed this way, put a +1/+1 counter on {this}"; + } + + public SelvalasEnforcerEffect(final SelvalasEnforcerEffect effect) { + super(effect); + } + + @Override + public SelvalasEnforcerEffect copy() { + return new SelvalasEnforcerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int parley = ParleyCount.getInstance().calculate(game, source, this); + if (parley > 0) { + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + if (sourcePermanent != null) { + sourcePermanent.addCounters(CounterType.P1P1.createInstance(parley), game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/TravelersCloak.java b/Mage.Sets/src/mage/sets/conspiracy/TravelersCloak.java new file mode 100644 index 00000000000..ad8ac3724a5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/TravelersCloak.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.sets.conspiracy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ChooseLandTypeEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.LandwalkAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.ChosenSubtypePredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class TravelersCloak extends CardImpl { + + public TravelersCloak(UUID ownerId) { + super(ownerId, 109, "Traveler's Cloak", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "CNS"; + 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); + + // As Traveler's Cloak enters the battlefield, choose a land type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseLandTypeEffect(Outcome.AddAbility))); + + // When Traveler's Cloak enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); + + // Enchanted creature has landwalk of the chosen type. + FilterLandPermanent filter = new FilterLandPermanent("Landwalk of the chosen type"); + filter.add(new ChosenSubtypePredicate(this.getId())); + Ability landwalkAbility = new LandwalkAbility(filter); + Effect effect = new GainAbilityAttachedEffect(landwalkAbility, AttachmentType.AURA); + effect.setText("Enchanted creature has landwalk of the chosen type"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public TravelersCloak(final TravelersCloak card) { + super(card); + } + + @Override + public TravelersCloak copy() { + return new TravelersCloak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/WoodvineElemental.java b/Mage.Sets/src/mage/sets/conspiracy/WoodvineElemental.java new file mode 100644 index 00000000000..1a6eafc4bf8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/WoodvineElemental.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.sets.conspiracy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.ParleyCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class WoodvineElemental extends CardImpl { + + final private String rule = "Parley — Whenever {this} attacks, each player reveals the top card of his or her library. " + + "For each nonland card revealed this way, attacking creatures you control get +1/+1 until end of turn. Then each player draws a card."; + + public WoodvineElemental(UUID ownerId) { + super(ownerId, 52, "Woodvine Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); + this.expansionSetCode = "CNS"; + this.subtype.add("Elemental"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Parley - Whenever Woodvine Elemental attacks, each player reveals the top card of his or her library. + // For each nonland card revealed this way, attacking creatures you control get +1/+1 until end of turn. Then each player draws a card. + Ability ability = new AttacksTriggeredAbility(new WoodvineElementalEffect(), false, rule); + Effect effect = new DrawCardAllEffect(1); + ability.addEffect(effect); + this.addAbility(ability); + } + + public WoodvineElemental(final WoodvineElemental card) { + super(card); + } + + @Override + public WoodvineElemental copy() { + return new WoodvineElemental(this); + } +} + +class WoodvineElementalEffect extends OneShotEffect { + + public WoodvineElementalEffect() { + super(Outcome.Benefit); + } + + public WoodvineElementalEffect(final WoodvineElementalEffect effect) { + super(effect); + } + + @Override + public WoodvineElementalEffect copy() { + return new WoodvineElementalEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int parley = ParleyCount.getInstance().calculate(game, source, this); + if (parley > 0) { + game.addEffect(new BoostControlledEffect(parley, parley, Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false), source); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java b/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java index 193aee99a9a..22098f98e2f 100644 --- a/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java +++ b/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java @@ -101,7 +101,7 @@ public class HuntmasterOfTheFells extends CardImpl { class HuntmasterOfTheFellsAbility extends TriggeredAbilityImpl { public HuntmasterOfTheFellsAbility() { - super(Zone.BATTLEFIELD, new CreateTokenEffect(new WolfToken(Token.Type.SECOND)), false); + super(Zone.BATTLEFIELD, new CreateTokenEffect(new WolfToken()), false); this.addEffect(new GainLifeEffect(2)); } diff --git a/Mage.Sets/src/mage/sets/darkascension/RequiemAngel.java b/Mage.Sets/src/mage/sets/darkascension/RequiemAngel.java index 3f1263e0fb8..7b98ac2bcb2 100644 --- a/Mage.Sets/src/mage/sets/darkascension/RequiemAngel.java +++ b/Mage.Sets/src/mage/sets/darkascension/RequiemAngel.java @@ -67,7 +67,7 @@ public class RequiemAngel extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever another non-Spirit creature you control dies, put a 1/1 white Spirit creature token with flying onto the battlefield. - this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken(expansionSetCode), 1), false, filter)); + this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken("ISD"), 1), false, filter)); } public RequiemAngel(final RequiemAngel card) { diff --git a/Mage.Sets/src/mage/sets/darkascension/Seance.java b/Mage.Sets/src/mage/sets/darkascension/Seance.java index 5f848ebe8ab..1b28fafa421 100644 --- a/Mage.Sets/src/mage/sets/darkascension/Seance.java +++ b/Mage.Sets/src/mage/sets/darkascension/Seance.java @@ -97,7 +97,7 @@ class SeanceEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null && card != null) { if (controller.moveCards(card, null, Zone.EXILED, source, game)) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false); effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); effect.setAdditionalSubType("Spirit"); effect.apply(game, source); diff --git a/Mage.Sets/src/mage/sets/darkascension/WolfhuntersQuiver.java b/Mage.Sets/src/mage/sets/darkascension/WolfhuntersQuiver.java index 33e582f32ef..b110ad5d363 100644 --- a/Mage.Sets/src/mage/sets/darkascension/WolfhuntersQuiver.java +++ b/Mage.Sets/src/mage/sets/darkascension/WolfhuntersQuiver.java @@ -67,11 +67,11 @@ public class WolfhuntersQuiver extends CardImpl { this.expansionSetCode = "DKA"; this.subtype.add("Equipment"); - // Equipped creature has "{tap}: This creature deals 1 damage to target creature or player" + // 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()); abilityToGain.addTarget(new TargetCreatureOrPlayer()); Effect effect = new GainAbilityAttachedEffect(abilityToGain, AttachmentType.EQUIPMENT); - effect.setText("Equipped creature has \"{tap}: This creature deals 1 damage to target creature or player\""); + effect.setText("Equipped creature has \"{T}: This creature deals 1 damage to target creature or player\""); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); // and "{T}: This creature deals 3 damage to target Werewolf creature." diff --git a/Mage.Sets/src/mage/sets/darksteel/GoblinArchaeologist.java b/Mage.Sets/src/mage/sets/darksteel/GoblinArchaeologist.java new file mode 100644 index 00000000000..46f9a5bbcc0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/GoblinArchaeologist.java @@ -0,0 +1,95 @@ +/* + * 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.sets.darksteel; + +import java.util.UUID; +import mage.MageInt; +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.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; + +/** + * + * @author BursegSardaukar + */ +public class GoblinArchaeologist extends CardImpl { + + public GoblinArchaeologist(UUID ownerId) { + super(ownerId, 63, "Goblin Archaeologist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "DST"; + this.subtype.add("Goblin"); + this.subtype.add("Artificer"); + + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {R}, {T]: Flip a coin. If you win the flip, destroy target artifact and untap Goblin Archaeologist. If you lose the flip, sacrifice Goblin Archaeologist. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinArchaeologistEffect(),new ManaCostsImpl("{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent(new FilterArtifactPermanent())); + this.addAbility(ability); + } + + public GoblinArchaeologist(final GoblinArchaeologist card) { + super(card); + } + + @Override + public GoblinArchaeologist copy() { + return new GoblinArchaeologist(this); + } +} + +class GoblinArchaeologistEffect extends OneShotEffect { + + public GoblinArchaeologistEffect() { + super(Outcome.DestroyPermanent); + } + + public GoblinArchaeologistEffect(final GoblinArchaeologistEffect ability) { + super(ability); + } + + @Override + public GoblinArchaeologistEffect copy() { + return new GoblinArchaeologistEffect(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) { + if (!player.flipCoin(game)) { + permanent.sacrifice(source.getSourceId(), game); + }else{ + Permanent targetArtifact = game.getPermanent(source.getFirstTarget()); + targetArtifact.destroy(source.getSourceId(), game, true); + permanent.untap(game); + } + return true; + } + return false; + } + + @Override + public String getText(Mode mode) { + return "Flip a coin. If you win the flip, destroy target artifact and untap {this}. If you lose the flip, sacrifice {this}"; + } +} diff --git a/Mage.Sets/src/mage/sets/darksteel/Karstoderm.java b/Mage.Sets/src/mage/sets/darksteel/Karstoderm.java new file mode 100644 index 00000000000..4eaa714a352 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/Karstoderm.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.sets.darksteel; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterArtifactPermanent; + +/** + * + * @author fireshoes + */ +public class Karstoderm extends CardImpl { + + public Karstoderm(UUID ownerId) { + super(ownerId, 77, "Karstoderm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "DST"; + this.subtype.add("Beast"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Karstoderm enters the battlefield with five +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)), + "{this} enters the battlefield with five +1/+1 counters on it")); + + // Whenever an artifact enters the battlefield, remove a +1/+1 counter from Karstoderm. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, + new RemoveCounterSourceEffect(CounterType.P1P1.createInstance(1)), + new FilterArtifactPermanent("an artifact"), false)); + } + + public Karstoderm(final Karstoderm card) { + super(card); + } + + @Override + public Karstoderm copy() { + return new Karstoderm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darksteel/LeoninBattlemage.java b/Mage.Sets/src/mage/sets/darksteel/LeoninBattlemage.java new file mode 100644 index 00000000000..937eec54ee4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/LeoninBattlemage.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.sets.darksteel; + +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.UntapSourceEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class LeoninBattlemage extends CardImpl { + + public LeoninBattlemage(UUID ownerId) { + super(ownerId, 5, "Leonin Battlemage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "DST"; + this.subtype.add("Cat"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {tap}: Target creature gets +1/+1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + // Whenever you cast a spell, you may untap Leonin Battlemage. + this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), true)); + } + + public LeoninBattlemage(final LeoninBattlemage card) { + super(card); + } + + @Override + public LeoninBattlemage copy() { + return new LeoninBattlemage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darksteel/WireflyHive.java b/Mage.Sets/src/mage/sets/darksteel/WireflyHive.java new file mode 100644 index 00000000000..fc3441c4d59 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/WireflyHive.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.sets.darksteel; + +import java.util.UUID; +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.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class WireflyHive extends CardImpl { + + public WireflyHive(UUID ownerId) { + super(ownerId, 161, "Wirefly Hive", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "DST"; + + // {3}, {tap}: Flip a coin. If you win the flip, put a 2/2 colorless Insect artifact creature token with flying named Wirefly onto the battlefield. + // If you lose the flip, destroy all permanents named Wirefly. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WireflyHiveEffect(), new GenericManaCost(3)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public WireflyHive(final WireflyHive card) { + super(card); + } + + @Override + public WireflyHive copy() { + return new WireflyHive(this); + } +} + +class WireflyHiveEffect extends OneShotEffect { + + public WireflyHiveEffect() { + super(Outcome.Damage); + staticText = "Flip a coin. If you win the flip, put a 2/2 colorless Insect artifact creature token with flying named Wirefly onto the battlefield." + + "If you lose the flip, destroy all permanents named Wirefly"; + } + + public WireflyHiveEffect(WireflyHiveEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (controller.flipCoin(game)) { + new CreateTokenEffect(new WireflyToken()).apply(game, source); + return true; + } else { + FilterPermanent filter = new FilterPermanent("permanents named Wirefly"); + filter.add(new NamePredicate("Wirefly")); + new DestroyAllEffect(filter).apply(game, source); + return true; + } + } + return false; + } + + @Override + public WireflyHiveEffect copy() { + return new WireflyHiveEffect(this); + } +} + +class WireflyToken extends Token { + + WireflyToken() { + super("Wirefly", "2/2 colorless Insect artifact creature token named Wirefly"); + this.setOriginalExpansionSetCode("DST"); + this.getPower().initValue(2); + this.getToughness().initValue(2); + this.getSubtype().add("Insect"); + this.getCardType().add(CardType.ARTIFACT); + this.getCardType().add(CardType.CREATURE); + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/BlessingOfTheNephilim.java b/Mage.Sets/src/mage/sets/dissension/BlessingOfTheNephilim.java new file mode 100644 index 00000000000..e3383a8f56a --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/BlessingOfTheNephilim.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.sets.dissension; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Quercitron + */ +public class BlessingOfTheNephilim extends CardImpl { + + public BlessingOfTheNephilim(UUID ownerId) { + super(ownerId, 4, "Blessing of the Nephilim", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + this.expansionSetCode = "DIS"; + 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 gets +1/+1 for each of its colors. + DynamicValue numberOfColors = new EnchantedCreatureColorsCount(); + Effect effect = new BoostEnchantedEffect(numberOfColors, numberOfColors, Duration.WhileOnBattlefield); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public BlessingOfTheNephilim(final BlessingOfTheNephilim card) { + super(card); + } + + @Override + public BlessingOfTheNephilim copy() { + return new BlessingOfTheNephilim(this); + } +} + +class EnchantedCreatureColorsCount implements DynamicValue { + + public EnchantedCreatureColorsCount() { + } + + public EnchantedCreatureColorsCount(final EnchantedCreatureColorsCount dynamicValue) { + } + + @Override + public int calculate(Game game, Ability source, Effect effect) { + int count = 0; + Permanent aura = game.getPermanent(source.getSourceId()); + if (aura != null) { + Permanent permanent = game.getPermanent(aura.getAttachedTo()); + if (permanent != null) { + count = permanent.getColor(game).getColorCount(); + } + } + return count; + } + + @Override + public EnchantedCreatureColorsCount copy() { + return new EnchantedCreatureColorsCount(this); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return "of its colors"; + } + +} diff --git a/Mage.Sets/src/mage/sets/dissension/Demonfire.java b/Mage.Sets/src/mage/sets/dissension/Demonfire.java index 02484480095..b71edacc19e 100644 --- a/Mage.Sets/src/mage/sets/dissension/Demonfire.java +++ b/Mage.Sets/src/mage/sets/dissension/Demonfire.java @@ -44,6 +44,7 @@ import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.common.DamagedByWatcher; /** * @@ -54,30 +55,29 @@ public class Demonfire extends CardImpl { public Demonfire(UUID ownerId) { super(ownerId, 60, "Demonfire", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{R}"); this.expansionSetCode = "DIS"; - - - // Demonfire deals X damage to target creature or player. + // Demonfire deals X damage to target creature or player. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(new ManacostVariableValue()), new InvertCondition(HellbentCondition.getInstance()), - "{this} deals X damage to target creature or player")); + "{this} deals X damage to target creature or player")); // If a creature dealt damage this way would die this turn, exile it instead. - this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - + this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); + this.getSpellAbility().addWatcher(new DamagedByWatcher()); + // Hellbent - If you have no cards in hand, Demonfire can't be countered by spells or abilities and the damage can't be prevented. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(new ManacostVariableValue(), false), HellbentCondition.getInstance(), - "
Hellbent - If you have no cards in hand, {this} can't be countered by spells or abilities and the damage can't be prevented.")); + "
Hellbent - If you have no cards in hand, {this} can't be countered by spells or abilities and the damage can't be prevented.")); // can't be countered - Effect effect = new CantBeCounteredSourceEffect(); - effect.setText(""); + Effect effect = new CantBeCounteredSourceEffect(); + effect.setText(""); this.addAbility(new SimpleStaticAbility(Zone.STACK, new ConditionalContinuousRuleModifyingEffect( - (CantBeCounteredSourceEffect)effect, + (CantBeCounteredSourceEffect) effect, HellbentCondition.getInstance()))); - + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/sets/dissension/DreadSlag.java b/Mage.Sets/src/mage/sets/dissension/DreadSlag.java new file mode 100644 index 00000000000..58ccae8ffd8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/DreadSlag.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.sets.dissension; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class DreadSlag extends CardImpl { + + public DreadSlag(UUID ownerId) { + super(ownerId, 109, "Dread Slag", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{R}"); + this.expansionSetCode = "DIS"; + this.subtype.add("Horror"); + this.power = new MageInt(9); + this.toughness = new MageInt(9); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Dread Slag gets -4/-4 for each card in your hand. + DynamicValue amount = new MultipliedValue(new CardsInControllerHandCount(), -4); + Effect effect = new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield); + effect.setText("{this} gets -4/-4 for each card in your hand"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public DreadSlag(final DreadSlag card) { + super(card); + } + + @Override + public DreadSlag copy() { + return new DreadSlag(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/MightOfTheNephilim.java b/Mage.Sets/src/mage/sets/dissension/MightOfTheNephilim.java new file mode 100644 index 00000000000..3b177f8b174 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/MightOfTheNephilim.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.sets.dissension; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Quercitron + */ +public class MightOfTheNephilim extends CardImpl { + + public MightOfTheNephilim(UUID ownerId) { + super(ownerId, 88, "Might of the Nephilim", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "DIS"; + + // Target creature gets +2/+2 until end of turn for each of its colors. + DynamicValue boostValue = MightOfTheNephilimValue.getInstance(); + Effect effect = new BoostTargetEffect(boostValue, boostValue, Duration.EndOfTurn, true); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public MightOfTheNephilim(final MightOfTheNephilim card) { + super(card); + } + + @Override + public MightOfTheNephilim copy() { + return new MightOfTheNephilim(this); + } +} + +class MightOfTheNephilimValue implements DynamicValue { + + private static final MightOfTheNephilimValue fINSTANCE = new MightOfTheNephilimValue(); + + public static MightOfTheNephilimValue getInstance() { + return fINSTANCE; + } + + private MightOfTheNephilimValue() {} + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + Permanent target = game.getPermanentOrLKIBattlefield(sourceAbility.getFirstTarget()); + if (target != null) { + return 2 * target.getColor(game).getColorCount(); + } + return 0; + } + + @Override + public MightOfTheNephilimValue copy() { + return fINSTANCE; + } + + @Override + public String toString() { + return "2"; + } + + @Override + public String getMessage() { + return "of its colors"; + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/PalliationAccord.java b/Mage.Sets/src/mage/sets/dissension/PalliationAccord.java index 0d98ccb2056..9014dce7344 100644 --- a/Mage.Sets/src/mage/sets/dissension/PalliationAccord.java +++ b/Mage.Sets/src/mage/sets/dissension/PalliationAccord.java @@ -29,7 +29,7 @@ package mage.sets.dissension; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.effects.PreventionEffectImpl; @@ -38,12 +38,14 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; -import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; +import mage.game.events.GameEvent; /** * @@ -51,13 +53,19 @@ import mage.game.permanent.Permanent; */ public class PalliationAccord extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + public PalliationAccord(UUID ownerId) { super(ownerId, 122, "Palliation Accord", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{U}"); this.expansionSetCode = "DIS"; // Whenever a creature an opponent controls becomes tapped, put a shield counter on Palliation Accord. - this.addAbility(new PallationAccordTriggeredAbility()); - + this.addAbility(new BecomesTappedTriggeredAbility(new AddCountersSourceEffect(CounterType.SHIELD.createInstance()), false, filter)); + // Remove a shield counter from Palliation Accord: Prevent the next 1 damage that would be dealt to you this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PalliationAccordPreventionEffect(), new RemoveCountersSourceCost(CounterType.SHIELD.createInstance()))); } @@ -72,41 +80,6 @@ public class PalliationAccord extends CardImpl { } } -class PallationAccordTriggeredAbility extends TriggeredAbilityImpl { - PallationAccordTriggeredAbility() { - super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.SHIELD.createInstance())); - } - - PallationAccordTriggeredAbility(final PallationAccordTriggeredAbility ability) { - super(ability); - } - - @Override - public PallationAccordTriggeredAbility copy() { - return new PallationAccordTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent p = game.getPermanent(event.getTargetId()); - if (p != null && p.getCardType().contains(CardType.CREATURE)) { - if (game.getOpponents(this.controllerId).contains(p.getControllerId())) - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever a creature an opponent controls becomes tapped, " + modes.getText(); - } -} - class PalliationAccordPreventionEffect extends PreventionEffectImpl { public PalliationAccordPreventionEffect() { @@ -151,4 +124,4 @@ class PalliationAccordPreventionEffect extends PreventionEffectImpl { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/dissension/RakdosGuildmage.java b/Mage.Sets/src/mage/sets/dissension/RakdosGuildmage.java index b4a6247fbea..0de01f222a7 100644 --- a/Mage.Sets/src/mage/sets/dissension/RakdosGuildmage.java +++ b/Mage.Sets/src/mage/sets/dissension/RakdosGuildmage.java @@ -30,7 +30,6 @@ package mage.sets.dissension; 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.DiscardCardCost; @@ -46,6 +45,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.FixedTarget; @@ -66,11 +66,11 @@ public class RakdosGuildmage extends CardImpl { // ({BR} can be paid with either {B} or {R}.) // {3}{B}, Discard a card: Target creature gets -2/-2 until end of turn. - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2,-2, Duration.EndOfTurn), new ManaCostsImpl("{3}{B}")); + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl("{3}{B}")); ability.addTarget(new TargetCreaturePermanent()); ability.addCost(new DiscardCardCost()); this.addAbility(ability); - + // {3}{R}: Put a 2/1 red Goblin creature token with haste onto the battlefield. Exile it at the beginning of the next end step. SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RakdosGuildmageEffect(), new ManaCostsImpl("{3}{R}")); this.addAbility(ability2); @@ -86,7 +86,6 @@ public class RakdosGuildmage extends CardImpl { } } - class RakdosGuildmageEffect extends OneShotEffect { public RakdosGuildmageEffect() { @@ -107,13 +106,14 @@ class RakdosGuildmageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Token token = new RakdosGuildmageGoblinToken(); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } return true; } return false; @@ -131,4 +131,4 @@ class RakdosGuildmageGoblinToken extends Token { toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/dissension/SimicBasilisk.java b/Mage.Sets/src/mage/sets/dissension/SimicBasilisk.java index 2d6da8494b8..09d54a7ec21 100644 --- a/Mage.Sets/src/mage/sets/dissension/SimicBasilisk.java +++ b/Mage.Sets/src/mage/sets/dissension/SimicBasilisk.java @@ -32,7 +32,10 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DealsDamageToACreatureTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.GraftAbility; @@ -69,7 +72,10 @@ public class SimicBasilisk extends CardImpl { this.addAbility(new GraftAbility(this, 3)); // {1}{G}: Until end of turn, target creature with a +1/+1 counter on it gains "Whenever this creature deals combat damage to a creature, destroy that creature at end of combat." - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new DealsDamageToACreatureTriggeredAbility(new DestroyTargetEffect(), true, false, true), Duration.EndOfTurn), new ManaCostsImpl("{1}{G}")); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new DealsDamageToACreatureTriggeredAbility(effect, true, false, true), Duration.EndOfTurn), new ManaCostsImpl("{1}{G}")); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/divinevsdemonic/FaithsFetters.java b/Mage.Sets/src/mage/sets/divinevsdemonic/FaithsFetters.java index e586bbed0c7..d386108be97 100644 --- a/Mage.Sets/src/mage/sets/divinevsdemonic/FaithsFetters.java +++ b/Mage.Sets/src/mage/sets/divinevsdemonic/FaithsFetters.java @@ -71,7 +71,7 @@ public class FaithsFetters extends CardImpl { // When Faith's Fetters enters the battlefield, you gain 4 life. this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4))); - // Enchanted permanent can't attack or block, and its activated abilities can't be activated unless they're mana abilities. + // Enchanted permanent's activated abilities can't be activated unless they're mana abilities. If enchanted permanent is a creature, it can't attack or block. Effect effect = new CantAttackBlockAttachedEffect(AttachmentType.AURA); effect.setText("Enchanted permanent can't attack or block,"); ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/AEtherling.java b/Mage.Sets/src/mage/sets/dragonsmaze/AEtherling.java index 3dd30d6f2ad..a6b07bc4f1a 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/AEtherling.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/AEtherling.java @@ -57,7 +57,7 @@ public class AEtherling extends CardImpl { // {U}: Exile AEtherling. Return it to the battlefield under its owner's control at the beginning of the next end step. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileReturnToBattlefieldOwnerNextEndStepEffect(true), new ManaCostsImpl("{U}"))); // {U}: AEtherling can't be blocked this turn - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedSourceEffect(), new ManaCostsImpl("{U}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{U}"))); // {1}: AEtherling gets +1/-1 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{1}"))); // {1}: AEtherling gets -1/+1 until end of turn diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/PlasmCapture.java b/Mage.Sets/src/mage/sets/dragonsmaze/PlasmCapture.java index cf82ebbf9e1..ae7f5f64f05 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/PlasmCapture.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/PlasmCapture.java @@ -141,15 +141,15 @@ class PlasmCaptureManaEffect extends ManaEffect { } if (choiceColor.getColor().isBlack()) { - mana.addBlack(); + mana.increaseBlack(); } else if (choiceColor.getColor().isBlue()) { - mana.addBlue(); + mana.increaseBlue(); } else if (choiceColor.getColor().isRed()) { - mana.addRed(); + mana.increaseRed(); } else if (choiceColor.getColor().isGreen()) { - mana.addGreen(); + mana.increaseGreen(); } else if (choiceColor.getColor().isWhite()) { - mana.addWhite(); + mana.increaseWhite(); } } diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/RenegadeKrasis.java b/Mage.Sets/src/mage/sets/dragonsmaze/RenegadeKrasis.java index 6bd8f47bef9..32b2b81941c 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/RenegadeKrasis.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/RenegadeKrasis.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.dragonsmaze; import java.util.UUID; @@ -44,13 +43,10 @@ import mage.filter.predicate.permanent.CounterPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.game.stack.StackObject; - - public class RenegadeKrasis extends CardImpl { - public RenegadeKrasis (UUID ownerId) { + public RenegadeKrasis(UUID ownerId) { super(ownerId, 47, "Renegade Krasis", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); this.expansionSetCode = "DGM"; this.subtype.add("Beast"); @@ -66,7 +62,7 @@ public class RenegadeKrasis extends CardImpl { this.addAbility(new RenegadeKrasisTriggeredAbility()); } - public RenegadeKrasis (final RenegadeKrasis card) { + public RenegadeKrasis(final RenegadeKrasis card) { super(card); } @@ -80,13 +76,14 @@ public class RenegadeKrasis extends CardImpl { class RenegadeKrasisTriggeredAbility extends TriggeredAbilityImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); + static { filter.add(new AnotherPredicate()); filter.add(new CounterPredicate(CounterType.P1P1)); } public RenegadeKrasisTriggeredAbility() { - super(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(1),filter), false); + super(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(1), filter), false); } public RenegadeKrasisTriggeredAbility(final RenegadeKrasisTriggeredAbility ability) { @@ -100,31 +97,16 @@ class RenegadeKrasisTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.COUNTER_ADDED; + return event.getType() == EventType.EVOLVED_CREATURE; } @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getTargetId().equals(getSourceId())) { - Object object = game.getState().getValue("EvolveAddCounterActive"); - if (object != null && (Boolean) object) { - StackObject stackObject = game.getStack().getLast(); - if (stackObject.getStackAbility() instanceof EvolveAbility) { - object = game.getState().getValue(this.getId() + "_lastUsedEvolveStackObject"); - if (object != null && ((UUID) object).equals(stackObject.getId())) { - // this evolve was already handled before (prevents to trigger multiple times if counter from evolve is e.g. doubled) - return false; - } - game.getState().setValue(this.getId() + "_lastUsedEvolveStackObject", stackObject.getId()); - return true; - } - } - } - return false; + return event.getTargetId().equals(getSourceId()); } @Override public String getRule() { - return "Whenever Renegade Krasis evolves, put a +1/+1 counter on each other creature you control with a +1/+1 counter on it."; + return "Whenever {this} evolves, put a +1/+1 counter on each other creature you control with a +1/+1 counter on it."; } } diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java index 89fe50de8f2..a820a9d6938 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/CommuneWithLava.java @@ -151,10 +151,8 @@ class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - if (targetPointer.getTargets(game, source).contains(sourceId)) { - return game.getState().getZone(sourceId).equals(Zone.EXILED); - } - return false; + return source.getControllerId().equals(affectedControllerId) + && getTargetPointer().getTargets(game, source).contains(sourceId); } } diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DeadlyWanderings.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DeadlyWanderings.java index dbedd9f34b6..02dca44575a 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/DeadlyWanderings.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DeadlyWanderings.java @@ -43,6 +43,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; /** * @@ -59,10 +60,10 @@ public class DeadlyWanderings extends CardImpl { Effect effect = new ConditionalContinuousEffect(boostEffect, new OneControlledCreatureCondition(), "As long as you control exactly one creature, that creature gets +2/+0"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); - ContinuousEffect deathtouchEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield); + ContinuousEffect deathtouchEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()); effect = new ConditionalContinuousEffect(deathtouchEffect, new OneControlledCreatureCondition(), "and has deathtouch"); ability.addEffect(effect); - ContinuousEffect lifelinkEffect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield); + ContinuousEffect lifelinkEffect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()); effect = new ConditionalContinuousEffect(lifelinkEffect, new OneControlledCreatureCondition(), "and lifelink"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DromokasCommand.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DromokasCommand.java index 70f308bde33..ef4a3a3af64 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/DromokasCommand.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DromokasCommand.java @@ -40,14 +40,12 @@ import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.TargetController; import mage.counters.CounterType; -import mage.filter.FilterStackObject; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterEnchantmentPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterInstantOrSorcerySpell; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.TargetPlayer; -import mage.target.TargetStackObject; +import mage.target.TargetSpell; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; @@ -57,15 +55,11 @@ import mage.target.common.TargetCreaturePermanent; */ public class DromokasCommand extends CardImpl { - private static final FilterStackObject filterInstantOrSorcery = new FilterStackObject("instant or sorcery spell"); private static final FilterEnchantmentPermanent filterEnchantment = new FilterEnchantmentPermanent("an enchantment"); private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature to put a +1/+1 counter on it"); private static final FilterCreaturePermanent filterUncontrolledCreature = new FilterCreaturePermanent("creature you don't control"); static { - filterInstantOrSorcery.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), - new CardTypePredicate(CardType.SORCERY))); - filterUncontrolledCreature.add(new ControllerPredicate(TargetController.NOT_YOU)); } @@ -79,9 +73,9 @@ public class DromokasCommand extends CardImpl { // Prevent all damage target instant or sorcery spell would deal this turn; this.getSpellAbility().getEffects().add(new PreventDamageByTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().getTargets().add(new TargetStackObject(filterInstantOrSorcery)); + this.getSpellAbility().getTargets().add(new TargetSpell(new FilterInstantOrSorcerySpell())); - // or Target player sacrifices an enchantment; + // or Target player sacrifices an enchantment; Mode mode = new Mode(); Effect effect = new SacrificeEffect(filterEnchantment, 1, "target player"); effect.setText("Target player sacrifices an enchantment"); diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/EnduringScalelord.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/EnduringScalelord.java index a73926993d6..92ea2e6444a 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/EnduringScalelord.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/EnduringScalelord.java @@ -92,12 +92,15 @@ class EnduringScalelordTriggeredAbility extends TriggeredAbilityImpl { return event.getType() == GameEvent.EventType.COUNTERS_ADDED; } - @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getData().equals(CounterType.P1P1.getName())) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); - return (!event.getTargetId().equals(this.getSourceId()) + if (permanent == null) { + permanent = game.getPermanentEntering(event.getTargetId()); + } + return (permanent != null + && !event.getTargetId().equals(this.getSourceId()) && permanent.getCardType().contains(CardType.CREATURE) && permanent.getControllerId().equals(this.getControllerId())); } diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java index 864a66b66dc..e24b8c59f97 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java @@ -44,10 +44,8 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.players.Library; import mage.players.Player; import mage.target.targetpointer.FixedTarget; @@ -67,10 +65,10 @@ public class IreShaman extends CardImpl { // Menace (This creature can't be blocked except by two or more creatures.) this.addAbility(new MenaceAbility()); - + // Megamorph {R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{R}"), true)); - + // When Ire Shaman is turned face up, exile the top card of your library. Until end of turn, you may play that card. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new IreShamanExileEffect(), false)); } @@ -106,11 +104,10 @@ class IreShamanExileEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourcePermanent != null && controller != null && controller.getLibrary().size() > 0) { - Library library = controller.getLibrary(); - Card card = library.removeFromTop(game); + Card card = controller.getLibrary().getFromTop(game); if (card != null) { - String exileName = new StringBuilder(sourcePermanent.getIdName()).append(" ").toString(); - controller.moveCardToExileWithInfo(card, source.getSourceId(), exileName, source.getSourceId(), game, Zone.LIBRARY, true); + String exileName = sourcePermanent.getIdName() + " "; + controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName); ContinuousEffect effect = new IreShamanCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); @@ -144,7 +141,7 @@ class IreShamanCastFromExileEffect 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)); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SarkhanUnbroken.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SarkhanUnbroken.java index ccd28a1c476..daf2b769358 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/SarkhanUnbroken.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SarkhanUnbroken.java @@ -132,19 +132,19 @@ class SarkhanUnbrokenAbility1 extends OneShotEffect { switch (manaChoice.getChoice()) { case "White": - mana.addWhite(); + mana.increaseWhite(); break; case "Blue": - mana.addBlue(); + mana.increaseBlue(); break; case "Black": - mana.addBlack(); + mana.increaseBlack(); break; case "Red": - mana.addRed(); + mana.increaseRed(); break; case "Green": - mana.addGreen(); + mana.increaseGreen(); break; } diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Forest1.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Forest1.java new file mode 100644 index 00000000000..6bc9d1232a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Forest1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId, 1); + this.expansionSetCode = "EURO"; + } + + public Forest1(final Forest1 card) { + super(card); + } + + @Override + public Forest1 copy() { + return new Forest1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Forest2.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Forest2.java new file mode 100644 index 00000000000..169d0df24d2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Forest2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId, 6); + this.expansionSetCode = "EURO"; + } + + public Forest2(final Forest2 card) { + super(card); + } + + @Override + public Forest2 copy() { + return new Forest2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Forest3.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Forest3.java new file mode 100644 index 00000000000..24a5f5576d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Forest3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId, 11); + this.expansionSetCode = "EURO"; + } + + public Forest3(final Forest3 card) { + super(card); + } + + @Override + public Forest3 copy() { + return new Forest3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Island1.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Island1.java new file mode 100644 index 00000000000..2785a4a405d --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Island1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId, 2); + this.expansionSetCode = "EURO"; + } + + public Island1(final Island1 card) { + super(card); + } + + @Override + public Island1 copy() { + return new Island1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Island2.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Island2.java new file mode 100644 index 00000000000..2750d1605db --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Island2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId, 7); + this.expansionSetCode = "EURO"; + } + + public Island2(final Island2 card) { + super(card); + } + + @Override + public Island2 copy() { + return new Island2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Island3.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Island3.java new file mode 100644 index 00000000000..f4fbbaf30d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Island3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId, 12); + this.expansionSetCode = "EURO"; + } + + public Island3(final Island3 card) { + super(card); + } + + @Override + public Island3 copy() { + return new Island3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain1.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain1.java new file mode 100644 index 00000000000..55475839f66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain1 extends mage.cards.basiclands.Mountain { + + public Mountain1(UUID ownerId) { + super(ownerId, 3); + this.expansionSetCode = "EURO"; + } + + public Mountain1(final Mountain1 card) { + super(card); + } + + @Override + public Mountain1 copy() { + return new Mountain1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain2.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain2.java new file mode 100644 index 00000000000..3626ec477fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain2 extends mage.cards.basiclands.Mountain { + + public Mountain2(UUID ownerId) { + super(ownerId, 8); + this.expansionSetCode = "EURO"; + } + + public Mountain2(final Mountain2 card) { + super(card); + } + + @Override + public Mountain2 copy() { + return new Mountain2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain3.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain3.java new file mode 100644 index 00000000000..ceb2cb7c228 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Mountain3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain3 extends mage.cards.basiclands.Mountain { + + public Mountain3(UUID ownerId) { + super(ownerId, 13); + this.expansionSetCode = "EURO"; + } + + public Mountain3(final Mountain3 card) { + super(card); + } + + @Override + public Mountain3 copy() { + return new Mountain3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Plains1.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Plains1.java new file mode 100644 index 00000000000..52b7eecf504 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Plains1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains1 extends mage.cards.basiclands.Plains { + + public Plains1(UUID ownerId) { + super(ownerId, 4); + this.expansionSetCode = "EURO"; + } + + public Plains1(final Plains1 card) { + super(card); + } + + @Override + public Plains1 copy() { + return new Plains1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Plains2.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Plains2.java new file mode 100644 index 00000000000..047d41d8f83 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Plains2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains2 extends mage.cards.basiclands.Plains { + + public Plains2(UUID ownerId) { + super(ownerId, 9); + this.expansionSetCode = "EURO"; + } + + public Plains2(final Plains2 card) { + super(card); + } + + @Override + public Plains2 copy() { + return new Plains2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Plains3.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Plains3.java new file mode 100644 index 00000000000..cb07f7f5339 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Plains3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains3 extends mage.cards.basiclands.Plains { + + public Plains3(UUID ownerId) { + super(ownerId, 14); + this.expansionSetCode = "EURO"; + } + + public Plains3(final Plains3 card) { + super(card); + } + + @Override + public Plains3 copy() { + return new Plains3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp1.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp1.java new file mode 100644 index 00000000000..762be05204c --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp1.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp1 extends mage.cards.basiclands.Swamp { + + public Swamp1(UUID ownerId) { + super(ownerId, 5); + this.expansionSetCode = "EURO"; + } + + public Swamp1(final Swamp1 card) { + super(card); + } + + @Override + public Swamp1 copy() { + return new Swamp1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp2.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp2.java new file mode 100644 index 00000000000..aae8e9f6f47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp2 extends mage.cards.basiclands.Swamp { + + public Swamp2(UUID ownerId) { + super(ownerId, 10); + this.expansionSetCode = "EURO"; + } + + public Swamp2(final Swamp2 card) { + super(card); + } + + @Override + public Swamp2 copy() { + return new Swamp2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp3.java b/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp3.java new file mode 100644 index 00000000000..7f390fb1b74 --- /dev/null +++ b/Mage.Sets/src/mage/sets/europeanlandprogram/Swamp3.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.europeanlandprogram; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp3 extends mage.cards.basiclands.Swamp { + + public Swamp3(UUID ownerId) { + super(ownerId, 15); + this.expansionSetCode = "EURO"; + } + + public Swamp3(final Swamp3 card) { + super(card); + } + + @Override + public Swamp3 copy() { + return new Swamp3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/BattlegateMimic.java b/Mage.Sets/src/mage/sets/eventide/BattlegateMimic.java index f109141e065..f531d0c82b0 100644 --- a/Mage.Sets/src/mage/sets/eventide/BattlegateMimic.java +++ b/Mage.Sets/src/mage/sets/eventide/BattlegateMimic.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -47,14 +48,14 @@ import mage.filter.predicate.mageobject.ColorPredicate; * @author jeffwadsworth */ public class BattlegateMimic extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a spell that's both red and white"); - + static { filter.add(new ColorPredicate(ObjectColor.RED)); filter.add(new ColorPredicate(ObjectColor.WHITE)); } - + private String rule = "Whenever you cast a spell that's both red and white, {this} has base power and toughness 4/2 and gains first strike until end of turn."; public BattlegateMimic(UUID ownerId) { @@ -66,10 +67,10 @@ public class BattlegateMimic extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a spell that's both red and white, Battlegate Mimic has base power and toughness 4/2 and gains first strike until end of turn. - Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(4, 2, Duration.EndOfTurn), filter, false, rule); + Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(4, 2, Duration.EndOfTurn, SubLayer.SetPT_7b), filter, false, rule); ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, false, true)); this.addAbility(ability); - + } public BattlegateMimic(final BattlegateMimic card) { diff --git a/Mage.Sets/src/mage/sets/eventide/BloomTender.java b/Mage.Sets/src/mage/sets/eventide/BloomTender.java index f4544ddc232..ecadab68f71 100644 --- a/Mage.Sets/src/mage/sets/eventide/BloomTender.java +++ b/Mage.Sets/src/mage/sets/eventide/BloomTender.java @@ -107,19 +107,19 @@ class BloomTenderEffect extends ManaEffect { Mana mana = new Mana(); for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { if (mana.getBlack() == 0 && permanent.getColor(game).isBlack()) { - mana.addBlack(); + mana.increaseBlack(); } if (mana.getBlue() == 0 && permanent.getColor(game).isBlue()) { - mana.addBlue(); + mana.increaseBlue(); } if (mana.getRed() == 0 && permanent.getColor(game).isRed()) { - mana.addRed(); + mana.increaseRed(); } if (mana.getGreen() == 0 && permanent.getColor(game).isGreen()) { - mana.addGreen(); + mana.increaseGreen(); } if (mana.getWhite() == 0 && permanent.getColor(game).isWhite()) { - mana.addWhite(); + mana.increaseWhite(); } } return mana; diff --git a/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java b/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java index 79141ba5cc4..9d6f8aa0df9 100644 --- a/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java +++ b/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java @@ -27,32 +27,28 @@ */ package mage.sets.eventide; -import java.util.HashSet; -import java.util.Set; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.condition.Condition; +import mage.abilities.condition.common.OpponentControlsPermanentCondition; +import mage.abilities.costs.Cost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.effects.Effect; +import mage.abilities.effects.Effects; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.EffectType; import mage.constants.Rarity; -import mage.constants.WatcherScope; 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.stack.StackAbility; -import mage.game.stack.StackObject; -import mage.watchers.Watcher; /** * @@ -61,7 +57,11 @@ import mage.watchers.Watcher; */ public class GroundlingPouncer extends CardImpl { - private String rule = "{this} gets +1/+3 and gains flying until end of turn. Activate this ability only once each turn and only if an opponent controls a creature with flying."; + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } public GroundlingPouncer(UUID ownerId) { super(ownerId, 154, "Groundling Pouncer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G/U}"); @@ -72,12 +72,14 @@ public class GroundlingPouncer extends CardImpl { this.toughness = new MageInt(1); // {GU}: Groundling Pouncer gets +1/+3 and gains flying until end of turn. Activate this ability only once each turn and only if an opponent controls a creature with flying. - Condition condition = new GroundingPouncerCondition(); - Effect effect = new BoostSourceEffect(1, 3, Duration.EndOfTurn); - Effect effect2 = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, false, true); - Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{G/U}"), condition, rule); - ability.addEffect(effect2); - this.addAbility(ability, new ActivatedAbilityUsedThisTurnWatcher()); + Ability ability = new GroundlingPouncerAbility( + Zone.BATTLEFIELD, + new BoostSourceEffect(1, 3, Duration.EndOfTurn), + new ManaCostsImpl("{G/U}"), + new OpponentControlsPermanentCondition(filter), + "{G/U}: {this} gets +1/+3 and gains flying until end of turn. Activate this ability only once each turn and only if an opponent controls a creature with flying."); + ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, false, true)); + this.addAbility(ability); } @@ -91,69 +93,48 @@ public class GroundlingPouncer extends CardImpl { } } -class GroundingPouncerCondition implements Condition { +class GroundlingPouncerAbility extends LimitedTimesPerTurnActivatedAbility { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + private static final Effects emptyEffects = new Effects(); - static { - filter.add(new AbilityPredicate(FlyingAbility.class)); + private final Condition condition; + private final String ruleText; + + public GroundlingPouncerAbility(Zone zone, Effect effect, Cost cost, Condition condition, String rule) { + super(zone, effect, cost); + this.condition = condition; + this.ruleText = rule; + } + + public GroundlingPouncerAbility(GroundlingPouncerAbility ability) { + super(ability); + this.condition = ability.condition; + this.ruleText = ability.ruleText; } @Override - public boolean apply(Game game, Ability source) { - ActivatedAbilityUsedThisTurnWatcher watcher = (ActivatedAbilityUsedThisTurnWatcher) game.getState().getWatchers().get("ActivatedAbilityUsedThisTurn"); - for (UUID opponentId : game.getOpponents(source.getControllerId())) { - if (game.getBattlefield().countAll(filter, opponentId, game) > 0 && !watcher.getActivatedThisTurn().contains(source.getSourceId())) { - return true; - } + public Effects getEffects(Game game, EffectType effectType) { + if (!condition.apply(game, this)) { + return emptyEffects; } - return false; + return super.getEffects(game, effectType); } @Override - public String toString() { - return "once each turn and only if an opponent controls a flying creature"; - } -} - -class ActivatedAbilityUsedThisTurnWatcher extends Watcher { - - public Set activatedThisTurn = new HashSet<>(); - - public ActivatedAbilityUsedThisTurnWatcher() { - super("ActivatedAbilityUsedThisTurn", WatcherScope.GAME); - } - - public ActivatedAbilityUsedThisTurnWatcher(final ActivatedAbilityUsedThisTurnWatcher watcher) { - super(watcher); - this.activatedThisTurn.addAll(watcher.activatedThisTurn); - } - - @Override - public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) { - StackObject stackObject = game.getStack().getStackObject(event.getTargetId()); - if (stackObject != null) { - StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getTargetId()); - if (stackAbility != null && stackAbility.getAbilityType() == AbilityType.ACTIVATED) { - this.activatedThisTurn.add(stackAbility.getOriginalId()); - } - } - } - } - - public Set getActivatedThisTurn() { - return this.activatedThisTurn; - } - - @Override - public ActivatedAbilityUsedThisTurnWatcher copy() { - return new ActivatedAbilityUsedThisTurnWatcher(this); - } - - @Override - public void reset() { - super.reset(); - this.activatedThisTurn.clear(); + 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); + } + + @Override + public String getRule() { + return ruleText; } } diff --git a/Mage.Sets/src/mage/sets/eventide/ImpelledGiant.java b/Mage.Sets/src/mage/sets/eventide/ImpelledGiant.java index 7c10d02f4d6..ceb04da2360 100644 --- a/Mage.Sets/src/mage/sets/eventide/ImpelledGiant.java +++ b/Mage.Sets/src/mage/sets/eventide/ImpelledGiant.java @@ -154,13 +154,10 @@ class ImpelledGiantBoostEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Permanent impelledGiant = game.getPermanent(source.getSourceId()); - Permanent tappedCreature = game.getPermanent(this.targetPointer.getFirst(game, source)); - if (tappedCreature == null) { - tappedCreature = (Permanent) game.getLastKnownInformation(this.targetPointer.getFirst(game, source), Zone.BATTLEFIELD); - } + Permanent tappedCreature = game.getPermanentOrLKIBattlefield(this.targetPointer.getFirst(game, source)); if (tappedCreature != null && impelledGiant != null) { int amount = tappedCreature.getPower().getValue(); - impelledGiant.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, 0, Duration.EndOfTurn)), source.getSourceId(), game); + game.addEffect(new BoostSourceEffect(amount, 0, Duration.EndOfTurn), source); } return true; } diff --git a/Mage.Sets/src/mage/sets/eventide/NightskyMimic.java b/Mage.Sets/src/mage/sets/eventide/NightskyMimic.java index 195ba1f3771..4bb385b9af1 100644 --- a/Mage.Sets/src/mage/sets/eventide/NightskyMimic.java +++ b/Mage.Sets/src/mage/sets/eventide/NightskyMimic.java @@ -39,18 +39,19 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author jeffwadsworth - + * */ public class NightskyMimic extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a spell that's both black and green"); - + static { filter.add(new ColorPredicate(ObjectColor.WHITE)); filter.add(new ColorPredicate(ObjectColor.BLACK)); @@ -69,7 +70,7 @@ public class NightskyMimic extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a spell that's both white and black, Nightsky Mimic has base power and toughness 4/4 until end of turn and gains flying until end of turn. - Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(4, 4, Duration.EndOfTurn), filter, false, rule); + Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(4, 4, Duration.EndOfTurn, SubLayer.SetPT_7b), filter, false, rule); ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, false, true)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/eventide/RiverfallMimic.java b/Mage.Sets/src/mage/sets/eventide/RiverfallMimic.java index 43def6c29ad..e3c6f650e7c 100644 --- a/Mage.Sets/src/mage/sets/eventide/RiverfallMimic.java +++ b/Mage.Sets/src/mage/sets/eventide/RiverfallMimic.java @@ -39,23 +39,24 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author jeffwadsworth - + * */ public class RiverfallMimic extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a spell that's both blue and red"); - + static { filter.add(new ColorPredicate(ObjectColor.BLUE)); filter.add(new ColorPredicate(ObjectColor.RED)); } - + private String rule = "Whenever you cast a spell that's both blue and red, {this} has base power and toughness 3/3 until end of turn and can't be blocked this turn."; public RiverfallMimic(UUID ownerId) { @@ -69,7 +70,7 @@ public class RiverfallMimic extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a spell that's both blue and red, Riverfall Mimic has base power and toughness 3/3 until end of turn and can't be blocked this turn. - Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(3, 3, Duration.EndOfTurn), filter, false, rule); + Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(3, 3, Duration.EndOfTurn, SubLayer.SetPT_7b), filter, false, rule); ability.addEffect(new GainAbilitySourceEffect(new CantBeBlockedSourceAbility(), Duration.EndOfTurn, false, true)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java b/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java index d91784affe7..1d7f50f456c 100644 --- a/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java +++ b/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java @@ -29,6 +29,7 @@ package mage.sets.eventide; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -80,11 +81,9 @@ public class SaplingOfColfenor extends CardImpl { } class SaplingOfColfenorEffect extends OneShotEffect { - - Cards cards = new CardsImpl(); public SaplingOfColfenorEffect() { - super(Outcome.GainLife); + super(Outcome.Benefit); this.staticText = "reveal the top card of your library. If it's a creature card, you gain life equal to that card's toughness, lose life equal to its power, then put it into your hand"; } @@ -99,17 +98,21 @@ class SaplingOfColfenorEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player you = game.getPlayer(source.getControllerId()); - if (you != null && you.getLibrary().size() > 0) { - Card card = you.getLibrary().removeFromTop(game); - cards.add(card); - you.revealCards("Sapling of Colfenor", cards, game); - if (card.getCardType().contains(CardType.CREATURE)) { - you.gainLife(card.getToughness().getValue(), game); - you.loseLife(card.getPower().getValue(), game); - return card.moveToZone(Zone.HAND, source.getSourceId(), game, false); + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + if (controller.getLibrary().size() > 0) { + Card card = controller.getLibrary().getFromTop(game); + Cards cards = new CardsImpl(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.getCardType().contains(CardType.CREATURE)) { + controller.gainLife(card.getToughness().getValue(), game); + controller.loseLife(card.getPower().getValue(), game); + return controller.moveCards(cards.getCards(game), Zone.HAND, source, game); + } } + return true; } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/eventide/ShorecrasherMimic.java b/Mage.Sets/src/mage/sets/eventide/ShorecrasherMimic.java index c4850c75cf4..41711f60d12 100644 --- a/Mage.Sets/src/mage/sets/eventide/ShorecrasherMimic.java +++ b/Mage.Sets/src/mage/sets/eventide/ShorecrasherMimic.java @@ -39,18 +39,19 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author jeffwadsworth - + * */ public class ShorecrasherMimic extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a spell that's both green and blue"); - + static { filter.add(new ColorPredicate(ObjectColor.GREEN)); filter.add(new ColorPredicate(ObjectColor.BLUE)); @@ -69,10 +70,10 @@ public class ShorecrasherMimic extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a spell that's both green and blue, Shorecrasher Mimic has base power and toughness 5/3 until end of turn and gains trample until end of turn. - Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(5, 3, Duration.EndOfTurn), filter, false, rule); + Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(5, 3, Duration.EndOfTurn, SubLayer.SetPT_7b), filter, false, rule); ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, false, true)); this.addAbility(ability); - + } public ShorecrasherMimic(final ShorecrasherMimic card) { diff --git a/Mage.Sets/src/mage/sets/eventide/WoodlurkerMimic.java b/Mage.Sets/src/mage/sets/eventide/WoodlurkerMimic.java index 59bf022dde0..92a514ea7aa 100644 --- a/Mage.Sets/src/mage/sets/eventide/WoodlurkerMimic.java +++ b/Mage.Sets/src/mage/sets/eventide/WoodlurkerMimic.java @@ -39,25 +39,26 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author jeffwadsworth - + * */ public class WoodlurkerMimic extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a spell that's both black and green"); - + static { filter.add(new ColorPredicate(ObjectColor.BLACK)); filter.add(new ColorPredicate(ObjectColor.GREEN)); } private String rule = "Whenever you cast a spell that's both black and green, {this} has base power and toughness 4/5 until end of turn and gains wither until end of turn."; - + public WoodlurkerMimic(UUID ownerId) { super(ownerId, 130, "Woodlurker Mimic", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B/G}"); this.expansionSetCode = "EVE"; @@ -69,10 +70,10 @@ public class WoodlurkerMimic extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a spell that's both black and green, Woodlurker Mimic has base power and toughness 4/5 until end of turn and gains wither until end of turn. - Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(4, 5, Duration.EndOfTurn), filter, false, rule); + Ability ability = new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(4, 5, Duration.EndOfTurn, SubLayer.SetPT_7b), filter, false, rule); ability.addEffect(new GainAbilitySourceEffect(WitherAbility.getInstance(), Duration.EndOfTurn, false, true)); this.addAbility(ability); - + } public WoodlurkerMimic(final WoodlurkerMimic card) { diff --git a/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java b/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java index b2e6ebf7cca..acbe6da3679 100644 --- a/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java +++ b/Mage.Sets/src/mage/sets/exodus/EntropicSpecter.java @@ -44,6 +44,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -70,7 +71,7 @@ public class EntropicSpecter extends CardImpl { this.addAbility(new AsEntersBattlefieldAbility(new ChooseOpponentEffect(Outcome.Detriment))); // Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInTargetPlayerHandCount(), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInTargetPlayerHandCount(), Duration.WhileOnBattlefield, SubLayer.SetPT_7b))); // Whenever Entropic Specter deals damage to a player, that player discards a card. this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1, false), false, true)); diff --git a/Mage.Sets/src/mage/sets/exodus/OathOfDruids.java b/Mage.Sets/src/mage/sets/exodus/OathOfDruids.java index e613109d666..261c3b9185b 100644 --- a/Mage.Sets/src/mage/sets/exodus/OathOfDruids.java +++ b/Mage.Sets/src/mage/sets/exodus/OathOfDruids.java @@ -55,6 +55,7 @@ import mage.target.TargetPlayer; */ public class OathOfDruids extends CardImpl { + private final UUID originalId; private static final FilterPlayer filter = new FilterPlayer(); static { @@ -68,12 +69,13 @@ public class OathOfDruids extends CardImpl { // At the beginning of each player's upkeep, that player chooses target player who controls more creatures than he or she does and is his or her opponent. The first player may reveal cards from the top of his or her library until he or she reveals a creature card. If he or she does, that player puts that card onto the battlefield and all other cards revealed this way into his or her graveyard. Ability ability = new BeginningOfUpkeepTriggeredAbility(new OathOfDruidsEffect(), TargetController.ANY, true); ability.addTarget(new TargetPlayer(1, 1, false, filter)); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof BeginningOfUpkeepTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { Player activePlayer = game.getPlayer(game.getActivePlayerId()); if (activePlayer != null) { ability.setControllerId(activePlayer.getId()); @@ -86,6 +88,7 @@ public class OathOfDruids extends CardImpl { public OathOfDruids(final OathOfDruids card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/exodus/OathOfLieges.java b/Mage.Sets/src/mage/sets/exodus/OathOfLieges.java index ad31783661b..6a2c3279357 100644 --- a/Mage.Sets/src/mage/sets/exodus/OathOfLieges.java +++ b/Mage.Sets/src/mage/sets/exodus/OathOfLieges.java @@ -54,6 +54,7 @@ import mage.target.targetpointer.FixedTarget; */ public class OathOfLieges extends CardImpl { + private final UUID originalId; private static final FilterPlayer filter = new FilterPlayer("player who controls more lands than you do and is his your opponent"); static { @@ -69,16 +70,18 @@ public class OathOfLieges extends CardImpl { effect.setText("that player chooses target player who controls more lands than he or she does and is his or her opponent. The first player may search his or her library for a basic land card, put that card onto the battlefield, then shuffle his or her library"); Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, true); ability.addTarget(new TargetPlayer(1, 1, false, filter)); + originalId = ability.getOriginalId(); this.addAbility(ability); } public OathOfLieges(final OathOfLieges card) { super(card); + this.originalId = card.originalId; } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof BeginningOfUpkeepTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { Player activePlayer = game.getPlayer(game.getActivePlayerId()); if (activePlayer != null) { ability.getTargets().clear(); diff --git a/Mage.Sets/src/mage/sets/exodus/PlatedRootwalla.java b/Mage.Sets/src/mage/sets/exodus/PlatedRootwalla.java new file mode 100644 index 00000000000..2307b7a7672 --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/PlatedRootwalla.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.sets.exodus; + +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author nigelzor + */ +public class PlatedRootwalla extends CardImpl { + + public PlatedRootwalla(UUID ownerId) { + super(ownerId, 116, "Plated Rootwalla", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "EXO"; + this.subtype.add("Lizard"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}{G}: Plated Rootwalla gets +3/+3 until end of turn. Activate this ability only once each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.EndOfTurn), new ManaCostsImpl("{2}{G}"))); + } + + public PlatedRootwalla(final PlatedRootwalla card) { + super(card); + } + + @Override + public PlatedRootwalla copy() { + return new PlatedRootwalla(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/BottomlessVault.java b/Mage.Sets/src/mage/sets/fallenempires/BottomlessVault.java index 277cc93571a..fc48a9218f0 100644 --- a/Mage.Sets/src/mage/sets/fallenempires/BottomlessVault.java +++ b/Mage.Sets/src/mage/sets/fallenempires/BottomlessVault.java @@ -70,7 +70,7 @@ public class BottomlessVault extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); // {tap}, Remove any number of storage counters from Bottomless Vault: Add {B} to your mana pool for each storage counter removed this way. Ability ability = new DynamicManaAbility( - Mana.BlackMana, + Mana.BlackMana(1), new RemovedCountersForCostValue(), new TapSourceCost(), "Add {B} to your mana pool for each storage counter removed this way", diff --git a/Mage.Sets/src/mage/sets/fallenempires/HollowTrees.java b/Mage.Sets/src/mage/sets/fallenempires/HollowTrees.java index 9253c1fc4f3..390760d261d 100644 --- a/Mage.Sets/src/mage/sets/fallenempires/HollowTrees.java +++ b/Mage.Sets/src/mage/sets/fallenempires/HollowTrees.java @@ -70,7 +70,7 @@ public class HollowTrees extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); // {tap}, Remove any number of storage counters from Hollow Trees: Add {G} to your mana pool for each storage counter removed this way. Ability ability = new DynamicManaAbility( - Mana.GreenMana, + Mana.GreenMana(1), new RemovedCountersForCostValue(), new TapSourceCost(), "Add {G} to your mana pool for each storage counter removed this way", diff --git a/Mage.Sets/src/mage/sets/fallenempires/IcatianJavelineers3.java b/Mage.Sets/src/mage/sets/fallenempires/IcatianJavelineers3.java index 85649357295..bd805f28bfe 100644 --- a/Mage.Sets/src/mage/sets/fallenempires/IcatianJavelineers3.java +++ b/Mage.Sets/src/mage/sets/fallenempires/IcatianJavelineers3.java @@ -25,7 +25,7 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ -package mage.sets.timeshifted; +package mage.sets.fallenempires; import java.util.UUID; import mage.constants.Rarity; diff --git a/Mage.Sets/src/mage/sets/fallenempires/IcatianLieutenant.java b/Mage.Sets/src/mage/sets/fallenempires/IcatianLieutenant.java new file mode 100644 index 00000000000..edb92cc6d97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/IcatianLieutenant.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.sets.fallenempires; + +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.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class IcatianLieutenant extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature"); + + static { + filter.add(new SubtypePredicate("Soldier")); + } + + public IcatianLieutenant(UUID ownerId) { + super(ownerId, 151, "Icatian Lieutenant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{W}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {1}{W}: Target Soldier creature gets +1/+0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public IcatianLieutenant(final IcatianLieutenant card) { + super(card); + } + + @Override + public IcatianLieutenant copy() { + return new IcatianLieutenant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/IcatianStore.java b/Mage.Sets/src/mage/sets/fallenempires/IcatianStore.java index 0fbec1161d9..7c055985dfc 100644 --- a/Mage.Sets/src/mage/sets/fallenempires/IcatianStore.java +++ b/Mage.Sets/src/mage/sets/fallenempires/IcatianStore.java @@ -70,7 +70,7 @@ public class IcatianStore extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); // {tap}, Remove any number of storage counters from Icatian Store: Add {W} to your mana pool for each storage counter removed this way. Ability ability = new DynamicManaAbility( - Mana.WhiteMana, + Mana.WhiteMana(1), new RemovedCountersForCostValue(), new TapSourceCost(), "Add {W} to your mana pool for each storage counter removed this way", diff --git a/Mage.Sets/src/mage/sets/fallenempires/NightSoil2.java b/Mage.Sets/src/mage/sets/fallenempires/NightSoil2.java index 09706ba97b5..b691888fe0a 100644 --- a/Mage.Sets/src/mage/sets/fallenempires/NightSoil2.java +++ b/Mage.Sets/src/mage/sets/fallenempires/NightSoil2.java @@ -25,7 +25,7 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ -package mage.sets.masterseditionii; +package mage.sets.fallenempires; import java.util.UUID; import mage.constants.Rarity; diff --git a/Mage.Sets/src/mage/sets/fallenempires/NightSoil3.java b/Mage.Sets/src/mage/sets/fallenempires/NightSoil3.java index 7289331f5f6..0acc86c5305 100644 --- a/Mage.Sets/src/mage/sets/fallenempires/NightSoil3.java +++ b/Mage.Sets/src/mage/sets/fallenempires/NightSoil3.java @@ -25,7 +25,7 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ -package mage.sets.masterseditionii; +package mage.sets.fallenempires; import java.util.UUID; import mage.constants.Rarity; diff --git a/Mage.Sets/src/mage/sets/fallenempires/OrcishCaptain.java b/Mage.Sets/src/mage/sets/fallenempires/OrcishCaptain.java new file mode 100644 index 00000000000..ebc21104e32 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/OrcishCaptain.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.sets.fallenempires; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrcishCaptain extends mage.sets.masterseditionii.OrcishCaptain { + + public OrcishCaptain(UUID ownerId) { + super(ownerId); + this.cardNumber = 123; + this.expansionSetCode = "FEM"; + } + + public OrcishCaptain(final OrcishCaptain card) { + super(card); + } + + @Override + public OrcishCaptain copy() { + return new OrcishCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/AleshaWhoSmilesAtDeath.java b/Mage.Sets/src/mage/sets/fatereforged/AleshaWhoSmilesAtDeath.java index 48380d0e00c..512e63ad699 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/AleshaWhoSmilesAtDeath.java +++ b/Mage.Sets/src/mage/sets/fatereforged/AleshaWhoSmilesAtDeath.java @@ -45,7 +45,6 @@ import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; @@ -72,11 +71,11 @@ public class AleshaWhoSmilesAtDeath extends CardImpl { // First strike this.addAbility(FirstStrikeAbility.getInstance()); - + // Whenever Alesha, Who Smiles at Death attacks, you may pay {W/B}{W/B}. If you do, return target creature card with power 2 or less from your graveyard to the battlefield tapped and attacking. Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new AleshaWhoSmilesAtDeathEffect(), new ManaCostsImpl("{W/B}{W/B}")), false); ability.addTarget(new TargetCardInYourGraveyard(filter)); - this.addAbility(ability); + this.addAbility(ability); } public AleshaWhoSmilesAtDeath(final AleshaWhoSmilesAtDeath card) { @@ -107,9 +106,8 @@ class AleshaWhoSmilesAtDeathEffect extends OneShotEffect { if (controller != null) { Card card = game.getCard(getTargetPointer().getFirst(game, source)); if (card != null) { - if (card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId(), true)) { - Permanent permanent = game.getPermanent(card.getId()); - game.getCombat().addAttackingCreature(permanent.getId(), game); + if (controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null)) { + game.getCombat().addAttackingCreature(card.getId(), game); } } return true; diff --git a/Mage.Sets/src/mage/sets/fatereforged/Dragonrage.java b/Mage.Sets/src/mage/sets/fatereforged/Dragonrage.java index 02d35bfe770..371905e0481 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/Dragonrage.java +++ b/Mage.Sets/src/mage/sets/fatereforged/Dragonrage.java @@ -63,7 +63,7 @@ public class Dragonrage extends CardImpl { this.expansionSetCode = "FRF"; // Add {R} to your mana pool for each attacking creature you control. - this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana, + this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), new PermanentsOnBattlefieldCount(filter))); // Until end of turn, attacking creatures you control gain "{R}: This creature gets +1/+0 until end of turn." diff --git a/Mage.Sets/src/mage/sets/fatereforged/HewedStoneRetainers.java b/Mage.Sets/src/mage/sets/fatereforged/HewedStoneRetainers.java index 4a9df6b2789..8d2e26b6d03 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/HewedStoneRetainers.java +++ b/Mage.Sets/src/mage/sets/fatereforged/HewedStoneRetainers.java @@ -29,18 +29,12 @@ package mage.sets.fatereforged; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.ruleModifying.CastOnlyIfYouHaveCastAnotherSpellEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.watchers.common.CastSpellLastTurnWatcher; /** * @@ -56,7 +50,7 @@ public class HewedStoneRetainers extends CardImpl { this.toughness = new MageInt(4); // Cast Hewed Stone Retainers only if you've cast another spell this turn. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new HewedStoneRetainersEffect())); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastOnlyIfYouHaveCastAnotherSpellEffect())); } public HewedStoneRetainers(final HewedStoneRetainers card) { @@ -69,40 +63,3 @@ public class HewedStoneRetainers extends CardImpl { } } -class HewedStoneRetainersEffect extends ContinuousRuleModifyingEffectImpl { - HewedStoneRetainersEffect() { - super(Duration.EndOfGame, Outcome.Detriment); - staticText = "Cast {this} only if you've cast another spell this turn"; - } - - HewedStoneRetainersEffect(final HewedStoneRetainersEffect effect) { - super(effect); - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.CAST_SPELL; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getSourceId().equals(source.getSourceId())) { - CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher"); - if (watcher != null && watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId()) == 0) { - return true; - } - } - return false; - - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public HewedStoneRetainersEffect copy() { - return new HewedStoneRetainersEffect(this); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/fifthdawn/DawnsReflection.java b/Mage.Sets/src/mage/sets/fifthdawn/DawnsReflection.java index 417381b270e..697e71390f0 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/DawnsReflection.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/DawnsReflection.java @@ -108,7 +108,7 @@ class DawnsReflectionTriggeredAbility extends TriggeredManaAbility { @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)."; + 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)."; } } @@ -142,15 +142,15 @@ class DawnsReflectionManaEffect extends ManaEffect { } if (choiceColor.getColor().isBlack()) { - mana.addBlack(); + mana.increaseBlack(); } else if (choiceColor.getColor().isBlue()) { - mana.addBlue(); + mana.increaseBlue(); } else if (choiceColor.getColor().isRed()) { - mana.addRed(); + mana.increaseRed(); } else if (choiceColor.getColor().isGreen()) { - mana.addGreen(); + mana.increaseGreen(); } else if (choiceColor.getColor().isWhite()) { - mana.addWhite(); + mana.increaseWhite(); } } diff --git a/Mage.Sets/src/mage/sets/fifthdawn/Ferropede.java b/Mage.Sets/src/mage/sets/fifthdawn/Ferropede.java new file mode 100644 index 00000000000..f680e10eea1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/Ferropede.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.sets.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class Ferropede extends CardImpl { + + public Ferropede(UUID ownerId) { + super(ownerId, 122, "Ferropede", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Insect"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Ferropede is unblockable. + this.addAbility(new CantBeBlockedSourceAbility()); + // Whenever Ferropede deals combat damage to a player, you may remove a counter from target permanent. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new RemoveCounterTargetEffect(), true); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public Ferropede(final Ferropede card) { + super(card); + } + + @Override + public Ferropede copy() { + return new Ferropede(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/FoldIntoAEther.java b/Mage.Sets/src/mage/sets/fifthdawn/FoldIntoAEther.java index 7ddcccce951..c9022050cad 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/FoldIntoAEther.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/FoldIntoAEther.java @@ -28,14 +28,14 @@ package mage.sets.fifthdawn; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.game.stack.StackObject; @@ -53,7 +53,6 @@ public class FoldIntoAEther extends CardImpl { super(ownerId, 31, "Fold into AEther", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); this.expansionSetCode = "5DN"; - // Counter target spell. If that spell is countered this way, its controller may put a creature card from his or her hand onto the battlefield. this.getSpellAbility().addEffect(new FoldIntoAEtherEffect()); this.getSpellAbility().addTarget(new TargetSpell()); @@ -87,19 +86,21 @@ class FoldIntoAEtherEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget()); - Player player = null; + UUID targetId = getTargetPointer().getFirst(game, source); + StackObject stackObject = game.getStack().getStackObject(targetId); + Player spellController = null; if (stackObject != null) { - player = game.getPlayer(stackObject.getControllerId()); + spellController = game.getPlayer(stackObject.getControllerId()); } - if (game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game)) { + if (game.getStack().counter(targetId, source.getSourceId(), game)) { TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard()); - if (player != null - && player.chooseUse(Outcome.Neutral, "Put a creature card from your hand in play?", source, game) - && player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { + if (spellController != null + && target.canChoose(source.getSourceId(), source.getSourceId(), game) + && spellController.chooseUse(Outcome.Neutral, "Put a creature card from your hand in play?", source, game) + && spellController.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { - card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), player.getId()); + spellController.moveCards(card, Zone.BATTLEFIELD, source, game); } } return true; diff --git a/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.java b/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.java index 40ae18645a0..1192c0ff152 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.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.sets.fifthdawn; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.Condition; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.keyword.EquipAbility; -import mage.abilities.keyword.FirstStrikeAbility; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.filter.predicate.mageobject.NamePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.permanent.token.Token; - -/** - * - * @author LevelX2 - */ -public class HelmOfKaldra extends CardImpl { - - public static final FilterControlledArtifactPermanent filterHelm = new FilterControlledArtifactPermanent(); - public static final FilterControlledArtifactPermanent filterShield = new FilterControlledArtifactPermanent(); - public static final FilterControlledArtifactPermanent filterSword = new FilterControlledArtifactPermanent(); - - static { - filterHelm.add(new NamePredicate("Helm of Kaldra")); - filterShield.add(new NamePredicate("Shield of Kaldra")); - filterSword.add(new NamePredicate("Sword of Kaldra")); - } - - public HelmOfKaldra(UUID ownerId) { - super(ownerId, 131, "Helm of Kaldra", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.expansionSetCode = "5DN"; - this.supertype.add("Legendary"); - this.subtype.add("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"); - ability.addEffect(effect); - effect = new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT); - effect.setText("and haste"); - ability.addEffect(effect); - this.addAbility(ability); - // {1}: If you control Equipment named Helm of Kaldra, Sword of Kaldra, and Shield of Kaldra, put a legendary 4/4 colorless Avatar creature token named Kaldra onto the battlefield and attach those Equipment to it. - this.addAbility(new ConditionalActivatedAbility( - Zone.BATTLEFIELD, - new HelmOfKaldraEffect(), - new GenericManaCost(1), - new HelmOfKaldraCondition(), - "{1}: If you control Equipment named Helm of Kaldra, Sword of Kaldra, and Shield of Kaldra, put a legendary 4/4 colorless Avatar creature token named Kaldra onto the battlefield and attach those Equipment to it")); - // Equip {2} - this.addAbility(new EquipAbility(Outcome.Benefit, new ManaCostsImpl("{2}"))); - } - - public HelmOfKaldra(final HelmOfKaldra card) { - super(card); - } - - @Override - public HelmOfKaldra copy() { - return new HelmOfKaldra(this); - } -} - -class HelmOfKaldraCondition implements Condition { - - @Override - public boolean apply(Game game, Ability source) { - if (game.getBattlefield().count(HelmOfKaldra.filterHelm, source.getSourceId(), source.getControllerId(), game) < 1) { - return false; - } - if (game.getBattlefield().count(HelmOfKaldra.filterShield, source.getSourceId(), source.getControllerId(), game) < 1) { - return false; - } - return game.getBattlefield().count(HelmOfKaldra.filterShield, source.getSourceId(), source.getControllerId(), game) >= 1; - } - -} - -class HelmOfKaldraEffect extends OneShotEffect { - - public HelmOfKaldraEffect() { - super(Outcome.Benefit); - this.staticText = "If you control Equipment named Helm of Kaldra, Sword of Kaldra, and Shield of Kaldra, put a legendary 4/4 colorless Avatar creature token named Kaldra onto the battlefield and attach those Equipment to it"; - } - - public HelmOfKaldraEffect(final HelmOfKaldraEffect effect) { - super(effect); - } - - @Override - public HelmOfKaldraEffect copy() { - return new HelmOfKaldraEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - if (new HelmOfKaldraCondition().apply(game, source)) { - CreateTokenEffect effect = new CreateTokenEffect(new KaldraToken()); - effect.apply(game, source); - for (UUID tokenId : effect.getLastAddedTokenIds()) { - Permanent kaldra = game.getPermanent(tokenId); - if (kaldra != null) { - // Attach helm to the token - for (Permanent kaldrasHelm : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterHelm, source.getControllerId(), game)) { - kaldra.addAttachment(kaldrasHelm.getId(), game); - break; - } - // Attach shield to the token - for (Permanent kaldrasShield : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterShield, source.getControllerId(), game)) { - kaldra.addAttachment(kaldrasShield.getId(), game); - break; - } - // Attach sword to the token - for (Permanent kaldrasSword : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterSword, source.getControllerId(), game)) { - kaldra.addAttachment(kaldrasSword.getId(), game); - break; - } - - } - return true; - } - } - return false; - } -} - -class KaldraToken extends Token { - - public KaldraToken() { - super("Kaldra", "legendary 4/4 colorless Avatar creature token named Kaldra"); - supertype.add("Legendary"); - cardType.add(CardType.CREATURE); - subtype.add("Avatar"); - 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.sets.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; + +/** + * + * @author LevelX2 + */ +public class HelmOfKaldra extends CardImpl { + + public static final FilterControlledArtifactPermanent filterHelm = new FilterControlledArtifactPermanent(); + public static final FilterControlledArtifactPermanent filterShield = new FilterControlledArtifactPermanent(); + public static final FilterControlledArtifactPermanent filterSword = new FilterControlledArtifactPermanent(); + + static { + filterHelm.add(new NamePredicate("Helm of Kaldra")); + filterShield.add(new NamePredicate("Shield of Kaldra")); + filterSword.add(new NamePredicate("Sword of Kaldra")); + } + + public HelmOfKaldra(UUID ownerId) { + super(ownerId, 131, "Helm of Kaldra", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "5DN"; + this.supertype.add("Legendary"); + this.subtype.add("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"); + ability.addEffect(effect); + effect = new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT); + effect.setText("and haste"); + ability.addEffect(effect); + this.addAbility(ability); + // {1}: If you control Equipment named Helm of Kaldra, Sword of Kaldra, and Shield of Kaldra, put a legendary 4/4 colorless Avatar creature token named Kaldra onto the battlefield and attach those Equipment to it. + this.addAbility(new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new HelmOfKaldraEffect(), + new GenericManaCost(1), + new HelmOfKaldraCondition(), + "{1}: If you control Equipment named Helm of Kaldra, Sword of Kaldra, and Shield of Kaldra, put a legendary 4/4 colorless Avatar creature token named Kaldra onto the battlefield and attach those Equipment to it")); + // Equip {2} + this.addAbility(new EquipAbility(Outcome.Benefit, new ManaCostsImpl("{2}"))); + } + + public HelmOfKaldra(final HelmOfKaldra card) { + super(card); + } + + @Override + public HelmOfKaldra copy() { + return new HelmOfKaldra(this); + } +} + +class HelmOfKaldraCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + if (game.getBattlefield().count(HelmOfKaldra.filterHelm, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(HelmOfKaldra.filterSword, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + return game.getBattlefield().count(HelmOfKaldra.filterShield, source.getSourceId(), source.getControllerId(), game) >= 1; + } + +} + +class HelmOfKaldraEffect extends OneShotEffect { + + public HelmOfKaldraEffect() { + super(Outcome.Benefit); + this.staticText = "If you control Equipment named Helm of Kaldra, Sword of Kaldra, and Shield of Kaldra, put a legendary 4/4 colorless Avatar creature token named Kaldra onto the battlefield and attach those Equipment to it"; + } + + public HelmOfKaldraEffect(final HelmOfKaldraEffect effect) { + super(effect); + } + + @Override + public HelmOfKaldraEffect copy() { + return new HelmOfKaldraEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (new HelmOfKaldraCondition().apply(game, source)) { + CreateTokenEffect effect = new CreateTokenEffect(new KaldraToken()); + effect.apply(game, source); + for (UUID tokenId : effect.getLastAddedTokenIds()) { + Permanent kaldra = game.getPermanent(tokenId); + if (kaldra != null) { + // Attach helm to the token + for (Permanent kaldrasHelm : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterHelm, source.getControllerId(), game)) { + kaldra.addAttachment(kaldrasHelm.getId(), game); + break; + } + // Attach shield to the token + for (Permanent kaldrasShield : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterShield, source.getControllerId(), game)) { + kaldra.addAttachment(kaldrasShield.getId(), game); + break; + } + // Attach sword to the token + for (Permanent kaldrasSword : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterSword, source.getControllerId(), game)) { + kaldra.addAttachment(kaldrasSword.getId(), game); + break; + } + + } + return true; + } + } + return false; + } +} + +class KaldraToken extends Token { + + public KaldraToken() { + super("Kaldra", "legendary 4/4 colorless Avatar creature token named Kaldra"); + supertype.add("Legendary"); + cardType.add(CardType.CREATURE); + subtype.add("Avatar"); + power = new MageInt(4); + toughness = new MageInt(4); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/LunarAvenger.java b/Mage.Sets/src/mage/sets/fifthdawn/LunarAvenger.java new file mode 100644 index 00000000000..99f441658eb --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/LunarAvenger.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.sets.fifthdawn; + +import java.util.HashSet; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.SunburstAbility; +import mage.cards.CardImpl; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LoneFox + */ +public class LunarAvenger extends CardImpl { + + public LunarAvenger(UUID ownerId) { + super(ownerId, 136, "Lunar Avenger", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Golem"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Sunburst + this.addAbility(new SunburstAbility(this)); + // Remove a +1/+1 counter from Lunar Avenger: Lunar Avenger gains your choice of flying, first strike, or haste until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LunarAvengerEffect(), + new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)))); + } + + public LunarAvenger(final LunarAvenger card) { + super(card); + } + + @Override + public LunarAvenger copy() { + return new LunarAvenger(this); + } +} + + +class LunarAvengerEffect extends OneShotEffect { + + private static final HashSet choices = new HashSet<>(); + + static { + choices.add("Flying"); + choices.add("First Strike"); + choices.add("Haste"); + } + + public LunarAvengerEffect() { + super(Outcome.AddAbility); + staticText = "{this} gains your choice of flying, first strike, or haste until end of turn"; + } + + public LunarAvengerEffect(final LunarAvengerEffect effect) { + super(effect); + } + + @Override + public LunarAvengerEffect copy() { + return new LunarAvengerEffect(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 ability to add"); + choice.setChoices(choices); + while(!controller.choose(outcome, choice, game)) { + if(controller.canRespond()) { + return false; + } + } + + Ability gainedAbility; + String chosen = choice.getChoice(); + if(chosen.equals("Flying")) { + gainedAbility = FlyingAbility.getInstance(); + } + else if(chosen.equals("First strike")) { + gainedAbility = FirstStrikeAbility.getInstance(); + } + else { + gainedAbility = HasteAbility.getInstance(); + } + + game.addEffect(new GainAbilitySourceEffect(gainedAbility, Duration.EndOfTurn), source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/SpinalParasite.java b/Mage.Sets/src/mage/sets/fifthdawn/SpinalParasite.java new file mode 100644 index 00000000000..c80e6946367 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/SpinalParasite.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.sets.fifthdawn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; +import mage.abilities.keyword.SunburstAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class SpinalParasite extends CardImpl { + + public SpinalParasite(UUID ownerId) { + super(ownerId, 155, "Spinal Parasite", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Insect"); + this.power = new MageInt(-1); + this.toughness = new MageInt(-1); + + // Sunburst + this.addAbility(new SunburstAbility(this)); + // Remove two +1/+1 counters from Spinal Parasite: Remove a counter from target permanent. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RemoveCounterTargetEffect(), + new RemoveCountersSourceCost(CounterType.P1P1.createInstance(2))); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public SpinalParasite(final SpinalParasite card) { + super(card); + } + + @Override + public SpinalParasite copy() { + return new SpinalParasite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/TangleAsp.java b/Mage.Sets/src/mage/sets/fifthdawn/TangleAsp.java index 88d2760e804..1a5e0bb53e0 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/TangleAsp.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/TangleAsp.java @@ -54,8 +54,8 @@ public class TangleAsp extends CardImpl { this.toughness = new MageInt(2); // Whenever Tangle Asp blocks or becomes blocked by a creature, destroy that creature at end of combat. - AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()); - Effect effect = new CreateDelayedTriggeredAbilityEffect(delayedAbility, true); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); effect.setText("destroy that creature at end of combat"); this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(effect, false)); } diff --git a/Mage.Sets/src/mage/sets/fifthedition/ArmorOfFaith.java b/Mage.Sets/src/mage/sets/fifthedition/ArmorOfFaith.java new file mode 100644 index 00000000000..0cbd046b054 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/ArmorOfFaith.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ArmorOfFaith extends mage.sets.masterseditionii.ArmorOfFaith { + + public ArmorOfFaith(UUID ownerId) { + super(ownerId); + this.cardNumber = 284; + this.expansionSetCode = "5ED"; + } + + public ArmorOfFaith(final ArmorOfFaith card) { + super(card); + } + + @Override + public ArmorOfFaith copy() { + return new ArmorOfFaith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/AysenBureaucrats.java b/Mage.Sets/src/mage/sets/fifthedition/AysenBureaucrats.java new file mode 100644 index 00000000000..eb925981947 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/AysenBureaucrats.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AysenBureaucrats extends mage.sets.masterseditionii.AysenBureaucrats { + + public AysenBureaucrats(UUID ownerId) { + super(ownerId); + this.cardNumber = 285; + this.expansionSetCode = "5ED"; + } + + public AysenBureaucrats(final AysenBureaucrats card) { + super(card); + } + + @Override + public AysenBureaucrats copy() { + return new AysenBureaucrats(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/BindingGrasp.java b/Mage.Sets/src/mage/sets/fifthedition/BindingGrasp.java new file mode 100644 index 00000000000..6ac1c2e8f8e --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/BindingGrasp.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BindingGrasp extends mage.sets.masterseditionii.BindingGrasp { + + public BindingGrasp(UUID ownerId) { + super(ownerId); + this.cardNumber = 74; + this.expansionSetCode = "5ED"; + this.rarity = Rarity.UNCOMMON; + } + + public BindingGrasp(final BindingGrasp card) { + super(card); + } + + @Override + public BindingGrasp copy() { + return new BindingGrasp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/CavePeople.java b/Mage.Sets/src/mage/sets/fifthedition/CavePeople.java new file mode 100644 index 00000000000..f5ffa299dc3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/CavePeople.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CavePeople extends mage.sets.thedark.CavePeople { + + public CavePeople(UUID ownerId) { + super(ownerId); + this.cardNumber = 215; + this.expansionSetCode = "5ED"; + } + + public CavePeople(final CavePeople card) { + super(card); + } + + @Override + public CavePeople copy() { + return new CavePeople(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/CoralHelm.java b/Mage.Sets/src/mage/sets/fifthedition/CoralHelm.java new file mode 100644 index 00000000000..2986ae235fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/CoralHelm.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author nigelzor + */ +public class CoralHelm extends mage.sets.masterseditioniv.CoralHelm { + + public CoralHelm(UUID ownerId) { + super(ownerId); + this.cardNumber = 359; + this.expansionSetCode = "5ED"; + this.rarity = Rarity.RARE; + } + + public CoralHelm(final CoralHelm card) { + super(card); + } + + @Override + public CoralHelm copy() { + return new CoralHelm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/DiabolicMachine.java b/Mage.Sets/src/mage/sets/fifthedition/DiabolicMachine.java new file mode 100644 index 00000000000..9472d8e8a6d --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/DiabolicMachine.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author nigelzor + */ +public class DiabolicMachine extends mage.sets.fourthedition.DiabolicMachine { + + public DiabolicMachine(UUID ownerId) { + super(ownerId); + this.cardNumber = 363; + this.expansionSetCode = "5ED"; + } + + public DiabolicMachine(final DiabolicMachine card) { + super(card); + } + + @Override + public DiabolicMachine copy() { + return new DiabolicMachine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/DwarvenHold.java b/Mage.Sets/src/mage/sets/fifthedition/DwarvenHold.java index ad4bc54a7ab..60ca4409671 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/DwarvenHold.java +++ b/Mage.Sets/src/mage/sets/fifthedition/DwarvenHold.java @@ -70,7 +70,7 @@ public class DwarvenHold extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); // {tap}, Remove any number of storage counters from Dwarven Hold: Add {R} to your mana pool for each storage counter removed this way. Ability ability = new DynamicManaAbility( - Mana.RedMana, + Mana.RedMana(1), new RemovedCountersForCostValue(), new TapSourceCost(), "Add {R} to your mana pool for each storage counter removed this way", diff --git a/Mage.Sets/src/mage/sets/fifthedition/KrovikanFetish.java b/Mage.Sets/src/mage/sets/fifthedition/KrovikanFetish.java index b0737e4e546..ecf2cda9de2 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/KrovikanFetish.java +++ b/Mage.Sets/src/mage/sets/fifthedition/KrovikanFetish.java @@ -31,7 +31,9 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; @@ -63,7 +65,8 @@ public class KrovikanFetish extends CardImpl { this.addAbility(ability); // When Krovikan Fetish enters the battlefield, draw a card at the beginning of the next turn's upkeep. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse)), false)); // Enchanted creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/sets/fifthedition/KrovikanSorcerer.java b/Mage.Sets/src/mage/sets/fifthedition/KrovikanSorcerer.java new file mode 100644 index 00000000000..eaa10d2e7ce --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/KrovikanSorcerer.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class KrovikanSorcerer extends mage.sets.vintagemasters.KrovikanSorcerer { + + public KrovikanSorcerer(UUID ownerId) { + super(ownerId); + this.cardNumber = 96; + this.expansionSetCode = "5ED"; + } + + public KrovikanSorcerer(final KrovikanSorcerer card) { + super(card); + } + + @Override + public KrovikanSorcerer copy() { + return new KrovikanSorcerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/Lifetap.java b/Mage.Sets/src/mage/sets/fifthedition/Lifetap.java new file mode 100644 index 00000000000..0b0f027a7b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/Lifetap.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.sets.fifthedition; + +import java.util.UUID; +import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LoneFox + */ +public class Lifetap extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Forest an opponent controls"); + + static { + filter.add(new SubtypePredicate("Forest")); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public Lifetap(UUID ownerId) { + super(ownerId, 99, "Lifetap", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); + this.expansionSetCode = "5ED"; + + // Whenever a Forest an opponent controls becomes tapped, you gain 1 life. + this.addAbility(new BecomesTappedTriggeredAbility(new GainLifeEffect(1), false, filter)); + } + + public Lifetap(final Lifetap card) { + super(card); + } + + @Override + public Lifetap copy() { + return new Lifetap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/OrcishCaptain.java b/Mage.Sets/src/mage/sets/fifthedition/OrcishCaptain.java new file mode 100644 index 00000000000..5a30798d549 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/OrcishCaptain.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OrcishCaptain extends mage.sets.masterseditionii.OrcishCaptain { + + public OrcishCaptain(UUID ownerId) { + super(ownerId); + this.cardNumber = 254; + this.expansionSetCode = "5ED"; + } + + public OrcishCaptain(final OrcishCaptain card) { + super(card); + } + + @Override + public OrcishCaptain copy() { + return new OrcishCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/PrimalClay.java b/Mage.Sets/src/mage/sets/fifthedition/PrimalClay.java index 9ac15c4a2c1..6057b91fbc4 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/PrimalClay.java +++ b/Mage.Sets/src/mage/sets/fifthedition/PrimalClay.java @@ -43,6 +43,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.game.Game; import mage.game.events.EntersTheBattlefieldEvent; @@ -151,7 +152,7 @@ class PrimalPlasmaReplacementEffect extends ReplacementEffectImpl { game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), source); break; } - game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom), source); + game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source); } return false; diff --git a/Mage.Sets/src/mage/sets/fifthedition/ReefPirates.java b/Mage.Sets/src/mage/sets/fifthedition/ReefPirates.java new file mode 100644 index 00000000000..9bc5b4ba2b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/ReefPirates.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ReefPirates extends mage.sets.homelands.ReefPirates1 { + + public ReefPirates(UUID ownerId) { + super(ownerId); + this.cardNumber = 116; + this.expansionSetCode = "5ED"; + } + + public ReefPirates(final ReefPirates card) { + super(card); + } + + @Override + public ReefPirates copy() { + return new ReefPirates(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/SandSilos.java b/Mage.Sets/src/mage/sets/fifthedition/SandSilos.java index bbc58406a2f..63700f3f9a9 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/SandSilos.java +++ b/Mage.Sets/src/mage/sets/fifthedition/SandSilos.java @@ -70,7 +70,7 @@ public class SandSilos extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); // {tap}, Remove any number of storage counters from Sand Silos: Add {U} to your mana pool for each storage counter removed this way. Ability ability = new DynamicManaAbility( - Mana.BlueMana, + Mana.BlueMana(1), new RemovedCountersForCostValue(), new TapSourceCost(), "Add {U} to your mana pool for each storage counter removed this way", diff --git a/Mage.Sets/src/mage/sets/fifthedition/Shatterstorm.java b/Mage.Sets/src/mage/sets/fifthedition/Shatterstorm.java index 8b7a9885776..ef14823483b 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/Shatterstorm.java +++ b/Mage.Sets/src/mage/sets/fifthedition/Shatterstorm.java @@ -46,7 +46,7 @@ public class Shatterstorm extends CardImpl { // Destroy all artifacts. They can't be regenerated. - this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterArtifactPermanent(), true)); + this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterArtifactPermanent("artifacts"), true)); } public Shatterstorm(final Shatterstorm card) { diff --git a/Mage.Sets/src/mage/sets/fifthedition/Stampede.java b/Mage.Sets/src/mage/sets/fifthedition/Stampede.java new file mode 100644 index 00000000000..79a7b0eabd6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/Stampede.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Stampede extends mage.sets.iceage.Stampede { + + public Stampede(UUID ownerId) { + super(ownerId); + this.cardNumber = 189; + this.expansionSetCode = "5ED"; + } + + public Stampede(final Stampede card) { + super(card); + } + + @Override + public Stampede copy() { + return new Stampede(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/StoneSpirit.java b/Mage.Sets/src/mage/sets/fifthedition/StoneSpirit.java new file mode 100644 index 00000000000..2c9e46dc8c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/StoneSpirit.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class StoneSpirit extends mage.sets.iceage.StoneSpirit { + + public StoneSpirit(UUID ownerId) { + super(ownerId); + this.cardNumber = 271; + this.expansionSetCode = "5ED"; + } + + public StoneSpirit(final StoneSpirit card) { + super(card); + } + + @Override + public StoneSpirit copy() { + return new StoneSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/UrzasMine.java b/Mage.Sets/src/mage/sets/fifthedition/UrzasMine.java index 9d1bb0ab1d5..7f00f1cc6ee 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/UrzasMine.java +++ b/Mage.Sets/src/mage/sets/fifthedition/UrzasMine.java @@ -48,7 +48,7 @@ public class UrzasMine extends CardImpl { this.expansionSetCode = "5ED"; // {T}: Add {1} to your mana pool. If you control an Urza's Power-Plant and an Urza's Tower, add {2} to your mana pool instead. - Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana, new UrzaTerrainValue(2), + Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana(1), new UrzaTerrainValue(2), "Add {1} to your mana pool. If you control an Urza's Power-Plant and an Urza's Tower, add {2} to your mana pool instead"); this.addAbility(urzaManaAbility); } diff --git a/Mage.Sets/src/mage/sets/fifthedition/UrzasPowerPlant.java b/Mage.Sets/src/mage/sets/fifthedition/UrzasPowerPlant.java index 4690665b40c..38d6113fd9f 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/UrzasPowerPlant.java +++ b/Mage.Sets/src/mage/sets/fifthedition/UrzasPowerPlant.java @@ -48,7 +48,7 @@ public class UrzasPowerPlant extends CardImpl { this.expansionSetCode = "5ED"; // {T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead. - Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana, new UrzaTerrainValue(2), + Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana(1), new UrzaTerrainValue(2), "Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead"); this.addAbility(urzaManaAbility); } diff --git a/Mage.Sets/src/mage/sets/fifthedition/UrzasTower.java b/Mage.Sets/src/mage/sets/fifthedition/UrzasTower.java index 1096b1dd5e0..ef6d3628ff7 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/UrzasTower.java +++ b/Mage.Sets/src/mage/sets/fifthedition/UrzasTower.java @@ -48,7 +48,7 @@ public class UrzasTower extends CardImpl { this.expansionSetCode = "5ED"; // {T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead. - Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana, new UrzaTerrainValue(3), + Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana(1), new UrzaTerrainValue(3), "Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead"); this.addAbility(urzaManaAbility); } diff --git a/Mage.Sets/src/mage/sets/fifthedition/WordOfBlasting.java b/Mage.Sets/src/mage/sets/fifthedition/WordOfBlasting.java new file mode 100644 index 00000000000..8c423c8867f --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/WordOfBlasting.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class WordOfBlasting extends mage.sets.iceage.WordOfBlasting { + + public WordOfBlasting(UUID ownerId) { + super(ownerId); + this.cardNumber = 276; + this.expansionSetCode = "5ED"; + } + + public WordOfBlasting(final WordOfBlasting card) { + super(card); + } + + @Override + public WordOfBlasting copy() { + return new WordOfBlasting(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/AmrouKithkin.java b/Mage.Sets/src/mage/sets/fourthedition/AmrouKithkin.java new file mode 100644 index 00000000000..f7ce1b9f3ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/AmrouKithkin.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.sets.fourthedition; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AmrouKithkin extends mage.sets.legends.AmrouKithkin { + + public AmrouKithkin(UUID ownerId) { + super(ownerId); + this.cardNumber = 252; + this.expansionSetCode = "4ED"; + } + + public AmrouKithkin(final AmrouKithkin card) { + super(card); + } + + @Override + public AmrouKithkin copy() { + return new AmrouKithkin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/CavePeople.java b/Mage.Sets/src/mage/sets/fourthedition/CavePeople.java new file mode 100644 index 00000000000..69bcfadd19b --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/CavePeople.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.sets.fourthedition; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CavePeople extends mage.sets.thedark.CavePeople { + + public CavePeople(UUID ownerId) { + super(ownerId); + this.cardNumber = 199; + this.expansionSetCode = "4ED"; + } + + public CavePeople(final CavePeople card) { + super(card); + } + + @Override + public CavePeople copy() { + return new CavePeople(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/CoralHelm.java b/Mage.Sets/src/mage/sets/fourthedition/CoralHelm.java new file mode 100644 index 00000000000..af73dce6c99 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/CoralHelm.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fourthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author nigelzor + */ +public class CoralHelm extends mage.sets.masterseditioniv.CoralHelm { + + public CoralHelm(UUID ownerId) { + super(ownerId); + this.cardNumber = 328; + this.expansionSetCode = "4ED"; + this.rarity = Rarity.RARE; + } + + public CoralHelm(final CoralHelm card) { + super(card); + } + + @Override + public CoralHelm copy() { + return new CoralHelm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/DiabolicMachine.java b/Mage.Sets/src/mage/sets/fourthedition/DiabolicMachine.java new file mode 100644 index 00000000000..c739fc2a759 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/DiabolicMachine.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.sets.fourthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author nigelzor + */ +public class DiabolicMachine extends CardImpl { + + public DiabolicMachine(UUID ownerId) { + super(ownerId, 332, "Diabolic Machine", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); + this.expansionSetCode = "4ED"; + this.subtype.add("Construct"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {3}: Regenerate Diabolic Machine. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new GenericManaCost(3))); + } + + public DiabolicMachine(final DiabolicMachine card) { + super(card); + } + + @Override + public DiabolicMachine copy() { + return new DiabolicMachine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/EbonyHorse.java b/Mage.Sets/src/mage/sets/fourthedition/EbonyHorse.java index 943eb139161..c2601f3b37e 100644 --- a/Mage.Sets/src/mage/sets/fourthedition/EbonyHorse.java +++ b/Mage.Sets/src/mage/sets/fourthedition/EbonyHorse.java @@ -33,13 +33,19 @@ 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.common.*; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventCombatDamageBySourceEffect; +import mage.abilities.effects.common.PreventCombatDamageToSourceEffect; +import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.Target; import mage.target.common.TargetCreaturePermanent; /** @@ -61,10 +67,13 @@ public class EbonyHorse extends CardImpl { // {2}, {tap}: Untap target attacking creature you control. Prevent all combat damage that would be dealt to and dealt by that creature this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); - ability.addEffect(new PreventCombatDamageToSourceEffect(Duration.EndOfTurn)); - ability.addEffect(new PreventCombatDamageBySourceEffect(Duration.EndOfTurn)); - Target target = new TargetCreaturePermanent(filter); - ability.addTarget(target); + Effect effect = new PreventCombatDamageToSourceEffect(Duration.EndOfTurn); + effect.setText("Prevent all combat damage that would be dealt to"); + ability.addEffect(effect); + effect = new PreventCombatDamageBySourceEffect(Duration.EndOfTurn); + effect.setText("and dealt by that creature this turn"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/fourthedition/Lifetap.java b/Mage.Sets/src/mage/sets/fourthedition/Lifetap.java new file mode 100644 index 00000000000..72046df5bde --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/Lifetap.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.sets.fourthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Lifetap extends mage.sets.fifthedition.Lifetap { + + public Lifetap(UUID ownerId) { + super(ownerId); + this.cardNumber = 81; + this.expansionSetCode = "4ED"; + } + + public Lifetap(final Lifetap card) { + super(card); + } + + @Override + public Lifetap copy() { + return new Lifetap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/TheRack.java b/Mage.Sets/src/mage/sets/fourthedition/TheRack.java index bbbed87b4d3..1f22f23cfad 100644 --- a/Mage.Sets/src/mage/sets/fourthedition/TheRack.java +++ b/Mage.Sets/src/mage/sets/fourthedition/TheRack.java @@ -119,7 +119,7 @@ class TheRackEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - UUID playerId = (UUID) game.getState().getValue(source.getSourceId().toString() + "_player"); + UUID playerId = (UUID) game.getState().getValue(source.getSourceId().toString() + ChooseOpponentEffect.VALUE_KEY); Player chosenPlayer = game.getPlayer(playerId); if (chosenPlayer != null) { int damage = 3 - chosenPlayer.getHand().size(); diff --git a/Mage.Sets/src/mage/sets/fridaynightmagic/Anticipate.java b/Mage.Sets/src/mage/sets/fridaynightmagic/Anticipate.java new file mode 100644 index 00000000000..b526917ea2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/fridaynightmagic/Anticipate.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.sets.fridaynightmagic; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Anticipate extends mage.sets.dragonsoftarkir.Anticipate { + + public Anticipate(UUID ownerId) { + super(ownerId); + this.cardNumber = 186; + this.expansionSetCode = "FNMP"; + } + + public Anticipate(final Anticipate card) { + super(card); + } + + @Override + public Anticipate copy() { + return new Anticipate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fridaynightmagic/ClashOfWills.java b/Mage.Sets/src/mage/sets/fridaynightmagic/ClashOfWills.java new file mode 100644 index 00000000000..c618d297558 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fridaynightmagic/ClashOfWills.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.sets.fridaynightmagic; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ClashOfWills extends mage.sets.magicorigins.ClashOfWills { + + public ClashOfWills(UUID ownerId) { + super(ownerId); + this.cardNumber = 188; + this.expansionSetCode = "FNMP"; + } + + public ClashOfWills(final ClashOfWills card) { + super(card); + } + + @Override + public ClashOfWills copy() { + return new ClashOfWills(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fridaynightmagic/NissasPilgrimage.java b/Mage.Sets/src/mage/sets/fridaynightmagic/NissasPilgrimage.java new file mode 100644 index 00000000000..5607bc55a65 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fridaynightmagic/NissasPilgrimage.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.sets.fridaynightmagic; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class NissasPilgrimage extends mage.sets.magicorigins.NissasPilgrimage { + + public NissasPilgrimage(UUID ownerId) { + super(ownerId); + this.cardNumber = 187; + this.expansionSetCode = "FNMP"; + } + + public NissasPilgrimage(final NissasPilgrimage card) { + super(card); + } + + @Override + public NissasPilgrimage copy() { + return new NissasPilgrimage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ftvdragons/EbonDragon.java b/Mage.Sets/src/mage/sets/ftvdragons/EbonDragon.java new file mode 100644 index 00000000000..93abef13890 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ftvdragons/EbonDragon.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.sets.ftvdragons; + +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.discard.DiscardTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class EbonDragon extends CardImpl { + + public EbonDragon(UUID ownerId) { + super(ownerId, 6, "Ebon Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); + this.expansionSetCode = "FVD"; + this.subtype.add("Dragon"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Ebon Dragon enters the battlefield, you may have target opponent discard a card. + Effect effect = new DiscardTargetEffect(1, false); + effect.setText("you may have target opponent discard a card"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public EbonDragon(final EbonDragon card) { + super(card); + } + + @Override + public EbonDragon copy() { + return new EbonDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/BoldwyrIntimidator.java b/Mage.Sets/src/mage/sets/futuresight/BoldwyrIntimidator.java new file mode 100644 index 00000000000..68b8f684401 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/BoldwyrIntimidator.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.sets.futuresight; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BoldwyrIntimidator extends mage.sets.morningtide.BoldwyrIntimidator { + + public BoldwyrIntimidator(UUID ownerId) { + super(ownerId); + this.cardNumber = 111; + this.expansionSetCode = "FUT"; + } + + public BoldwyrIntimidator(final BoldwyrIntimidator card) { + super(card); + } + + @Override + public BoldwyrIntimidator copy() { + return new BoldwyrIntimidator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/CoalitionRelic.java b/Mage.Sets/src/mage/sets/futuresight/CoalitionRelic.java index 1c7ec71523c..3c2b480ecbe 100644 --- a/Mage.Sets/src/mage/sets/futuresight/CoalitionRelic.java +++ b/Mage.Sets/src/mage/sets/futuresight/CoalitionRelic.java @@ -109,15 +109,15 @@ class CoalitionRelicEffect extends OneShotEffect { player.choose(outcome, choice, game); } if (choice.getColor().isBlack()) { - mana.addBlack(); + mana.increaseBlack(); } else if (choice.getColor().isBlue()) { - mana.addBlue(); + mana.increaseBlue(); } else if (choice.getColor().isRed()) { - mana.addRed(); + mana.increaseRed(); } else if (choice.getColor().isGreen()) { - mana.addGreen(); + mana.increaseGreen(); } else if (choice.getColor().isWhite()) { - mana.addWhite(); + mana.increaseWhite(); } choice.clearChoice(); } diff --git a/Mage.Sets/src/mage/sets/futuresight/GravePeril.java b/Mage.Sets/src/mage/sets/futuresight/GravePeril.java new file mode 100644 index 00000000000..9b36c3b60ab --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/GravePeril.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.sets.futuresight; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author emerald000 + */ +public class GravePeril extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a nonblack creature"); + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public GravePeril(UUID ownerId) { + super(ownerId, 67, "Grave Peril", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "FUT"; + + // When a nonblack creature enters the battlefield, sacrifice Grave Peril. If you do, destroy that creature. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GravePerilEffect(), filter, false, SetTargetPointer.PERMANENT, null)); + } + + public GravePeril(final GravePeril card) { + super(card); + } + + @Override + public GravePeril copy() { + return new GravePeril(this); + } +} + +class GravePerilEffect extends OneShotEffect { + + GravePerilEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "sacrifice Grave Peril. If you do, destroy that creature"; + } + + GravePerilEffect(final GravePerilEffect effect) { + super(effect); + } + + @Override + public GravePerilEffect copy() { + return new GravePerilEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game); + if (permanent != null) { + if (permanent.sacrifice(source.getSourceId(), game)) { + Effect effect = new DestroyTargetEffect(); + effect.setTargetPointer(this.getTargetPointer()); + return effect.apply(game, source); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/LinessaZephyrMage.java b/Mage.Sets/src/mage/sets/futuresight/LinessaZephyrMage.java index 2d70219a2a8..8e3e97682c8 100644 --- a/Mage.Sets/src/mage/sets/futuresight/LinessaZephyrMage.java +++ b/Mage.Sets/src/mage/sets/futuresight/LinessaZephyrMage.java @@ -61,6 +61,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class LinessaZephyrMage extends CardImpl { + private final UUID originalId; + public LinessaZephyrMage(UUID ownerId) { super(ownerId, 51, "Linessa, Zephyr Mage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.expansionSetCode = "FUT"; @@ -75,6 +77,7 @@ public class LinessaZephyrMage extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}{U}")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); + originalId = ability.getOriginalId(); 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. @@ -85,11 +88,12 @@ 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 instanceof SimpleActivatedAbility) { + if (ability.getOriginalId().equals(originalId)) { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost " + xValue); diff --git a/Mage.Sets/src/mage/sets/futuresight/MagusOfTheMoon.java b/Mage.Sets/src/mage/sets/futuresight/MagusOfTheMoon.java index 4d1d52f33ef..131e99c2405 100644 --- a/Mage.Sets/src/mage/sets/futuresight/MagusOfTheMoon.java +++ b/Mage.Sets/src/mage/sets/futuresight/MagusOfTheMoon.java @@ -34,6 +34,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; +import mage.cards.repository.CardRepository; import mage.constants.CardType; import mage.constants.DependencyType; import mage.constants.Duration; @@ -108,14 +109,16 @@ public class MagusOfTheMoon extends CardImpl { public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { for (Permanent land : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { switch (layer) { - case AbilityAddingRemovingEffects_6: - land.removeAllAbilities(source.getSourceId(), game); - land.addAbility(new RedManaAbility(), source.getSourceId(), game); - break; case TypeChangingEffects_4: - land.getSubtype().clear(); + // 305.7 Note that this doesn't remove any abilities that were granted to the land by other effects + // So the ability removing has to be done before Layer 6 + land.removeAllAbilities(source.getSourceId(), game); + land.getSubtype().removeAll(CardRepository.instance.getLandTypes()); land.getSubtype().add("Mountain"); break; + case AbilityAddingRemovingEffects_6: + land.addAbility(new RedManaAbility(), source.getSourceId(), game); + break; } } return true; diff --git a/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java b/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java index 75026f82f29..e6754694f8a 100644 --- a/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java +++ b/Mage.Sets/src/mage/sets/futuresight/NimbusMaze.java @@ -68,13 +68,13 @@ public class NimbusMaze extends CardImpl { // {tap}: Add {W} to your mana pool. Activate this ability only if you control an Island. this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.WhiteMana), + new BasicManaEffect(Mana.WhiteMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(controlIsland))); // {tap}: Add {U} to your mana pool. Activate this ability only if you control a Plains. this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.BlueMana), + new BasicManaEffect(Mana.BlueMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(controlPlains))); } diff --git a/Mage.Sets/src/mage/sets/futuresight/RamosianRevivalist.java b/Mage.Sets/src/mage/sets/futuresight/RamosianRevivalist.java new file mode 100644 index 00000000000..d79662101db --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/RamosianRevivalist.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.sets.futuresight; + +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.GenericManaCost; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class RamosianRevivalist extends CardImpl { + + private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with converted mana cost 5 or less from your graveyard"); + + static { + filter.add(new SubtypePredicate("Rebel")); + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 6)); + } + + public RamosianRevivalist(UUID ownerId) { + super(ownerId, 30, "Ramosian Revivalist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Human"); + this.subtype.add("Rebel"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {6}, {tap}: Return target Rebel permanent card with converted mana cost 5 or less from your graveyard to the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new GenericManaCost(6)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + public RamosianRevivalist(final RamosianRevivalist card) { + super(card); + } + + @Override + public RamosianRevivalist copy() { + return new RamosianRevivalist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/RiverOfTears.java b/Mage.Sets/src/mage/sets/futuresight/RiverOfTears.java index 881bc577850..b7981dd3bd8 100644 --- a/Mage.Sets/src/mage/sets/futuresight/RiverOfTears.java +++ b/Mage.Sets/src/mage/sets/futuresight/RiverOfTears.java @@ -52,8 +52,8 @@ public class RiverOfTears extends CardImpl { // {T}: Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead. this.addAbility(new ConditionalManaAbility(Zone.BATTLEFIELD, new ConditionalManaEffect( - new BasicManaEffect(Mana.BlackMana), - new BasicManaEffect(Mana.BlueMana), + new BasicManaEffect(Mana.BlackMana(1)), + new BasicManaEffect(Mana.BlueMana(1)), LandfallCondition.getInstance(), "Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead"), new TapSourceCost()), diff --git a/Mage.Sets/src/mage/sets/futuresight/TaroxBladewing.java b/Mage.Sets/src/mage/sets/futuresight/TaroxBladewing.java index 74812fc3110..08bcdb02e9a 100644 --- a/Mage.Sets/src/mage/sets/futuresight/TaroxBladewing.java +++ b/Mage.Sets/src/mage/sets/futuresight/TaroxBladewing.java @@ -29,20 +29,15 @@ package mage.sets.futuresight; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.abilityword.GrandeurAbility; -import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.SubLayer; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -66,7 +61,8 @@ public class TaroxBladewing extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Grandeur - Discard another card named Tarox Bladewing: Tarox Bladewing gets +X/+X until end of turn, where X is its power. - this.addAbility(new GrandeurAbility(new TaroxBladewingEffect(), "Tarox Bladewing")); + SourcePermanentPowerCount x = new SourcePermanentPowerCount(); + this.addAbility(new GrandeurAbility(new BoostSourceEffect(x, x, Duration.EndOfTurn, true), "Tarox Bladewing")); } public TaroxBladewing(final TaroxBladewing card) { @@ -78,32 +74,3 @@ public class TaroxBladewing extends CardImpl { return new TaroxBladewing(this); } } - -class TaroxBladewingEffect extends ContinuousEffectImpl { - - TaroxBladewingEffect() { - super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); - staticText = "{this} gets +X/+X until end of turn, where X is its power"; - } - - TaroxBladewingEffect(final TaroxBladewingEffect effect) { - super(effect); - } - - @Override - public TaroxBladewingEffect copy() { - return new TaroxBladewingEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - int power = permanent.getPower().getValue(); - permanent.addPower(power); - permanent.addToughness(power); - return true; - } - return false; - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java b/Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java index 27985e968f3..7588795fd9e 100644 --- a/Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java +++ b/Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java @@ -111,7 +111,7 @@ class ScaleguardSentinelsCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + Permanent sourcePermanent = game.getPermanentEntering(source.getSourceId()); if (sourcePermanent != null) { DragonOnTheBattlefieldWhileSpellWasCastWatcher watcher = (DragonOnTheBattlefieldWhileSpellWasCastWatcher) game.getState().getWatchers().get("DragonOnTheBattlefieldWhileSpellWasCastWatcher"); return (watcher != null && watcher.castWithConditionTrue(sourcePermanent.getSpellAbility().getId())); diff --git a/Mage.Sets/src/mage/sets/gatecrash/CartelAristocrat.java b/Mage.Sets/src/mage/sets/gatecrash/CartelAristocrat.java index 83086c0d761..4ff2be9d3f6 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/CartelAristocrat.java +++ b/Mage.Sets/src/mage/sets/gatecrash/CartelAristocrat.java @@ -32,7 +32,6 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.common.continuous.GainProtectionFromColorSourceEffect; @@ -44,19 +43,18 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledPermanent; /** - * Gatecrash FAQ (01.2013) - * You choose the color when the ability resolves. + * Gatecrash FAQ (01.2013) You choose the color when the ability resolves. * * @author LevelX2 */ public class CartelAristocrat extends CardImpl { - + private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature"); static { filter.add(new AnotherPredicate()); } - + public CartelAristocrat(UUID ownerId) { super(ownerId, 150, "Cartel Aristocrat", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}{B}"); this.expansionSetCode = "GTC"; diff --git a/Mage.Sets/src/mage/sets/gatecrash/CryptGhast.java b/Mage.Sets/src/mage/sets/gatecrash/CryptGhast.java index 87693e80a76..ddf6d0b59b4 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/CryptGhast.java +++ b/Mage.Sets/src/mage/sets/gatecrash/CryptGhast.java @@ -83,7 +83,7 @@ class CryptGhastTriggeredAbility extends TriggeredManaAbility { } public CryptGhastTriggeredAbility() { - super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana), false); + super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), false); this.usesStack = false; } diff --git a/Mage.Sets/src/mage/sets/gatecrash/EnterTheInfinite.java b/Mage.Sets/src/mage/sets/gatecrash/EnterTheInfinite.java index a53a1e0b985..b0710850a27 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/EnterTheInfinite.java +++ b/Mage.Sets/src/mage/sets/gatecrash/EnterTheInfinite.java @@ -27,6 +27,7 @@ */ package mage.sets.gatecrash; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; @@ -35,14 +36,17 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; import mage.cards.Card; import mage.cards.CardImpl; -import mage.constants.*; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Rarity; import mage.game.Game; import mage.game.turn.Step; import mage.players.Player; import mage.target.common.TargetCardInHand; -import java.util.UUID; - /** * * @author LevelX2 @@ -53,8 +57,7 @@ public class EnterTheInfinite extends CardImpl { super(ownerId, 34, "Enter the Infinite", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{8}{U}{U}{U}{U}"); this.expansionSetCode = "GTC"; - - // Draw cards equal to the number of cards in your library, + // Draw cards equal to the number of cards in your library, this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new CardsInControllerLibraryCount())); //then put a card from your hand on top of your library. this.getSpellAbility().addEffect(new PutCardOnLibraryEffect()); @@ -72,8 +75,8 @@ public class EnterTheInfinite extends CardImpl { } } - class CardsInControllerLibraryCount implements DynamicValue { + @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { if (sourceAbility != null) { @@ -119,14 +122,13 @@ class PutCardOnLibraryEffect 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()); + if (controller != null) { TargetCardInHand target = new TargetCardInHand(); - player.chooseTarget(Outcome.ReturnToHand, target, source, game); - Card card = player.getHand().get(target.getFirstTarget(), game); + controller.chooseTarget(Outcome.ReturnToHand, target, source, game); + Card card = controller.getHand().get(target.getFirstTarget(), game); if (card != null) { - player.getHand().remove(card); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + controller.putCardsOnTopOfLibrary(new CardsImpl(card), game, source, false); } return true; } @@ -134,29 +136,27 @@ class PutCardOnLibraryEffect extends OneShotEffect { } } +class MaximumHandSizeEffect extends MaximumHandSizeControllerEffect { -class MaximumHandSizeEffect extends MaximumHandSizeControllerEffect{ - - public MaximumHandSizeEffect(){ + public MaximumHandSizeEffect() { super(Integer.MAX_VALUE, Duration.Custom, MaximumHandSizeControllerEffect.HandSizeModification.SET); staticText = "You have no maximum hand size until your next turn"; } - - public MaximumHandSizeEffect(final MaximumHandSizeEffect effect) { + + public MaximumHandSizeEffect(final MaximumHandSizeEffect effect) { super(effect); } - + @Override public boolean isInactive(Ability source, Game game) { - if (game.getPhase().getStep().getType() == PhaseStep.UNTAP && game.getStep().getStepPart() == Step.StepPart.PRE) - { + if (game.getPhase().getStep().getType() == PhaseStep.UNTAP && game.getStep().getStepPart() == Step.StepPart.PRE) { if (game.getActivePlayerId().equals(source.getControllerId())) { return true; } } return false; } - + @Override public MaximumHandSizeEffect copy() { return new MaximumHandSizeEffect(this); diff --git a/Mage.Sets/src/mage/sets/gatecrash/GyreSage.java b/Mage.Sets/src/mage/sets/gatecrash/GyreSage.java index 6acb0c27fc5..b45cbe21d01 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/GyreSage.java +++ b/Mage.Sets/src/mage/sets/gatecrash/GyreSage.java @@ -59,7 +59,7 @@ public class GyreSage extends CardImpl { this.addAbility(new EvolveAbility()); //{T} : Add {G} to your mana pool for each +1/+1 counter on Gyre Sage. - this.addAbility(new DynamicManaAbility(Mana.GreenMana, new CountersCount(CounterType.P1P1))); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new CountersCount(CounterType.P1P1))); } public GyreSage(final GyreSage card) { diff --git a/Mage.Sets/src/mage/sets/gatecrash/RapidHybridization.java b/Mage.Sets/src/mage/sets/gatecrash/RapidHybridization.java index e78fd5d41f4..42d9aa8bbf1 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/RapidHybridization.java +++ b/Mage.Sets/src/mage/sets/gatecrash/RapidHybridization.java @@ -29,7 +29,6 @@ package mage.sets.gatecrash; import java.util.UUID; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -52,7 +51,6 @@ public class RapidHybridization extends CardImpl { super(ownerId, 44, "Rapid Hybridization", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{U}"); this.expansionSetCode = "GTC"; - // Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Frog Lizard creature token onto the battlefield. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); @@ -87,7 +85,7 @@ class RapidHybridizationEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = (Permanent) game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); if (permanent != null) { RapidHybridizationToken token = new RapidHybridizationToken(); token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId()); @@ -103,14 +101,14 @@ class RapidHybridizationToken extends Token { super("Frog Lizard", "3/3 green Frog Lizard creature token onto the battlefield"); this.setOriginalExpansionSetCode("GTC"); cardType.add(CardType.CREATURE); - + color.setGreen(true); - + subtype.add("Frog"); subtype.add("Lizard"); - + power = new MageInt(3); toughness = new MageInt(3); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java b/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java index e989bcca14d..d53ebeca491 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java +++ b/Mage.Sets/src/mage/sets/gatecrash/ThrullParasite.java @@ -27,29 +27,18 @@ */ package mage.sets.gatecrash; -import java.util.HashSet; -import java.util.Set; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.PayLifeCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.RemoveCounterTargetEffect; import mage.abilities.keyword.ExtortAbility; import mage.cards.CardImpl; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; -import mage.counters.Counter; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.common.TargetNonlandPermanent; /** @@ -69,7 +58,7 @@ public class ThrullParasite extends CardImpl { // Extort this.addAbility(new ExtortAbility()); // {tap}, Pay 2 life: Remove a counter from target nonland permanent. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RemoveCounterTargetEffect(),new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RemoveCounterTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetNonlandPermanent()); ability.addCost(new PayLifeCost(2)); this.addAbility(ability); @@ -84,75 +73,3 @@ public class ThrullParasite extends CardImpl { return new ThrullParasite(this); } } - -class RemoveCounterTargetEffect extends OneShotEffect { - - private CounterType counterTypeToRemove; - - public RemoveCounterTargetEffect() { - super(Outcome.Detriment); - this.staticText = "Remove a counter from target nonland permanent"; - } - - public RemoveCounterTargetEffect(CounterType counterTypeToRemove) { - super(Outcome.Detriment); - this.staticText = "Remove a " + counterTypeToRemove.getName() + " counter from target nonland permanent"; - this.counterTypeToRemove = counterTypeToRemove; - } - - public RemoveCounterTargetEffect(final RemoveCounterTargetEffect effect) { - super(effect); - this.counterTypeToRemove = effect.counterTypeToRemove; - } - - @Override - public RemoveCounterTargetEffect copy() { - return new RemoveCounterTargetEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - boolean result = false; - Player controller = game.getPlayer(source.getControllerId()); - for (UUID targetId: getTargetPointer().getTargets(game, source)) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null) { - if (permanent.getCounters().size() > 0 && (counterTypeToRemove == null || permanent.getCounters().containsKey(counterTypeToRemove))) { - String counterName = null; - if (counterTypeToRemove != null) { - counterName = counterTypeToRemove.getName(); - } else { - if (permanent.getCounters().size() > 1 && counterTypeToRemove == null) { - Choice choice = new ChoiceImpl(true); - Set choices = new HashSet(); - for (Counter counter : permanent.getCounters().values()) { - if (permanent.getCounters().getCount(counter.getName()) > 0) { - choices.add(counter.getName()); - } - } - choice.setChoices(choices); - choice.setMessage("Choose a counter type to remove from " + permanent.getName()); - controller.choose(Outcome.Detriment, choice, game); - counterName = choice.getChoice(); - } else { - for (Counter counter : permanent.getCounters().values()) { - if (counter.getCount() > 0) { - counterName = counter.getName(); - } - } - } - } - if (counterName != null) { - permanent.removeCounters(counterName, 1, game); - if (permanent.getCounters().getCount(counterName) == 0 ){ - permanent.getCounters().removeCounter(counterName); - } - result |= true; - game.informPlayers(new StringBuilder(controller.getLogName()).append(" removes a ").append(counterName).append(" counter from ").append(permanent.getName()).toString()); - } - } - } - } - return result; - } -} diff --git a/Mage.Sets/src/mage/sets/gatecrash/UrbanEvolution.java b/Mage.Sets/src/mage/sets/gatecrash/UrbanEvolution.java index 53128276399..087c376526c 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/UrbanEvolution.java +++ b/Mage.Sets/src/mage/sets/gatecrash/UrbanEvolution.java @@ -44,7 +44,7 @@ import mage.constants.Duration; public class UrbanEvolution extends CardImpl { public UrbanEvolution(UUID ownerId) { - super(ownerId, 204, "Urban Evolution", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{U}{G}"); + super(ownerId, 204, "Urban Evolution", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{U}"); this.expansionSetCode = "GTC"; //Draw three cards. diff --git a/Mage.Sets/src/mage/sets/gatecrash/ZameckGuildmage.java b/Mage.Sets/src/mage/sets/gatecrash/ZameckGuildmage.java index 41bc52a2399..ba0208320ff 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/ZameckGuildmage.java +++ b/Mage.Sets/src/mage/sets/gatecrash/ZameckGuildmage.java @@ -64,7 +64,7 @@ public class ZameckGuildmage extends CardImpl { this.toughness = new MageInt(2); // {G}{U}: This turn, each creature you control enters the battlefield with an additional +1/+1 counter on it. - this.addAbility(new SimpleActivatedAbility(Zone.ALL, new ZameckGuildmageEntersBattlefieldEffect(), new ManaCostsImpl("{G}{U}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ZameckGuildmageEntersBattlefieldEffect(), new ManaCostsImpl("{G}{U}"))); // {G}{U}, Remove a +1/+1 counter from a creature you control: Draw a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{G}{U}")); diff --git a/Mage.Sets/src/mage/sets/guildpact/Borborygmos.java b/Mage.Sets/src/mage/sets/guildpact/Borborygmos.java new file mode 100644 index 00000000000..ae1d94838c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/Borborygmos.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.sets.guildpact; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class Borborygmos extends CardImpl { + + public Borborygmos(UUID ownerId) { + super(ownerId, 103, "Borborygmos", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}{G}{G}"); + this.expansionSetCode = "GPT"; + this.supertype.add("Legendary"); + this.subtype.add("Cyclops"); + this.power = new MageInt(6); + this.toughness = new MageInt(7); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever Borborygmos deals combat damage to a player, put a +1/+1 counter on each creature you control. + this.addAbility(new DealsCombatDamageTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), false)); + } + + public Borborygmos(final Borborygmos card) { + super(card); + } + + @Override + public Borborygmos copy() { + return new Borborygmos(this); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.java b/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.java index 0405ecd60a3..b4c5d10a83c 100644 --- a/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.java +++ b/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.java @@ -30,6 +30,7 @@ package mage.sets.guildpact; import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; @@ -41,7 +42,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.StackAbility; -import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; /** @@ -76,8 +76,7 @@ public class BurningTreeShaman extends CardImpl { class BurningTreeShamanTriggeredAbility extends TriggeredAbilityImpl { BurningTreeShamanTriggeredAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(1, false, "that player")); - this.addTarget(new TargetPlayer()); + super(Zone.BATTLEFIELD, new DamageTargetEffect(new StaticValue(1), false, "that player", true)); } BurningTreeShamanTriggeredAbility(final BurningTreeShamanTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/sets/guildpact/NivixAerieOfTheFiremind.java b/Mage.Sets/src/mage/sets/guildpact/NivixAerieOfTheFiremind.java new file mode 100644 index 00000000000..d1a35ddeee7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/NivixAerieOfTheFiremind.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.sets.guildpact; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class NivixAerieOfTheFiremind extends mage.sets.izzetvsgolgari.NivixAerieOfTheFiremind { + + public NivixAerieOfTheFiremind(UUID ownerId) { + super(ownerId); + this.cardNumber = 160; + this.expansionSetCode = "GPT"; + } + + public NivixAerieOfTheFiremind(final NivixAerieOfTheFiremind card) { + super(card); + } + + @Override + public NivixAerieOfTheFiremind copy() { + return new NivixAerieOfTheFiremind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/Thunderheads.java b/Mage.Sets/src/mage/sets/guildpact/Thunderheads.java new file mode 100644 index 00000000000..4cca5654327 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/Thunderheads.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.sets.guildpact; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ReplicateAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author nigelzor + */ +public class Thunderheads extends CardImpl { + + public Thunderheads(UUID ownerId) { + super(ownerId, 37, "Thunderheads", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "GPT"; + + // Replicate {2}{U} + this.addAbility(new ReplicateAbility(this, "{2}{U}")); + // Put a 3/3 blue Weird creature token with defender and flying onto the battlefield. Exile it at the beginning of the next end step. + this.getSpellAbility().addEffect(new ThunderheadsEffect()); + } + + public Thunderheads(final Thunderheads card) { + super(card); + } + + @Override + public Thunderheads copy() { + return new Thunderheads(this); + } +} + +class ThunderheadsEffect extends OneShotEffect { + + public ThunderheadsEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Put a 3/3 blue Weird creature token with defender and flying onto the battlefield. Exile it at the beginning of the next end step."; + } + + public ThunderheadsEffect(ThunderheadsEffect effect) { + super(effect); + } + + @Override + public ThunderheadsEffect copy() { + return new ThunderheadsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Token token = new WeirdToken(); + if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } + return true; + } + return false; + } +} + +class WeirdToken extends Token { + + WeirdToken() { + super("Weird", "3/3 blue Weird create token with defender and flying"); + cardType.add(CardType.CREATURE); + color.setBlue(true); + subtype.add("Weird"); + power = new MageInt(3); + toughness = new MageInt(3); + this.addAbility(DefenderAbility.getInstance()); + this.addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/TinStreetHooligan.java b/Mage.Sets/src/mage/sets/guildpact/TinStreetHooligan.java index bfa2c666645..7718c7e3f97 100644 --- a/Mage.Sets/src/mage/sets/guildpact/TinStreetHooligan.java +++ b/Mage.Sets/src/mage/sets/guildpact/TinStreetHooligan.java @@ -32,7 +32,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ManaWasSpentCondition; -import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -57,9 +57,11 @@ public class TinStreetHooligan extends CardImpl { this.toughness = new MageInt(1); // When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact. - Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyTargetEffect(), new ManaWasSpentCondition(ColoredManaSymbol.G), - "if {G} was spent to cast {this}, destroy target artifact"), false); - ability.addTarget(new TargetArtifactPermanent()); + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()), + new ManaWasSpentCondition(ColoredManaSymbol.G), + "When {this} enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact."); + ability.addTarget(new TargetArtifactPermanent()); this.addAbility(ability, new ManaSpentToCastWatcher()); } diff --git a/Mage.Sets/src/mage/sets/heroesvsmonsters/OrcishLumberjack.java b/Mage.Sets/src/mage/sets/heroesvsmonsters/OrcishLumberjack.java index 93277aa22f2..3a06eafc05a 100644 --- a/Mage.Sets/src/mage/sets/heroesvsmonsters/OrcishLumberjack.java +++ b/Mage.Sets/src/mage/sets/heroesvsmonsters/OrcishLumberjack.java @@ -123,10 +123,10 @@ class OrcishLumberjackManaEffect extends ManaEffect { } switch (manaChoice.getChoice()) { case "Green": - mana.addGreen(); + mana.increaseGreen(); break; case "Red": - mana.addRed(); + mana.increaseRed(); break; } diff --git a/Mage.Sets/src/mage/sets/homelands/AlibansTower1.java b/Mage.Sets/src/mage/sets/homelands/AlibansTower1.java new file mode 100644 index 00000000000..50f072111e9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/AlibansTower1.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.sets.homelands; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterBlockingCreature; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class AlibansTower1 extends CardImpl { + + public AlibansTower1(UUID ownerId) { + super(ownerId, 76, "Aliban's Tower", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "HML"; + + // Target blocking creature gets +3/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(3, 1, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterBlockingCreature())); + } + + public AlibansTower1(final AlibansTower1 card) { + super(card); + } + + @Override + public AlibansTower1 copy() { + return new AlibansTower1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/AlibansTower2.java b/Mage.Sets/src/mage/sets/homelands/AlibansTower2.java new file mode 100644 index 00000000000..f9841cce182 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/AlibansTower2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.homelands; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class AlibansTower2 extends AlibansTower1 { + + public AlibansTower2(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + } + + public AlibansTower2(final AlibansTower2 card) { + super(card); + } + + @Override + public AlibansTower2 copy() { + return new AlibansTower2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/AnHavvaTownship.java b/Mage.Sets/src/mage/sets/homelands/AnHavvaTownship.java index 5a1919ced64..8553de7e730 100644 --- a/Mage.Sets/src/mage/sets/homelands/AnHavvaTownship.java +++ b/Mage.Sets/src/mage/sets/homelands/AnHavvaTownship.java @@ -52,14 +52,14 @@ public class AnHavvaTownship extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {1}, {tap}: Add {G} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new GenericManaCost(1)); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {2}, {tap}: Add {R} or {W} to your mana pool. - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/homelands/AysenAbbey.java b/Mage.Sets/src/mage/sets/homelands/AysenAbbey.java index b8974e29087..4493e419578 100644 --- a/Mage.Sets/src/mage/sets/homelands/AysenAbbey.java +++ b/Mage.Sets/src/mage/sets/homelands/AysenAbbey.java @@ -52,14 +52,14 @@ public class AysenAbbey extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {1}, {tap}: Add {W} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new GenericManaCost(1)); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {2}, {tap}: Add {G} or {U} to your mana pool. - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/homelands/AysenBureaucrats1.java b/Mage.Sets/src/mage/sets/homelands/AysenBureaucrats1.java new file mode 100644 index 00000000000..41ecb5594d4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/AysenBureaucrats1.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.sets.homelands; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AysenBureaucrats1 extends mage.sets.masterseditionii.AysenBureaucrats { + + public AysenBureaucrats1(UUID ownerId) { + super(ownerId); + this.cardNumber = 104; + this.expansionSetCode = "HML"; + } + + public AysenBureaucrats1(final AysenBureaucrats1 card) { + super(card); + } + + @Override + public AysenBureaucrats1 copy() { + return new AysenBureaucrats1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/AysenBureaucrats2.java b/Mage.Sets/src/mage/sets/homelands/AysenBureaucrats2.java new file mode 100644 index 00000000000..001037563db --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/AysenBureaucrats2.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.sets.homelands; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AysenBureaucrats2 extends mage.sets.masterseditionii.AysenBureaucrats { + + public AysenBureaucrats2(UUID ownerId) { + super(ownerId); + this.cardNumber = 105; + this.expansionSetCode = "HML"; + } + + public AysenBureaucrats2(final AysenBureaucrats2 card) { + super(card); + } + + @Override + public AysenBureaucrats2 copy() { + return new AysenBureaucrats2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/CastleSengir.java b/Mage.Sets/src/mage/sets/homelands/CastleSengir.java index 091f4368d51..60ea0d23c19 100644 --- a/Mage.Sets/src/mage/sets/homelands/CastleSengir.java +++ b/Mage.Sets/src/mage/sets/homelands/CastleSengir.java @@ -52,14 +52,14 @@ public class CastleSengir extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {1}, {tap}: Add {B} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new GenericManaCost(1)); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {2}, {tap}: Add {U} or {R} to your mana pool. - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/homelands/FolkOfAnHavva1.java b/Mage.Sets/src/mage/sets/homelands/FolkOfAnHavva1.java new file mode 100644 index 00000000000..22ad5c2d3e6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/FolkOfAnHavva1.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.sets.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class FolkOfAnHavva1 extends CardImpl { + + public FolkOfAnHavva1(UUID ownerId) { + super(ownerId, 58, "Folk of An-Havva", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "HML"; + this.subtype.add("Human"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Folk of An-Havva blocks, it gets +2/+0 until end of turn. + this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(2, 0, Duration.EndOfTurn), false)); + } + + public FolkOfAnHavva1(final FolkOfAnHavva1 card) { + super(card); + } + + @Override + public FolkOfAnHavva1 copy() { + return new FolkOfAnHavva1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/FolkOfAnHavva2.java b/Mage.Sets/src/mage/sets/homelands/FolkOfAnHavva2.java new file mode 100644 index 00000000000..f28dbedca24 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/FolkOfAnHavva2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.homelands; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class FolkOfAnHavva2 extends FolkOfAnHavva1 { + + public FolkOfAnHavva2(UUID ownerId) { + super(ownerId); + this.cardNumber = 59; + } + + public FolkOfAnHavva2(final FolkOfAnHavva2 card) { + super(card); + } + + @Override + public FolkOfAnHavva2 copy() { + return new FolkOfAnHavva2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/KoskunKeep.java b/Mage.Sets/src/mage/sets/homelands/KoskunKeep.java index 8764ad81b04..a05a608eae1 100644 --- a/Mage.Sets/src/mage/sets/homelands/KoskunKeep.java +++ b/Mage.Sets/src/mage/sets/homelands/KoskunKeep.java @@ -52,14 +52,14 @@ public class KoskunKeep extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {1}, {tap}: Add {R} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new GenericManaCost(1)); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {2}, {tap}: Add {B} or {G} to your mana pool. - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/homelands/LeapingLizard.java b/Mage.Sets/src/mage/sets/homelands/LeapingLizard.java new file mode 100644 index 00000000000..a702e236f7a --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/LeapingLizard.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.sets.homelands; + +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.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class LeapingLizard extends CardImpl { + + public LeapingLizard(UUID ownerId) { + super(ownerId, 63, "Leaping Lizard", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "HML"; + this.subtype.add("Lizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {1}{G}: Leaping Lizard gets -0/-1 and gains flying until end of turn. + Effect effect = new BoostSourceEffect(0, -1, Duration.EndOfTurn); + effect.setText("{this} gets -0/-1"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{G}")); + effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains flying until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public LeapingLizard(final LeapingLizard card) { + super(card); + } + + @Override + public LeapingLizard copy() { + return new LeapingLizard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/MysticDecree.java b/Mage.Sets/src/mage/sets/homelands/MysticDecree.java new file mode 100644 index 00000000000..a4fb82b1e24 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/MysticDecree.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.sets.homelands; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.LoseAbilityAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.IslandwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class MysticDecree extends CardImpl { + + public MysticDecree(UUID ownerId) { + super(ownerId, 43, "Mystic Decree", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); + this.expansionSetCode = "HML"; + this.supertype.add("World"); + + // All creatures lose flying and islandwalk. + Effect effect = new LoseAbilityAllEffect(new FilterCreaturePermanent("All creatures"), FlyingAbility.getInstance(), Duration.WhileOnBattlefield); + effect.setText("All creatures lose flying"); + Effect effect2 = new LoseAbilityAllEffect(new FilterCreaturePermanent("all creatures"), new IslandwalkAbility(), Duration.WhileOnBattlefield); + effect2.setText("and islandwalk"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + ability.addEffect(effect2); + this.addAbility(ability); + } + + public MysticDecree(final MysticDecree card) { + super(card); + } + + @Override + public MysticDecree copy() { + return new MysticDecree(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/ReefPirates1.java b/Mage.Sets/src/mage/sets/homelands/ReefPirates1.java new file mode 100644 index 00000000000..2414edbb0aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/ReefPirates1.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.sets.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ReefPirates1 extends CardImpl { + + public ReefPirates1(UUID ownerId) { + super(ownerId, 45, "Reef Pirates", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "HML"; + this.subtype.add("Zombie"); + this.subtype.add("Pirate"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Reef Pirates deals damage to an opponent, that player puts the top card of his or her library into his or her graveyard. + Effect effect = new PutLibraryIntoGraveTargetEffect(1); + effect.setText("that player puts the top card of his or her library into his or her graveyard"); + this.addAbility(new DealsDamageToAPlayerTriggeredAbility(effect, false, true)); + } + + public ReefPirates1(final ReefPirates1 card) { + super(card); + } + + @Override + public ReefPirates1 copy() { + return new ReefPirates1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/ReefPirates2.java b/Mage.Sets/src/mage/sets/homelands/ReefPirates2.java new file mode 100644 index 00000000000..d7e484c14cc --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/ReefPirates2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.homelands; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ReefPirates2 extends ReefPirates1 { + + public ReefPirates2(UUID ownerId) { + super(ownerId); + this.cardNumber = 46; + } + + public ReefPirates2(final ReefPirates2 card) { + super(card); + } + + @Override + public ReefPirates2 copy() { + return new ReefPirates2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/SerratedArrows.java b/Mage.Sets/src/mage/sets/homelands/SerratedArrows.java index be8f776102a..07d6551edd7 100644 --- a/Mage.Sets/src/mage/sets/homelands/SerratedArrows.java +++ b/Mage.Sets/src/mage/sets/homelands/SerratedArrows.java @@ -59,7 +59,7 @@ public class SerratedArrows extends CardImpl { this.expansionSetCode = "HML"; // Serrated Arrows enters the battlefield with three arrowhead counters on it. - Effect effect = new AddCountersSourceEffect(CounterType.ARROWHEAD.createInstance(4)); + Effect effect = new AddCountersSourceEffect(CounterType.ARROWHEAD.createInstance(3)); effect.setText("with three arrowhead counters on it"); this.addAbility(new EntersBattlefieldAbility(effect)); // At the beginning of your upkeep, if there are no arrowhead counters on Serrated Arrows, sacrifice it. @@ -67,7 +67,7 @@ public class SerratedArrows extends CardImpl { "if there are no arrowhead counters on {this}, sacrifice it"); this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false)); // {tap}, Remove an arrowhead counter from Serrated Arrows: Put a -1/-1 counter on target creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.M1M1.createInstance()), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.ARROWHEAD.createInstance())); diff --git a/Mage.Sets/src/mage/sets/homelands/WinterSky.java b/Mage.Sets/src/mage/sets/homelands/WinterSky.java new file mode 100644 index 00000000000..df27a202b71 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/WinterSky.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.sets.homelands; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class WinterSky extends CardImpl { + + public WinterSky(UUID ownerId) { + super(ownerId, 100, "Winter Sky", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{R}"); + this.expansionSetCode = "HML"; + + // Flip a coin. If you win the flip, Winter Sky deals 1 damage to each creature and each player. If you lose the flip, each player draws a card. + this.getSpellAbility().addEffect(new WinterSkyEffect()); + } + + public WinterSky(final WinterSky card) { + super(card); + } + + @Override + public WinterSky copy() { + return new WinterSky(this); + } +} + +class WinterSkyEffect extends OneShotEffect { + + public WinterSkyEffect() { + super(Outcome.Damage); + staticText = "Flip a coin. If you win the flip, {this} deals 1 damage to each creature and each player. If you lose the flip, each player draws a card"; + } + + public WinterSkyEffect(WinterSkyEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (controller.flipCoin(game)) { + new DamageEverythingEffect(1).apply(game, source); + return true; + } else { + new DrawCardAllEffect(1).apply(game, source); + return true; + } + } + return false; + } + + @Override + public WinterSkyEffect copy() { + return new WinterSkyEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/WizardsSchool.java b/Mage.Sets/src/mage/sets/homelands/WizardsSchool.java index e6907b2655b..40029c7ef39 100644 --- a/Mage.Sets/src/mage/sets/homelands/WizardsSchool.java +++ b/Mage.Sets/src/mage/sets/homelands/WizardsSchool.java @@ -52,14 +52,14 @@ public class WizardsSchool extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {1}, {tap}: Add {U} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new GenericManaCost(1)); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {2}, {tap}: Add {W} or {B} to your mana pool. - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); - ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new GenericManaCost(2)); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/iceage/AltarOfBone.java b/Mage.Sets/src/mage/sets/iceage/AltarOfBone.java index f707874f338..f752381fbe2 100644 --- a/Mage.Sets/src/mage/sets/iceage/AltarOfBone.java +++ b/Mage.Sets/src/mage/sets/iceage/AltarOfBone.java @@ -51,7 +51,7 @@ public class AltarOfBone extends CardImpl { // As an additional cost to cast Altar of Bone, sacrifice a creature. this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); // Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()))); + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true)); } public AltarOfBone(final AltarOfBone card) { diff --git a/Mage.Sets/src/mage/sets/iceage/ArmorOfFaith.java b/Mage.Sets/src/mage/sets/iceage/ArmorOfFaith.java new file mode 100644 index 00000000000..5c6edff8436 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/ArmorOfFaith.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ArmorOfFaith extends mage.sets.masterseditionii.ArmorOfFaith { + + public ArmorOfFaith(UUID ownerId) { + super(ownerId); + this.cardNumber = 228; + this.expansionSetCode = "ICE"; + } + + public ArmorOfFaith(final ArmorOfFaith card) { + super(card); + } + + @Override + public ArmorOfFaith copy() { + return new ArmorOfFaith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/ArnjlotsAscent.java b/Mage.Sets/src/mage/sets/iceage/ArnjlotsAscent.java new file mode 100644 index 00000000000..91dbff9f70f --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/ArnjlotsAscent.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.sets.iceage; + +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.CumulativeUpkeepAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ArnjlotsAscent extends CardImpl { + + public ArnjlotsAscent(UUID ownerId) { + super(ownerId, 57, "Arnjlot's Ascent", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}"); + this.expansionSetCode = "ICE"; + + // Cumulative upkeep {U} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{U}"))); + // {1}: Target creature gains flying until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), + Duration.EndOfTurn), new ManaCostsImpl("{1}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ArnjlotsAscent(final ArnjlotsAscent card) { + super(card); + } + + @Override + public ArnjlotsAscent copy() { + return new ArnjlotsAscent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/BindingGrasp.java b/Mage.Sets/src/mage/sets/iceage/BindingGrasp.java new file mode 100644 index 00000000000..0188474a59b --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/BindingGrasp.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.iceage; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BindingGrasp extends mage.sets.masterseditionii.BindingGrasp { + + public BindingGrasp(UUID ownerId) { + super(ownerId); + this.cardNumber = 60; + this.expansionSetCode = "ICE"; + this.rarity = Rarity.UNCOMMON; + } + + public BindingGrasp(final BindingGrasp card) { + super(card); + } + + @Override + public BindingGrasp copy() { + return new BindingGrasp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Clairvoyance.java b/Mage.Sets/src/mage/sets/iceage/Clairvoyance.java index 997effb3bd1..c5cf6f7d4e7 100644 --- a/Mage.Sets/src/mage/sets/iceage/Clairvoyance.java +++ b/Mage.Sets/src/mage/sets/iceage/Clairvoyance.java @@ -28,19 +28,14 @@ package mage.sets.iceage; import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.game.Game; -import mage.players.Player; import mage.target.TargetPlayer; /** @@ -54,7 +49,7 @@ public class Clairvoyance extends CardImpl { this.expansionSetCode = "ICE"; // Look at target player's hand. - this.getSpellAbility().addEffect(new ClairvoyanceEffect()); + this.getSpellAbility().addEffect(new LookAtTargetPlayerHandEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); // Draw a card at the beginning of the next turn's upkeep. @@ -71,32 +66,3 @@ public class Clairvoyance extends CardImpl { return new Clairvoyance(this); } } - -class ClairvoyanceEffect extends OneShotEffect { - - ClairvoyanceEffect() { - super(Outcome.DrawCard); - staticText = "Look at target player's hand"; - } - - ClairvoyanceEffect(final ClairvoyanceEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - MageObject sourceObject = source.getSourceObject(game); - if (player != null && controller != null && sourceObject != null) { - controller.lookAtCards(sourceObject.getIdName() + " (" + player.getName() + ")", player.getHand(), game); - } - return true; - } - - @Override - public ClairvoyanceEffect copy() { - return new ClairvoyanceEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/iceage/DespoticScepter.java b/Mage.Sets/src/mage/sets/iceage/DespoticScepter.java new file mode 100644 index 00000000000..4c30c613732 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/DespoticScepter.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class DespoticScepter extends mage.sets.masterseditionii.DespoticScepter { + + public DespoticScepter(UUID ownerId) { + super(ownerId); + this.cardNumber = 291; + this.expansionSetCode = "ICE"; + } + + public DespoticScepter(final DespoticScepter card) { + super(card); + } + + @Override + public DespoticScepter copy() { + return new DespoticScepter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/FanaticalFever.java b/Mage.Sets/src/mage/sets/iceage/FanaticalFever.java index 82ecfeef4ca..c6e4ebcab53 100644 --- a/Mage.Sets/src/mage/sets/iceage/FanaticalFever.java +++ b/Mage.Sets/src/mage/sets/iceage/FanaticalFever.java @@ -28,6 +28,7 @@ package mage.sets.iceage; 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; @@ -48,8 +49,12 @@ public class FanaticalFever extends CardImpl { this.expansionSetCode = "ICE"; // Target creature gets +3/+0 and gains trample until end of turn. - this.getSpellAbility().addEffect(new BoostTargetEffect(3, 0, Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); + Effect effect = new BoostTargetEffect(3, 0, Duration.EndOfTurn); + effect.setText("Target creature gets +3/+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()); } diff --git a/Mage.Sets/src/mage/sets/iceage/ForbiddenLore.java b/Mage.Sets/src/mage/sets/iceage/ForbiddenLore.java new file mode 100644 index 00000000000..ee5187aeb2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/ForbiddenLore.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.sets.iceage; + +import java.util.UUID; +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.AttachEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class ForbiddenLore extends CardImpl { + + public ForbiddenLore(UUID ownerId) { + super(ownerId, 124, "Forbidden Lore", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Aura"); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted land has "{tap}: Target creature gets +2/+1 until end of turn." + Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 1, Duration.EndOfTurn), new TapSourceCost()); + gainAbility.addTarget(new TargetCreaturePermanent()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA, + Duration.WhileOnBattlefield, "Enchanted land has \"{T}: Target creature gets +2/+1 until end of turn.\""))); + } + + public ForbiddenLore(final ForbiddenLore card) { + super(card); + } + + @Override + public ForbiddenLore copy() { + return new ForbiddenLore(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/FoulFamiliar.java b/Mage.Sets/src/mage/sets/iceage/FoulFamiliar.java new file mode 100644 index 00000000000..af7dd89d640 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/FoulFamiliar.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class FoulFamiliar extends mage.sets.masterseditionii.FoulFamiliar { + + public FoulFamiliar(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "ICE"; + } + + public FoulFamiliar(final FoulFamiliar card) { + super(card); + } + + @Override + public FoulFamiliar copy() { + return new FoulFamiliar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Fumarole.java b/Mage.Sets/src/mage/sets/iceage/Fumarole.java new file mode 100644 index 00000000000..5e8f34c4639 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Fumarole.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Fumarole extends mage.sets.masterseditionii.Fumarole { + + public Fumarole(UUID ownerId) { + super(ownerId); + this.cardNumber = 369; + this.expansionSetCode = "ICE"; + } + + public Fumarole(final Fumarole card) { + super(card); + } + + @Override + public Fumarole copy() { + return new Fumarole(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/FyndhornBow.java b/Mage.Sets/src/mage/sets/iceage/FyndhornBow.java new file mode 100644 index 00000000000..6be48bc5a7e --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/FyndhornBow.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.sets.iceage; + +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class FyndhornBow extends CardImpl { + + public FyndhornBow(UUID ownerId) { + super(ownerId, 293, "Fyndhorn Bow", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "ICE"; + + // {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 FyndhornBow(final FyndhornBow card) { + super(card); + } + + @Override + public FyndhornBow copy() { + return new FyndhornBow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/GlacialCrevasses.java b/Mage.Sets/src/mage/sets/iceage/GlacialCrevasses.java new file mode 100644 index 00000000000..b394a9bbd01 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/GlacialCrevasses.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.sets.iceage; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventAllDamageByAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Quercitron + */ +public class GlacialCrevasses extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("a snow Mountain"); + + static { + filter.add(new SubtypePredicate("Mountain")); + filter.add(new SupertypePredicate("Snow")); + } + + public GlacialCrevasses(UUID ownerId) { + super(ownerId, 187, "Glacial Crevasses", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "ICE"; + + // Sacrifice a snow Mountain: Prevent all combat damage that would be dealt this turn. + Effect effect = new PreventAllDamageByAllEffect(Duration.EndOfTurn, true); + effect.setText("Prevent all combat damage that would be dealt this turn"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public GlacialCrevasses(final GlacialCrevasses card) { + super(card); + } + + @Override + public GlacialCrevasses copy() { + return new GlacialCrevasses(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/GoblinMutant.java b/Mage.Sets/src/mage/sets/iceage/GoblinMutant.java new file mode 100644 index 00000000000..b1b2b822430 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/GoblinMutant.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.sets.iceage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CantAttackIfDefenderControlsPermanent; +import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.permanent.TappedPredicate; + +/** + * + * @author BursegSardaukar + + */ +public class GoblinMutant extends CardImpl { + + static final private FilterCreaturePermanent filter = new FilterCreaturePermanent("untapped creature with power 3 or greater"); + static final private FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures with power 3 or greater"); + + static { + filter.add(Predicates.and(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2), Predicates.not(new TappedPredicate()))); + filter2.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + } + + public GoblinMutant(UUID ownerId) { + super(ownerId, 188, "Goblin Mutant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Goblin"); + this.subtype.add("Mutant"); + + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + //Trample + this.addAbility(TrampleAbility.getInstance()); + + // Goblin Mutant can't attack if defending player controls an untapped creature with power 3 or greater. + Effect effect = new CantAttackIfDefenderControlsPermanent(filter); + effect.setText("{this} can't attack if defending player controls an untapped creature with power 3 or greater."); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + //Goblin Mutant can't block creatures with power 3 or greater. + Effect effectBlock = new CantBlockCreaturesSourceEffect(filter2); + effectBlock.setText("{this} can't block creatures with power 3 or greater."); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectBlock)); + } + + public GoblinMutant(final GoblinMutant card) { + super(card); + } + + @Override + public GoblinMutant copy() { + return new GoblinMutant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/HotSprings.java b/Mage.Sets/src/mage/sets/iceage/HotSprings.java new file mode 100644 index 00000000000..c03aca60797 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/HotSprings.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.sets.iceage; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class HotSprings extends CardImpl { + + public HotSprings(UUID ownerId) { + super(ownerId, 136, "Hot Springs", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Aura"); + + // Enchant land you control + TargetPermanent auraTarget = new TargetControlledPermanent(new FilterControlledLandPermanent("land you control")); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted land has "{tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn." + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); + effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public HotSprings(final HotSprings card) { + super(card); + } + + @Override + public HotSprings copy() { + return new HotSprings(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/HyalopterousLemure.java b/Mage.Sets/src/mage/sets/iceage/HyalopterousLemure.java new file mode 100644 index 00000000000..07ad8bc2f88 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/HyalopterousLemure.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.sets.iceage; + +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.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class HyalopterousLemure extends CardImpl { + + public HyalopterousLemure(UUID ownerId) { + super(ownerId, 21, "Hyalopterous Lemure", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Spirit"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // {0}: Hyalopterous Lemure gets -1/-0 and gains flying until end of turn. + Effect effect = new BoostSourceEffect(-1, 0, Duration.EndOfTurn); + effect.setText("{this} gets -1/-0"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, 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 HyalopterousLemure(final HyalopterousLemure card) { + super(card); + } + + @Override + public HyalopterousLemure copy() { + return new HyalopterousLemure(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/HymnOfRebirth.java b/Mage.Sets/src/mage/sets/iceage/HymnOfRebirth.java new file mode 100644 index 00000000000..c17069ce9c2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/HymnOfRebirth.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class HymnOfRebirth extends mage.sets.mastersedition.HymnOfRebirth { + + public HymnOfRebirth(UUID ownerId) { + super(ownerId); + this.cardNumber = 373; + this.expansionSetCode = "ICE"; + } + + public HymnOfRebirth(final HymnOfRebirth card) { + super(card); + } + + @Override + public HymnOfRebirth copy() { + return new HymnOfRebirth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/KrovikanSorcerer.java b/Mage.Sets/src/mage/sets/iceage/KrovikanSorcerer.java new file mode 100644 index 00000000000..b2cedf2cc3e --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/KrovikanSorcerer.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class KrovikanSorcerer extends mage.sets.vintagemasters.KrovikanSorcerer { + + public KrovikanSorcerer(UUID ownerId) { + super(ownerId); + this.cardNumber = 81; + this.expansionSetCode = "ICE"; + } + + public KrovikanSorcerer(final KrovikanSorcerer card) { + super(card); + } + + @Override + public KrovikanSorcerer copy() { + return new KrovikanSorcerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/LandCap.java b/Mage.Sets/src/mage/sets/iceage/LandCap.java index 9049711a15e..b39a78c9d93 100644 --- a/Mage.Sets/src/mage/sets/iceage/LandCap.java +++ b/Mage.Sets/src/mage/sets/iceage/LandCap.java @@ -67,10 +67,10 @@ public class LandCap extends CardImpl { Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.DEPLETION.createInstance()), TargetController.YOU, false); this.addAbility(ability2); // {T}: Add {W} or {U} to your mana pool. Put a depletion counter on Land Cap. - Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new TapSourceCost()); + Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new TapSourceCost()); ability3.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability3); - Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new TapSourceCost()); + Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new TapSourceCost()); ability4.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability4); } diff --git a/Mage.Sets/src/mage/sets/iceage/LavaTubes.java b/Mage.Sets/src/mage/sets/iceage/LavaTubes.java index ba645300648..a768579eaac 100644 --- a/Mage.Sets/src/mage/sets/iceage/LavaTubes.java +++ b/Mage.Sets/src/mage/sets/iceage/LavaTubes.java @@ -67,10 +67,10 @@ public class LavaTubes extends CardImpl { Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.DEPLETION.createInstance()), TargetController.YOU, false); this.addAbility(ability2); // {tap}: Add {B} or {R} to your mana pool. Put a depletion counter on Lava Tubes. - Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()); + Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost()); ability3.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability3); - Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new TapSourceCost()); + Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new TapSourceCost()); ability4.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability4); } diff --git a/Mage.Sets/src/mage/sets/iceage/Lhurgoyf.java b/Mage.Sets/src/mage/sets/iceage/Lhurgoyf.java index f927d789a56..7f7bcacc82a 100644 --- a/Mage.Sets/src/mage/sets/iceage/Lhurgoyf.java +++ b/Mage.Sets/src/mage/sets/iceage/Lhurgoyf.java @@ -28,17 +28,19 @@ package mage.sets.iceage; import java.util.UUID; - -import mage.constants.*; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount; import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.players.Player; @@ -71,17 +73,13 @@ public class Lhurgoyf extends CardImpl { } } - - class LhurgoyfEffect extends ContinuousEffectImpl { - public LhurgoyfEffect() { - super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.CharacteristicDefining_7a, Outcome.BoostCreature); staticText = "{this}'s power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1"; } - public LhurgoyfEffect(final LhurgoyfEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/sets/iceage/MesmericTrance.java b/Mage.Sets/src/mage/sets/iceage/MesmericTrance.java new file mode 100644 index 00000000000..4286d8d1733 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/MesmericTrance.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MesmericTrance extends mage.sets.masterseditionii.MesmericTrance { + + public MesmericTrance(UUID ownerId) { + super(ownerId); + this.cardNumber = 83; + this.expansionSetCode = "ICE"; + } + + public MesmericTrance(final MesmericTrance card) { + super(card); + } + + @Override + public MesmericTrance copy() { + return new MesmericTrance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/MysticMight.java b/Mage.Sets/src/mage/sets/iceage/MysticMight.java new file mode 100644 index 00000000000..47ec41770ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/MysticMight.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.sets.iceage; + +import java.util.UUID; +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.AttachEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class MysticMight extends CardImpl { + + public MysticMight(UUID ownerId) { + super(ownerId, 86, "Mystic Might", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Aura"); + + // Enchant land you control + TargetPermanent auraTarget = new TargetControlledPermanent(new FilterControlledLandPermanent("land you control")); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Cumulative upkeep {1}{U} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}{U}"))); + // Enchanted land has "{tap}: Target creature gets +2/+2 until end of turn." + Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost()); + gainAbility.addTarget(new TargetCreaturePermanent()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA, + Duration.WhileOnBattlefield, "Enchanted land has \"{T}: Target creature gets +2/+2 until end of turn.\""))); + } + + public MysticMight(final MysticMight card) { + super(card); + } + + @Override + public MysticMight copy() { + return new MysticMight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/OrcishCannoneers.java b/Mage.Sets/src/mage/sets/iceage/OrcishCannoneers.java index ef0cebf67d2..644e2eeb821 100644 --- a/Mage.Sets/src/mage/sets/iceage/OrcishCannoneers.java +++ b/Mage.Sets/src/mage/sets/iceage/OrcishCannoneers.java @@ -32,6 +32,7 @@ import mage.MageInt; 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.DamageControllerEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; @@ -57,7 +58,9 @@ public class OrcishCannoneers extends CardImpl { // {tap}: Orcish Cannoneers deals 2 damage to target creature or player and 3 damage to you. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); - ability.addEffect(new DamageControllerEffect(3)); + Effect effect = new DamageControllerEffect(3); + effect.setText("and 3 damage to you"); + ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/iceage/Rally.java b/Mage.Sets/src/mage/sets/iceage/Rally.java new file mode 100644 index 00000000000..16bd28f1c64 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Rally.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.sets.iceage; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterBlockingCreature; + +/** + * + * @author LoneFox + */ +public class Rally extends CardImpl { + + public Rally(UUID ownerId) { + super(ownerId, 272, "Rally", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}{W}"); + this.expansionSetCode = "ICE"; + + // Blocking creatures get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(1, 1, Duration.EndOfTurn, + new FilterBlockingCreature("blocking creatures"), false)); + } + + public Rally(final Rally card) { + super(card); + } + + @Override + public Rally copy() { + return new Rally(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/RiverDelta.java b/Mage.Sets/src/mage/sets/iceage/RiverDelta.java index 008c5d3f159..1a441d947d5 100644 --- a/Mage.Sets/src/mage/sets/iceage/RiverDelta.java +++ b/Mage.Sets/src/mage/sets/iceage/RiverDelta.java @@ -67,10 +67,10 @@ public class RiverDelta extends CardImpl { Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.DEPLETION.createInstance()), TargetController.YOU, false); this.addAbility(ability2); // {tap}: Add {U} or {B} to your mana pool. Put a depletion counter on River Delta. - Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new TapSourceCost()); + Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new TapSourceCost()); ability3.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability3); - Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()); + Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost()); ability4.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability4); } diff --git a/Mage.Sets/src/mage/sets/iceage/SnowHound.java b/Mage.Sets/src/mage/sets/iceage/SnowHound.java index fb95474fb9c..bd828411862 100644 --- a/Mage.Sets/src/mage/sets/iceage/SnowHound.java +++ b/Mage.Sets/src/mage/sets/iceage/SnowHound.java @@ -67,11 +67,11 @@ public class SnowHound extends CardImpl { // {1}, {tap}: Return Snow Hound and target green or blue creature you control to their owner's hand. Effect effect = new ReturnToHandSourceEffect(true); - effect.setText("Return Snow Hound"); + effect.setText("Return Snow Hound"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); effect = new ReturnToHandTargetEffect(); - effect.setText("and green or blue creature you control to their owners' hands"); + effect.setText("and target green or blue creature you control to their owners' hands"); ability.addTarget(new TargetControlledCreaturePermanent(filter)); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/iceage/SongsOfTheDamned.java b/Mage.Sets/src/mage/sets/iceage/SongsOfTheDamned.java index 5732302dad6..2bb2c448bc8 100644 --- a/Mage.Sets/src/mage/sets/iceage/SongsOfTheDamned.java +++ b/Mage.Sets/src/mage/sets/iceage/SongsOfTheDamned.java @@ -47,7 +47,7 @@ public class SongsOfTheDamned extends CardImpl { this.expansionSetCode = "ICE"; // Add {B} to your mana pool for each creature card in your graveyard. - DynamicManaEffect effect = new DynamicManaEffect(Mana.BlackMana, new CardsInControllerGraveyardCount(new FilterCreatureCard())); + DynamicManaEffect effect = new DynamicManaEffect(Mana.BlackMana(1), new CardsInControllerGraveyardCount(new FilterCreatureCard())); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/sets/iceage/SoulKiss.java b/Mage.Sets/src/mage/sets/iceage/SoulKiss.java new file mode 100644 index 00000000000..3dfbde1acd0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/SoulKiss.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.iceage; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SoulKiss extends mage.sets.masterseditionii.SoulKiss { + + public SoulKiss(UUID ownerId) { + super(ownerId); + this.cardNumber = 50; + this.expansionSetCode = "ICE"; + this.rarity = Rarity.COMMON; + } + + public SoulKiss(final SoulKiss card) { + super(card); + } + + @Override + public SoulKiss copy() { + return new SoulKiss(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Stampede.java b/Mage.Sets/src/mage/sets/iceage/Stampede.java new file mode 100644 index 00000000000..0a701005d9c --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Stampede.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.sets.iceage; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; + +/** + * + * @author LoneFox + */ +public class Stampede extends CardImpl { + + public Stampede(UUID ownerId) { + super(ownerId, 153, "Stampede", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{G}{G}"); + this.expansionSetCode = "ICE"; + + // Attacking creatures get +1/+0 and gain trample until end of turn. + Effect effect = new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature(), false); + effect.setText("attacking creatures get +1/+0"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterAttackingCreature()); + effect.setText("and gain trample until end of turn"); + this.getSpellAbility().addEffect(effect); + } + + public Stampede(final Stampede card) { + super(card); + } + + @Override + public Stampede copy() { + return new Stampede(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/StoneSpirit.java b/Mage.Sets/src/mage/sets/iceage/StoneSpirit.java new file mode 100644 index 00000000000..9f7af081f96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/StoneSpirit.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.sets.iceage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class StoneSpirit extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public StoneSpirit(UUID ownerId) { + super(ownerId, 218, "Stone Spirit", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Elemental"); + this.subtype.add("Spirit"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Stone Spirit can't be blocked by creatures with flying. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public StoneSpirit(final StoneSpirit card) { + super(card); + } + + @Override + public StoneSpirit copy() { + return new StoneSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/StormSpirit.java b/Mage.Sets/src/mage/sets/iceage/StormSpirit.java new file mode 100644 index 00000000000..c59492cc623 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/StormSpirit.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class StormSpirit extends mage.sets.masterseditionii.StormSpirit { + + public StormSpirit(UUID ownerId) { + super(ownerId); + this.cardNumber = 381; + this.expansionSetCode = "ICE"; + } + + public StormSpirit(final StormSpirit card) { + super(card); + } + + @Override + public StormSpirit copy() { + return new StormSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Sunstone.java b/Mage.Sets/src/mage/sets/iceage/Sunstone.java new file mode 100644 index 00000000000..1d195808294 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Sunstone.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.sets.iceage; + +import java.util.UUID; +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.Effect; +import mage.abilities.effects.common.PreventAllDamageByAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Quercitron + */ +public class Sunstone extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("a snow land"); + + static { + filter.add(new SupertypePredicate("Snow")); + } + + public Sunstone(UUID ownerId) { + super(ownerId, 316, "Sunstone", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "ICE"; + + // {2}, Sacrifice a snow land: Prevent all combat damage that would be dealt this turn. + Effect effect = new PreventAllDamageByAllEffect(Duration.EndOfTurn, true); + effect.setText("Prevent all combat damage that would be dealt this turn"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public Sunstone(final Sunstone card) { + super(card); + } + + @Override + public Sunstone copy() { + return new Sunstone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/TimberlineRidge.java b/Mage.Sets/src/mage/sets/iceage/TimberlineRidge.java index e10a0009454..bc8c8483cde 100644 --- a/Mage.Sets/src/mage/sets/iceage/TimberlineRidge.java +++ b/Mage.Sets/src/mage/sets/iceage/TimberlineRidge.java @@ -67,10 +67,10 @@ public class TimberlineRidge extends CardImpl { Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.DEPLETION.createInstance()), TargetController.YOU, false); this.addAbility(ability2); // {tap}: Add {R} or {G} to your mana pool. Put a depletion counter on Timberline Ridge. - Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new TapSourceCost()); + Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new TapSourceCost()); ability3.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability3); - Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new TapSourceCost()); + Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new TapSourceCost()); ability4.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability4); } diff --git a/Mage.Sets/src/mage/sets/iceage/Veldt.java b/Mage.Sets/src/mage/sets/iceage/Veldt.java index 29f1e423aa3..d286f7e7765 100644 --- a/Mage.Sets/src/mage/sets/iceage/Veldt.java +++ b/Mage.Sets/src/mage/sets/iceage/Veldt.java @@ -67,10 +67,10 @@ public class Veldt extends CardImpl { Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.DEPLETION.createInstance()), TargetController.YOU, false); this.addAbility(ability2); // {tap}: Add {G} or {W} to your mana pool. Put a depletion counter on Veldt. - Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new TapSourceCost()); + Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new TapSourceCost()); ability3.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability3); - Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new TapSourceCost()); + Ability ability4 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new TapSourceCost()); ability4.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance())); this.addAbility(ability4); } diff --git a/Mage.Sets/src/mage/sets/iceage/WarChariot.java b/Mage.Sets/src/mage/sets/iceage/WarChariot.java new file mode 100644 index 00000000000..af4c6723531 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/WarChariot.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.sets.iceage; + +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.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class WarChariot extends CardImpl { + + public WarChariot(UUID ownerId) { + super(ownerId, 323, "War Chariot", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "ICE"; + + // {3}, {tap}: Target creature gains trample until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(), + Duration.EndOfTurn), new ManaCostsImpl("{3}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public WarChariot(final WarChariot card) { + super(card); + } + + @Override + public WarChariot copy() { + return new WarChariot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Warning.java b/Mage.Sets/src/mage/sets/iceage/Warning.java new file mode 100644 index 00000000000..2894a43c781 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Warning.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Warning extends mage.sets.masterseditionii.Warning { + + public Warning(UUID ownerId) { + super(ownerId); + this.cardNumber = 279; + this.expansionSetCode = "ICE"; + } + + public Warning(final Warning card) { + super(card); + } + + @Override + public Warning copy() { + return new Warning(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/WingsOfAesthir.java b/Mage.Sets/src/mage/sets/iceage/WingsOfAesthir.java new file mode 100644 index 00000000000..2f1e01acf75 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/WingsOfAesthir.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.sets.iceage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class WingsOfAesthir extends mage.sets.masterseditionii.WingsOfAesthir { + + public WingsOfAesthir(UUID ownerId) { + super(ownerId); + this.cardNumber = 383; + this.expansionSetCode = "ICE"; + } + + public WingsOfAesthir(final WingsOfAesthir card) { + super(card); + } + + @Override + public WingsOfAesthir copy() { + return new WingsOfAesthir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/WordOfBlasting.java b/Mage.Sets/src/mage/sets/iceage/WordOfBlasting.java new file mode 100644 index 00000000000..380dc65b44b --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/WordOfBlasting.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.sets.iceage; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.TargetConvertedManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetControllerEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class WordOfBlasting extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Wall"); + + static { + filter.add(new SubtypePredicate("Wall")); + } + + public WordOfBlasting(UUID ownerId) { + super(ownerId, 224, "Word of Blasting", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "ICE"; + + // Destroy target Wall. It can't be regenerated. Word of Blasting deals damage equal to that Wall's converted mana cost to the Wall's controller. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + Effect effect = new DamageTargetControllerEffect(new TargetConvertedManaCost()); + effect.setText("{this} deals damage equal to that Wall's converted mana cost to the Wall's controller"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public WordOfBlasting(final WordOfBlasting card) { + super(card); + } + + @Override + public WordOfBlasting copy() { + return new WordOfBlasting(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/YavimayaGnats.java b/Mage.Sets/src/mage/sets/iceage/YavimayaGnats.java new file mode 100644 index 00000000000..a2e726d4e69 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/YavimayaGnats.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.sets.iceage; + +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.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author nigelzor + */ +public class YavimayaGnats extends CardImpl { + + public YavimayaGnats(UUID ownerId) { + super(ownerId, 168, "Yavimaya Gnats", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Insect"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {G}: Regenerate Yavimaya Gnats. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{G}"))); + } + + public YavimayaGnats(final YavimayaGnats card) { + super(card); + } + + @Override + public YavimayaGnats copy() { + return new YavimayaGnats(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/ZuranEnchanter.java b/Mage.Sets/src/mage/sets/iceage/ZuranEnchanter.java new file mode 100644 index 00000000000..428f191c7d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/ZuranEnchanter.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.sets.iceage; + +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.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPlayer; + +/** + * + * @author nigelzor + */ +public class ZuranEnchanter extends CardImpl { + + public ZuranEnchanter(UUID ownerId) { + super(ownerId, 110, "Zuran Enchanter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{B}, {tap}: Target player discards a card. Activate this ability only during your turn. + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}{B}"), MyTurnCondition.getInstance()); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public ZuranEnchanter(final ZuranEnchanter card) { + super(card); + } + + @Override + public ZuranEnchanter copy() { + return new ZuranEnchanter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/GeistOfSaintTraft.java b/Mage.Sets/src/mage/sets/innistrad/GeistOfSaintTraft.java index 121a77b2705..ca4bb6e65c6 100644 --- a/Mage.Sets/src/mage/sets/innistrad/GeistOfSaintTraft.java +++ b/Mage.Sets/src/mage/sets/innistrad/GeistOfSaintTraft.java @@ -35,14 +35,13 @@ 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.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.constants.Outcome; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.AngelToken; import mage.players.Player; import mage.target.targetpointer.FixedTarget; @@ -79,6 +78,7 @@ public class GeistOfSaintTraft extends CardImpl { } class GeistOfSaintTraftEffect extends OneShotEffect { + GeistOfSaintTraftEffect() { super(Outcome.PutCreatureInPlay); staticText = "put a 4/4 white Angel creature token with flying onto the battlefield tapped and attacking. Exile that token at end of combat"; @@ -93,10 +93,14 @@ class GeistOfSaintTraftEffect extends OneShotEffect { AngelToken token = new AngelToken(); Player controller = game.getPlayer(source.getControllerId()); if (controller != null && token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), true, true)) { - Effect effect = new ExileTargetEffect(); - effect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - CreateDelayedTriggeredAbilityEffect createEffect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect), false); - createEffect.apply(game, source); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect), source); + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/sets/innistrad/SharpenedPitchfork.java b/Mage.Sets/src/mage/sets/innistrad/SharpenedPitchfork.java index 9f5743b3bda..69b5927d538 100644 --- a/Mage.Sets/src/mage/sets/innistrad/SharpenedPitchfork.java +++ b/Mage.Sets/src/mage/sets/innistrad/SharpenedPitchfork.java @@ -28,11 +28,6 @@ package mage.sets.innistrad; import java.util.UUID; - -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.EquippedHasSubtypeCondition; import mage.abilities.costs.mana.GenericManaCost; @@ -42,7 +37,11 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; /** * @@ -53,7 +52,7 @@ public class SharpenedPitchfork extends CardImpl { private static final String staticText = "As long as equipped creature is a Human, it gets +1/+1"; public SharpenedPitchfork(UUID ownerId) { - super(ownerId, 232, "Sharpened Pitchfork", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + super(ownerId, 232, "Sharpened Pitchfork", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); this.expansionSetCode = "ISD"; this.subtype.add("Equipment"); diff --git a/Mage.Sets/src/mage/sets/innistrad/SpiderSpawning.java b/Mage.Sets/src/mage/sets/innistrad/SpiderSpawning.java index af915331c45..3b5ed551c26 100644 --- a/Mage.Sets/src/mage/sets/innistrad/SpiderSpawning.java +++ b/Mage.Sets/src/mage/sets/innistrad/SpiderSpawning.java @@ -1,82 +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.sets.innistrad; - -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.TimingRule; -import mage.MageInt; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.keyword.FlashbackAbility; -import mage.abilities.keyword.ReachAbility; -import mage.cards.CardImpl; -import mage.filter.common.FilterCreatureCard; -import mage.game.permanent.token.Token; - -/** - * - * @author North - */ -public class SpiderSpawning extends CardImpl { - - public SpiderSpawning(UUID ownerId) { - super(ownerId, 203, "Spider Spawning", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{G}"); - this.expansionSetCode = "ISD"; - - - // Put a 1/2 green Spider creature token with reach onto the battlefield for each creature card in your graveyard. - this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiderToken(), new CardsInControllerGraveyardCount(new FilterCreatureCard()))); - // Flashback {6}{B} - this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{B}"), TimingRule.SORCERY)); - } - - public SpiderSpawning(final SpiderSpawning card) { - super(card); - } - - @Override - public SpiderSpawning copy() { - return new SpiderSpawning(this); - } -} - -class SpiderToken extends Token { - - public SpiderToken() { - super("Spider", "1/2 green Spider creature token with reach"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Spider"); - power = new MageInt(1); - toughness = new MageInt(2); - addAbility(ReachAbility.getInstance()); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.innistrad; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.filter.common.FilterCreatureCard; +import mage.game.permanent.token.SpiderToken; + +/** + * + * @author North + */ +public class SpiderSpawning extends CardImpl { + + public SpiderSpawning(UUID ownerId) { + super(ownerId, 203, "Spider Spawning", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{G}"); + this.expansionSetCode = "ISD"; + + + // Put a 1/2 green Spider creature token with reach onto the battlefield for each creature card in your graveyard. + this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiderToken(), new CardsInControllerGraveyardCount(new FilterCreatureCard()))); + // Flashback {6}{B} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{B}"), TimingRule.SORCERY)); + } + + public SpiderSpawning(final SpiderSpawning card) { + super(card); + } + + @Override + public SpiderSpawning copy() { + return new SpiderSpawning(this); + } +} + diff --git a/Mage.Sets/src/mage/sets/innistrad/TreeOfRedemption.java b/Mage.Sets/src/mage/sets/innistrad/TreeOfRedemption.java index f5a37fb5ce7..b20abba0013 100644 --- a/Mage.Sets/src/mage/sets/innistrad/TreeOfRedemption.java +++ b/Mage.Sets/src/mage/sets/innistrad/TreeOfRedemption.java @@ -28,11 +28,6 @@ package mage.sets.innistrad; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -41,6 +36,12 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -94,14 +95,17 @@ class TreeOfRedemptionEffect extends OneShotEffect { if (perm != null) { int amount = perm.getToughness().getValue(); int life = player.getLife(); - if (life == amount) + if (life == amount) { return false; - if (life < amount && !player.isCanGainLife()) + } + if (life < amount && !player.isCanGainLife()) { return false; - if (life > amount && !player.isCanLoseLife()) + } + if (life > amount && !player.isCanLoseLife()) { return false; + } player.setLife(amount, game); - game.addEffect(new SetPowerToughnessSourceEffect(Integer.MIN_VALUE, life, Duration.WhileOnBattlefield), source); + game.addEffect(new SetPowerToughnessSourceEffect(Integer.MIN_VALUE, life, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); return true; } } @@ -113,4 +117,4 @@ class TreeOfRedemptionEffect extends OneShotEffect { return new TreeOfRedemptionEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/invasion/BogInitiate.java b/Mage.Sets/src/mage/sets/invasion/BogInitiate.java index 32e731cc687..32227b0b24a 100644 --- a/Mage.Sets/src/mage/sets/invasion/BogInitiate.java +++ b/Mage.Sets/src/mage/sets/invasion/BogInitiate.java @@ -53,7 +53,7 @@ public class BogInitiate extends CardImpl { this.toughness = new MageInt(1); // {1}: Add {B} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new ManaCostsImpl("{1}"))); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new ManaCostsImpl("{1}"))); } public BogInitiate(final BogInitiate card) { diff --git a/Mage.Sets/src/mage/sets/invasion/ChaoticStrike.java b/Mage.Sets/src/mage/sets/invasion/ChaoticStrike.java new file mode 100644 index 00000000000..b7724a2bdc0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/ChaoticStrike.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.sets.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.TurnPhase; +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.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ChaoticStrike extends CardImpl { + + public ChaoticStrike(UUID ownerId) { + super(ownerId, 140, "Chaotic Strike", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "INV"; + + // Cast Chaotic Strike only during combat after blockers are declared. + Ability ability = new SimpleStaticAbility(Zone.ALL, new ChaoticStrikeRuleModifyingEffect()); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Flip a coin. If you win the flip, target creature gets +1/+1 until end of turn. + this.getSpellAbility().addEffect(new ChaoticStrikeEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public ChaoticStrike(final ChaoticStrike card) { + super(card); + } + + @Override + public ChaoticStrike copy() { + return new ChaoticStrike(this); + } +} + +class ChaoticStrikeRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { + + ChaoticStrikeRuleModifyingEffect() { + super(Duration.EndOfGame, Outcome.Detriment); + staticText = "Cast {this} only during combat after blockers are declared"; + } + + ChaoticStrikeRuleModifyingEffect(final ChaoticStrikeRuleModifyingEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType().equals(GameEvent.EventType.CAST_SPELL); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getSourceId().equals(source.getSourceId())) { + return !game.getPhase().getType().equals(TurnPhase.COMBAT) || + game.getStep().getType().equals(PhaseStep.BEGIN_COMBAT) || + game.getStep().getType().equals(PhaseStep.DECLARE_ATTACKERS); + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ChaoticStrikeRuleModifyingEffect copy() { + return new ChaoticStrikeRuleModifyingEffect(this); + } +} + +class ChaoticStrikeEffect extends OneShotEffect { + + public ChaoticStrikeEffect() { + super(Outcome.Damage); + staticText = "Flip a coin. If you win the flip, target creature gets +1/+1 until end of turn"; + } + + public ChaoticStrikeEffect(ChaoticStrikeEffect effect) { + super(effect); + } + + @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 && permanent != null) { + if (controller.flipCoin(game)) { + game.addEffect(new BoostTargetEffect(1, 1, Duration.EndOfTurn), source); + return true; + } + } + return false; + } + + @Override + public ChaoticStrikeEffect copy() { + return new ChaoticStrikeEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/CoalitionVictory.java b/Mage.Sets/src/mage/sets/invasion/CoalitionVictory.java new file mode 100644 index 00000000000..f255546428d --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/CoalitionVictory.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.invasion; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author anonymous + */ +public class CoalitionVictory extends mage.sets.timeshifted.CoalitionVictory { + + public CoalitionVictory(UUID ownerId) { + super(ownerId); + this.cardNumber = 241; + this.expansionSetCode = "INV"; + this.rarity = Rarity.RARE; + } + + public CoalitionVictory(final CoalitionVictory card) { + super(card); + } + + @Override + public CoalitionVictory copy() { + return new CoalitionVictory(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/SpiritOfResistance.java b/Mage.Sets/src/mage/sets/invasion/SpiritOfResistance.java new file mode 100644 index 00000000000..8cf66a1f33d --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/SpiritOfResistance.java @@ -0,0 +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.sets.invasion; + +import java.util.HashSet; +import java.util.UUID; + +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalReplacementEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventAllDamageToControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author Quercitron + */ +public class SpiritOfResistance extends CardImpl { + + public SpiritOfResistance(UUID ownerId) { + super(ownerId, 38, "Spirit of Resistance", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "INV"; + + // As long as you control a permanent of each color, prevent all damage that would be dealt to you. + Effect effect = new ConditionalReplacementEffect( + new PreventAllDamageToControllerEffect(Duration.WhileOnBattlefield), + SpiritOfResistanceCondition.getInstance()); + effect.setText("As long as you control a permanent of each color, prevent all damage that would be dealt to you."); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public SpiritOfResistance(final SpiritOfResistance card) { + super(card); + } + + @Override + public SpiritOfResistance copy() { + return new SpiritOfResistance(this); + } +} + +class SpiritOfResistanceCondition implements Condition { + + private static final SpiritOfResistanceCondition fInstance = new SpiritOfResistanceCondition(); + + public static SpiritOfResistanceCondition getInstance() { + return fInstance; + }; + + private SpiritOfResistanceCondition() {} + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + HashSet colors = new HashSet<>(); + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { + if (permanent.getColor(game).isBlack()) { + colors.add(ObjectColor.BLACK); + } + if (permanent.getColor(game).isBlue()) { + colors.add(ObjectColor.BLUE); + } + if (permanent.getColor(game).isRed()) { + colors.add(ObjectColor.RED); + } + if (permanent.getColor(game).isGreen()) { + colors.add(ObjectColor.GREEN); + } + if (permanent.getColor(game).isWhite()) { + colors.add(ObjectColor.WHITE); + } + } + return colors.size() >= 5; + } + return false; + } + + @Override + public String toString() { + return "you control a permanent of each color"; + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/TravelersCloak.java b/Mage.Sets/src/mage/sets/invasion/TravelersCloak.java new file mode 100644 index 00000000000..6a748bdb5a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/TravelersCloak.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.sets.invasion; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class TravelersCloak extends mage.sets.conspiracy.TravelersCloak { + + public TravelersCloak(UUID ownerId) { + super(ownerId); + this.cardNumber = 83; + this.expansionSetCode = "INV"; + } + + public TravelersCloak(final TravelersCloak card) { + super(card); + } + + @Override + public TravelersCloak copy() { + return new TravelersCloak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/izzetvsgolgari/NivixAerieOfTheFiremind.java b/Mage.Sets/src/mage/sets/izzetvsgolgari/NivixAerieOfTheFiremind.java new file mode 100644 index 00000000000..ba37bcea266 --- /dev/null +++ b/Mage.Sets/src/mage/sets/izzetvsgolgari/NivixAerieOfTheFiremind.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.sets.izzetvsgolgari; + +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.abilities.mana.ColorlessManaAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Library; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author emerald000 + */ +public class NivixAerieOfTheFiremind extends CardImpl { + + public NivixAerieOfTheFiremind(UUID ownerId) { + super(ownerId, 36, "Nivix, Aerie of the Firemind", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "DDJ"; + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {2}{U}{R}, {tap}: Exile the top card of your library. Until your next turn, you may cast that card if it's an instant or sorcery. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NivixAerieOfTheFiremindEffect(), new ManaCostsImpl<>("{2}{U}{R}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public NivixAerieOfTheFiremind(final NivixAerieOfTheFiremind card) { + super(card); + } + + @Override + public NivixAerieOfTheFiremind copy() { + return new NivixAerieOfTheFiremind(this); + } +} + +class NivixAerieOfTheFiremindEffect extends OneShotEffect { + + NivixAerieOfTheFiremindEffect() { + super(Outcome.Benefit); + this.staticText = "Exile the top card of your library. Until your next turn, you may cast that card if it's an instant or sorcery"; + } + + NivixAerieOfTheFiremindEffect(final NivixAerieOfTheFiremindEffect effect) { + super(effect); + } + + @Override + public NivixAerieOfTheFiremindEffect copy() { + return new NivixAerieOfTheFiremindEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Library library = controller.getLibrary(); + if (library.size() > 0) { + Card card = library.removeFromTop(game); + if (card != null + && controller.moveCardsToExile(card, source, game, true, source.getSourceId(), "Nivix, Aerie of the Firemind") + && (card.getCardType().contains(CardType.INSTANT) || card.getCardType().contains(CardType.SORCERY))) { + ContinuousEffect effect = new NivixAerieOfTheFiremindCanCastEffect(); + effect.setTargetPointer(new FixedTarget(card.getId())); + game.addEffect(effect, source); + } + } + return true; + } + return false; + } +} + +class NivixAerieOfTheFiremindCanCastEffect extends AsThoughEffectImpl { + + NivixAerieOfTheFiremindCanCastEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.UntilYourNextTurn, Outcome.Benefit); + staticText = "Until your next turn, you may cast that card"; + } + + NivixAerieOfTheFiremindCanCastEffect(final NivixAerieOfTheFiremindCanCastEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public NivixAerieOfTheFiremindCanCastEffect copy() { + return new NivixAerieOfTheFiremindCanCastEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + return this.getTargetPointer().getFirst(game, source) != null + && this.getTargetPointer().getFirst(game, source).equals(sourceId) + && source.getControllerId().equals(affectedControllerId) + && game.getState().getZone(sourceId).equals(Zone.EXILED); + } +} diff --git a/Mage.Sets/src/mage/sets/izzetvsgolgari/Thunderheads.java b/Mage.Sets/src/mage/sets/izzetvsgolgari/Thunderheads.java new file mode 100644 index 00000000000..8e10cd639fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/izzetvsgolgari/Thunderheads.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.sets.izzetvsgolgari; + +import java.util.UUID; + +/** + * + * @author nigelzor + */ +public class Thunderheads extends mage.sets.guildpact.Thunderheads { + + public Thunderheads(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "DDJ"; + } + + public Thunderheads(final Thunderheads card) { + super(card); + } + + @Override + public Thunderheads copy() { + return new Thunderheads(this); + } +} diff --git a/Mage.Sets/src/mage/sets/jacevschandra/Hostility.java b/Mage.Sets/src/mage/sets/jacevschandra/Hostility.java index a4e68652263..615e706f705 100644 --- a/Mage.Sets/src/mage/sets/jacevschandra/Hostility.java +++ b/Mage.Sets/src/mage/sets/jacevschandra/Hostility.java @@ -46,6 +46,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.token.Token; +import mage.game.stack.Spell; /** * @@ -111,7 +112,10 @@ class HostilityEffect extends PreventionEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (super.applies(event, source, game)) { if (game.getOpponents(source.getControllerId()).contains(event.getTargetId())) { - return true; + Spell spell = game.getStack().getSpell(event.getSourceId()); + if (spell != null && spell.getControllerId().equals(source.getControllerId())) { + return true; + } } } return false; diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/BloodcrazedHoplite.java b/Mage.Sets/src/mage/sets/journeyintonyx/BloodcrazedHoplite.java index 31e52d06b4a..d72892f67f3 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/BloodcrazedHoplite.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/BloodcrazedHoplite.java @@ -72,7 +72,7 @@ public class BloodcrazedHoplite extends CardImpl { this.addAbility(new HeroicAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), false))); // Whenever a +1/+1 counter is placed on Bloodcrazed Hoplite, remove a +1/+1 counter from target creature an opponent controls. Ability ability = new BloodcrazedHopliteTriggeredAbility(); - ability.addTarget(new TargetCreaturePermanent()); + ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java b/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java index 3f758c3321a..db20609309e 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/BrainMaggot.java @@ -192,7 +192,7 @@ class BrainMaggotReturnExiledCardEffect extends OneShotEffect { ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), zoneChangeCounter)); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (exile != null && sourcePermanent != null) { - controller.moveCards(exile, null, Zone.HAND, source, game); + controller.moveCards(exile, Zone.HAND, source, game); return true; } } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/MarketFestival.java b/Mage.Sets/src/mage/sets/journeyintonyx/MarketFestival.java index affa7e15e95..6f4c011d920 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/MarketFestival.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/MarketFestival.java @@ -111,7 +111,7 @@ class MarketFestivalTriggeredAbility extends TriggeredManaAbility { @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)."; + 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)."; } } @@ -154,15 +154,15 @@ class MarketFestivalManaEffect extends ManaEffect { } if (choiceColor.getColor().isBlack()) { - mana.addBlack(); + mana.increaseBlack(); } else if (choiceColor.getColor().isBlue()) { - mana.addBlue(); + mana.increaseBlue(); } else if (choiceColor.getColor().isRed()) { - mana.addRed(); + mana.increaseRed(); } else if (choiceColor.getColor().isGreen()) { - mana.addGreen(); + mana.increaseGreen(); } else if (choiceColor.getColor().isWhite()) { - mana.addWhite(); + mana.increaseWhite(); } } checkToFirePossibleEvents(mana, game, source); diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java b/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java index bc3084b4b15..b906849775c 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java @@ -30,7 +30,6 @@ package mage.sets.journeyintonyx; import java.util.Deque; import java.util.LinkedList; import java.util.UUID; -import java.util.logging.Logger; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; diff --git a/Mage.Sets/src/mage/sets/judgepromo/Damnation.java b/Mage.Sets/src/mage/sets/judgepromo/Damnation.java index b52992b4a05..764dcae3893 100644 --- a/Mage.Sets/src/mage/sets/judgepromo/Damnation.java +++ b/Mage.Sets/src/mage/sets/judgepromo/Damnation.java @@ -37,7 +37,7 @@ public class Damnation extends mage.sets.planarchaos.Damnation { public Damnation(UUID ownerId) { super(ownerId); - this.cardNumber = 94; + this.cardNumber = 98; this.expansionSetCode = "JR"; } diff --git a/Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.java b/Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.java index 3b3b3502ca7..d1be95bb480 100644 --- a/Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.java +++ b/Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.java @@ -37,7 +37,7 @@ public class DualcasterMage extends mage.sets.commander2014.DualcasterMage { public DualcasterMage(UUID ownerId) { super(ownerId); - this.cardNumber = 95; + this.cardNumber = 99; this.expansionSetCode = "JR"; } diff --git a/Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.java b/Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.java index 624e723230c..87d0da65db1 100644 --- a/Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.java +++ b/Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.java @@ -37,7 +37,7 @@ public class FeldonOfTheThirdPath extends mage.sets.commander2014.FeldonOfTheThi public FeldonOfTheThirdPath(UUID ownerId) { super(ownerId); - this.cardNumber = 96; + this.cardNumber = 100; this.expansionSetCode = "JR"; } diff --git a/Mage.Sets/src/mage/sets/judgepromo/RishadanPort.java b/Mage.Sets/src/mage/sets/judgepromo/RishadanPort.java index 5ff68095f0f..124ef61d9b4 100644 --- a/Mage.Sets/src/mage/sets/judgepromo/RishadanPort.java +++ b/Mage.Sets/src/mage/sets/judgepromo/RishadanPort.java @@ -37,7 +37,7 @@ public class RishadanPort extends mage.sets.mercadianmasques.RishadanPort { public RishadanPort(UUID ownerId) { super(ownerId); - this.cardNumber = 98; + this.cardNumber = 96; this.expansionSetCode = "JR"; } diff --git a/Mage.Sets/src/mage/sets/judgepromo/ShardlessAgent.java b/Mage.Sets/src/mage/sets/judgepromo/ShardlessAgent.java new file mode 100644 index 00000000000..4a5ff4aef74 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgepromo/ShardlessAgent.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.sets.judgepromo; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ShardlessAgent extends mage.sets.planechase2012.ShardlessAgent { + + public ShardlessAgent(UUID ownerId) { + super(ownerId); + this.cardNumber = 95; + this.expansionSetCode = "JR"; + } + + public ShardlessAgent(final ShardlessAgent card) { + super(card); + } + + @Override + public ShardlessAgent copy() { + return new ShardlessAgent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java b/Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java index 3f62f4a6739..c9154fd22ff 100644 --- a/Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java +++ b/Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java @@ -38,7 +38,7 @@ public class Wasteland2 extends mage.sets.tempest.Wasteland { public Wasteland2(UUID ownerId) { super(ownerId); - this.cardNumber = 98; + this.cardNumber = 101; this.expansionSetCode = "JR"; this.rarity = Rarity.RARE; } diff --git a/Mage.Sets/src/mage/sets/judgment/BattlewiseAven.java b/Mage.Sets/src/mage/sets/judgment/BattlewiseAven.java new file mode 100644 index 00000000000..c446713b153 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/BattlewiseAven.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.sets.judgment; + +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.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class BattlewiseAven extends CardImpl { + + public BattlewiseAven(UUID ownerId) { + super(ownerId, 4, "Battlewise Aven", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Threshold - As long as seven or more cards are in your graveyard, Battlewise Aven gets +1/+1 and has first strike. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), + "As long as seven or more cards are in your graveyard, {this} gets +1/+1")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), + new CardsInControllerGraveCondition(7), "and has first strike")); + ability.setAbilityWord(AbilityWord.THRESHOLD); + this.addAbility(ability); + } + + public BattlewiseAven(final BattlewiseAven card) { + super(card); + } + + @Override + public BattlewiseAven copy() { + return new BattlewiseAven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/RiftstonePortal.java b/Mage.Sets/src/mage/sets/judgment/RiftstonePortal.java index bc4b28dbd96..34e77f78dfb 100644 --- a/Mage.Sets/src/mage/sets/judgment/RiftstonePortal.java +++ b/Mage.Sets/src/mage/sets/judgment/RiftstonePortal.java @@ -55,10 +55,10 @@ public class RiftstonePortal extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); - // As long as Riftstone Portal is in your graveyard, lands you control have "{tap}: Add {G} or {W} to your mana pool." + // As long as Riftstone Portal is in your graveyard, lands you control have "{T}: Add {G} or {W} to your mana pool." ContinuousEffect effect = new GainAbilityControlledEffect(new GreenManaAbility(), Duration.WhileOnBattlefield, new FilterControlledLandPermanent()); - effect.setText("As long as Riftstone Portal is in your graveyard, lands you control have \"{tap}: Add {G} or {W} to your mana pool.\""); + effect.setText("As long as Riftstone Portal is in your graveyard, lands you control have \"{T}: Add {G} or {W} to your mana pool.\""); Ability ability = new SimpleStaticAbility(Zone.GRAVEYARD, effect); effect = new GainAbilityControlledEffect(new WhiteManaAbility(), Duration.WhileOnBattlefield, new FilterControlledLandPermanent()); diff --git a/Mage.Sets/src/mage/sets/judgment/SolitaryConfinement.java b/Mage.Sets/src/mage/sets/judgment/SolitaryConfinement.java index c7435e2543d..893686b35e9 100644 --- a/Mage.Sets/src/mage/sets/judgment/SolitaryConfinement.java +++ b/Mage.Sets/src/mage/sets/judgment/SolitaryConfinement.java @@ -54,16 +54,15 @@ public class SolitaryConfinement extends CardImpl { super(ownerId, 24, "Solitary Confinement", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); this.expansionSetCode = "JUD"; - // At the beginning of your upkeep, sacrifice Solitary Confinement unless you discard a card. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand())), TargetController.YOU, false)); - + // Skip your draw step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); - + // You have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(ShroudAbility.getInstance()))); - + // Prevent all damage that would be dealt to you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToControllerEffect(Duration.WhileOnBattlefield))); } diff --git a/Mage.Sets/src/mage/sets/judgment/Spelljack.java b/Mage.Sets/src/mage/sets/judgment/Spelljack.java index 4c5f862cbe5..f6961e96834 100644 --- a/Mage.Sets/src/mage/sets/judgment/Spelljack.java +++ b/Mage.Sets/src/mage/sets/judgment/Spelljack.java @@ -28,7 +28,6 @@ package mage.sets.judgment; import java.util.UUID; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.ContinuousEffect; @@ -42,7 +41,6 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; -import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; @@ -75,40 +73,35 @@ public class Spelljack extends CardImpl { } class SpelljackEffect extends OneShotEffect { - + SpelljackEffect() { super(Outcome.PlayForFree); this.staticText = "Counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. You may play it without paying its mana cost for as long as it remains exiled"; } - + SpelljackEffect(final SpelljackEffect effect) { super(effect); } - + @Override public SpelljackEffect copy() { return new SpelljackEffect(this); } - + @Override public boolean apply(Game game, Ability source) { - UUID objectId = targetPointer.getFirst(game, source); - UUID sourceId = source.getSourceId(); - - StackObject stackObject = game.getStack().getStackObject(objectId); - if (stackObject != null && !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) { - game.rememberLKI(objectId, Zone.STACK, stackObject); - game.getStack().remove(stackObject); - if (!((Spell) stackObject).isCopiedSpell()) { - MageObject card = game.getObject(stackObject.getSourceId()); - if (card instanceof Card) { - ((Card) card).moveToZone(Zone.EXILED, sourceId, game, true); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + UUID targetId = targetPointer.getFirst(game, source); + StackObject stackObject = game.getStack().getStackObject(targetId); + if (stackObject != null && game.getStack().counter(targetId, source.getSourceId(), game, Zone.EXILED, false, false)) { + Card card = ((Spell) stackObject).getCard(); + if (card != null) { ContinuousEffect effect = new SpelljackCastFromExileEffect(); - effect.setTargetPointer(new FixedTarget(card.getId())); + effect.setTargetPointer(new FixedTarget(card.getId(), game.getState().getZoneChangeCounter(card.getId()))); game.addEffect(effect, source); } } - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId())); return true; } return false; @@ -148,10 +141,9 @@ class SpelljackCastFromExileEffect extends AsThoughEffectImpl { if (card != null) { if (game.getState().getZone(sourceId) == Zone.EXILED) { Player player = game.getPlayer(affectedControllerId); - player.setCastSourceIdWithAlternateMana(sourceId, null); + player.setCastSourceIdWithAlternateMana(sourceId, null, null); return true; - } - else { + } else { this.discard(); } } @@ -159,4 +151,4 @@ class SpelljackCastFromExileEffect extends AsThoughEffectImpl { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/judgment/SwirlingSandstorm.java b/Mage.Sets/src/mage/sets/judgment/SwirlingSandstorm.java new file mode 100644 index 00000000000..4de542ed49e --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/SwirlingSandstorm.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.sets.judgment; + +import java.util.UUID; + +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author Quercitron + */ +public class SwirlingSandstorm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public SwirlingSandstorm(UUID ownerId) { + super(ownerId, 102, "Swirling Sandstorm", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "JUD"; + + // Threshold - Swirling Sandstorm deals 5 damage to each creature without flying if seven or more cards are in your graveyard. + Effect effect = new ConditionalOneShotEffect( + new DamageAllEffect(5, filter), + new CardsInControllerGraveCondition(7), + "Threshold - {this} deals 5 damage to each creature without flying if seven or more cards are in your graveyard."); + this.getSpellAbility().addEffect(effect); + } + + public SwirlingSandstorm(final SwirlingSandstorm card) { + super(card); + } + + @Override + public SwirlingSandstorm copy() { + return new SwirlingSandstorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/TestOfEndurance.java b/Mage.Sets/src/mage/sets/judgment/TestOfEndurance.java new file mode 100644 index 00000000000..ca29245261e --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/TestOfEndurance.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.sets.judgment; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.WinGameSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.game.Game; + +/** + * + * @author fireshoes + */ +public class TestOfEndurance extends CardImpl { + + public TestOfEndurance(UUID ownerId) { + super(ownerId, 29, "Test of Endurance", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + this.expansionSetCode = "JUD"; + + // At the beginning of your upkeep, if you have 50 or more life, you win the game. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); + this.addAbility(new ConditionalTriggeredAbility(ability, new FiftyOrMoreLifeCondition(), "At the beginning of your upkeep, if you have 50 or more life, you win the game.")); + } + + public TestOfEndurance(final TestOfEndurance card) { + super(card); + } + + @Override + public TestOfEndurance copy() { + return new TestOfEndurance(this); + } +} + + +class FiftyOrMoreLifeCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + return game.getPlayer(source.getControllerId()).getLife() >= 50; + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index f9c5f47a426..15d030afde7 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -32,9 +32,8 @@ import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.ZoneChangeTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.costs.CostImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.keyword.FlyingAbility; @@ -56,9 +55,7 @@ import mage.util.CardUtil; * @author Temba21 */ public class WormfangDrake extends CardImpl { - - public WormfangDrake(UUID ownerId) { super(ownerId, 57, "Wormfang Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.expansionSetCode = "JUD"; @@ -66,7 +63,7 @@ public class WormfangDrake extends CardImpl { this.subtype.add("Drake"); this.power = new MageInt(3); this.toughness = new MageInt(4); - + // Flying this.addAbility(FlyingAbility.getInstance()); @@ -74,8 +71,8 @@ public class WormfangDrake extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility( new SacrificeSourceUnlessPaysEffect(new WormfangDrakeExileCost()), false)); - // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. - this.addAbility(new WormfangDrakeTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false)); + // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false)); } public WormfangDrake(final WormfangDrake card) { @@ -88,23 +85,6 @@ public class WormfangDrake extends CardImpl { } } -class WormfangDrakeTriggeredAbility extends ZoneChangeTriggeredAbility { - - public WormfangDrakeTriggeredAbility(Effect effect, boolean optional) { - super(Zone.BATTLEFIELD, null, effect, "When {this} leaves the battlefield, ", optional); - } - - public WormfangDrakeTriggeredAbility(WormfangDrakeTriggeredAbility ability) { - super(ability); - } - - @Override - public WormfangDrakeTriggeredAbility copy() { - return new WormfangDrakeTriggeredAbility(this); - } - -} - class WormfangDrakeExileCost extends CostImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); @@ -114,7 +94,7 @@ class WormfangDrakeExileCost extends CostImpl { } public WormfangDrakeExileCost() { - this.addTarget(new TargetControlledCreaturePermanent(1,1,filter, true)); + this.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, true)); this.text = "Exile a creature you control other than {this}"; } @@ -125,11 +105,11 @@ class WormfangDrakeExileCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { Player controller = game.getPlayer(controllerId); - MageObject sourceObject = ability.getSourceObject(game); + MageObject sourceObject = ability.getSourceObject(game); if (controller != null && sourceObject != null) { if (targets.choose(Outcome.Exile, controllerId, sourceId, game)) { UUID exileId = CardUtil.getExileZoneId(game, ability.getSourceId(), ability.getSourceObjectZoneChangeCounter()); - for (UUID targetId: targets.get(0).getTargets()) { + for (UUID targetId : targets.get(0).getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent == null) { return false; diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/Duneblast.java b/Mage.Sets/src/mage/sets/khansoftarkir/Duneblast.java index 34d4495c712..c0424b1594c 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/Duneblast.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/Duneblast.java @@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; public class Duneblast extends CardImpl { public Duneblast(UUID ownerId) { - super(ownerId, 174, "Duneblast", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{W}{G}{B}"); + super(ownerId, 174, "Duneblast", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{W}{B}{G}"); this.expansionSetCode = "KTK"; diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/KheruSpellsnatcher.java b/Mage.Sets/src/mage/sets/khansoftarkir/KheruSpellsnatcher.java index 19cced0b3a5..2ce29a65aa3 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/KheruSpellsnatcher.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/KheruSpellsnatcher.java @@ -46,7 +46,6 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; -import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; @@ -70,7 +69,7 @@ public class KheruSpellsnatcher extends CardImpl { // Morph {4}{U}{U} this.addAbility(new MorphAbility(this, new ManaCostsImpl<>("{4}{U}{U}"))); - + // When Kheru Spellthief is turned face up, counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. You may cast that card without paying its mana cost as long as it remains exiled. Ability ability = new TurnedFaceUpSourceTriggeredAbility(new KheruSpellsnatcherEffect()); ability.addTarget(new TargetSpell()); @@ -88,30 +87,29 @@ public class KheruSpellsnatcher extends CardImpl { } class KheruSpellsnatcherEffect extends OneShotEffect { - + KheruSpellsnatcherEffect() { super(Outcome.Benefit); this.staticText = "counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. You may cast that card without paying its mana cost as long as it remains exiled"; } - + KheruSpellsnatcherEffect(final KheruSpellsnatcherEffect effect) { super(effect); } - + @Override public KheruSpellsnatcherEffect copy() { return new KheruSpellsnatcherEffect(this); } - + @Override public boolean apply(Game game, Ability source) { UUID objectId = targetPointer.getFirst(game, source); UUID sourceId = source.getSourceId(); StackObject stackObject = game.getStack().getStackObject(objectId); - if (stackObject != null && !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) { - game.rememberLKI(objectId, Zone.STACK, stackObject); - game.getStack().remove(stackObject); + if (stackObject != null + && game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.EXILED, false, false)) { if (!((Spell) stackObject).isCopiedSpell()) { MageObject card = game.getObject(stackObject.getSourceId()); if (card instanceof Card) { @@ -121,7 +119,6 @@ class KheruSpellsnatcherEffect extends OneShotEffect { game.addEffect(effect, source); } } - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId())); return true; } return false; @@ -161,10 +158,9 @@ class KheruSpellsnatcherCastFromExileEffect extends AsThoughEffectImpl { if (card != null) { if (game.getState().getZone(sourceId) == Zone.EXILED) { Player player = game.getPlayer(affectedControllerId); - player.setCastSourceIdWithAlternateMana(sourceId, null); + player.setCastSourceIdWithAlternateMana(sourceId, null, null); return true; - } - else { + } else { this.discard(); } } @@ -172,4 +168,4 @@ class KheruSpellsnatcherCastFromExileEffect extends AsThoughEffectImpl { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java b/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java index a5093dcec42..f97744e57b6 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/NarsetEnlightenedMaster.java @@ -151,7 +151,7 @@ class NarsetEnlightenedMasterCastFromExileEffect extends AsThoughEffectImpl { if (card != null) { Player player = game.getPlayer(affectedControllerId); if (player != null) { - player.setCastSourceIdWithAlternateMana(objectId, null); + player.setCastSourceIdWithAlternateMana(objectId, null, null); return true; } } diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/SultaiAscendancy.java b/Mage.Sets/src/mage/sets/khansoftarkir/SultaiAscendancy.java index ab1050c0e4b..b0cf690da77 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/SultaiAscendancy.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/SultaiAscendancy.java @@ -46,7 +46,7 @@ import mage.filter.FilterCard; public class SultaiAscendancy extends CardImpl { public SultaiAscendancy(UUID ownerId) { - super(ownerId, 203, "Sultai Ascendancy", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}{B}{U}"); + super(ownerId, 203, "Sultai Ascendancy", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}{G}{U}"); this.expansionSetCode = "KTK"; diff --git a/Mage.Sets/src/mage/sets/legends/Abomination.java b/Mage.Sets/src/mage/sets/legends/Abomination.java index 5bf815d95f1..179e0541ff5 100644 --- a/Mage.Sets/src/mage/sets/legends/Abomination.java +++ b/Mage.Sets/src/mage/sets/legends/Abomination.java @@ -29,22 +29,18 @@ package mage.sets.legends; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.ObjectColor; +import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -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.target.targetpointer.FixedTarget; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; /** * @@ -52,6 +48,12 @@ import mage.target.targetpointer.FixedTarget; */ public class Abomination extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("green or white creature"); + + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.GREEN), new ColorPredicate(ObjectColor.WHITE))); + } + public Abomination(UUID ownerId) { super(ownerId, 1, "Abomination", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.expansionSetCode = "LEG"; @@ -61,7 +63,10 @@ public class Abomination extends CardImpl { this.toughness = new MageInt(6); // Whenever Abomination blocks or becomes blocked by a green or white creature, destroy that creature at end of combat. - this.addAbility(new AbominationTriggeredAbility()); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(effect, filter, false)); } public Abomination(final Abomination card) { @@ -73,99 +78,3 @@ public class Abomination extends CardImpl { return new Abomination(this); } } - -class AbominationTriggeredAbility extends TriggeredAbilityImpl { - - AbominationTriggeredAbility() { - super(Zone.BATTLEFIELD, new AbominationEffect()); - } - - AbominationTriggeredAbility(final AbominationTriggeredAbility ability) { - super(ability); - } - - @Override - public AbominationTriggeredAbility copy() { - return new AbominationTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.BLOCKER_DECLARED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent blocker = game.getPermanent(event.getSourceId()); - Permanent blocked = game.getPermanent(event.getTargetId()); - Permanent abomination = game.getPermanent(sourceId); - if (blocker != null && blocker != abomination - && blocker.getColor(game).isWhite() - && blocked == abomination) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); - return true; - } - } - if (blocker != null && blocker == abomination - && game.getPermanent(event.getTargetId()).getColor(game).isWhite()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); - return true; - } - } - if (blocker != null && blocker != abomination - && blocker.getColor(game).isGreen() - && blocked == abomination) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); - return true; - } - } - if (blocker != null && blocker == abomination - && game.getPermanent(event.getTargetId()).getColor(game).isGreen()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever {this} blocks or becomes blocked by a green or white creature, destroy that creature at end of combat."; - } -} - -class AbominationEffect extends OneShotEffect { - - AbominationEffect() { - super(Outcome.Detriment); - staticText = "Destroy that creature at the end of combat"; - } - - AbominationEffect(final AbominationEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability event) { - Permanent permanent = game.getPermanent(targetPointer.getFirst(game, event)); - if (permanent != null) { - AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()); - delayedAbility.setSourceId(permanent.getId()); - delayedAbility.setControllerId(event.getControllerId()); - delayedAbility.setSourceObject(event.getSourceObject(game), game); - delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId())); - game.addDelayedTriggeredAbility(delayedAbility); - return true; - } - return false; - } - - @Override - public AbominationEffect copy() { - return new AbominationEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/legends/ActiveVolcano.java b/Mage.Sets/src/mage/sets/legends/ActiveVolcano.java index 553776ba1de..8acab9a6337 100644 --- a/Mage.Sets/src/mage/sets/legends/ActiveVolcano.java +++ b/Mage.Sets/src/mage/sets/legends/ActiveVolcano.java @@ -36,7 +36,6 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.filter.FilterPermanent; -import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; @@ -46,9 +45,9 @@ import mage.target.TargetPermanent; * @author emerald000 */ public class ActiveVolcano extends CardImpl { - + private static final FilterPermanent filterBlue = new FilterPermanent("blue permanent"); - private static final FilterLandPermanent filterIsland = new FilterLandPermanent("Island"); + private static final FilterPermanent filterIsland = new FilterPermanent("Island"); static { filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); filterIsland.add(new SubtypePredicate("Island")); @@ -62,7 +61,7 @@ public class ActiveVolcano extends CardImpl { // Choose one - Destroy target blue permanent; this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent(filterBlue)); - + // or return target Island to its owner's hand. Mode mode = new Mode(); mode.getEffects().add(new ReturnToHandTargetEffect()); diff --git a/Mage.Sets/src/mage/sets/legends/AmrouKithkin.java b/Mage.Sets/src/mage/sets/legends/AmrouKithkin.java new file mode 100644 index 00000000000..9f57ddf6218 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/AmrouKithkin.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.sets.legends; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +/** + * + * @author fireshoes + */ +public class AmrouKithkin extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 3 or greater"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + } + + public AmrouKithkin(UUID ownerId) { + super(ownerId, 172, "Amrou Kithkin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}{W}"); + this.expansionSetCode = "LEG"; + this.subtype.add("Kithkin"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Amrou Kithkin can't be blocked by creatures with power 3 or greater. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public AmrouKithkin(final AmrouKithkin card) { + super(card); + } + + @Override + public AmrouKithkin copy() { + return new AmrouKithkin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/Cleanse.java b/Mage.Sets/src/mage/sets/legends/Cleanse.java new file mode 100644 index 00000000000..bd851bdec0a --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/Cleanse.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.sets.legends; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class Cleanse extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public Cleanse(UUID ownerId) { + super(ownerId, 174, "Cleanse", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); + this.expansionSetCode = "LEG"; + + // Destroy all black creatures. + this.getSpellAbility().addEffect(new DestroyAllEffect(filter)); + } + + public Cleanse(final Cleanse card) { + super(card); + } + + @Override + public Cleanse copy() { + return new Cleanse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/FieldOfDreams.java b/Mage.Sets/src/mage/sets/legends/FieldOfDreams.java new file mode 100644 index 00000000000..5b44a48f7ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/FieldOfDreams.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.sets.legends; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class FieldOfDreams extends CardImpl { + + public FieldOfDreams(UUID ownerId) { + super(ownerId, 55, "Field of Dreams", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "LEG"; + this.supertype.add("World"); + + // Players play with the top card of their libraries revealed. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect(true))); + } + + public FieldOfDreams(final FieldOfDreams card) { + super(card); + } + + @Override + public FieldOfDreams copy() { + return new FieldOfDreams(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/FlashFlood.java b/Mage.Sets/src/mage/sets/legends/FlashFlood.java new file mode 100644 index 00000000000..b9ea6449152 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/FlashFlood.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.sets.legends; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Mode; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class FlashFlood extends CardImpl { + + private static final FilterPermanent filter1 = new FilterPermanent("red permanent"); + private static final FilterPermanent filter2 = new FilterPermanent("Mountain"); + + static { + filter1.add(new ColorPredicate(ObjectColor.RED)); + filter2.add(new SubtypePredicate("Mountain")); + } + + public FlashFlood(UUID ownerId) { + super(ownerId, 57, "Flash Flood", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "LEG"; + + // Choose one - Destroy target red permanent; + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter1)); + // or return target Mountain to its owner's hand. + Mode mode = new Mode(); + mode.getEffects().add(new ReturnToHandTargetEffect()); + mode.getTargets().add(new TargetPermanent(filter2)); + this.getSpellAbility().addMode(mode); + } + + public FlashFlood(final FlashFlood card) { + super(card); + } + + @Override + public FlashFlood copy() { + return new FlashFlood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/GravitySphere.java b/Mage.Sets/src/mage/sets/legends/GravitySphere.java new file mode 100644 index 00000000000..64d010fca18 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/GravitySphere.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.sets.legends; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.LoseAbilityAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class GravitySphere extends CardImpl { + + public GravitySphere(UUID ownerId) { + super(ownerId, 149, "Gravity Sphere", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "LEG"; + this.supertype.add("World"); + + // All creatures lose flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LoseAbilityAllEffect(new FilterCreaturePermanent("All creatures"), FlyingAbility.getInstance(), Duration.WhileOnBattlefield))); + } + + public GravitySphere(final GravitySphere card) { + super(card); + } + + @Override + public GravitySphere copy() { + return new GravitySphere(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/Lifeblood.java b/Mage.Sets/src/mage/sets/legends/Lifeblood.java new file mode 100644 index 00000000000..9bca8d2d6ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/Lifeblood.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.sets.legends; + +import java.util.UUID; +import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LoneFox + */ +public class Lifeblood extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Mountain an opponent controls"); + + static { + filter.add(new SubtypePredicate("Mountain")); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public Lifeblood(UUID ownerId) { + super(ownerId, 196, "Lifeblood", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + this.expansionSetCode = "LEG"; + + // Whenever a Mountain an opponent controls becomes tapped, you gain 1 life. + this.addAbility(new BecomesTappedTriggeredAbility(new GainLifeEffect(1), false, filter)); + } + + public Lifeblood(final Lifeblood card) { + super(card); + } + + @Override + public Lifeblood copy() { + return new Lifeblood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/PavelMaliki.java b/Mage.Sets/src/mage/sets/legends/PavelMaliki.java new file mode 100644 index 00000000000..7b918d9fec6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/PavelMaliki.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.sets.legends; + +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.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author nigelzor + */ +public class PavelMaliki extends CardImpl { + + public PavelMaliki(UUID ownerId) { + super(ownerId, 288, "Pavel Maliki", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}{R}"); + this.expansionSetCode = "LEG"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // {B}{R}: Pavel Maliki gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{B}{R}"))); + } + + public PavelMaliki(final PavelMaliki card) { + super(card); + } + + @Override + public PavelMaliki copy() { + return new PavelMaliki(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/RamsesOverdark.java b/Mage.Sets/src/mage/sets/legends/RamsesOverdark.java new file mode 100644 index 00000000000..c1fab094807 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/RamsesOverdark.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.legends; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class RamsesOverdark extends mage.sets.masterseditioniii.RamsesOverdark { + + public RamsesOverdark(UUID ownerId) { + super(ownerId); + this.cardNumber = 292; + this.expansionSetCode = "LEG"; + this.rarity = Rarity.RARE; + } + + public RamsesOverdark(final RamsesOverdark card) { + super(card); + } + + @Override + public RamsesOverdark copy() { + return new RamsesOverdark(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/SpinalVillain.java b/Mage.Sets/src/mage/sets/legends/SpinalVillain.java new file mode 100644 index 00000000000..f5ed15de098 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/SpinalVillain.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.sets.legends; + +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.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpinalVillain extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public SpinalVillain(UUID ownerId) { + super(ownerId, 161, "Spinal Villain", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "LEG"; + this.subtype.add("Beast"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {tap}: Destroy target blue creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SpinalVillain(final SpinalVillain card) { + super(card); + } + + @Override + public SpinalVillain copy() { + return new SpinalVillain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/Earthblighter.java b/Mage.Sets/src/mage/sets/legions/Earthblighter.java new file mode 100644 index 00000000000..ecec1361406 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/Earthblighter.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.sets.legions; + +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.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author fireshoes + */ +public class Earthblighter extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Goblin"); + static { + filter.add(new SubtypePredicate("Goblin")); + } + + public Earthblighter(UUID ownerId) { + super(ownerId, 68, "Earthblighter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{B}, {tap}, Sacrifice a Goblin: Destroy target land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public Earthblighter(final Earthblighter card) { + super(card); + } + + @Override + public Earthblighter copy() { + return new Earthblighter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/EmbalmedBrawler.java b/Mage.Sets/src/mage/sets/legions/EmbalmedBrawler.java new file mode 100644 index 00000000000..4038cfe0b18 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/EmbalmedBrawler.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.sets.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.AmplifyEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.AmplifyAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class EmbalmedBrawler extends CardImpl { + + public EmbalmedBrawler(UUID ownerId) { + super(ownerId, 69, "Embalmed Brawler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Amplify 1 + this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1)); + // Whenever Embalmed Brawler attacks or blocks, you lose 1 life for each +1/+1 counter on it. + this.addAbility(new AttacksOrBlocksTriggeredAbility(new LoseLifeSourceControllerEffect(new CountersCount(CounterType.P1P1)), false)); + } + + public EmbalmedBrawler(final EmbalmedBrawler card) { + super(card); + } + + @Override + public EmbalmedBrawler copy() { + return new EmbalmedBrawler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/GempalmPolluter.java b/Mage.Sets/src/mage/sets/legions/GempalmPolluter.java index 1bf3c4306e7..65f53df4512 100644 --- a/Mage.Sets/src/mage/sets/legions/GempalmPolluter.java +++ b/Mage.Sets/src/mage/sets/legions/GempalmPolluter.java @@ -56,7 +56,7 @@ public class GempalmPolluter extends CardImpl { } public GempalmPolluter(UUID ownerId) { - super(ownerId, 70, "Gempalm Avenger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{B}"); + super(ownerId, 70, "Gempalm Polluter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{B}"); this.expansionSetCode = "LGN"; this.subtype.add("Zombie"); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/sets/legions/GoblinAssassin.java b/Mage.Sets/src/mage/sets/legions/GoblinAssassin.java new file mode 100644 index 00000000000..308da29ac93 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/GoblinAssassin.java @@ -0,0 +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.sets.legions; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * @author BursegSardaukar + */ +public class GoblinAssassin extends CardImpl { + + public GoblinAssassin(UUID ownerId) { + super(ownerId, 95, "Goblin Assassin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goblin"); + this.subtype.add("Assassin"); + + this.power = new MageInt(2); + this.toughness = new MageInt(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. + this.addAbility(new GoblinAssassinTriggeredAbiliy()); + } + + public GoblinAssassin(final GoblinAssassin card) { + super(card); + } + + @Override + public GoblinAssassin copy() { + return new GoblinAssassin(this); + } +} + +class GoblinAssassinTriggeredAbiliy extends TriggeredAbilityImpl { + GoblinAssassinTriggeredAbiliy() { + super(Zone.BATTLEFIELD, new GoblinAssassinTriggeredEffect(), false); + } + + GoblinAssassinTriggeredAbiliy(final GoblinAssassinTriggeredAbiliy ability) { + super(ability); + } + + @Override + public GoblinAssassinTriggeredAbiliy copy() { + return new GoblinAssassinTriggeredAbiliy(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.ENTERS_THE_BATTLEFIELD; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + UUID targetId = event.getTargetId(); + Permanent permanent = game.getPermanent(targetId); + if ((targetId.equals(this.getSourceId())) || (permanent.hasSubtype("Goblin") && !targetId.equals(this.getSourceId()))) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} or another Goblin enters battlefield, each player flips a coin. Each player whose coin comes up tails sacrifices a creature."; + } +} + +class GoblinAssassinTriggeredEffect extends OneShotEffect { + GoblinAssassinTriggeredEffect() { + super(Outcome.Sacrifice); + } + + GoblinAssassinTriggeredEffect(final GoblinAssassinTriggeredEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + List perms = new ArrayList<>(); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null && !player.flipCoin(game)) { + TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); + target.setNotTarget(true); + if (target.canChoose(player.getId(), game)) { + player.chooseTarget(Outcome.Sacrifice, target, source, game); + perms.addAll(target.getTargets()); + } + } + } + for (UUID permID : perms) { + Permanent permanent = game.getPermanent(permID); + if (permanent != null) { + permanent.sacrifice(source.getSourceId(), game); + } + } + return true; + } + return false; + } + + @Override + public GoblinAssassinTriggeredEffect copy() { + return new GoblinAssassinTriggeredEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/legions/GoblinClearcutter.java b/Mage.Sets/src/mage/sets/legions/GoblinClearcutter.java new file mode 100644 index 00000000000..bce8de73085 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/GoblinClearcutter.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.sets.legions; + +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +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.OneShotEffect; +import mage.cards.CardImpl; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; + +/** + * @author BursegSardaukar + */ +public class GoblinClearcutter extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public GoblinClearcutter(UUID ownerId) { + super(ownerId, 96, "Goblin Clearcutter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goblin"); + + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {T}, Sacrifice a Forest: Add three mana in any combination of {R} and/or {G} to your mana pool. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinClearCutterEffect(), new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public GoblinClearcutter(final GoblinClearcutter card) { + super(card); + } + + @Override + public GoblinClearcutter copy() { + return new GoblinClearcutter(this); + } +} + + +class GoblinClearCutterEffect extends OneShotEffect { + + public GoblinClearCutterEffect() { + super(Outcome.PutManaInPool); + this.staticText = "Add 3 mana in any combination of {R} and/or {G} to your mana pool"; + } + + public GoblinClearCutterEffect(final GoblinClearCutterEffect effect) { + super(effect); + } + + @Override + public GoblinClearCutterEffect copy() { + return new GoblinClearCutterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null){ + Choice manaChoice = new ChoiceImpl(); + Set choices = new LinkedHashSet<>(); + choices.add("Red"); + choices.add("Green"); + manaChoice.setChoices(choices); + manaChoice.setMessage("Select color of mana to add"); + + for (int i = 0; i < 3; i++){ + Mana mana = new Mana(); + while (!player.choose(Outcome.Benefit, manaChoice, game)) { + if (!player.canRespond()) { + return false; + } + } + if (manaChoice.getChoice() == null) { // can happen if player leaves game + return false; + } + switch (manaChoice.getChoice()) { + case "Green": + mana.increaseGreen(); + break; + case "Red": + mana.increaseRed(); + break; + } + player.getManaPool().addMana(mana, game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/legions/GoblinDynamo.java b/Mage.Sets/src/mage/sets/legions/GoblinDynamo.java new file mode 100644 index 00000000000..53ad2996a72 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/GoblinDynamo.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.sets.legions; + +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.ManacostVariableValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * @author BursegSardaukar + */ +public class GoblinDynamo extends CardImpl { + + public GoblinDynamo(UUID ownerId) { + super(ownerId, 97, "Goblin Dynamo", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goblin"); + this.subtype.add("Mutant"); + + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {T}: Goblin Dynamo deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + + //{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to target creature or player. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public GoblinDynamo(final GoblinDynamo card) { + super(card); + } + + @Override + public GoblinDynamo copy() { + return new GoblinDynamo(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/legions/GoblinGoon.java b/Mage.Sets/src/mage/sets/legions/GoblinGoon.java new file mode 100644 index 00000000000..452fd426dbd --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/GoblinGoon.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.sets.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author emerald000 + */ +public class GoblinGoon extends CardImpl { + + public GoblinGoon(UUID ownerId) { + super(ownerId, 99, "Goblin Goon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goblin"); + this.subtype.add("Mutant"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Goblin Goon can't attack unless you control more creatures than defending player. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinGoonCantAttackEffect())); + + // Goblin Goon can't block unless you control more creatures than attacking player. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinGoonCantBlockEffect())); + } + + public GoblinGoon(final GoblinGoon card) { + super(card); + } + + @Override + public GoblinGoon copy() { + return new GoblinGoon(this); + } +} + +class GoblinGoonCantAttackEffect extends RestrictionEffect { + + GoblinGoonCantAttackEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't attack unless you control more creatures than defending player"; + } + + GoblinGoonCantAttackEffect(final GoblinGoonCantAttackEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canAttack(UUID defenderId, Ability source, Game game) { + UUID defendingPlayerId; + Player defender = game.getPlayer(defenderId); + if (defender == null) { + Permanent permanent = game.getPermanent(defenderId); + if (permanent != null) { + defendingPlayerId = permanent.getControllerId(); + } + else { + return false; + } + } + else { + defendingPlayerId = defenderId; + } + if (defendingPlayerId != null) { + return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), defendingPlayerId, game); + } + else { + return true; + } + } + + @Override + public GoblinGoonCantAttackEffect copy() { + return new GoblinGoonCantAttackEffect(this); + } +} + +class GoblinGoonCantBlockEffect extends RestrictionEffect { + + GoblinGoonCantBlockEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't block unless you control more creatures than attacking player"; + } + + GoblinGoonCantBlockEffect(final GoblinGoonCantBlockEffect effect) { + super(effect); + } + + @Override + public GoblinGoonCantBlockEffect copy() { + return new GoblinGoonCantBlockEffect(this); + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + UUID attackingPlayerId = attacker.getControllerId(); + if (attackingPlayerId != null) { + return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), attackingPlayerId, game); + } + return true; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/GoblinLookout.java b/Mage.Sets/src/mage/sets/legions/GoblinLookout.java new file mode 100644 index 00000000000..3d5abad9a9f --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/GoblinLookout.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.sets.legions; + +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.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author fireshoes + */ +public class GoblinLookout extends CardImpl { + + private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("Goblin creatures"); + private static final FilterControlledPermanent filterPermanent = new FilterControlledPermanent("a Goblin"); + static { + filterCreature.add(new SubtypePredicate("Goblin")); + filterPermanent.add(new SubtypePredicate("Goblin")); + } + + public GoblinLookout(UUID ownerId) { + super(ownerId, 101, "Goblin Lookout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goblin"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {tap}, Sacrifice a Goblin: Goblin creatures get +2/+0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(2, 0, Duration.EndOfTurn, filterCreature, false), new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filterPermanent))); + this.addAbility(ability); + } + + public GoblinLookout(final GoblinLookout card) { + super(card); + } + + @Override + public GoblinLookout copy() { + return new GoblinLookout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/HavocDemon.java b/Mage.Sets/src/mage/sets/legions/HavocDemon.java new file mode 100644 index 00000000000..71f5ecd394c --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/HavocDemon.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.sets.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class HavocDemon extends CardImpl { + + public HavocDemon(UUID ownerId) { + super(ownerId, 74, "Havoc Demon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Demon"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Havoc Demon dies, all creatures get -5/-5 until end of turn. + this.addAbility(new DiesTriggeredAbility(new BoostAllEffect(-5, -5, Duration.EndOfTurn), false)); + } + + public HavocDemon(final HavocDemon card) { + super(card); + } + + @Override + public HavocDemon copy() { + return new HavocDemon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/ImperialHellkite.java b/Mage.Sets/src/mage/sets/legions/ImperialHellkite.java new file mode 100644 index 00000000000..6a3e96faf3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/ImperialHellkite.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.sets.legions; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ImperialHellkite extends mage.sets.archenemy.ImperialHellkite { + + public ImperialHellkite(UUID ownerId) { + super(ownerId); + this.cardNumber = 103; + this.expansionSetCode = "LGN"; + } + + public ImperialHellkite(final ImperialHellkite card) { + super(card); + } + + @Override + public ImperialHellkite copy() { + return new ImperialHellkite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/ShiftingSliver.java b/Mage.Sets/src/mage/sets/legions/ShiftingSliver.java index 656caafaa53..98d27b84b80 100644 --- a/Mage.Sets/src/mage/sets/legions/ShiftingSliver.java +++ b/Mage.Sets/src/mage/sets/legions/ShiftingSliver.java @@ -29,10 +29,8 @@ package mage.sets.legions; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesAllEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; @@ -47,12 +45,12 @@ import mage.filter.predicate.mageobject.SubtypePredicate; * @author cbt33 */ public class ShiftingSliver extends CardImpl { - + private static final FilterCreaturePermanent filterCreatures = new FilterCreaturePermanent("Slivers"); private static final FilterCreaturePermanent filterBlockedBy = new FilterCreaturePermanent("except by Slivers"); - + static { - filterCreatures.add(Predicates.not(new SubtypePredicate("Sliver"))); + filterCreatures.add(new SubtypePredicate("Sliver")); filterBlockedBy.add(Predicates.not(new SubtypePredicate("Sliver"))); } diff --git a/Mage.Sets/src/mage/sets/legions/UnstableHulk.java b/Mage.Sets/src/mage/sets/legions/UnstableHulk.java new file mode 100644 index 00000000000..233196a128e --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/UnstableHulk.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.sets.legions; + +import java.util.UUID; + +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +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.effects.common.turn.SkipNextTurnSourceEffect; +import mage.abilities.keyword.MorphAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.Duration; + +/** + * + * @author BursegSardaukar + */ +public class UnstableHulk extends CardImpl { + + public UnstableHulk(UUID ownerId) { + super(ownerId, 115, "Unstable Hulk", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goblin"); + this.subtype.add("Mutant"); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Morph {3}{R}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{R}{R}"))); + + //When Unstable Hulk is turned face up, it gets +6/+6 and gains trample until end of turn. You skip your next turn. + Effect effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect); + effect = new BoostSourceEffect(6,6,Duration.EndOfTurn); + ability.addEffect(effect); + effect = new SkipNextTurnSourceEffect(); + ability.addEffect(effect); + this.addAbility(ability); + + } + + public UnstableHulk(final UnstableHulk card) { + super(card); + } + + @Override + public UnstableHulk copy() { + return new UnstableHulk(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/legions/ZombieBrute.java b/Mage.Sets/src/mage/sets/legions/ZombieBrute.java new file mode 100644 index 00000000000..c550b504244 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/ZombieBrute.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.sets.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.AmplifyEffect; +import mage.abilities.keyword.AmplifyAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ZombieBrute extends CardImpl { + + public ZombieBrute(UUID ownerId) { + super(ownerId, 87, "Zombie Brute", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{B}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Zombie"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Amplify 1 + this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1)); + // Trample + this.addAbility(TrampleAbility.getInstance()); + } + + public ZombieBrute(final ZombieBrute card) { + super(card); + } + + @Override + public ZombieBrute copy() { + return new ZombieBrute(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/Cockatrice.java b/Mage.Sets/src/mage/sets/limitedalpha/Cockatrice.java index eb9712905e9..e6896635fad 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/Cockatrice.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/Cockatrice.java @@ -29,22 +29,18 @@ package mage.sets.limitedalpha; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -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.target.targetpointer.FixedTarget; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; /** * @@ -52,6 +48,12 @@ import mage.target.targetpointer.FixedTarget; */ public class Cockatrice extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Wall creature"); + + static { + filter.add(Predicates.not(new SubtypePredicate("Wall"))); + } + public Cockatrice(UUID ownerId) { super(ownerId, 98, "Cockatrice", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); this.expansionSetCode = "LEA"; @@ -60,10 +62,13 @@ public class Cockatrice extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(4); - // Flying - this.addAbility(FlyingAbility.getInstance()); + // Flying + this.addAbility(FlyingAbility.getInstance()); // Whenever Cockatrice blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat. - this.addAbility(new CockatriceTriggeredAbility()); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(effect, filter, false)); } public Cockatrice(final Cockatrice card) { @@ -75,80 +80,3 @@ public class Cockatrice extends CardImpl { return new Cockatrice(this); } } - -class CockatriceTriggeredAbility extends TriggeredAbilityImpl { - - CockatriceTriggeredAbility() { - super(Zone.BATTLEFIELD, new CockatriceEffect()); - } - - CockatriceTriggeredAbility(final CockatriceTriggeredAbility ability) { - super(ability); - } - - @Override - public CockatriceTriggeredAbility copy() { - return new CockatriceTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.BLOCKER_DECLARED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent blocker = game.getPermanent(event.getSourceId()); - Permanent blocked = game.getPermanent(event.getTargetId()); - Permanent cockatrice = game.getPermanent(sourceId); - if (blocker != null && blocker != cockatrice - && !blocker.getSubtype().contains("Wall") - && blocked == cockatrice) { - this.getEffects().get(0).setTargetPointer(new FixedTarget(blocker.getId())); - return true; - } - if (blocker != null && blocker == cockatrice - && !blocked.getSubtype().contains("Wall")) { - this.getEffects().get(0).setTargetPointer(new FixedTarget(blocked.getId())); - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever {this} blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat."; - } -} - -class CockatriceEffect extends OneShotEffect { - - CockatriceEffect() { - super(Outcome.DestroyPermanent); - staticText = "destroy that creature at end of combat"; - } - - CockatriceEffect(final CockatriceEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - if (targetCreature != null) { - AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId())); - game.addDelayedTriggeredAbility(delayedAbility); - return true; - } - return false; - } - - @Override - public CockatriceEffect copy() { - return new CockatriceEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/Lifetap.java b/Mage.Sets/src/mage/sets/limitedalpha/Lifetap.java new file mode 100644 index 00000000000..23838ead6b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedalpha/Lifetap.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.sets.limitedalpha; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Lifetap extends mage.sets.fifthedition.Lifetap { + + public Lifetap(UUID ownerId) { + super(ownerId); + this.cardNumber = 62; + this.expansionSetCode = "LEA"; + } + + public Lifetap(final Lifetap card) { + super(card); + } + + @Override + public Lifetap copy() { + return new Lifetap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/ThicketBasilisk.java b/Mage.Sets/src/mage/sets/limitedalpha/ThicketBasilisk.java index 1c8dfda7ce2..329272766b5 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/ThicketBasilisk.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/ThicketBasilisk.java @@ -29,21 +29,17 @@ package mage.sets.limitedalpha; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -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.target.targetpointer.FixedTarget; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; /** * @@ -51,6 +47,12 @@ import mage.target.targetpointer.FixedTarget; */ public class ThicketBasilisk extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Wall creature"); + + static { + filter.add(Predicates.not(new SubtypePredicate("Wall"))); + } + public ThicketBasilisk(UUID ownerId) { super(ownerId, 127, "Thicket Basilisk", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); this.expansionSetCode = "LEA"; @@ -60,7 +62,10 @@ public class ThicketBasilisk extends CardImpl { this.toughness = new MageInt(4); // Whenever Thicket Basilisk blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat. - this.addAbility(new ThicketBasiliskTriggeredAbility()); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(effect, filter, false)); } public ThicketBasilisk(final ThicketBasilisk card) { @@ -72,80 +77,3 @@ public class ThicketBasilisk extends CardImpl { return new ThicketBasilisk(this); } } - -class ThicketBasiliskTriggeredAbility extends TriggeredAbilityImpl { - - ThicketBasiliskTriggeredAbility() { - super(Zone.BATTLEFIELD, new ThicketBasiliskEffect()); - } - - ThicketBasiliskTriggeredAbility(final ThicketBasiliskTriggeredAbility ability) { - super(ability); - } - - @Override - public ThicketBasiliskTriggeredAbility copy() { - return new ThicketBasiliskTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.BLOCKER_DECLARED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent blocker = game.getPermanent(event.getSourceId()); - Permanent blocked = game.getPermanent(event.getTargetId()); - Permanent thicketBasilisk = game.getPermanent(sourceId); - if (blocker != null && blocker != thicketBasilisk - && !blocker.getSubtype().contains("Wall") - && blocked == thicketBasilisk) { - this.getEffects().get(0).setTargetPointer(new FixedTarget(blocker.getId())); - return true; - } - if (blocker != null && blocker == thicketBasilisk - && !blocked.getSubtype().contains("Wall")) { - this.getEffects().get(0).setTargetPointer(new FixedTarget(blocked.getId())); - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever {this} blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat."; - } -} - -class ThicketBasiliskEffect extends OneShotEffect { - - ThicketBasiliskEffect() { - super(Outcome.DestroyPermanent); - staticText = "destroy that creature at end of combat"; - } - - ThicketBasiliskEffect(final ThicketBasiliskEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - if (targetCreature != null) { - AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId())); - game.addDelayedTriggeredAbility(delayedAbility); - return true; - } - return false; - } - - @Override - public ThicketBasiliskEffect copy() { - return new ThicketBasiliskEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/limitedbeta/Lifetap.java b/Mage.Sets/src/mage/sets/limitedbeta/Lifetap.java new file mode 100644 index 00000000000..effd512e823 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedbeta/Lifetap.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.sets.limitedbeta; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Lifetap extends mage.sets.fifthedition.Lifetap { + + public Lifetap(UUID ownerId) { + super(ownerId); + this.cardNumber = 62; + this.expansionSetCode = "LEB"; + } + + public Lifetap(final Lifetap card) { + super(card); + } + + @Override + public Lifetap copy() { + return new Lifetap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/CennsHeir.java b/Mage.Sets/src/mage/sets/lorwyn/CennsHeir.java new file mode 100644 index 00000000000..558b973c1ab --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/CennsHeir.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.sets.lorwyn; + +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LoneFox + */ +public class CennsHeir extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Kithkin"); + + static { + filter.add(new SubtypePredicate("Kithkin")); + filter.add(new AnotherPredicate()); + } + + public CennsHeir(UUID ownerId) { + super(ownerId, 8, "Cenn's Heir", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Kithkin"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Cenn's Heir attacks, it gets +1/+1 until end of turn for each other attacking Kithkin. + PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(count, count, Duration.EndOfTurn, true), false)); + } + + public CennsHeir(final CennsHeir card) { + super(card); + } + + @Override + public CennsHeir copy() { + return new CennsHeir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/ChangelingHero.java b/Mage.Sets/src/mage/sets/lorwyn/ChangelingHero.java new file mode 100644 index 00000000000..02cb5eb2aab --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/ChangelingHero.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.sets.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.ChampionAbility; +import mage.abilities.keyword.ChangelingAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ChangelingHero extends CardImpl { + + public ChangelingHero(UUID ownerId) { + super(ownerId, 9, "Changeling Hero", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Shapeshifter"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Changeling + this.addAbility(ChangelingAbility.getInstance()); + + // Champion a creature + this.addAbility(new ChampionAbility(this, "")); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + } + + public ChangelingHero(final ChangelingHero card) { + super(card); + } + + @Override + public ChangelingHero copy() { + return new ChangelingHero(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/FaerieHarbinger.java b/Mage.Sets/src/mage/sets/lorwyn/FaerieHarbinger.java new file mode 100644 index 00000000000..6ea0535395f --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/FaerieHarbinger.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.sets.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class FaerieHarbinger extends CardImpl { + + public static final FilterCard filter = new FilterCard("Faerie card"); + static { + filter.add(new SubtypePredicate("Faerie")); + } + + public FaerieHarbinger(UUID ownerId) { + super(ownerId, 61, "Faerie Harbinger", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Faerie"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Faerie Harbinger enters the battlefield, you may search your library for a Faerie card, reveal it, then shuffle your library and put that card on top of it. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + } + + public FaerieHarbinger(final FaerieHarbinger card) { + super(card); + } + + @Override + public FaerieHarbinger copy() { + return new FaerieHarbinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/Fallowsage.java b/Mage.Sets/src/mage/sets/lorwyn/Fallowsage.java index 81387b1efed..94e15d4b70c 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/Fallowsage.java +++ b/Mage.Sets/src/mage/sets/lorwyn/Fallowsage.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.MageInt; -import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; @@ -51,7 +51,7 @@ public class Fallowsage extends CardImpl { this.toughness = new MageInt(2); // Whenever Fallowsage becomes tapped, you may draw a card. - this.addAbility(new BecomesTappedTriggeredAbility(new DrawCardSourceControllerEffect(1))); + this.addAbility(new BecomesTappedSourceTriggeredAbility(new DrawCardSourceControllerEffect(1))); } public Fallowsage(final Fallowsage card) { diff --git a/Mage.Sets/src/mage/sets/lorwyn/GiantHarbinger.java b/Mage.Sets/src/mage/sets/lorwyn/GiantHarbinger.java new file mode 100644 index 00000000000..545403a4bff --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/GiantHarbinger.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.sets.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class GiantHarbinger extends CardImpl { + + public static final FilterCard filter = new FilterCard("Giant card"); + static { + filter.add(new SubtypePredicate("Giant")); + } + + public GiantHarbinger(UUID ownerId) { + super(ownerId, 169, "Giant Harbinger", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Giant"); + this.subtype.add("Shaman"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // When Giant Harbinger enters the battlefield, you may search your library for a Giant card, reveal it, then shuffle your library and put that card on top of it. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + } + + public GiantHarbinger(final GiantHarbinger card) { + super(card); + } + + @Override + public GiantHarbinger copy() { + return new GiantHarbinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/Guile.java b/Mage.Sets/src/mage/sets/lorwyn/Guile.java index a945a8c5c54..f420c52eefa 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/Guile.java +++ b/Mage.Sets/src/mage/sets/lorwyn/Guile.java @@ -109,11 +109,11 @@ class GuileReplacementEffect extends ReplacementEffectImpl { Spell spell = game.getStack().getSpell(event.getTargetId()); Player controller = game.getPlayer(source.getControllerId()); if (spell != null && controller != null) { - controller.moveCards(spell, null, Zone.EXILED, source, game); + controller.moveCards(spell, Zone.EXILED, source, game); if (!spell.isCopy()) { Card spellCard = spell.getCard(); if (spellCard != null && controller.chooseUse(Outcome.PlayForFree, "Cast " + spellCard.getIdName() + " for free?", source, game)) { - controller.cast(spellCard.getSpellAbility(), game, true); + controller.playCard(spellCard, game, true, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/lorwyn/HordeOfNotions.java b/Mage.Sets/src/mage/sets/lorwyn/HordeOfNotions.java index ab05c32d1e8..976cff926fd 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/HordeOfNotions.java +++ b/Mage.Sets/src/mage/sets/lorwyn/HordeOfNotions.java @@ -33,9 +33,9 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.VigilanceAbility; -import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; @@ -55,11 +55,11 @@ import mage.target.common.TargetCardInYourGraveyard; public class HordeOfNotions extends CardImpl { private final static FilterCard filter = new FilterCard("Elemental card from your graveyard"); - + static { filter.add(new SubtypePredicate("Elemental")); } - + public HordeOfNotions(UUID ownerId) { super(ownerId, 249, "Horde of Notions", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}"); this.expansionSetCode = "LRW"; @@ -74,8 +74,8 @@ public class HordeOfNotions extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Haste this.addAbility(HasteAbility.getInstance()); - - // {W}{U}{B}{R}{G}: You may play target Elemental card from your graveyard without paying its mana cost. + + // {W}{U}{B}{R}{G}: You may play target Elemental card from your graveyard without paying its mana cost. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HordeOfNotionsEffect(), new ManaCostsImpl<>("{W}{U}{B}{R}{G}")); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); @@ -92,37 +92,28 @@ public class HordeOfNotions extends CardImpl { } class HordeOfNotionsEffect extends OneShotEffect { - + public HordeOfNotionsEffect() { super(Outcome.PlayForFree); this.staticText = "You may play target Elemental card from your graveyard without paying its mana cost"; } - + public HordeOfNotionsEffect(final HordeOfNotionsEffect effect) { super(effect); } - + @Override public HordeOfNotionsEffect copy() { return new HordeOfNotionsEffect(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 ) { - // Probably there is no Elemental land, but who knows - if (card.getCardType().contains(CardType.LAND) && controller.canPlayLand() && - controller.chooseUse(outcome, "Play " + card.getName() + " from your graveyard for free?", source, game)) { - controller.playLand(card, game); - } else { - if (card.getSpellAbility().canChooseTarget(game) && - controller.chooseUse(outcome, "Play " + card.getName() + " from your graveyard for free?", source, game)) { - controller.cast(card.getSpellAbility(), game, true); - } - } + if (card != null && controller.chooseUse(outcome, "Play " + card.getName() + " from your graveyard for free?", source, game)) { + controller.playCard(card, game, true, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/lorwyn/JudgeOfCurrents.java b/Mage.Sets/src/mage/sets/lorwyn/JudgeOfCurrents.java index 09bd019a922..b030484768d 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/JudgeOfCurrents.java +++ b/Mage.Sets/src/mage/sets/lorwyn/JudgeOfCurrents.java @@ -29,7 +29,7 @@ package mage.sets.lorwyn; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BecomesTappedCreatureControlledTriggeredAbility; +import mage.abilities.common.BecomesTappedTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -51,7 +51,7 @@ public class JudgeOfCurrents extends CardImpl { this.toughness = new MageInt(1); // Whenever a Merfolk you control becomes tapped, you may gain 1 life. - this.addAbility(new BecomesTappedCreatureControlledTriggeredAbility(new GainLifeEffect(1), true, new FilterControlledCreaturePermanent("Merfolk", "a Merfolk you control"))); + this.addAbility(new BecomesTappedTriggeredAbility(new GainLifeEffect(1), true, new FilterControlledCreaturePermanent("Merfolk", "a Merfolk you control"))); } public JudgeOfCurrents(final JudgeOfCurrents card) { diff --git a/Mage.Sets/src/mage/sets/lorwyn/KithkinHarbinger.java b/Mage.Sets/src/mage/sets/lorwyn/KithkinHarbinger.java new file mode 100644 index 00000000000..3ff7e1a031f --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/KithkinHarbinger.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.sets.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LoneFox + */ +public class KithkinHarbinger extends CardImpl { + + public static final FilterCard filter = new FilterCard("Kithkin card"); + + static { + filter.add(new SubtypePredicate("Kithkin")); + } + + public KithkinHarbinger(UUID ownerId) { + super(ownerId, 26, "Kithkin Harbinger", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Kithkin"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // When Kithkin Harbinger enters the battlefield, you may search your library for a Kithkin card, reveal it, then shuffle your library and put that card on top of it. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + } + + public KithkinHarbinger(final KithkinHarbinger card) { + super(card); + } + + @Override + public KithkinHarbinger copy() { + return new KithkinHarbinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/KithkinMourncaller.java b/Mage.Sets/src/mage/sets/lorwyn/KithkinMourncaller.java new file mode 100644 index 00000000000..76267304715 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/KithkinMourncaller.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.sets.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class KithkinMourncaller extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("an attacking Kithkin or Elf"); + + static { + filter.add(Predicates.or(new SubtypePredicate("Kithkin"), new SubtypePredicate("Elf"))); + } + + public KithkinMourncaller(UUID ownerId) { + super(ownerId, 224, "Kithkin Mourncaller", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Kithkin"); + this.subtype.add("Scout"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever an attacking Kithkin or Elf is put into your graveyard from the battlefield, you may draw a card. + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new DrawCardSourceControllerEffect(1), + true, filter, false, true)); + } + + public KithkinMourncaller(final KithkinMourncaller card) { + super(card); + } + + @Override + public KithkinMourncaller copy() { + return new KithkinMourncaller(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/LysAlanaScarblade.java b/Mage.Sets/src/mage/sets/lorwyn/LysAlanaScarblade.java new file mode 100644 index 00000000000..5cdc7019042 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/LysAlanaScarblade.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.sets.lorwyn; + +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.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class LysAlanaScarblade extends CardImpl { + + private static final FilterControlledPermanent filter1 = new FilterControlledPermanent(); + private static final FilterCard filter2 = new FilterCard("an Elf card"); + + static { + filter1.add(new SubtypePredicate("Elf")); + filter2.add(new SubtypePredicate("Elf")); + } + + public LysAlanaScarblade(UUID ownerId) { + super(ownerId, 122, "Lys Alana Scarblade", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Elf"); + this.subtype.add("Assassin"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}, Discard an Elf card: Target creature gets -X/-X until end of turn, where X is the number of Elves you control. + SignInversionDynamicValue count = new SignInversionDynamicValue(new PermanentsOnBattlefieldCount(filter1)); + Effect effect = new BoostTargetEffect(count, count, Duration.EndOfTurn); + effect.setText("target creature gets -X/-X until end of turn, where X is the number of Elves you control"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addCost(new DiscardCardCost(filter2)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public LysAlanaScarblade(final LysAlanaScarblade card) { + super(card); + } + + @Override + public LysAlanaScarblade copy() { + return new LysAlanaScarblade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/ProwessOfTheFair.java b/Mage.Sets/src/mage/sets/lorwyn/ProwessOfTheFair.java new file mode 100644 index 00000000000..09eb350a4b8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/ProwessOfTheFair.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.sets.lorwyn; + +import java.util.UUID; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +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.ElfToken; + +/** + * + * @author LoneFox + */ +public class ProwessOfTheFair extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("another nontoken Elf"); + + static { + filter.add(new SubtypePredicate("Elf")); + filter.add(new AnotherPredicate()); + filter.add(Predicates.not(new TokenPredicate())); + } + + public ProwessOfTheFair(UUID ownerId) { + super(ownerId, 136, "Prowess of the Fair", Rarity.UNCOMMON, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Elf"); + + // Whenever another nontoken Elf is put into your graveyard from the battlefield, you may put a 1/1 green Elf Warrior creature token onto the battlefield. + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new CreateTokenEffect(new ElfToken()), + true, filter, false, true)); + } + + public ProwessOfTheFair(final ProwessOfTheFair card) { + super(card); + } + + @Override + public ProwessOfTheFair copy() { + return new ProwessOfTheFair(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java b/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java index 4bf012e1bbb..8793c91e928 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java +++ b/Mage.Sets/src/mage/sets/lorwyn/RingsOfBrighthearth.java @@ -94,7 +94,7 @@ class RingsOfBrighthearthTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(getControllerId())) { StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); - if (!(stackAbility.getStackAbility() instanceof ManaAbility)) { + if (stackAbility != null && !(stackAbility.getStackAbility() instanceof ManaAbility)) { Effect effect = this.getEffects().get(0); effect.setValue("stackAbility", stackAbility.getStackAbility()); return true; diff --git a/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java b/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java index d7ded0f1762..2d915af972d 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java +++ b/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java @@ -32,7 +32,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ReturnToHandTargetEffect; @@ -55,7 +55,7 @@ public class Surgespanner extends CardImpl { this.toughness = new MageInt(2); // Whenever Surgespanner becomes tapped, you may pay {1}{U}. If you do, return target permanent to its owner's hand. - Ability ability = new BecomesTappedTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{U}"))); + Ability ability = new BecomesTappedSourceTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{U}"))); ability.addTarget(new TargetPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/lorwyn/VividCrag.java b/Mage.Sets/src/mage/sets/lorwyn/VividCrag.java index db911ac24fa..a2a1f9af187 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/VividCrag.java +++ b/Mage.Sets/src/mage/sets/lorwyn/VividCrag.java @@ -27,22 +27,19 @@ */ package mage.sets.lorwyn; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; -import mage.constants.Zone; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.counters.CounterType; -import java.util.UUID; - /** * * @author Loki @@ -53,13 +50,13 @@ public class VividCrag extends CardImpl { super(ownerId, 275, "Vivid Crag", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "LRW"; // Vivid Crag enters the battlefield tapped with two charge counters on it. - EntersBattlefieldEffect effect = new EntersBattlefieldEffect(new TapSourceEffect(true), "{this} enters the battlefield tapped with two charge counters on it"); - effect.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + Ability ability = new EntersBattlefieldAbility(new TapSourceEffect(true), false, null, "{this} enters the battlefield tapped with two charge counters on it", null); + ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); + this.addAbility(ability); // {tap}: Add {R} to your mana pool. this.addAbility(new RedManaAbility()); // {tap}, Remove a charge counter from Vivid Crag: Add one mana of any color to your mana pool. - Ability ability = new AnyColorManaAbility(); + ability = new AnyColorManaAbility(); ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/lorwyn/VividCreek.java b/Mage.Sets/src/mage/sets/lorwyn/VividCreek.java index d81545b95fc..308795ad88a 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/VividCreek.java +++ b/Mage.Sets/src/mage/sets/lorwyn/VividCreek.java @@ -27,22 +27,19 @@ */ package mage.sets.lorwyn; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; -import mage.constants.Zone; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.counters.CounterType; -import java.util.UUID; - /** * * @author Loki @@ -53,13 +50,13 @@ public class VividCreek extends CardImpl { super(ownerId, 276, "Vivid Creek", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "LRW"; // Vivid Creek enters the battlefield tapped with two charge counters on it. - EntersBattlefieldEffect effect = new EntersBattlefieldEffect(new TapSourceEffect(true), "{this} enters the battlefield tapped with two charge counters on it"); - effect.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + Ability ability = new EntersBattlefieldAbility(new TapSourceEffect(true), false, null, "{this} enters the battlefield tapped with two charge counters on it", null); + ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); + this.addAbility(ability); // {tap}: Add {U} to your mana pool. this.addAbility(new BlueManaAbility()); // {tap}, Remove a charge counter from Vivid Creek: Add one mana of any color to your mana pool. - Ability ability = new AnyColorManaAbility(); + ability = new AnyColorManaAbility(); ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/lorwyn/VividGrove.java b/Mage.Sets/src/mage/sets/lorwyn/VividGrove.java index 69edf5be55d..07ba8af8c82 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/VividGrove.java +++ b/Mage.Sets/src/mage/sets/lorwyn/VividGrove.java @@ -27,22 +27,19 @@ */ package mage.sets.lorwyn; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; -import mage.constants.Zone; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.counters.CounterType; -import java.util.UUID; - /** * * @author Loki @@ -53,13 +50,13 @@ public class VividGrove extends CardImpl { super(ownerId, 277, "Vivid Grove", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "LRW"; // Vivid Grove enters the battlefield tapped with two charge counters on it. - EntersBattlefieldEffect effect = new EntersBattlefieldEffect(new TapSourceEffect(true), "{this} enters the battlefield tapped with two charge counters on it"); - effect.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + Ability ability = new EntersBattlefieldAbility(new TapSourceEffect(true), false, null, "{this} enters the battlefield tapped with two charge counters on it", null); + ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); + this.addAbility(ability); // {tap}: Add {G} to your mana pool. this.addAbility(new GreenManaAbility()); // {tap}, Remove a charge counter from Vivid Grove: Add one mana of any color to your mana pool. - Ability ability = new AnyColorManaAbility(); + ability = new AnyColorManaAbility(); ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/lorwyn/VividMarsh.java b/Mage.Sets/src/mage/sets/lorwyn/VividMarsh.java index ad6e4d8435c..85748e6f602 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/VividMarsh.java +++ b/Mage.Sets/src/mage/sets/lorwyn/VividMarsh.java @@ -27,22 +27,19 @@ */ package mage.sets.lorwyn; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.abilities.mana.BlackManaAbility; import mage.cards.CardImpl; -import mage.constants.Zone; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.counters.CounterType; -import java.util.UUID; - /** * * @author Loki @@ -54,13 +51,13 @@ public class VividMarsh extends CardImpl { this.expansionSetCode = "LRW"; // Vivid Marsh enters the battlefield tapped with two charge counters on it. - EntersBattlefieldEffect effect = new EntersBattlefieldEffect(new TapSourceEffect(true), "{this} enters the battlefield tapped with two charge counters on it"); - effect.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + Ability ability = new EntersBattlefieldAbility(new TapSourceEffect(true), false, null, "{this} enters the battlefield tapped with two charge counters on it", null); + ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); + this.addAbility(ability); // {tap}: Add {B} to your mana pool. this.addAbility(new BlackManaAbility()); // {tap}, Remove a charge counter from Vivid Marsh: Add one mana of any color to your mana pool. - Ability ability = new AnyColorManaAbility(); + ability = new AnyColorManaAbility(); ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/lorwyn/VividMeadow.java b/Mage.Sets/src/mage/sets/lorwyn/VividMeadow.java index 432d65ef859..a5998b765f8 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/VividMeadow.java +++ b/Mage.Sets/src/mage/sets/lorwyn/VividMeadow.java @@ -27,22 +27,19 @@ */ package mage.sets.lorwyn; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; -import mage.constants.Zone; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.counters.CounterType; -import java.util.UUID; - /** * * @author Loki @@ -53,13 +50,13 @@ public class VividMeadow extends CardImpl { super(ownerId, 279, "Vivid Meadow", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "LRW"; // Vivid Meadow enters the battlefield tapped with two charge counters on it. - EntersBattlefieldEffect effect = new EntersBattlefieldEffect(new TapSourceEffect(true), "{this} enters the battlefield tapped with two charge counters on it"); - effect.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + Ability ability = new EntersBattlefieldAbility(new TapSourceEffect(true), false, null, "{this} enters the battlefield tapped with two charge counters on it", null); + ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(2))); + this.addAbility(ability); // {tap}: Add {W} to your mana pool. this.addAbility(new WhiteManaAbility()); // {tap}, Remove a charge counter from Vivid Meadow: Add one mana of any color to your mana pool. - Ability ability = new AnyColorManaAbility(); + ability = new AnyColorManaAbility(); ability.addCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/magic2010/DjinnOfWishes.java b/Mage.Sets/src/mage/sets/magic2010/DjinnOfWishes.java index ea454dc5cdb..b42be2535a1 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DjinnOfWishes.java +++ b/Mage.Sets/src/mage/sets/magic2010/DjinnOfWishes.java @@ -28,12 +28,8 @@ package mage.sets.magic2010; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -46,6 +42,10 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.Cards; import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; import mage.players.Player; @@ -100,33 +100,16 @@ class DjinnOfWishesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null && player.getLibrary().size() > 0) { - Card card = player.getLibrary().getFromTop(game); - Cards cards = new CardsImpl(); - cards.add(card); - player.revealCards("Djinn of Wishes", cards, game); - - player.getLibrary().removeFromTop(game); - - boolean used = false; - if (player.chooseUse(Outcome.PlayForFree, "Play " + card.getName() + " without paying its mana cost?", source, game)) { - if (card.getCardType().contains(CardType.LAND)) { - // If the revealed card is a land, you can play it only if it's your turn and you haven't yet played a land this turn. - if (game.getActivePlayerId().equals(player.getId()) && player.canPlayLand()) { - used = true; - player.playLand(card, game); - } - } else { - used = true; - player.cast(card.getSpellAbility(), game, true); - } - } - - if (!used) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null && controller.getLibrary().size() > 0) { + Card card = controller.getLibrary().getFromTop(game); + Cards cards = new CardsImpl(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (!controller.chooseUse(Outcome.PlayForFree, "Play " + card.getName() + " without paying its mana cost?", source, game) + || !controller.playCard(card, game, true, true)) { card.moveToZone(Zone.EXILED, source.getSourceId(), game, false); } - return true; } return false; diff --git a/Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java b/Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java index 5224b598da7..99c69a45804 100644 --- a/Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java +++ b/Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java @@ -71,7 +71,7 @@ public class ElvishArchdruid extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); // {T}: Add {G} to your mana pool for each Elf you control. - this.addAbility(new DynamicManaAbility(Mana.GreenMana, new PermanentsOnBattlefieldCount(filterCount))); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new PermanentsOnBattlefieldCount(filterCount))); } public ElvishArchdruid(final ElvishArchdruid card) { diff --git a/Mage.Sets/src/mage/sets/magic2010/HowlingMine.java b/Mage.Sets/src/mage/sets/magic2010/HowlingMine.java index 5ec15b0a5a3..2499010036b 100644 --- a/Mage.Sets/src/mage/sets/magic2010/HowlingMine.java +++ b/Mage.Sets/src/mage/sets/magic2010/HowlingMine.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.sets.magic2010; import java.util.UUID; @@ -38,6 +37,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; /** @@ -90,7 +90,8 @@ class HowlingMineAbility extends TriggeredAbilityImpl { @Override public boolean checkInterveningIfClause(Game game) { - return !game.getPermanent(this.sourceId).isTapped(); + Permanent source = game.getPermanentOrLKIBattlefield(this.sourceId); + return source != null && !source.isTapped(); } @Override diff --git a/Mage.Sets/src/mage/sets/magic2010/LurkingPredators.java b/Mage.Sets/src/mage/sets/magic2010/LurkingPredators.java index 9a1a0795565..2e53c0c49e1 100644 --- a/Mage.Sets/src/mage/sets/magic2010/LurkingPredators.java +++ b/Mage.Sets/src/mage/sets/magic2010/LurkingPredators.java @@ -28,10 +28,7 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -39,6 +36,10 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.Cards; import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -52,7 +53,6 @@ public class LurkingPredators extends CardImpl { super(ownerId, 190, "Lurking Predators", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}{G}"); this.expansionSetCode = "M10"; - // Whenever an opponent casts a spell, reveal the top card of your library. If it's a creature card, put it onto the battlefield. Otherwise, you may put that card on the bottom of your library. this.addAbility(new SpellCastOpponentTriggeredAbility(new LurkingPredatorsEffect(), false)); } @@ -85,26 +85,25 @@ class LurkingPredatorsEffect 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 = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { return false; } - if (player.getLibrary().size() > 0) { - Card card = player.getLibrary().getFromTop(game); - Cards cards = new CardsImpl(); - cards.add(card); - player.revealCards("Lurking Predators", cards, game); + if (controller.getLibrary().size() > 0) { + Card card = controller.getLibrary().getFromTop(game); + Cards cards = new CardsImpl(card); + controller.revealCards(sourceObject.getIdName(), cards, game); if (card != null) { if (card.getCardType().contains(CardType.CREATURE)) { - card = player.getLibrary().removeFromTop(game); - card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId()); - } else if (player.chooseUse(Outcome.Neutral, "Put " + card.getName() + " on the bottom of your library?", source, game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } else if (controller.chooseUse(Outcome.Neutral, "Put " + card.getIdName() + " on the bottom of your library?", source, game)) { + controller.putCardsOnBottomOfLibrary(cards, game, source, false); } } } - return false; + return true; } } diff --git a/Mage.Sets/src/mage/sets/magic2010/StoneGiant.java b/Mage.Sets/src/mage/sets/magic2010/StoneGiant.java index c43cc027e97..f377e69b981 100644 --- a/Mage.Sets/src/mage/sets/magic2010/StoneGiant.java +++ b/Mage.Sets/src/mage/sets/magic2010/StoneGiant.java @@ -28,26 +28,22 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; 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.DestroyTargetEffect; +import mage.abilities.effects.common.DestroyTargetAtBeginningOfNextEndStepEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -68,7 +64,7 @@ public class StoneGiant extends CardImpl { new TapSourceCost()); ability.addTarget(new StoneGiantTarget()); // Destroy that creature at the beginning of the next end step. - ability.addEffect(new StoneGiantEffect()); + ability.addEffect(new DestroyTargetAtBeginningOfNextEndStepEffect()); this.addAbility(ability); } @@ -109,32 +105,3 @@ class StoneGiantTarget extends TargetPermanent { return false; } } - -class StoneGiantEffect extends OneShotEffect { - - public StoneGiantEffect() { - super(Outcome.Detriment); - this.staticText = "Destroy that creature at the beginning of the next end step"; - } - - public StoneGiantEffect(final StoneGiantEffect effect) { - super(effect); - } - - @Override - public StoneGiantEffect copy() { - return new StoneGiantEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - DestroyTargetEffect effect = new DestroyTargetEffect(); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); - AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - return true; - } -} diff --git a/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java b/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java index 1e2498235d5..01e01604528 100644 --- a/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java +++ b/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java @@ -30,18 +30,13 @@ package mage.sets.magic2011; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.TargetController; -import mage.game.Game; -import mage.players.Player; /** * diff --git a/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java b/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java index 95bb22a3635..cd3743fde26 100644 --- a/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java +++ b/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java @@ -58,6 +58,8 @@ public class MassPolymorph extends CardImpl { super(ownerId, 64, "Mass Polymorph", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{U}"); this.expansionSetCode = "M11"; + // Exile all creatures you control, then reveal cards from the top of your library until you reveal that many creature cards. + // Put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library. this.getSpellAbility().addEffect(new MassPolymorphEffect()); } @@ -93,7 +95,7 @@ class MassPolymorphEffect extends OneShotEffect { Set creaturesToExile = new HashSet<>(); creaturesToExile.addAll(creatures); count = creatures.size(); - controller.moveCards(creaturesToExile, null, Zone.HAND, source, game); + controller.moveCards(creaturesToExile, Zone.HAND, source, game); Cards revealed = new CardsImpl(); Set creatureCards = new LinkedHashSet<>(); diff --git a/Mage.Sets/src/mage/sets/magic2011/PrimevalTitan.java b/Mage.Sets/src/mage/sets/magic2011/PrimevalTitan.java index 60e79d7a2f1..71c58ed51f3 100644 --- a/Mage.Sets/src/mage/sets/magic2011/PrimevalTitan.java +++ b/Mage.Sets/src/mage/sets/magic2011/PrimevalTitan.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,23 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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.magic2011; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterLandCard; import mage.game.Game; import mage.game.events.GameEvent; @@ -58,7 +57,10 @@ public class PrimevalTitan extends CardImpl { this.power = new MageInt(6); this.toughness = new MageInt(6); + // Trample this.addAbility(TrampleAbility.getInstance()); + + // Whenever Primeval Titan enters the battlefield or attacks, you may search your library for up to two land cards, put them onto the battlefield tapped, then shuffle your library. this.addAbility(new PrimevalTitanAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2011/ShivsEmbrace.java b/Mage.Sets/src/mage/sets/magic2011/ShivsEmbrace.java index ce1bddb944c..95304846b7b 100644 --- a/Mage.Sets/src/mage/sets/magic2011/ShivsEmbrace.java +++ b/Mage.Sets/src/mage/sets/magic2011/ShivsEmbrace.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,7 +20,7 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. @@ -29,25 +29,23 @@ package mage.sets.magic2011; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.SubLayer; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.ContinuousEffectImpl; +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.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -65,13 +63,15 @@ public class ShivsEmbrace extends CardImpl { // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature gets +2/+2 and has flying. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ShivsEmbraceEffect())); - + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2)); + Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has flying"); + ability.addEffect(effect); + this.addAbility(ability); // {R}: Enchanted creature gets +1/+0 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); @@ -86,56 +86,3 @@ public class ShivsEmbrace extends CardImpl { return new ShivsEmbrace(this); } } - -class ShivsEmbraceEffect extends ContinuousEffectImpl { - - public ShivsEmbraceEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Enchanted creature gets +2/+2 and has flying"; - } - - public ShivsEmbraceEffect(final ShivsEmbraceEffect effect) { - super(effect); - } - - @Override - public ShivsEmbraceEffect copy() { - return new ShivsEmbraceEffect(this); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature != null) { - switch (layer) { - case PTChangingEffects_7: - if (sublayer == SubLayer.ModifyPT_7c) { - creature.addPower(2); - creature.addToughness(2); - } - break; - case AbilityAddingRemovingEffects_6: - if (sublayer == SubLayer.NA) { - creature.addAbility(FlyingAbility.getInstance(), source.getSourceId(), game); - } - break; - } - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.AbilityAddingRemovingEffects_6 || layer == Layer.PTChangingEffects_7; - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2012/GideonsAvenger.java b/Mage.Sets/src/mage/sets/magic2012/GideonsAvenger.java index be7f26d1122..5d147f63c4e 100644 --- a/Mage.Sets/src/mage/sets/magic2012/GideonsAvenger.java +++ b/Mage.Sets/src/mage/sets/magic2012/GideonsAvenger.java @@ -29,17 +29,15 @@ package mage.sets.magic2012; import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.constants.Zone; +import mage.constants.TargetController; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; /** * @@ -47,6 +45,12 @@ import mage.game.permanent.Permanent; */ public class GideonsAvenger extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + public GideonsAvenger(UUID ownerId) { super(ownerId, 17, "Gideon's Avenger", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); this.expansionSetCode = "M12"; @@ -56,7 +60,8 @@ public class GideonsAvenger extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - this.addAbility(new GideonsAvengerTriggeredAbility()); + // Whenever a creature an opponent controls becomes tapped, put a +1/+1 counter on Gideon's Avenger. + this.addAbility(new BecomesTappedTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter)); } public GideonsAvenger(final GideonsAvenger card) { @@ -68,38 +73,3 @@ public class GideonsAvenger extends CardImpl { return new GideonsAvenger(this); } } - -class GideonsAvengerTriggeredAbility extends TriggeredAbilityImpl { - GideonsAvengerTriggeredAbility() { - super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance())); - } - - GideonsAvengerTriggeredAbility(final GideonsAvengerTriggeredAbility ability) { - super(ability); - } - - @Override - public GideonsAvengerTriggeredAbility copy() { - return new GideonsAvengerTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent p = game.getPermanent(event.getTargetId()); - if (p != null && p.getCardType().contains(CardType.CREATURE)) { - if (game.getOpponents(this.controllerId).contains(p.getControllerId())) - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever a creature an opponent controls becomes tapped, " + modes.getText(); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java b/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java index 7f9a5487524..ff1264b2ddb 100644 --- a/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java +++ b/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java @@ -1,119 +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.sets.magic2012; - -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -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.cards.CardImpl; -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.TargetCreatureOrPlayer; - -/** - * - * @author nantuko - */ -public class GoblinBangchuckers extends CardImpl { - - public GoblinBangchuckers(UUID ownerId) { - super(ownerId, 137, "Goblin Bangchuckers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); - this.expansionSetCode = "M12"; - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); - - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - // {t}: Flip a coin. If you win the flip, Goblin Bangchuckers deals 2 damage to target creature or player. If you lose the flip, Goblin Bangchuckers deals 2 damage to itself. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinBangchuckersEffect(), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); - this.addAbility(ability); - } - - public GoblinBangchuckers(final GoblinBangchuckers card) { - super(card); - } - - @Override - public GoblinBangchuckers copy() { - return new GoblinBangchuckers(this); - } -} - -class GoblinBangchuckersEffect extends OneShotEffect { - - public GoblinBangchuckersEffect() { - super(Outcome.Damage); - staticText = "{tap}: Flip a coin. If you win the flip, Goblin Bangchuckers deals 2 damage to target creature or player. If you lose the flip, Goblin Bangchuckers deals 2 damage to itself"; - } - - public GoblinBangchuckersEffect(GoblinBangchuckersEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - if (controller.flipCoin(game)) { - Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); - if (permanent != null) { - permanent.damage(2, source.getSourceId(), game, false, true); - return true; - } - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - if (player != null) { - player.damage(2, source.getSourceId(), game, false, true); - return true; - } - } else { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - permanent.damage(2, source.getSourceId(), game, false, true); - return true; - } - } - } - return false; - } - - @Override - public GoblinBangchuckersEffect copy() { - return new GoblinBangchuckersEffect(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.sets.magic2012; + +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.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author nantuko + */ +public class GoblinBangchuckers extends CardImpl { + + public GoblinBangchuckers(UUID ownerId) { + super(ownerId, 137, "Goblin Bangchuckers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "M12"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Flip a coin. If you win the flip, Goblin Bangchuckers deals 2 damage to target creature or player. If you lose the flip, Goblin Bangchuckers deals 2 damage to itself. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinBangchuckersEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public GoblinBangchuckers(final GoblinBangchuckers card) { + super(card); + } + + @Override + public GoblinBangchuckers copy() { + return new GoblinBangchuckers(this); + } +} + +class GoblinBangchuckersEffect extends OneShotEffect { + + public GoblinBangchuckersEffect() { + super(Outcome.Damage); + staticText = "Flip a coin. If you win the flip, {this} deals 2 damage to target creature or player. If you lose the flip, {this} deals 2 damage to itself"; + } + + public GoblinBangchuckersEffect(GoblinBangchuckersEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (controller.flipCoin(game)) { + Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); + if (permanent != null) { + permanent.damage(2, source.getSourceId(), game, false, true); + return true; + } + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + player.damage(2, source.getSourceId(), game, false, true); + return true; + } + } else { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + permanent.damage(2, source.getSourceId(), game, false, true); + return true; + } + } + } + return false; + } + + @Override + public GoblinBangchuckersEffect copy() { + return new GoblinBangchuckersEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2012/Scrambleverse.java b/Mage.Sets/src/mage/sets/magic2012/Scrambleverse.java index 27b559d840f..e6b670804fc 100644 --- a/Mage.Sets/src/mage/sets/magic2012/Scrambleverse.java +++ b/Mage.Sets/src/mage/sets/magic2012/Scrambleverse.java @@ -27,27 +27,23 @@ */ package mage.sets.magic2012; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.Random; +import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.Mode; import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Layer; import mage.constants.Outcome; -import mage.constants.SubLayer; +import mage.constants.Rarity; import mage.filter.common.FilterNonlandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.PlayerList; import mage.target.targetpointer.FixedTarget; -import java.util.Random; -import java.util.UUID; - /** * * @author nantuko @@ -58,7 +54,6 @@ public class Scrambleverse extends CardImpl { super(ownerId, 153, "Scrambleverse", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{6}{R}{R}"); this.expansionSetCode = "M12"; - // For each nonland permanent, choose a player at random. Then each player gains control of each permanent for which he or she was chosen. Untap those permanents. this.getSpellAbility().addEffect(new ScrambleverseEffect()); } @@ -87,15 +82,13 @@ class ScrambleverseEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Random random = new Random(); - PlayerList players = game.getPlayerList(); + PlayerList players = game.getState().getPlayersInRange(source.getControllerId(), game); int count = players.size(); - if (count > 1) { - FilterNonlandPermanent nonLand = new FilterNonlandPermanent(); - for (Permanent permanent : game.getBattlefield().getActivePermanents(nonLand, source.getControllerId(), source.getSourceId(), game)) { - ContinuousEffect effect = new ScrambleverseControlEffect(players.get(random.nextInt(count))); - effect.setTargetPointer(new FixedTarget(permanent.getId())); - game.addEffect(effect, source); - } + for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterNonlandPermanent(), source.getControllerId(), source.getSourceId(), game)) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, players.get(random.nextInt(count))); + effect.setTargetPointer(new FixedTarget(permanent.getId())); + game.addEffect(effect, source); + permanent.untap(game); } return true; } @@ -105,37 +98,3 @@ class ScrambleverseEffect extends OneShotEffect { return new ScrambleverseEffect(this); } } - -class ScrambleverseControlEffect extends ContinuousEffectImpl { - - private UUID controllerId; - - public ScrambleverseControlEffect(UUID controllerId) { - super(Duration.EndOfGame, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); - this.controllerId = controllerId; - } - - public ScrambleverseControlEffect(final ScrambleverseControlEffect effect) { - super(effect); - this.controllerId = effect.controllerId; - } - - @Override - public ScrambleverseControlEffect copy() { - return new ScrambleverseControlEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); - if (permanent != null && controllerId != null) { - return permanent.changeControllerId(controllerId, game); - } - return false; - } - - @Override - public String getText(Mode mode) { - return "Gain control of {this}"; - } -} diff --git a/Mage.Sets/src/mage/sets/magic2013/BoundlessRealms.java b/Mage.Sets/src/mage/sets/magic2013/BoundlessRealms.java index 9896e6a5422..922f1e1f5fa 100644 --- a/Mage.Sets/src/mage/sets/magic2013/BoundlessRealms.java +++ b/Mage.Sets/src/mage/sets/magic2013/BoundlessRealms.java @@ -28,21 +28,20 @@ package mage.sets.magic2013; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.TargetController; import mage.constants.Zone; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; @@ -56,7 +55,6 @@ public class BoundlessRealms extends CardImpl { super(ownerId, 162, "Boundless Realms", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{6}{G}"); this.expansionSetCode = "M13"; - // Search your library for up to X basic land cards, where X is the number of lands you control, and put them onto the battlefield tapped. Then shuffle your library. this.getSpellAbility().addEffect(new BoundlessRealmsEffect()); } @@ -89,32 +87,19 @@ class BoundlessRealmsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } FilterLandPermanent filter = new FilterLandPermanent(); filter.add(new ControllerPredicate(TargetController.YOU)); int amount = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this); TargetCardInLibrary target = new TargetCardInLibrary(0, amount, new FilterBasicLandCard()); - - Player player = game.getPlayer(source.getControllerId()); - if (player == null) { - return false; + if (controller.searchLibrary(target, game)) { + controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null); } - - if (player.searchLibrary(target, game)) { - for (UUID cardId : target.getTargets()) { - Card card = player.getLibrary().getCard(cardId, game); - if (card != null) { - if (card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId())) { - Permanent permanent = game.getPermanent(card.getId()); - if (permanent != null) { - permanent.setTapped(true); - } - } - } - } - } - - player.shuffleLibrary(game); + controller.shuffleLibrary(game); return true; } } diff --git a/Mage.Sets/src/mage/sets/magic2013/Spelltwine.java b/Mage.Sets/src/mage/sets/magic2013/Spelltwine.java index b37080dda6b..a0cb37881f4 100644 --- a/Mage.Sets/src/mage/sets/magic2013/Spelltwine.java +++ b/Mage.Sets/src/mage/sets/magic2013/Spelltwine.java @@ -28,14 +28,14 @@ package mage.sets.magic2013; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileSpellEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -68,7 +68,6 @@ public class Spelltwine extends CardImpl { super(ownerId, 68, "Spelltwine", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{U}"); this.expansionSetCode = "M13"; - // Exile target instant or sorcery card from your graveyard and target instant or sorcery card from an opponent's graveyard. Copy those cards. Cast the copies if able without paying their mana costs. Exile Spelltwine. this.getSpellAbility().addEffect(new SpelltwineEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); @@ -105,10 +104,10 @@ class SpelltwineEffect extends OneShotEffect { Card cardTwo = game.getCard(source.getTargets().get(1).getFirstTarget()); if (controller != null) { if (cardOne != null) { - controller.moveCardToExileWithInfo(cardOne, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true); + controller.moveCards(cardOne, Zone.EXILED, source, game); } if (cardTwo != null) { - controller.moveCardToExileWithInfo(cardTwo, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true); + controller.moveCards(cardTwo, Zone.EXILED, source, game); } boolean castCardOne = true; if (cardOne != null && controller.chooseUse(Outcome.Neutral, "Cast the copy of " + cardOne.getName() + " first?", source, game)) { diff --git a/Mage.Sets/src/mage/sets/magic2013/TradingPost.java b/Mage.Sets/src/mage/sets/magic2013/TradingPost.java index f6370a6d285..07f0f0fab5a 100644 --- a/Mage.Sets/src/mage/sets/magic2013/TradingPost.java +++ b/Mage.Sets/src/mage/sets/magic2013/TradingPost.java @@ -28,11 +28,6 @@ package mage.sets.magic2013; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.DiscardTargetCost; @@ -45,10 +40,12 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.permanent.token.GoatToken; import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInHand; @@ -60,14 +57,6 @@ import mage.target.common.TargetControlledPermanent; */ public class TradingPost extends CardImpl { - final static FilterControlledPermanent filter = new FilterControlledPermanent("creature"); - final static FilterControlledPermanent filter2 = new FilterControlledPermanent("artifact"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - filter2.add(new CardTypePredicate(CardType.ARTIFACT)); - } - public TradingPost(UUID ownerId) { super(ownerId, 220, "Trading Post", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); this.expansionSetCode = "M13"; @@ -86,15 +75,15 @@ public class TradingPost extends CardImpl { // {1}, {tap}, Sacrifice a creature: Return target artifact card from your graveyard to your hand. Ability ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(1)); - ability3.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("artifact card in your graveyard"))); + ability3.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("an artifact card in your graveyard"))); ability3.addCost(new TapSourceCost()); - ability3.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + ability3.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledCreaturePermanent("a creature")))); this.addAbility(ability3); // {1}, {tap}, Sacrifice an artifact: Draw a card. Ability ability4 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(1)); ability4.addCost(new TapSourceCost()); - ability4.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter2))); + ability4.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); this.addAbility(ability4); } diff --git a/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java b/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java index 1728e7f1f4a..fbf9d88f792 100644 --- a/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java +++ b/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java @@ -29,7 +29,6 @@ package mage.sets.magic2014; import java.util.UUID; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -39,8 +38,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.SetTargetPointer; import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterControlledEnchantmentPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.CatToken; @@ -53,11 +51,6 @@ import mage.players.Player; */ public class AjanisChosen extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent(); - static { - filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); - } - public AjanisChosen(UUID ownerId) { super(ownerId, 2, "Ajani's Chosen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.expansionSetCode = "M14"; @@ -69,7 +62,7 @@ public class AjanisChosen extends CardImpl { // Whenever an enchantment enters the battlefield under your control, put a 2/2 white Cat creature token onto the battlefield. If that enchantment is an Aura, you may attach it to the token. this.addAbility(new EntersBattlefieldAllTriggeredAbility( - Zone.BATTLEFIELD, new AjanisChosenEffect(), filter, false, SetTargetPointer.PERMANENT, + Zone.BATTLEFIELD, new AjanisChosenEffect(), new FilterControlledEnchantmentPermanent(), false, SetTargetPointer.PERMANENT, "Whenever an enchantment enters the battlefield under your control, put a 2/2 white Cat creature token onto the battlefield. If that enchantment is an Aura, you may attach it to the token")); } @@ -85,7 +78,6 @@ public class AjanisChosen extends CardImpl { class AjanisChosenEffect extends OneShotEffect { - public AjanisChosenEffect() { super(Outcome.PutCreatureInPlay); staticText = "put a 2/2 white Cat creature token onto the battlefield. If that enchantment is an Aura, you may attach it to the token"; @@ -102,19 +94,22 @@ class AjanisChosenEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Token token = new CatToken(); - if(token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())){ - Player player = game.getPlayer(source.getControllerId()); - Permanent enchantement = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - Permanent tokenPermanent = game.getPermanent(token.getLastAddedToken()); - if(player != null && enchantement != null && tokenPermanent != null && enchantement.getSubtype().contains("Aura")) - { - Permanent oldCreature = game.getPermanent(enchantement.getAttachedTo()); - - if(oldCreature != null && enchantement.getSpellAbility().getTargets().get(0).canTarget(tokenPermanent.getId(), game) && player.chooseUse(Outcome.Neutral, "Attach " + enchantement.getName() + " to the token ?", source, game)) - { - if(oldCreature.removeAttachment(enchantement.getId(), game)){ - tokenPermanent.addAttachment(enchantement.getId(), game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + 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().contains("Aura")) { + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + Permanent oldCreature = game.getPermanent(enchantment.getAttachedTo()); + if (oldCreature != null && enchantment.getSpellAbility().getTargets().get(0).canTarget(tokenPermanent.getId(), game) && controller.chooseUse(Outcome.Neutral, "Attach " + enchantment.getName() + " to the token ?", source, game)) { + if (oldCreature.removeAttachment(enchantment.getId(), game)) { + tokenPermanent.addAttachment(enchantment.getId(), game); + } + } + } } } } diff --git a/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java b/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java index 3f71b0c0a72..9dc699f772c 100644 --- a/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java +++ b/Mage.Sets/src/mage/sets/magic2014/DevoutInvocation.java @@ -55,10 +55,9 @@ public class DevoutInvocation extends CardImpl { super(ownerId, 16, "Devout Invocation", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{6}{W}"); this.expansionSetCode = "M14"; - // Tap any number of untapped creatures you control. Put a 4/4 white Angel creature token with flying onto the battlefield for each creature tapped this way. this.getSpellAbility().addEffect(new DevoutInvocationEffect()); - + } public DevoutInvocation(final DevoutInvocation card) { @@ -72,9 +71,9 @@ public class DevoutInvocation extends CardImpl { } class DevoutInvocationEffect extends OneShotEffect { - + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control"); - + static { filter.add(Predicates.not(new TappedPredicate())); } @@ -93,7 +92,7 @@ class DevoutInvocationEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int tappedAmount = 0; - TargetPermanent target = new TargetPermanent(0,1,filter, false); + TargetPermanent target = new TargetPermanent(0, 1, filter, false); while (true && controller.canRespond()) { target.clearChosen(); if (target.canChoose(source.getControllerId(), game)) { @@ -109,15 +108,13 @@ class DevoutInvocationEffect extends OneShotEffect { } else { break; } - } - else { + } else { break; } } if (tappedAmount > 0) { AngelToken angelToken = new AngelToken(); angelToken.putOntoBattlefield(tappedAmount, game, source.getSourceId(), source.getControllerId()); - game.informPlayers(new StringBuilder(controller.getLogName()).append(" puts ").append(tappedAmount).append(" token").append(tappedAmount != 1 ?"s":"").append(" onto the battlefield").toString()); } return true; } diff --git a/Mage.Sets/src/mage/sets/magic2014/MasterOfDiversion.java b/Mage.Sets/src/mage/sets/magic2014/MasterOfDiversion.java index 3c7072088f9..2503b681a8f 100644 --- a/Mage.Sets/src/mage/sets/magic2014/MasterOfDiversion.java +++ b/Mage.Sets/src/mage/sets/magic2014/MasterOfDiversion.java @@ -33,7 +33,6 @@ import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; -import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.Rarity; import mage.filter.common.FilterCreaturePermanent; @@ -47,6 +46,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class MasterOfDiversion extends CardImpl { + private final UUID originalId; + public MasterOfDiversion(UUID ownerId) { super(ownerId, 24, "Master of Diversion", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.expansionSetCode = "M14"; @@ -59,17 +60,19 @@ public class MasterOfDiversion extends CardImpl { // Whenever Master of Diversion attacks, tap target creature defending player controls. Ability ability = new AttacksTriggeredAbility(new TapTargetEffect(), false); ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls"))); + originalId = ability.getOriginalId(); this.addAbility(ability); } public MasterOfDiversion(final MasterOfDiversion card) { super(card); + this.originalId = card.originalId; } @Override public void adjustTargets(Ability ability, Game game) { - if (ability.getAbilityType().equals(AbilityType.TRIGGERED)) { + if (ability.getOriginalId().equals(originalId)) { ability.getTargets().clear(); FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls"); UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId()); diff --git a/Mage.Sets/src/mage/sets/magic2015/MercurialPretender.java b/Mage.Sets/src/mage/sets/magic2015/MercurialPretender.java index fcfabc49c0f..2152b28b88a 100644 --- a/Mage.Sets/src/mage/sets/magic2015/MercurialPretender.java +++ b/Mage.Sets/src/mage/sets/magic2015/MercurialPretender.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.sets.magic2015; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.CopyPermanentEffect; -import mage.abilities.effects.common.ReturnToHandSourceEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.util.functions.AbilityApplier; - -/** - * - * @author LevelX2 - */ -public class MercurialPretender extends CardImpl { - - private static final String effectText = "as a copy of any creature you control except it gains \"{2}{U}{U}: Return this creature to its owner's hand.\""; - - public MercurialPretender(UUID ownerId) { - super(ownerId, 68, "Mercurial Pretender", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.expansionSetCode = "M15"; - this.subtype.add("Shapeshifter"); - - this.color.setBlue(true); - this.power = new MageInt(0); - this.toughness = new MageInt(0); - - // You may have Mercurial Pretender enter the battlefield as a copy of any creature you control - // except it gains "{2}{U}{U}: Return this creature to its owner's hand." - Effect effect = new CopyPermanentEffect(new FilterCreaturePermanent(), - new AbilityApplier(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}{U}")))); - effect.setText(effectText); - this.addAbility(new EntersBattlefieldAbility(effect, true)); - } - - public MercurialPretender(final MercurialPretender card) { - super(card); - } - - @Override - public MercurialPretender copy() { - return new MercurialPretender(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.sets.magic2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.util.functions.AbilityApplier; + +/** + * + * @author LevelX2 + */ +public class MercurialPretender extends CardImpl { + + private static final String effectText = "as a copy of any creature you control except it gains \"{2}{U}{U}: Return this creature to its owner's hand.\""; + + public MercurialPretender(UUID ownerId) { + super(ownerId, 68, "Mercurial Pretender", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "M15"; + this.subtype.add("Shapeshifter"); + + this.color.setBlue(true); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // You may have Mercurial Pretender enter the battlefield as a copy of any creature you control + // except it gains "{2}{U}{U}: Return this creature to its owner's hand." + Effect effect = new CopyPermanentEffect(new FilterControlledCreaturePermanent(), + new AbilityApplier(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}{U}")))); + effect.setText(effectText); + this.addAbility(new EntersBattlefieldAbility(effect, true)); + } + + public MercurialPretender(final MercurialPretender card) { + super(card); + } + + @Override + public MercurialPretender copy() { + return new MercurialPretender(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/InfiniteObliteration.java b/Mage.Sets/src/mage/sets/magicorigins/InfiniteObliteration.java index 030db436a14..9b85d3cdf94 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/InfiniteObliteration.java +++ b/Mage.Sets/src/mage/sets/magicorigins/InfiniteObliteration.java @@ -113,10 +113,7 @@ class InfiniteObliterationEffect extends SearchTargetGraveyardHandLibraryForCard @Override public String getText(Mode mode) { - StringBuilder sb = new StringBuilder(); - sb.append("Name a creature card. "); - sb.append(super.getText(mode)); - return sb.toString(); + return "Name a creature card. " + super.getText(mode); } } diff --git a/Mage.Sets/src/mage/sets/magicorigins/JaceTelepathUnbound.java b/Mage.Sets/src/mage/sets/magicorigins/JaceTelepathUnbound.java index 7e87bf53d0c..3e55cfbfbd3 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/JaceTelepathUnbound.java +++ b/Mage.Sets/src/mage/sets/magicorigins/JaceTelepathUnbound.java @@ -124,7 +124,7 @@ class JaceTelepathUnboundEffect extends OneShotEffect { Card card = game.getCard(this.getTargetPointer().getFirst(game, source)); if (card != null) { ContinuousEffect effect = new JaceTelepathUnboundCastFromGraveyardEffect(); - effect.setTargetPointer(new FixedTarget(card.getId())); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); game.addEffect(effect, source); effect = new JaceTelepathUnboundReplacementEffect(card.getId()); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/magicorigins/MageRingNetwork.java b/Mage.Sets/src/mage/sets/magicorigins/MageRingNetwork.java index fe953e08e6d..b62a9f2eacc 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/MageRingNetwork.java +++ b/Mage.Sets/src/mage/sets/magicorigins/MageRingNetwork.java @@ -65,7 +65,7 @@ public class MageRingNetwork extends CardImpl { this.addAbility(ability); // {T}, Remove X storage counters from Mage-Ring Network: Add {x} to your mana pool. ability = new DynamicManaAbility( - Mana.ColorlessMana, + Mana.ColorlessMana(1), new RemovedCountersForCostValue(), new TapSourceCost(), "Add {X} to your mana pool", diff --git a/Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.java b/Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.java index a0d055231c0..da04c314ed9 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.java +++ b/Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.java @@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; @@ -60,8 +61,10 @@ public class PiaAndKiranNalaar extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken(), 2))); + // When Pia and Kiran Nalaar enters the battlefield, put two 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. + Effect effect = new CreateTokenEffect(new ThopterColorlessToken(), 2); + effect.setText("put two 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield"); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); // {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); diff --git a/Mage.Sets/src/mage/sets/magicorigins/PsychicRebuttal.java b/Mage.Sets/src/mage/sets/magicorigins/PsychicRebuttal.java index cdc1ecbfb18..84aca36df0f 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/PsychicRebuttal.java +++ b/Mage.Sets/src/mage/sets/magicorigins/PsychicRebuttal.java @@ -29,6 +29,7 @@ package mage.sets.magicorigins; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.condition.common.SpellMasteryCondition; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -137,9 +138,8 @@ class PsychicRebuttalPredicate implements ObjectPlayerPredicate 0) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { TargetCard target = new TargetCard(Zone.HAND, filter); - player.choose(Outcome.Benefit, target, source.getSourceId(), game); - Card card = player.getHand().get(target.getFirstTarget(), game); - if (card != null) { - card.moveToExile(getId(), "Chrome Mox (Imprint)", source.getSourceId(), game); - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - permanent.imprint(card.getId(), game); - } - return true; + target.setNotTarget(true); + Card cardToImprint = null; + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + if (controller.getHand().size() > 0 && controller.choose(Outcome.Benefit, target, source.getSourceId(), game)) { + cardToImprint = controller.getHand().get(target.getFirstTarget(), game); } + if (sourcePermanent != null) { + if (cardToImprint != null) { + controller.moveCardsToExile(cardToImprint, source, game, true, source.getSourceId(), sourceObject.getIdName() + " (Imprint)"); + sourcePermanent.imprint(cardToImprint.getId(), game); + sourcePermanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + GameLog.getColoredObjectIdNameForTooltip(cardToImprint) + "]"), game); + } else { + sourcePermanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - None]"), game); + } + } + return true; + } - return true; + return false; } @java.lang.Override @@ -118,12 +131,10 @@ class ChromeMoxEffect extends OneShotEffect { return new ChromeMoxEffect(this); } - } class ChromeMoxManaEffect extends ManaEffect { - ChromeMoxManaEffect() { super(); staticText = "Add one mana of any of the exiled card's colors to your mana pool"; @@ -133,8 +144,6 @@ class ChromeMoxManaEffect extends ManaEffect { super(effect); } - - @java.lang.Override public ChromeMoxManaEffect copy() { return new ChromeMoxManaEffect(this); @@ -176,17 +185,17 @@ class ChromeMoxManaEffect extends ManaEffect { player.choose(outcome, choice, game); } if (choice.getChoice().equals("Black")) { - player.getManaPool().addMana(Mana.BlackMana, game, source); + player.getManaPool().addMana(Mana.BlackMana(1), game, source); } else if (choice.getChoice().equals("Blue")) { - player.getManaPool().addMana(Mana.BlueMana, game, source); + player.getManaPool().addMana(Mana.BlueMana(1), game, source); } else if (choice.getChoice().equals("Red")) { - player.getManaPool().addMana(Mana.RedMana, game, source); + player.getManaPool().addMana(Mana.RedMana(1), game, source); } else if (choice.getChoice().equals("Green")) { - player.getManaPool().addMana(Mana.GreenMana, game, source); + player.getManaPool().addMana(Mana.GreenMana(1), game, source); } else if (choice.getChoice().equals("White")) { - player.getManaPool().addMana(Mana.WhiteMana, game, source); + player.getManaPool().addMana(Mana.WhiteMana(1), game, source); } else if (choice.getChoice().equals("Colorless")) { - player.getManaPool().addMana(Mana.ColorlessMana, game, source); + player.getManaPool().addMana(Mana.ColorlessMana(1), game, source); } checkToFirePossibleEvents(mana, game, source); player.getManaPool().addMana(mana, game, source); @@ -202,4 +211,4 @@ class ChromeMoxManaEffect extends ManaEffect { return null; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/Cloudpost.java b/Mage.Sets/src/mage/sets/mirrodin/Cloudpost.java index ea6e278bc9e..a1453e09636 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/Cloudpost.java +++ b/Mage.Sets/src/mage/sets/mirrodin/Cloudpost.java @@ -58,7 +58,7 @@ public class Cloudpost extends CardImpl { // Cloudpost enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // {tap}: Add {1} to your mana pool for each Locus on the battlefield. - this.addAbility(new DynamicManaAbility(Mana.ColorlessMana, new PermanentsOnBattlefieldCount(filter))); + this.addAbility(new DynamicManaAbility(Mana.ColorlessMana(1), new PermanentsOnBattlefieldCount(filter))); } public Cloudpost(final Cloudpost card) { diff --git a/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java b/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java index 182669babf1..e4eb8d30835 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java +++ b/Mage.Sets/src/mage/sets/mirrodin/IsochronScepter.java @@ -28,11 +28,6 @@ package mage.sets.mirrodin; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -41,6 +36,10 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -50,6 +49,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetCard; import mage.util.CardUtil; +import org.apache.log4j.Logger; /** * @@ -84,7 +84,8 @@ public class IsochronScepter extends CardImpl { class IsochronScepterImprintEffect extends OneShotEffect { private static final FilterCard filter = new FilterCard("instant card with converted mana cost 2 or less from your hand"); - static { + + static { filter.add(new CardTypePredicate(CardType.INSTANT)); filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); } @@ -109,7 +110,7 @@ class IsochronScepterImprintEffect extends OneShotEffect { && controller.choose(Outcome.Benefit, controller.getHand(), target, game)) { Card card = controller.getHand().get(target.getFirstTarget(), game); if (card != null) { - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getIdName() +" (Imprint)", source.getSourceId(), game, Zone.HAND, true); + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getIdName() + " (Imprint)", source.getSourceId(), game, Zone.HAND, true); Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { permanent.imprint(card.getId(), game); @@ -121,7 +122,7 @@ class IsochronScepterImprintEffect extends OneShotEffect { return true; } return false; - + } @java.lang.Override @@ -158,10 +159,14 @@ class IsochronScepterCopyEffect extends OneShotEffect { if (controller.chooseUse(outcome, new StringBuilder("Create a copy of ").append(imprintedInstant.getName()).append("?").toString(), source, game)) { Card copiedCard = game.copyCard(imprintedInstant, source, source.getControllerId()); if (copiedCard != null) { - game.getExile().add(source.getSourceId(), "",copiedCard); + game.getExile().add(source.getSourceId(), "", copiedCard); game.getState().setZone(copiedCard.getId(), Zone.EXILED); if (controller.chooseUse(outcome, "Cast the copied card without paying mana cost?", source, game)) { - controller.cast(copiedCard.getSpellAbility(), game, true); + if (copiedCard.getSpellAbility() != null) { + controller.cast(copiedCard.getSpellAbility(), game, true); + } else { + Logger.getLogger(IsochronScepterCopyEffect.class).error("Isochron Scepter: spell ability == null " + copiedCard.getName()); + } } } } diff --git a/Mage.Sets/src/mage/sets/mirrodin/LumengridSentinel.java b/Mage.Sets/src/mage/sets/mirrodin/LumengridSentinel.java new file mode 100644 index 00000000000..cecd85116bb --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/LumengridSentinel.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.sets.mirrodin; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class LumengridSentinel extends CardImpl { + + private static final FilterPermanent filter = new FilterArtifactPermanent("an artifact"); + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public LumengridSentinel(UUID ownerId) { + super(ownerId, 40, "Lumengrid Sentinel", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever an artifact enters the battlefield under your control, you may tap target permanent. + Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new TapTargetEffect(), filter, true); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public LumengridSentinel(final LumengridSentinel card) { + super(card); + } + + @java.lang.Override + public LumengridSentinel copy() { + return new LumengridSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/Vermiculos.java b/Mage.Sets/src/mage/sets/mirrodin/Vermiculos.java new file mode 100644 index 00000000000..6466519c88c --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/Vermiculos.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.sets.mirrodin; + +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class Vermiculos extends CardImpl { + + private static final FilterPermanent filter = new FilterArtifactPermanent("an artifact"); + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public Vermiculos(UUID ownerId) { + super(ownerId, 80, "Vermiculos", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Horror"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever an artifact enters the battlefield, Vermiculos gets +4/+4 until end of turn. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BoostSourceEffect(4, 4, Duration.EndOfTurn), filter, false)); + } + + public Vermiculos(final Vermiculos card) { + super(card); + } + + @java.lang.Override + public Vermiculos copy() { + return new Vermiculos(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/ViridianJoiner.java b/Mage.Sets/src/mage/sets/mirrodin/ViridianJoiner.java index 4c289b7e4e7..19500559150 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/ViridianJoiner.java +++ b/Mage.Sets/src/mage/sets/mirrodin/ViridianJoiner.java @@ -52,7 +52,7 @@ public class ViridianJoiner extends CardImpl { this.toughness = new MageInt(2); // {tap}: Add to your mana pool an amount of {G} equal to Viridian Joiner's power. - this.addAbility(new DynamicManaAbility(Mana.GreenMana, new SourcePermanentPowerCount())); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new SourcePermanentPowerCount())); } public ViridianJoiner(final ViridianJoiner card) { diff --git a/Mage.Sets/src/mage/sets/mirrodin/ViridianLongbow.java b/Mage.Sets/src/mage/sets/mirrodin/ViridianLongbow.java new file mode 100644 index 00000000000..785498a0619 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/ViridianLongbow.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.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class ViridianLongbow extends CardImpl { + + public ViridianLongbow(UUID ownerId) { + super(ownerId, 270, "Viridian Longbow", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Equipment"); + + // Equipped creature has "{tap}: This creature deals 1 damage to target creature or player." + Effect effect = new DamageTargetEffect(1); + effect.setText("This creature deals 1 damage to target creature or player"); + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT))); + + // Equip {3} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); + } + + public ViridianLongbow(final ViridianLongbow card) { + super(card); + } + + @java.lang.Override + public ViridianLongbow copy() { + return new ViridianLongbow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/Cryptoplasm.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/Cryptoplasm.java index 083bee110ab..cb57582bc57 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/Cryptoplasm.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/Cryptoplasm.java @@ -33,7 +33,6 @@ import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CopyEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -102,8 +101,7 @@ class CryptoplasmEffect extends OneShotEffect { public boolean apply(Game game, final Ability source) { Permanent creatureToCopy = game.getPermanent(getTargetPointer().getFirst(game, source)); if (creatureToCopy != null) { - CopyEffect effect = new CopyEffect(creatureToCopy, source.getSourceId()); - effect.setApplier(new ApplyToPermanent() { + ApplyToPermanent applier = new ApplyToPermanent() { @Override public Boolean apply(Game game, Permanent permanent) { Ability upkeepAbility = new BeginningOfUpkeepTriggeredAbility(new CryptoplasmEffect(), TargetController.YOU, true); @@ -120,9 +118,8 @@ class CryptoplasmEffect extends OneShotEffect { return true; } - }); - game.addEffect(effect, source); - + }; + game.copyPermanent(creatureToCopy, source.getSourceId(), source, applier); } return true; } diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/DivineOffering.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/DivineOffering.java index 8dd821a21b1..f0f805c5b06 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/DivineOffering.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/DivineOffering.java @@ -28,19 +28,14 @@ package mage.sets.mirrodinbesieged; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.dynamicvalue.common.TargetConvertedManaCost; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.filter.FilterPermanent; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; /** * @@ -48,21 +43,17 @@ import mage.target.TargetPermanent; */ public class DivineOffering extends CardImpl { - private final static FilterPermanent filter = new FilterPermanent("artifact"); - - static { - filter.add(new CardTypePredicate(CardType.ARTIFACT)); - } - public DivineOffering(UUID ownerId) { super(ownerId, 5, "Divine Offering", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); this.expansionSetCode = "MBS"; // Destroy target artifact. You gain life equal to its converted mana cost. - this.getSpellAbility().addTarget(new TargetPermanent(filter)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addEffect(new DivineOfferingEffect()); + Effect effect = new GainLifeEffect(new TargetConvertedManaCost()); + effect.setText("You gain life equal to its converted mana cost"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetArtifactPermanent()); } public DivineOffering(final DivineOffering card) { @@ -73,35 +64,4 @@ public class DivineOffering extends CardImpl { public DivineOffering copy() { return new DivineOffering(this); } - - private class DivineOfferingEffect extends OneShotEffect { - - public DivineOfferingEffect() { - super(Outcome.DestroyPermanent); - staticText = "You gain life equal to its converted mana cost"; - } - - public DivineOfferingEffect(DivineOfferingEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent artifact = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); - if (artifact != null) { - int cost = artifact.getManaCost().convertedManaCost(); - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.gainLife(cost, game); - } - } - return true; - } - - @Override - public DivineOfferingEffect copy() { - return new DivineOfferingEffect(this); - } - - } } diff --git a/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java b/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java index 65428a838bb..719eca0111e 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java +++ b/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -54,6 +55,7 @@ import mage.target.common.TargetControlledPermanent; public class MarshFlitter extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin"); + static { filter.add(new SubtypePredicate("Goblin")); } @@ -72,7 +74,7 @@ public class MarshFlitter extends CardImpl { // When Marsh Flitter enters the battlefield, put two 1/1 black Goblin Rogue creature tokens onto the battlefield. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinRogueToken(), 2), false)); // Sacrifice a Goblin: Marsh Flitter has base power and toughness 3/3 until end of turn. - Effect effect = new SetPowerToughnessSourceEffect(3, 3, Duration.EndOfTurn); + Effect effect = new SetPowerToughnessSourceEffect(3, 3, Duration.EndOfTurn, SubLayer.SetPT_7b); effect.setText("{this} has base power and toughness 3/3 until end of turn"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java b/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java index 478914ee117..1ce14ebe81c 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java +++ b/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java @@ -103,7 +103,7 @@ class ToothAndNailPutCreatureOnBattlefieldEffect extends OneShotEffect { TargetCardInHand target = new TargetCardInHand(0, 2, new FilterCreatureCard("creature cards")); if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { return controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), - Zone.BATTLEFIELD, source, game, true, false, false, null); + Zone.BATTLEFIELD, source, game, false, false, false, null); } return false; } diff --git a/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java b/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java index d790518da10..06051fdcd96 100644 --- a/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java +++ b/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java @@ -111,7 +111,7 @@ public class WorldheartPhoenix extends CardImpl { Player player = game.getPlayer(affectedControllerId); if (player != null) { // can sometimes be cast with base mana cost from grave???? - player.setCastSourceIdWithAlternateMana(sourceId, new ManaCostsImpl<>("{W}{U}{B}{R}{G}")); + player.setCastSourceIdWithAlternateMana(sourceId, new ManaCostsImpl<>("{W}{U}{B}{R}{G}"), null); return true; } } diff --git a/Mage.Sets/src/mage/sets/morningtide/BoldwyrIntimidator.java b/Mage.Sets/src/mage/sets/morningtide/BoldwyrIntimidator.java new file mode 100644 index 00000000000..e7a229c1b25 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/BoldwyrIntimidator.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.sets.morningtide; + +import java.util.ArrayList; +import java.util.Arrays; +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.RestrictionEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTypeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class BoldwyrIntimidator extends CardImpl { + + public BoldwyrIntimidator(UUID ownerId) { + super(ownerId, 86, "Boldwyr Intimidator", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Cowards can't block Warriors. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoldwyrIntimidatorEffect())); + + // {R}: Target creature becomes a Coward until end of turn. + Effect effect = new BecomesCreatureTypeTargetEffect(Duration.EndOfTurn, new ArrayList<>(Arrays.asList("Coward")), true); + effect.setText("Target creature becomes a Coward until end of turn"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{R}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {2}{R}: Target creature becomes a Warrior until end of turn. + effect = new BecomesCreatureTypeTargetEffect(Duration.EndOfTurn, new ArrayList<>(Arrays.asList("Warrior")), true); + effect.setText("Target creature becomes a Warrior until end of turn"); + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{R}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public BoldwyrIntimidator(final BoldwyrIntimidator card) { + super(card); + } + + @Override + public BoldwyrIntimidator copy() { + return new BoldwyrIntimidator(this); + } +} + +class BoldwyrIntimidatorEffect extends RestrictionEffect { + + BoldwyrIntimidatorEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Cowards can't block Warriors"; + } + + BoldwyrIntimidatorEffect(final BoldwyrIntimidatorEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + if (sourcePermanent != null) { + return true; + } + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + if (attacker != null && blocker != null) { + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + if (sourcePermanent != null && attacker.getSubtype().contains("Warrior")) { + return !blocker.getSubtype().contains("Coward"); + } + } + return true; + } + + @Override + public BoldwyrIntimidatorEffect copy() { + return new BoldwyrIntimidatorEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/BorderlandBehemoth.java b/Mage.Sets/src/mage/sets/morningtide/BorderlandBehemoth.java new file mode 100644 index 00000000000..f4650f2c6a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/BorderlandBehemoth.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.sets.morningtide; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BorderlandBehemoth extends mage.sets.commander2015.BorderlandBehemoth { + + public BorderlandBehemoth(UUID ownerId) { + super(ownerId); + this.cardNumber = 87; + this.expansionSetCode = "MOR"; + } + + public BorderlandBehemoth(final BorderlandBehemoth card) { + super(card); + } + + @Override + public BorderlandBehemoth copy() { + return new BorderlandBehemoth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java b/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java index e404891c77d..521d13e03fa 100644 --- a/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java +++ b/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java @@ -52,7 +52,7 @@ public class BrighthearthBanneret extends CardImpl { static { filter.add(Predicates.or( new SubtypePredicate("Elemental"), - new SubtypePredicate("Shaman"))); + new SubtypePredicate("Warrior"))); } public BrighthearthBanneret(UUID ownerId) { diff --git a/Mage.Sets/src/mage/sets/morningtide/ChameleonColossus.java b/Mage.Sets/src/mage/sets/morningtide/ChameleonColossus.java index 56d7df6a2e4..a57e67d4f3d 100644 --- a/Mage.Sets/src/mage/sets/morningtide/ChameleonColossus.java +++ b/Mage.Sets/src/mage/sets/morningtide/ChameleonColossus.java @@ -28,26 +28,22 @@ package mage.sets.morningtide; import java.util.UUID; + import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.SubLayer; import mage.constants.Zone; 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.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.ChangelingAbility; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -76,7 +72,8 @@ public class ChameleonColossus extends CardImpl { this.addAbility(new ProtectionAbility(filter)); // {2}{G}{G}: Chameleon Colossus gets +X/+X until end of turn, where X is its power. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChameleonColossusEffect(), new ManaCostsImpl("{2}{G}{G}"))); + SourcePermanentPowerCount x = new SourcePermanentPowerCount(); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(x, x, Duration.EndOfTurn, true), new ManaCostsImpl("{2}{G}{G}"))); } public ChameleonColossus(final ChameleonColossus card) { @@ -88,31 +85,3 @@ public class ChameleonColossus extends CardImpl { return new ChameleonColossus(this); } } - -class ChameleonColossusEffect extends ContinuousEffectImpl { - public ChameleonColossusEffect() { - super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); - staticText = "{this} gets +X/+X until end of turn, where X is its power"; - } - - public ChameleonColossusEffect(final ChameleonColossusEffect effect) { - super(effect); - } - - @Override - public ChameleonColossusEffect copy() { - return new ChameleonColossusEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent sourcePermanent = game.getPermanent(source.getSourceId()); - if (sourcePermanent != null) { - int power = sourcePermanent.getPower().getValue(); - sourcePermanent.addPower(power); - sourcePermanent.addToughness(power); - return true; - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/morningtide/CountrysideCrusher.java b/Mage.Sets/src/mage/sets/morningtide/CountrysideCrusher.java index bc8f7d46c19..9bee542397c 100644 --- a/Mage.Sets/src/mage/sets/morningtide/CountrysideCrusher.java +++ b/Mage.Sets/src/mage/sets/morningtide/CountrysideCrusher.java @@ -28,10 +28,6 @@ package mage.sets.morningtide; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -42,8 +38,11 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.Cards; import mage.cards.CardsImpl; +import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.TargetController; +import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterLandCard; import mage.game.Game; @@ -70,7 +69,7 @@ public class CountrysideCrusher extends CardImpl { // Whenever a land card is put into your graveyard from anywhere, put a +1/+1 counter on Countryside Crusher. this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance()), - false, new FilterLandCard("a land card"),TargetController.YOU + false, new FilterLandCard("a land card"), TargetController.YOU )); } @@ -111,7 +110,7 @@ class CountrysideCrusherEffect extends OneShotEffect { Card card = controller.getLibrary().getFromTop(game); cards.add(card); if (card.getCardType().contains(CardType.LAND)) { - controller.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, source, game); + controller.moveCards(card, Zone.GRAVEYARD, source, game); } else { break; } diff --git a/Mage.Sets/src/mage/sets/morningtide/DeclarationOfNaught.java b/Mage.Sets/src/mage/sets/morningtide/DeclarationOfNaught.java index 7f91e4a9af4..38c343102a5 100644 --- a/Mage.Sets/src/mage/sets/morningtide/DeclarationOfNaught.java +++ b/Mage.Sets/src/mage/sets/morningtide/DeclarationOfNaught.java @@ -48,7 +48,8 @@ import mage.target.TargetSpell; * @author jeffwadsworth */ 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) { @@ -61,13 +62,14 @@ public class DeclarationOfNaught extends CardImpl { // {U}: Counter target spell with the chosen name. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}")); ability.addTarget(new TargetSpell(filter)); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + 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))); @@ -78,10 +80,11 @@ public class DeclarationOfNaught extends CardImpl { public DeclarationOfNaught(final DeclarationOfNaught card) { super(card); + this.originalId = card.originalId; } @Override public DeclarationOfNaught copy() { return new DeclarationOfNaught(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/morningtide/DewdropSpy.java b/Mage.Sets/src/mage/sets/morningtide/DewdropSpy.java new file mode 100644 index 00000000000..88f037780f6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/DewdropSpy.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.sets.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LookLibraryTopCardTargetPlayerEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class DewdropSpy extends CardImpl { + + public DewdropSpy(UUID ownerId) { + super(ownerId, 30, "Dewdrop Spy", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Faerie"); + this.subtype.add("Rogue"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Dewdrop Spy enters the battlefield, look at the top card of target player's library. + Ability ability = new EntersBattlefieldTriggeredAbility(new LookLibraryTopCardTargetPlayerEffect(), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public DewdropSpy(final DewdropSpy card) { + super(card); + } + + @Override + public DewdropSpy copy() { + return new DewdropSpy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/FireJuggler.java b/Mage.Sets/src/mage/sets/morningtide/FireJuggler.java new file mode 100644 index 00000000000..a056936308c --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/FireJuggler.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.sets.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DoIfClashWonEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; + +/** + * + * @author BursegSardaukar + */ +public class FireJuggler extends CardImpl { + + public FireJuggler(UUID ownerId) { + super(ownerId, 90, "Fire Juggler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Goblin"); + this.subtype.add("Shaman"); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Fire Juggler becomes blocked, clash with an opponent. If you win, Fire Juggler deals 4 damage to each creature blocking it. + FilterPermanent filter = new FilterPermanent("each creature blocking it"); + filter.add(new BlockingAttackerIdPredicate(this.getId())); + this.addAbility(new BecomesBlockedTriggeredAbility(new DoIfClashWonEffect(new DamageAllEffect(4,filter)),false)); + } + + public FireJuggler(final FireJuggler card) { + super(card); + } + + @Override + public FireJuggler copy() { + return new FireJuggler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/GrimoireThief.java b/Mage.Sets/src/mage/sets/morningtide/GrimoireThief.java index 47338c04dea..17d751edb03 100644 --- a/Mage.Sets/src/mage/sets/morningtide/GrimoireThief.java +++ b/Mage.Sets/src/mage/sets/morningtide/GrimoireThief.java @@ -34,7 +34,7 @@ import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -65,9 +65,9 @@ import mage.util.CardUtil; * @author jeffwadsworth */ public class GrimoireThief extends CardImpl { - + protected static final String VALUE_PREFIX = "ExileZones"; - + public GrimoireThief(UUID ownerId) { super(ownerId, 35, "Grimoire Thief", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{U}{U}"); this.expansionSetCode = "MOR"; @@ -77,7 +77,7 @@ public class GrimoireThief extends CardImpl { this.toughness = new MageInt(2); // Whenever Grimoire Thief becomes tapped, exile the top three cards of target opponent's library face down. - Ability ability = new BecomesTappedTriggeredAbility(new GrimoireThiefExileEffect(), false); + Ability ability = new BecomesTappedSourceTriggeredAbility(new GrimoireThiefExileEffect(), false); ability.addTarget(new TargetOpponent()); this.addAbility(ability); @@ -88,13 +88,13 @@ public class GrimoireThief extends CardImpl { Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GrimoireThiefCounterspellEffect(), new ManaCostsImpl("{U}")); ability2.addCost(new SacrificeSourceCost()); this.addAbility(ability2); - + } - + public GrimoireThief(final GrimoireThief card) { super(card); } - + @Override public GrimoireThief copy() { return new GrimoireThief(this); @@ -102,16 +102,16 @@ public class GrimoireThief extends CardImpl { } class GrimoireThiefExileEffect extends OneShotEffect { - + public GrimoireThiefExileEffect() { super(Outcome.Discard); staticText = "exile the top three cards of target opponent's library face down"; } - + public GrimoireThiefExileEffect(final GrimoireThiefExileEffect effect) { super(effect); } - + @Override public boolean apply(Game game, Ability source) { Player targetOpponent = game.getPlayer(source.getFirstTarget()); @@ -138,7 +138,7 @@ class GrimoireThiefExileEffect extends OneShotEffect { } return false; } - + @Override public GrimoireThiefExileEffect copy() { return new GrimoireThiefExileEffect(this); @@ -146,26 +146,26 @@ class GrimoireThiefExileEffect extends OneShotEffect { } class GrimoireThiefLookEffect extends AsThoughEffectImpl { - + public GrimoireThiefLookEffect() { super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); staticText = "You may look at the cards exiled with {this}"; } - + public GrimoireThiefLookEffect(final GrimoireThiefLookEffect effect) { super(effect); } - + @Override public boolean apply(Game game, Ability source) { return true; } - + @Override public GrimoireThiefLookEffect copy() { return new GrimoireThiefLookEffect(this); } - + @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { if (affectedControllerId.equals(source.getControllerId()) && game.getState().getZone(objectId).equals(Zone.EXILED)) { @@ -193,16 +193,16 @@ class GrimoireThiefLookEffect extends AsThoughEffectImpl { } class GrimoireThiefCounterspellEffect extends OneShotEffect { - + public GrimoireThiefCounterspellEffect() { super(Outcome.Discard); staticText = "Turn all cards exiled with {this} face up. Counter all spells with those names"; } - + public GrimoireThiefCounterspellEffect(final GrimoireThiefCounterspellEffect effect) { super(effect); } - + @Override public boolean apply(Game game, Ability source) { Cards cards = new CardsImpl(); @@ -245,7 +245,7 @@ class GrimoireThiefCounterspellEffect extends OneShotEffect { } return false; } - + @Override public GrimoireThiefCounterspellEffect copy() { return new GrimoireThiefCounterspellEffect(this); diff --git a/Mage.Sets/src/mage/sets/morningtide/KinsbaileBorderguard.java b/Mage.Sets/src/mage/sets/morningtide/KinsbaileBorderguard.java new file mode 100644 index 00000000000..5080aa2baa5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/KinsbaileBorderguard.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.sets.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.KithkinToken; + +/** + * + * @author LoneFox + */ +public class KinsbaileBorderguard extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(new SubtypePredicate("Kithkin")); + } + + public KinsbaileBorderguard(UUID ownerId) { + super(ownerId, 14, "Kinsbaile Borderguard", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Kithkin"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Kinsbaile Borderguard enters the battlefield with a +1/+1 counter on it for each other Kithkin you control. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), + new PermanentsOnBattlefieldCount(filter), true), "with a +1/+1 counter on it for each other Kithkin you control")); + // When Kinsbaile Borderguard dies, put a 1/1 white Kithkin Soldier creature token onto the battlefield for each counter on it. + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new KithkinToken(), new AllCountersCount()))); + } + + public KinsbaileBorderguard(final KinsbaileBorderguard card) { + super(card); + } + + @Override + public KinsbaileBorderguard copy() { + return new KinsbaileBorderguard(this); + } +} + +class AllCountersCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId()); + if(sourcePermanent != null) { + int total = 0; + for(Counter counter : sourcePermanent.getCounters().values()) { + total += counter.getCount(); + } + return total; + } + return 0; + } + + @Override + public DynamicValue copy() { + return new AllCountersCount(); + } + + @Override + public String getMessage() { + return "for each counter on it"; + } + + @Override + public String toString() { + return "1"; + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/LeafCrownedElder.java b/Mage.Sets/src/mage/sets/morningtide/LeafCrownedElder.java index 29bf162db7e..80824610284 100644 --- a/Mage.Sets/src/mage/sets/morningtide/LeafCrownedElder.java +++ b/Mage.Sets/src/mage/sets/morningtide/LeafCrownedElder.java @@ -55,10 +55,10 @@ public class LeafCrownedElder extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(5); - // Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Leaf-Crowned Elder, you may reveal it. + // Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Leaf-Crowned Elder, you may reveal it. // If you do, you may play that card without paying its mana cost. this.addAbility(new KinshipAbility(new LeafCrownedElderPlayEffect())); - + } public LeafCrownedElder(final LeafCrownedElder card) { @@ -84,18 +84,11 @@ class LeafCrownedElderPlayEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); Card card = game.getCard(getTargetPointer().getFirst(game, source)); - if (player != null && card != null) { - if (player.chooseUse(Outcome.PlayForFree, "Play " + card.getName() + " without paying its mana cost?", source, game)) { - if (card.getCardType().contains(CardType.LAND)) { - // If the revealed card is a land, you can play it only if it's your turn and you haven't yet played a land this turn. - if (game.getActivePlayerId().equals(player.getId()) && player.canPlayLand()) { - player.playLand(card, game); - } - } else { - player.cast(card.getSpellAbility(), game, true); - } + if (controller != null && card != null) { + if (controller.chooseUse(Outcome.PlayForFree, "Play " + card.getIdName() + " without paying its mana cost?", source, game)) { + controller.playCard(card, game, true, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/morningtide/StinkdrinkerBandit.java b/Mage.Sets/src/mage/sets/morningtide/StinkdrinkerBandit.java new file mode 100644 index 00000000000..82fecdc17ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/StinkdrinkerBandit.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.sets.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.effects.Effect; +import mage.abilities.common.SimpleTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.ProwlAbility; +import mage.constants.Duration; +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.AttackingPredicate; +import mage.filter.predicate.permanent.BlockedPredicate; +import mage.game.events.GameEvent; + +/** + * + * @author BursegSardaukar + */ +public class StinkdrinkerBandit extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Attacking and unblocked Rogues"); + + static { + filter.add(new SubtypePredicate("Rogue")); + filter.add(new AttackingPredicate()); + filter.add(Predicates.not(new BlockedPredicate())); + } + + public StinkdrinkerBandit(UUID ownerId) { + super(ownerId, 80, "Stinkdrinker Bandit", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Goblin"); + this.subtype.add("Rogue"); + + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Prowl {1}, {B} (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Goblin or Rogue.) + this.addAbility(new ProwlAbility(this, "{1}{B}")); + + // Whenever a Rogue you control attacks and isn't blocked, it gets +2/+1 until end of turn. + Effect effect = new BoostControlledEffect(2,1,Duration.EndOfTurn, filter); + Ability ability = new SimpleTriggeredAbility(Zone.BATTLEFIELD, GameEvent.EventType.DECLARED_BLOCKERS, effect, "Whenever a Rogue you control attacks and isn't blocked,"); + this.addAbility(ability); + } + + public StinkdrinkerBandit(final StinkdrinkerBandit card) { + super(card); + } + + @Override + public StinkdrinkerBandit copy() { + return new StinkdrinkerBandit(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java b/Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java index 691d5c6c073..f4c59c8063f 100644 --- a/Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java +++ b/Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java @@ -29,7 +29,7 @@ package mage.sets.morningtide; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -51,7 +51,7 @@ public class StonybrookSchoolmaster extends CardImpl { this.toughness = new MageInt(2); // Whenever Stonybrook Schoolmaster becomes tapped, you may put a 1/1 blue Merfolk Wizard creature token onto the battlefield. - this.addAbility(new BecomesTappedTriggeredAbility(new CreateTokenEffect(new MerfolkWizardToken()), true)); + this.addAbility(new BecomesTappedSourceTriggeredAbility(new CreateTokenEffect(new MerfolkWizardToken()), true)); } public StonybrookSchoolmaster(final StonybrookSchoolmaster card) { @@ -62,4 +62,4 @@ public class StonybrookSchoolmaster extends CardImpl { public StonybrookSchoolmaster copy() { return new StonybrookSchoolmaster(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/morningtide/VengefulFirebrand.java b/Mage.Sets/src/mage/sets/morningtide/VengefulFirebrand.java new file mode 100644 index 00000000000..2ce4e29736b --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/VengefulFirebrand.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.sets.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class VengefulFirebrand extends CardImpl { + + public VengefulFirebrand(UUID ownerId) { + super(ownerId, 111, "Vengeful Firebrand", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Elemental"); + this.subtype.add("Warrior"); + this.power = new MageInt(5); + this.toughness = new MageInt(2); + + // Vengeful Firebrand has haste as long as a Warrior card is in your graveyard. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield), + VengefulFirebrandCondition.getInstance(), + "{this} has haste as long as a Warrior card is in your graveyard"))); + + // {R}: Vengeful Firebrand gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public VengefulFirebrand(final VengefulFirebrand card) { + super(card); + } + + @Override + public VengefulFirebrand copy() { + return new VengefulFirebrand(this); + } +} + +class VengefulFirebrandCondition implements Condition { + + private static VengefulFirebrandCondition fInstance = new VengefulFirebrandCondition(); + private static final FilterCard filter = new FilterCard("Warrior"); + + static { + filter.add(new SubtypePredicate("Warrior")); + } + + public static Condition getInstance() { + return fInstance; + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + return player != null && player.getGraveyard().count(filter, game) > 0; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/nemesis/AnimateLand.java b/Mage.Sets/src/mage/sets/nemesis/AnimateLand.java new file mode 100644 index 00000000000..04a11385bea --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/AnimateLand.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.sets.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.permanent.token.Token; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class AnimateLand extends CardImpl { + + public AnimateLand(UUID ownerId) { + super(ownerId, 101, "Animate Land", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "NMS"; + + // Until end of turn, target land becomes a 3/3 creature that's still a land. + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new AnimatedLand(), false, true, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + } + + public AnimateLand(final AnimateLand card) { + super(card); + } + + @Override + public AnimateLand copy() { + return new AnimateLand(this); + } +} + +class AnimatedLand extends Token { + + public AnimatedLand() { + super("", "3/3 creature"); + this.cardType.add(CardType.CREATURE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/Dominate.java b/Mage.Sets/src/mage/sets/nemesis/Dominate.java new file mode 100644 index 00000000000..6c03ea78ddb --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/Dominate.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.sets.nemesis; + +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class Dominate extends CardImpl { + + public Dominate(UUID ownerId) { + super(ownerId, 31, "Dominate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{1}{U}{U}"); + this.expansionSetCode = "NMS"; + + // Gain control of target creature with converted mana cost X or less. + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.Custom, true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature with converted mana cost X or less"))); + } + + public Dominate(final Dominate 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 or less"); + filter.add(Predicates.not(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, xValue))); + ability.addTarget(new TargetCreaturePermanent(filter)); + } + } + + @Override + public Dominate copy() { + return new Dominate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/Ensnare.java b/Mage.Sets/src/mage/sets/nemesis/Ensnare.java new file mode 100644 index 00000000000..85295255c9a --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/Ensnare.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.sets.nemesis; + +import java.util.UUID; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; +import mage.abilities.effects.common.TapAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author fireshoes + */ +public class Ensnare extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Islands"); + static{ + filter.add(new SubtypePredicate("Island")); + } + + public Ensnare(UUID ownerId) { + super(ownerId, 32, "Ensnare", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{U}"); + this.expansionSetCode = "NMS"; + + // You may return two Islands you control to their owner's hand rather than pay Ensnare's mana cost. + AlternativeCostSourceAbility ability; + ability = new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, filter, true))); + this.addAbility(ability); + + // Tap all creatures. + this.getSpellAbility().addEffect(new TapAllEffect(new FilterCreaturePermanent())); + } + + public Ensnare(final Ensnare card) { + super(card); + } + + @Override + public Ensnare copy() { + return new Ensnare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/SaprolingBurst.java b/Mage.Sets/src/mage/sets/nemesis/SaprolingBurst.java new file mode 100644 index 00000000000..1b1d9f7c8e6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/SaprolingBurst.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.sets.nemesis; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class SaprolingBurst extends mage.sets.vintagemasters.SaprolingBurst { + + public SaprolingBurst(UUID ownerId) { + super(ownerId); + this.cardNumber = 113; + this.expansionSetCode = "NMS"; + } + + public SaprolingBurst(final SaprolingBurst card) { + super(card); + } + + @Override + public SaprolingBurst copy() { + return new SaprolingBurst(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/ShriekingMogg.java b/Mage.Sets/src/mage/sets/nemesis/ShriekingMogg.java new file mode 100644 index 00000000000..4470042228a --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/ShriekingMogg.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.sets.nemesis; + +import java.util.UUID; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.TapAllEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author BursegSardaukar + */ +public class ShriekingMogg extends CardImpl { + + static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all other creatures"); + + static { + filter.add(new AnotherPredicate()); + } + + public ShriekingMogg(UUID ownerId) { + super(ownerId, 99, "Shrieking Mogg", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Goblin"); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // When Shrieking Mogg enters the battlefield, tap all other creatures. + Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllEffect(filter)); + this.addAbility(ability); + } + + public ShriekingMogg(final ShriekingMogg card) { + super(card); + } + + @Override + public ShriekingMogg copy() { + return new ShriekingMogg(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/nemesis/SilkenfistFighter.java b/Mage.Sets/src/mage/sets/nemesis/SilkenfistFighter.java new file mode 100644 index 00000000000..8ac25b84cc3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/SilkenfistFighter.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.sets.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SilkenfistFighter extends CardImpl { + + public SilkenfistFighter(UUID ownerId) { + super(ownerId, 19, "Silkenfist Fighter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Whenever Silkenfist Fighter becomes blocked, untap it. + Effect effect = new UntapSourceEffect(); + effect.setText("untap it"); + this.addAbility(new BecomesBlockedTriggeredAbility(effect, false)); + } + + public SilkenfistFighter(final SilkenfistFighter card) { + super(card); + } + + @Override + public SilkenfistFighter copy() { + return new SilkenfistFighter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/SilkenfistOrder.java b/Mage.Sets/src/mage/sets/nemesis/SilkenfistOrder.java new file mode 100644 index 00000000000..23ecd99ace7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/SilkenfistOrder.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.sets.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SilkenfistOrder extends CardImpl { + + public SilkenfistOrder(UUID ownerId) { + super(ownerId, 20, "Silkenfist Order", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Whenever Silkenfist Order becomes blocked, untap it. + Effect effect = new UntapSourceEffect(); + effect.setText("untap it"); + this.addAbility(new BecomesBlockedTriggeredAbility(effect, false)); + } + + public SilkenfistOrder(final SilkenfistOrder card) { + super(card); + } + + @Override + public SilkenfistOrder copy() { + return new SilkenfistOrder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheTangle.java b/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheTangle.java index 810a3c9db94..a74e7b63d3a 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheTangle.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheTangle.java @@ -79,7 +79,7 @@ public class ChancellorOfTheTangle extends CardImpl { class ChancellorOfTheTangleDelayedTriggeredAbility extends DelayedTriggeredAbility { ChancellorOfTheTangleDelayedTriggeredAbility () { - super(new BasicManaEffect(Mana.GreenMana)); + super(new BasicManaEffect(Mana.GreenMana(1))); } ChancellorOfTheTangleDelayedTriggeredAbility(ChancellorOfTheTangleDelayedTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/sets/newphyrexia/GitaxianProbe.java b/Mage.Sets/src/mage/sets/newphyrexia/GitaxianProbe.java index bf3054706e8..298ed67b7b6 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/GitaxianProbe.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/GitaxianProbe.java @@ -1,99 +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.sets.newphyrexia; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetPlayer; - -/** - * - * @author Loki - */ -public class GitaxianProbe extends CardImpl { - - public GitaxianProbe(UUID ownerId) { - super(ownerId, 35, "Gitaxian Probe", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{UP}"); - this.expansionSetCode = "NPH"; - - // Look at target player's hand. - this.getSpellAbility().addEffect(new GitaxianProbeEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - - } - - public GitaxianProbe(final GitaxianProbe card) { - super(card); - } - - @Override - public GitaxianProbe copy() { - return new GitaxianProbe(this); - } - -} - -class GitaxianProbeEffect extends OneShotEffect { - - GitaxianProbeEffect() { - super(Outcome.DrawCard); - staticText = "Look at target player's hand"; - } - - GitaxianProbeEffect(final GitaxianProbeEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - MageObject sourceObject = source.getSourceObject(game); - if (player != null && controller != null && sourceObject != null) { - controller.lookAtCards(sourceObject.getIdName() + " (" + player.getName() + ")", player.getHand(), game); - } - return true; - } - - @Override - public GitaxianProbeEffect copy() { - return new GitaxianProbeEffect(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.sets.newphyrexia; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author Loki + */ +public class GitaxianProbe extends CardImpl { + + public GitaxianProbe(UUID ownerId) { + super(ownerId, 35, "Gitaxian Probe", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{UP}"); + this.expansionSetCode = "NPH"; + + // Look at target player's hand. + this.getSpellAbility().addEffect(new LookAtTargetPlayerHandEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + + } + + public GitaxianProbe(final GitaxianProbe card) { + super(card); + } + + @Override + public GitaxianProbe copy() { + return new GitaxianProbe(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/newphyrexia/KarnLiberated.java b/Mage.Sets/src/mage/sets/newphyrexia/KarnLiberated.java index e51d4c7d16e..468537a4201 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/KarnLiberated.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/KarnLiberated.java @@ -139,12 +139,17 @@ class KarnLiberatedEffect extends OneShotEffect { if (card.getOwnerId().equals(player.getId()) && !card.isCopy() // no copies && !player.getSideboard().contains(card.getId()) && !cards.contains(card)) { // not the exiled cards - player.getLibrary().putOnTop(card, game); + if (card.getId().equals(player.getCommanderId())) { + card.moveToZone(Zone.COMMAND, null, game, true); + } else { + player.getLibrary().putOnTop(card, game); + } } } player.init(game); } for (Card card : cards) { + game.getState().setZone(card.getId(), Zone.EXILED); if (CardUtil.isPermanentCard(card) && !card.getSubtype().contains("Aura")) { game.getExile().add(exileId, sourceObject.getIdName(), card); } @@ -209,16 +214,21 @@ class KarnLiberatedDelayedEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - ExileZone exile = game.getExile().getExileZone(exileId); - if (exile != null) { - Cards cards = new CardsImpl(); // needed because putOntoTheBattlefield removes from exile - cards.addAll(exile); - for (Card card : cards.getCards(game)) { - card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId()); - Permanent permanent = game.getPermanent(card.getId()); - ((PermanentImpl) permanent).removeSummoningSickness(); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + ExileZone exile = game.getExile().getExileZone(exileId); + if (exile != null) { + // Creatures put onto the battlefield due to Karn's ability will have been under their controller's control continuously + // since the beginning of the first turn. They can attack and their activated abilities with {T} in the cost can be activated. + Cards cards = new CardsImpl(); // needed because putOntoTheBattlefield removes from exile + cards.addAll(exile); + controller.moveCards(cards, Zone.BATTLEFIELD, source, game); + for (Card card : cards.getCards(game)) { + Permanent permanent = game.getPermanent(card.getId()); + ((PermanentImpl) permanent).removeSummoningSickness(); + } + return true; } - return true; } return false; } diff --git a/Mage.Sets/src/mage/sets/newphyrexia/ShrineOfBoundlessGrowth.java b/Mage.Sets/src/mage/sets/newphyrexia/ShrineOfBoundlessGrowth.java index ef5096faa9a..a8475f44f34 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/ShrineOfBoundlessGrowth.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/ShrineOfBoundlessGrowth.java @@ -68,7 +68,7 @@ public class ShrineOfBoundlessGrowth extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false)); // {T}, Sacrifice Shrine of Boundless Growth: Add {1} to your mana pool for each charge counter on Shrine of Boundless Growth. - Ability ability = new DynamicManaAbility(Mana.ColorlessMana, new CountersCount(CounterType.CHARGE), new TapSourceCost()); + Ability ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersCount(CounterType.CHARGE), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/ninthedition/AnabaShaman.java b/Mage.Sets/src/mage/sets/ninthedition/AnabaShaman.java index 40ad7100342..f1615de3394 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/AnabaShaman.java +++ b/Mage.Sets/src/mage/sets/ninthedition/AnabaShaman.java @@ -28,16 +28,15 @@ package mage.sets.ninthedition; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; 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.DamagePlayersEffect; +import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; import mage.target.common.TargetCreatureOrPlayer; @@ -57,7 +56,7 @@ public class AnabaShaman extends CardImpl { this.toughness = new MageInt(2); // {R}, {tap}: Anaba Shaman deals 1 damage to target creature or player. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(1), new ManaCostsImpl("{R}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/ninthedition/BloodMoon.java b/Mage.Sets/src/mage/sets/ninthedition/BloodMoon.java index c374adde742..ac21d7d9855 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/BloodMoon.java +++ b/Mage.Sets/src/mage/sets/ninthedition/BloodMoon.java @@ -28,6 +28,12 @@ package mage.sets.ninthedition; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; +import mage.cards.repository.CardRepository; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; @@ -35,11 +41,6 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.SubLayer; import mage.constants.Zone; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.mana.RedManaAbility; -import mage.cards.CardImpl; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -56,7 +57,6 @@ public class BloodMoon extends CardImpl { super(ownerId, 176, "Blood Moon", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); this.expansionSetCode = "9ED"; - // Nonbasic lands are Mountains. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BloodMoonEffect())); } @@ -74,6 +74,7 @@ public class BloodMoon extends CardImpl { class BloodMoonEffect extends ContinuousEffectImpl { private static final FilterLandPermanent filter = new FilterLandPermanent(); + static { filter.add(Predicates.not(new SupertypePredicate("Basic"))); } @@ -99,16 +100,18 @@ class BloodMoonEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - for (Permanent land: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { + for (Permanent land : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { switch (layer) { - case AbilityAddingRemovingEffects_6: - land.removeAllAbilities(source.getSourceId(), game); - land.addAbility(new RedManaAbility(), source.getSourceId(), game); - break; case TypeChangingEffects_4: - land.getSubtype().clear(); + // 305.7 Note that this doesn't remove any abilities that were granted to the land by other effects + // So the ability removing has to be done before Layer 6 + land.removeAllAbilities(source.getSourceId(), game); + land.getSubtype().removeAll(CardRepository.instance.getLandTypes()); land.getSubtype().add("Mountain"); break; + case AbilityAddingRemovingEffects_6: + land.addAbility(new RedManaAbility(), source.getSourceId(), game); + break; } } return true; diff --git a/Mage.Sets/src/mage/sets/ninthedition/Deathgazer.java b/Mage.Sets/src/mage/sets/ninthedition/Deathgazer.java index 68f56668e4d..f8bd55460ae 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/Deathgazer.java +++ b/Mage.Sets/src/mage/sets/ninthedition/Deathgazer.java @@ -29,18 +29,18 @@ package mage.sets.ninthedition; import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.ObjectColor; +import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -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.target.targetpointer.FixedTarget; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; /** * @@ -48,6 +48,12 @@ import mage.target.targetpointer.FixedTarget; */ public class Deathgazer extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + public Deathgazer(UUID ownerId) { super(ownerId, 124, "Deathgazer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.expansionSetCode = "9ED"; @@ -57,7 +63,11 @@ public class Deathgazer extends CardImpl { this.toughness = new MageInt(2); // Whenever Deathgazer blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat. - this.addAbility(new DeathgazerTriggeredAbility(new DestroyTargetEffect(), false)); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(effect, filter, false)); + } public Deathgazer(final Deathgazer card) { @@ -69,54 +79,3 @@ public class Deathgazer extends CardImpl { return new Deathgazer(this); } } - -class DeathgazerTriggeredAbility extends TriggeredAbilityImpl { - - - - public DeathgazerTriggeredAbility(Effect effect, boolean optional) { - super(Zone.BATTLEFIELD, effect, optional); - } - - public DeathgazerTriggeredAbility(final DeathgazerTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.BLOCKER_DECLARED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getSourceId().equals(this.getSourceId())) { - Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null && !permanent.getColor(game).isBlack()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); - } - return true; - } - } - if (event.getTargetId().equals(this.getSourceId())) { - Permanent permanent = game.getPermanent(event.getSourceId()); - if (permanent != null && !permanent.getColor(game).isBlack()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); - } - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever {this} blocks or becomes blocked by a nonblack creature, " + super.getRule(); - } - - @Override - public DeathgazerTriggeredAbility copy() { - return new DeathgazerTriggeredAbility(this); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java b/Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java index e506714d397..c769466b309 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java +++ b/Mage.Sets/src/mage/sets/ninthedition/ViashinoSandstalker.java @@ -29,17 +29,14 @@ package mage.sets.ninthedition; import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.TargetController; import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; /** * @@ -61,8 +58,8 @@ public class ViashinoSandstalker extends CardImpl { this.addAbility(HasteAbility.getInstance()); // At the beginning of the end step, return Viashino Sandstalker to its owner's hand. - this.addAbility(new BeginningOfEndStepTriggeredAbility(new ReturnToHandSourceEffect(true), false)); - + this.addAbility(new BeginningOfEndStepTriggeredAbility(new ReturnToHandSourceEffect(true), + TargetController.ANY, false)); } public ViashinoSandstalker(final ViashinoSandstalker card) { @@ -74,34 +71,3 @@ public class ViashinoSandstalker extends CardImpl { return new ViashinoSandstalker(this); } } - -class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl { - - public BeginningOfEndStepTriggeredAbility(Effect effect, boolean optional) { - super(Zone.BATTLEFIELD, effect, optional); - } - - public BeginningOfEndStepTriggeredAbility(final BeginningOfEndStepTriggeredAbility ability) { - super(ability); - } - - @Override - public BeginningOfEndStepTriggeredAbility copy() { - return new BeginningOfEndStepTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.END_TURN_STEP_PRE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return true; - } - - @Override - public String getRule() { - return "At the beginning of the end step, return {this} to its owner's hand"; - } -} diff --git a/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java b/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java index e0e33069cdf..798ecb02a0c 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java +++ b/Mage.Sets/src/mage/sets/ninthedition/WanderguardSentry.java @@ -31,11 +31,11 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.RevealHandTargetEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.constants.TargetController; import mage.target.common.TargetOpponent; /** @@ -53,7 +53,9 @@ public class WanderguardSentry extends CardImpl { this.toughness = new MageInt(3); // When Wanderguard Sentry enters the battlefield, look at target opponent's hand. - Ability ability = new EntersBattlefieldTriggeredAbility(new RevealHandTargetEffect(TargetController.OPPONENT)); + Effect effect = new LookAtTargetPlayerHandEffect(); + effect.setText("look at target opponent's hand"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/ninthedition/ZealousInquisitor.java b/Mage.Sets/src/mage/sets/ninthedition/ZealousInquisitor.java new file mode 100644 index 00000000000..f5053a18f8e --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/ZealousInquisitor.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.sets.ninthedition; + +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.RedirectDamageFromSourceToTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ZealousInquisitor extends CardImpl { + + public ZealousInquisitor(UUID ownerId) { + super(ownerId, 57, "Zealous Inquisitor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}{W}: The next 1 damage that would be dealt to Zealous Inquisitor this turn is dealt to target creature instead. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ZealousInquisitor(final ZealousInquisitor card) { + super(card); + } + + @Override + public ZealousInquisitor copy() { + return new ZealousInquisitor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/AyliEternalPilgrim.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/AyliEternalPilgrim.java new file mode 100644 index 00000000000..e9a0f2878d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/AyliEternalPilgrim.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.sets.oathofthegatewatch; + +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.SacrificeTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesToughness; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author fireshoes + */ +public class AyliEternalPilgrim extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature"); + static { + filter.add(new AnotherPredicate()); + } + + public AyliEternalPilgrim(UUID ownerId) { + super(ownerId, 151, "Ayli, Eternal Pilgrim", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{B}"); + this.expansionSetCode = "OGW"; + this.supertype.add("Legendary"); + this.subtype.add("Kor"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // {1}, Sacrifice another creature: You gain life equal to the sacrificed creature's toughness. + Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness()); + effect.setText("You gain life equal to the sacrificed creature's toughness"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1)); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + + // {1}{W}{B}, Sacrifice another creature: Exile target nonland permanent. Activate this ability only if you have at least 10 life more than your starting life total. + ability = new ConditionalActivatedAbility( + Zone.BATTLEFIELD, + new ExileTargetEffect(), + new ManaCostsImpl("{1}{W}{B}"), + new AyliEternalPilgrimCondition(), + "{1}{W}{B}, Sacrifice another creature: Exile target nonland permanent. Activate this ability only if you have at least 10 life more than your starting life total"); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + ability.addTarget(new TargetNonlandPermanent()); + this.addAbility(ability); + } + + public AyliEternalPilgrim(final AyliEternalPilgrim card) { + super(card); + } + + @Override + public AyliEternalPilgrim copy() { + return new AyliEternalPilgrim(this); + } +} + +class AyliEternalPilgrimCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + return player.getLife() >= game.getLife() + 10; + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java index 1d5d1346d3d..9209498429f 100644 --- a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java +++ b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java @@ -69,11 +69,11 @@ public class AnimalBoneyard extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted land has "{tap}, Sacrifice a creature: You gain life equal to that creature's toughness." + // Enchanted land has "{T}, Sacrifice a creature: You gain life equal to that creature's toughness." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AnimalBoneyardEffect(), new TapSourceCost()); gainedAbility.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, - "Enchanted land has \"{tap}, Sacrifice a creature: You gain life equal to that creature's toughness.\""); + "Enchanted land has \"{T}, Sacrifice a creature: You gain life equal to that creature's toughness.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/sets/odyssey/BurningSands.java b/Mage.Sets/src/mage/sets/odyssey/BurningSands.java index de47ee28336..fbea465432a 100644 --- a/Mage.Sets/src/mage/sets/odyssey/BurningSands.java +++ b/Mage.Sets/src/mage/sets/odyssey/BurningSands.java @@ -46,20 +46,22 @@ import mage.target.targetpointer.FixedTarget; */ public class BurningSands extends CardImpl { + private final UUID originalId; private static final FilterLandPermanent filter = new FilterLandPermanent("a land"); public BurningSands(UUID ownerId) { super(ownerId, 180, "Burning Sands", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}"); this.expansionSetCode = "ODY"; - // Whenever a creature dies, that creature's controller sacrifices a land. - this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeEffect(filter, 1, "that creature's controller"), false, false, true)); + Ability ability = new DiesCreatureTriggeredAbility(new SacrificeEffect(filter, 1, "that creature's controller"), false, false, true); + originalId = ability.getOriginalId(); + this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof DiesCreatureTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { UUID creatureId = ability.getEffects().get(0).getTargetPointer().getFirst(game, ability); Permanent creature = (Permanent) game.getLastKnownInformation(creatureId, Zone.BATTLEFIELD); if (creature != null) { @@ -70,6 +72,7 @@ public class BurningSands extends CardImpl { public BurningSands(final BurningSands card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/odyssey/CabalInquisitor.java b/Mage.Sets/src/mage/sets/odyssey/CabalInquisitor.java index 7d3dac197f4..a0a48bb3b26 100644 --- a/Mage.Sets/src/mage/sets/odyssey/CabalInquisitor.java +++ b/Mage.Sets/src/mage/sets/odyssey/CabalInquisitor.java @@ -89,7 +89,7 @@ public class CabalInquisitor extends CardImpl { class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl { private Condition condition; - private String ruleText = "Threshold - {1}{B}, {t}, Exile two cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard."; + private String ruleText = "Threshold - {1}{B}, {t}, Exile two cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard."; private static final Effects emptyEffects = new Effects(); diff --git a/Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java b/Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java index 0758743b18d..c6650039d9b 100644 --- a/Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java +++ b/Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java @@ -32,8 +32,7 @@ import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.CardsInControllerGraveCondition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.AddContinuousEffectToGame; +import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -63,8 +62,8 @@ public class DivineSacrament extends CardImpl { Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false)); this.addAbility(ability); // Threshold - White creatures get an additional +1/+1 as long as seven or more cards are in your graveyard. - ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect( - new AddContinuousEffectToGame(new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false)), + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false), new CardsInControllerGraveCondition(7), "Threshold - If seven or more cards are in your graveyard, white creatures get an additional +1/+1." )); diff --git a/Mage.Sets/src/mage/sets/odyssey/NomadDecoy.java b/Mage.Sets/src/mage/sets/odyssey/NomadDecoy.java index 94f051146c7..b2befb9492c 100644 --- a/Mage.Sets/src/mage/sets/odyssey/NomadDecoy.java +++ b/Mage.Sets/src/mage/sets/odyssey/NomadDecoy.java @@ -65,13 +65,13 @@ public class NomadDecoy extends CardImpl { ability.addCost(new TapSourceCost()); this.addAbility(ability); - // Threshold - {W}{W}, {tap}: Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard. + // Threshold - {W}{W}, {T}: Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard. Ability thresholdAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{W}{W}")); thresholdAbility.addTarget(new TargetCreaturePermanent(2)); thresholdAbility.addCost(new TapSourceCost()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(thresholdAbility), new CardsInControllerGraveCondition(7), - "Threshold - {W}{W}, {tap}: Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard."))); + "Threshold - {W}{W}, {T}: Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard."))); } public NomadDecoy(final NomadDecoy card) { diff --git a/Mage.Sets/src/mage/sets/odyssey/RitesOfInitiation.java b/Mage.Sets/src/mage/sets/odyssey/RitesOfInitiation.java new file mode 100644 index 00000000000..dbaff078468 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/RitesOfInitiation.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.sets.odyssey; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author emerald000 + */ +public class RitesOfInitiation extends CardImpl { + + public RitesOfInitiation(UUID ownerId) { + super(ownerId, 217, "Rites of Initiation", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "ODY"; + + // Discard any number of cards at random. Creatures you control get +1/+0 until end of turn for each card discarded this way. + this.getSpellAbility().addEffect(new RitesOfInitiationEffect()); + } + + public RitesOfInitiation(final RitesOfInitiation card) { + super(card); + } + + @Override + public RitesOfInitiation copy() { + return new RitesOfInitiation(this); + } +} + +class RitesOfInitiationEffect extends OneShotEffect { + + RitesOfInitiationEffect() { + super(Outcome.BoostCreature); + this.staticText = "Discard any number of cards at random. Creatures you control get +1/+0 until end of turn for each card discarded this way"; + } + + RitesOfInitiationEffect(final RitesOfInitiationEffect effect) { + super(effect); + } + + @Override + public RitesOfInitiationEffect copy() { + return new RitesOfInitiationEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + int numToDiscard = player.getAmount(0, player.getHand().size(), "Discard how many cards at random?", game); + player.discard(numToDiscard, true, source, game); + game.addEffect(new BoostControlledEffect(numToDiscard, 0, Duration.EndOfTurn), source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/SacredRites.java b/Mage.Sets/src/mage/sets/odyssey/SacredRites.java index 9b81acc9b99..b066c5a7482 100644 --- a/Mage.Sets/src/mage/sets/odyssey/SacredRites.java +++ b/Mage.Sets/src/mage/sets/odyssey/SacredRites.java @@ -41,7 +41,6 @@ import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; import mage.target.Target; -import mage.target.Targets; import mage.target.common.TargetCardInHand; /** @@ -56,7 +55,6 @@ public class SacredRites extends CardImpl { // Discard any number of cards. Creatures you control get +0/+1 until end of turn for each card discarded this way. - this.getSpellAbility().addTarget(new TargetCardInHand(0, Integer.MAX_VALUE, new FilterCard())); this.getSpellAbility().addEffect(new SacredRitesEffect()); } @@ -72,12 +70,12 @@ public class SacredRites extends CardImpl { class SacredRitesEffect extends OneShotEffect { - public SacredRitesEffect() { + SacredRitesEffect() { super(Outcome.Benefit); this.staticText = "Discard any number of cards. Creatures you control get +0/+1 until end of turn for each card discarded this way."; } - public SacredRitesEffect(final SacredRitesEffect effect) { + SacredRitesEffect(final SacredRitesEffect effect) { super(effect); } @@ -90,14 +88,18 @@ class SacredRitesEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - Targets targets = source.getTargets(); - int i = 0; - for (Target target: targets) { - Card card = game.getCard(target.getFirstTarget()); - player.discard(card, source, game); - i++; + Target target = new TargetCardInHand(0, Integer.MAX_VALUE, new FilterCard("cards to discard")); + while (player.canRespond() && !target.isChosen()) { + target.choose(Outcome.BoostCreature, player.getId(), source.getSourceId(), game); + } + int numDiscarded = 0; + for (UUID targetId : target.getTargets()) { + Card card = player.getHand().get(targetId, game); + if (player.discard(card, source, game)) { + numDiscarded++; + } } - game.addEffect(new BoostControlledEffect(0, i, Duration.EndOfTurn), source); + game.addEffect(new BoostControlledEffect(0, numDiscarded, Duration.EndOfTurn), source); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/odyssey/SetonKrosanProtector.java b/Mage.Sets/src/mage/sets/odyssey/SetonKrosanProtector.java index 71e67602a64..351858ad997 100644 --- a/Mage.Sets/src/mage/sets/odyssey/SetonKrosanProtector.java +++ b/Mage.Sets/src/mage/sets/odyssey/SetonKrosanProtector.java @@ -68,7 +68,7 @@ public class SetonKrosanProtector extends CardImpl { // Tap an untapped Druid you control: Add {G} to your mana pool. this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, - new BasicManaEffect(Mana.GreenMana), + new BasicManaEffect(Mana.GreenMana(1)), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)))); } diff --git a/Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java b/Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java index 6043783ef79..f7bb4159f8e 100644 --- a/Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java +++ b/Mage.Sets/src/mage/sets/odyssey/ShowerOfCoals.java @@ -53,7 +53,7 @@ public class ShowerOfCoals extends CardImpl { Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(4), new DamageTargetEffect(2), new CardsInControllerGraveCondition(7), - "{this} deals 2 damage to each of up to three target creatures and/or players.

Threshold - {this} deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard."); + "{this} deals 2 damage to each of up to three target creatures and/or players.

Threshold - {this} deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard."); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(0,3)); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/sets/odyssey/SylvanMight.java b/Mage.Sets/src/mage/sets/odyssey/SylvanMight.java new file mode 100644 index 00000000000..5c999e567c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/SylvanMight.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.sets.odyssey; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SylvanMight extends CardImpl { + + public SylvanMight(UUID ownerId) { + super(ownerId, 277, "Sylvan Might", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "ODY"; + + // Target creature gets +2/+2 and gains trample until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Flashback {2}{G}{G} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}{G}"), TimingRule.INSTANT)); + } + + public SylvanMight(final SylvanMight card) { + super(card); + } + + @Override + public SylvanMight copy() { + return new SylvanMight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/TarnishedCitadel.java b/Mage.Sets/src/mage/sets/odyssey/TarnishedCitadel.java index 88508e24529..08f9895da5f 100644 --- a/Mage.Sets/src/mage/sets/odyssey/TarnishedCitadel.java +++ b/Mage.Sets/src/mage/sets/odyssey/TarnishedCitadel.java @@ -50,7 +50,7 @@ public class TarnishedCitadel extends CardImpl { this.expansionSetCode = "ODY"; // {tap}: Add {1} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana, new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new TapSourceCost())); // {tap}: Add one mana of any color to your mana pool. Tarnished Citadel deals 3 damage to you. ManaAbility ability = new AnyColorManaAbility(new TapSourceCost()); ability.addEffect(new DamageControllerEffect(3)); diff --git a/Mage.Sets/src/mage/sets/odyssey/Vivify.java b/Mage.Sets/src/mage/sets/odyssey/Vivify.java new file mode 100644 index 00000000000..1ace55114a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Vivify.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.sets.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.permanent.token.Token; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class Vivify extends CardImpl { + + public Vivify(UUID ownerId) { + super(ownerId, 281, "Vivify", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "ODY"; + + // Target land becomes a 3/3 creature until end of turn. It's still a land. + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new AnimatedLand(), false, true, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Vivify(final Vivify card) { + super(card); + } + + @Override + public Vivify copy() { + return new Vivify(this); + } +} + +class AnimatedLand extends Token { + + public AnimatedLand() { + super("", "3/3 creature"); + this.cardType.add(CardType.CREATURE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java b/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java index 56d1531aaca..dc2d27c82ad 100644 --- a/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java +++ b/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java @@ -56,7 +56,7 @@ public class Whipkeeper extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}: Whipkeeper deals damage to target creature equal to the damage already dealt to it this turn. + // {T}: Whipkeeper deals damage to target creature equal to the damage already dealt to it this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WhipkeeperEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); @@ -77,7 +77,7 @@ class WhipkeeperEffect extends OneShotEffect { public WhipkeeperEffect() { super(Outcome.Damage); - staticText = "{tap}: {this} deals damage to target creature equal to the damage already dealt to it this turn."; + staticText = "{this} deals damage to target creature equal to the damage already dealt to it this turn."; } public WhipkeeperEffect(final WhipkeeperEffect effect) { super(effect); diff --git a/Mage.Sets/src/mage/sets/onslaught/AphettoGrifter.java b/Mage.Sets/src/mage/sets/onslaught/AphettoGrifter.java new file mode 100644 index 00000000000..8c5ffc0495c --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AphettoGrifter.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +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.TargetPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class AphettoGrifter extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Wizards you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Wizard")); + } + + public AphettoGrifter(UUID ownerId) { + super(ownerId, 65, "Aphetto Grifter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Tap two untapped Wizards you control: Tap target permanent. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public AphettoGrifter(final AphettoGrifter card) { + super(card); + } + + @Override + public AphettoGrifter copy() { + return new AphettoGrifter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/AvenBrigadier.java b/Mage.Sets/src/mage/sets/onslaught/AvenBrigadier.java new file mode 100644 index 00000000000..8c3e7032911 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AvenBrigadier.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class AvenBrigadier extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Bird creatures"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Soldier creatures"); + + static { + filter1.add(new SubtypePredicate("Bird")); + filter2.add(new SubtypePredicate("Soldier")); + } + + public AvenBrigadier(UUID ownerId) { + super(ownerId, 7, "Aven Brigadier", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Other Bird creatures get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter1, true))); + // Other Soldier creatures get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter2, true))); + } + + public AvenBrigadier(final AvenBrigadier card) { + super(card); + } + + @Override + public AvenBrigadier copy() { + return new AvenBrigadier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/AvenFateshaper.java b/Mage.Sets/src/mage/sets/onslaught/AvenFateshaper.java new file mode 100644 index 00000000000..38118afecae --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AvenFateshaper.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class AvenFateshaper extends CardImpl { + + public AvenFateshaper(UUID ownerId) { + super(ownerId, 69, "Aven Fateshaper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Wizard"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Aven Fateshaper enters the battlefield, look at the top four cards of your library, then put them back in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4))); + // {4}{U}: Look at the top four cards of your library, then put them back in any order. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(4), new ManaCostsImpl("{4}{U}"))); + } + + public AvenFateshaper(final AvenFateshaper card) { + super(card); + } + + @Override + public AvenFateshaper copy() { + return new AvenFateshaper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Boneknitter.java b/Mage.Sets/src/mage/sets/onslaught/Boneknitter.java new file mode 100644 index 00000000000..eacced8d3ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/Boneknitter.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.sets.onslaught; + +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.RegenerateTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class Boneknitter extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Zombie"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public Boneknitter(UUID ownerId) { + super(ownerId, 128, "Boneknitter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{B}: Regenerate target Zombie. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{1}{B}")); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + // Morph {2}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{B}"))); + } + + public Boneknitter(final Boneknitter card) { + super(card); + } + + @Override + public Boneknitter copy() { + return new Boneknitter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java b/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java index 896507e5b5f..71ffffa0106 100644 --- a/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java +++ b/Mage.Sets/src/mage/sets/onslaught/BrightstoneRitual.java @@ -34,7 +34,9 @@ import mage.abilities.effects.common.DynamicManaEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; /** * @@ -42,12 +44,18 @@ import mage.filter.common.FilterCreaturePermanent; */ public class BrightstoneRitual extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("Goblin on the battlefield"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + public BrightstoneRitual(UUID ownerId) { super(ownerId, 191, "Brightstone Ritual", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); this.expansionSetCode = "ONS"; // Add {R} to your mana pool for each Goblin on the battlefield. - this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("Goblin","Goblin on the battlefield")))); + this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), new PermanentsOnBattlefieldCount(filter))); } public BrightstoneRitual(final BrightstoneRitual card) { diff --git a/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java b/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java index e67cd3fa843..9f666a50fe0 100644 --- a/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java +++ b/Mage.Sets/src/mage/sets/onslaught/CabalArchon.java @@ -33,25 +33,26 @@ 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.Effect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPlayer; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; /** * * @author fireshoes */ public class CabalArchon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Cleric"); - + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Cleric"); + static { filter.add(new SubtypePredicate("Cleric")); } @@ -66,8 +67,10 @@ public class CabalArchon extends CardImpl { // {B}, Sacrifice a Cleric: Target player loses 2 life and you gain 2 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{B}")); - ability.addEffect(new GainLifeEffect(2)); - ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))); + Effect effect = new GainLifeEffect(2); + effect.setText("and you gain 2 life"); + ability.addEffect(effect); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java b/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java index 93c38299370..e05a2c5ec57 100644 --- a/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java +++ b/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java @@ -44,7 +44,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class CabalSlaver extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("Goblin"); + private static final FilterPermanent filter = new FilterPermanent("a Goblin"); static { filter.add(new SubtypePredicate("Goblin")); diff --git a/Mage.Sets/src/mage/sets/onslaught/CatapultSquad.java b/Mage.Sets/src/mage/sets/onslaught/CatapultSquad.java new file mode 100644 index 00000000000..b2d86150117 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/CatapultSquad.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +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; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class CatapultSquad extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Soldiers you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Soldier")); + } + + public CatapultSquad(UUID ownerId) { + super(ownerId, 11, "Catapult Squad", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Tap two untapped Soldiers you control: Catapult Squad deals 2 damage to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addTarget(new TargetCreaturePermanent(new FilterAttackingOrBlockingCreature())); + this.addAbility(ability); + } + + public CatapultSquad(final CatapultSquad card) { + super(card); + } + + @Override + public CatapultSquad copy() { + return new CatapultSquad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ChargingSlateback.java b/Mage.Sets/src/mage/sets/onslaught/ChargingSlateback.java new file mode 100644 index 00000000000..85e7d4663c3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ChargingSlateback.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ChargingSlateback extends CardImpl { + + public ChargingSlateback(UUID ownerId) { + super(ownerId, 194, "Charging Slateback", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Charging Slateback can't block. + this.addAbility(new CantBlockAbility()); + // Morph {4}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{R}"))); + } + + public ChargingSlateback(final ChargingSlateback card) { + super(card); + } + + @Override + public ChargingSlateback copy() { + return new ChargingSlateback(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ConvalescentCare.java b/Mage.Sets/src/mage/sets/onslaught/ConvalescentCare.java new file mode 100644 index 00000000000..691e8fe9b2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ConvalescentCare.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.sets.onslaught; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.game.Game; + +/** + * + * @author fireshoes + */ +public class ConvalescentCare extends CardImpl { + + public ConvalescentCare(UUID ownerId) { + super(ownerId, 14, "Convalescent Care", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.expansionSetCode = "ONS"; + + // At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card. + Effect effect = new DrawCardSourceControllerEffect(1); + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(3), TargetController.YOU, false); + ability.addEffect(effect); + this.addAbility(new ConditionalTriggeredAbility(ability, new FiveOrLessLifeCondition(), "At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card.")); + } + + public ConvalescentCare(final ConvalescentCare card) { + super(card); + } + + @Override + public ConvalescentCare copy() { + return new ConvalescentCare(this); + } + + class FiveOrLessLifeCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + return game.getPlayer(source.getControllerId()).getLife() <= 5; + } + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/DiveBomber.java b/Mage.Sets/src/mage/sets/onslaught/DiveBomber.java new file mode 100644 index 00000000000..48a017e5c78 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/DiveBomber.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.sets.onslaught; + +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.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DiveBomber extends CardImpl { + + public DiveBomber(UUID ownerId) { + super(ownerId, 26, "Dive Bomber", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {tap}, Sacrifice Dive Bomber: Dive Bomber deals 2 damage to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent(new FilterAttackingOrBlockingCreature())); + this.addAbility(ability); + } + + public DiveBomber(final DiveBomber card) { + super(card); + } + + @Override + public DiveBomber copy() { + return new DiveBomber(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ElvishPathcutter.java b/Mage.Sets/src/mage/sets/onslaught/ElvishPathcutter.java new file mode 100644 index 00000000000..b78333c95a3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ElvishPathcutter.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.sets.onslaught; + +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.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ElvishPathcutter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf creature"); + + static { + filter.add(new SubtypePredicate("Elf")); + } + + public ElvishPathcutter(UUID ownerId) { + super(ownerId, 256, "Elvish Pathcutter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Elf"); + this.subtype.add("Scout"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {2}{G}: Target Elf creature gains forestwalk until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new ForestwalkAbility(), Duration.EndOfTurn), new ManaCostsImpl("{2}{G}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ElvishPathcutter(final ElvishPathcutter card) { + super(card); + } + + @Override + public ElvishPathcutter copy() { + return new ElvishPathcutter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ElvishVanguard.java b/Mage.Sets/src/mage/sets/onslaught/ElvishVanguard.java new file mode 100644 index 00000000000..1f876e83614 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ElvishVanguard.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LoneFox + */ +public class ElvishVanguard extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("another Elf"); + + static { + filter.add(new SubtypePredicate("Elf")); + filter.add(new AnotherPredicate()); + } + + public ElvishVanguard(UUID ownerId) { + super(ownerId, 259, "Elvish Vanguard", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever another Elf enters the battlefield, put a +1/+1 counter on Elvish Vanguard. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter)); + } + + public ElvishVanguard(final ElvishVanguard card) { + super(card); + } + + @Override + public ElvishVanguard copy() { + return new ElvishVanguard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ErraticExplosion.java b/Mage.Sets/src/mage/sets/onslaught/ErraticExplosion.java new file mode 100644 index 00000000000..d41a0f9f88d --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ErraticExplosion.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.sets.onslaught; + +import java.util.UUID; + +/** + * + * @author nigelzor + */ +public class ErraticExplosion extends mage.sets.planechase2012.ErraticExplosion { + + public ErraticExplosion(UUID ownerId) { + super(ownerId); + this.cardNumber = 201; + this.expansionSetCode = "ONS"; + } + + public ErraticExplosion(final ErraticExplosion card) { + super(card); + } + + @Override + public ErraticExplosion copy() { + return new ErraticExplosion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/EvergloveCourier.java b/Mage.Sets/src/mage/sets/onslaught/EvergloveCourier.java new file mode 100644 index 00000000000..3ecfc22b812 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/EvergloveCourier.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.sets.onslaught; + +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.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class EvergloveCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf creature"); + + static { + filter.add(new SubtypePredicate("Elf")); + } + + public EvergloveCourier(UUID ownerId) { + super(ownerId, 262, "Everglove Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Elf"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Everglove Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{G}, {tap}: Target Elf creature gets +2/+2 and has trample for as long as Everglove Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Elf creature gets +2/+2"), new ManaCostsImpl("{2}{G}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has trample for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public EvergloveCourier(final EvergloveCourier card) { + super(card); + } + + @Override + public EvergloveCourier copy() { + return new EvergloveCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java b/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java index ff57cf267b9..55d168c3091 100644 --- a/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java +++ b/Mage.Sets/src/mage/sets/onslaught/FeedingFrenzy.java @@ -28,20 +28,20 @@ package mage.sets.onslaught; import java.util.UUID; - import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CountersCount; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.counters.CounterType; +import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; -import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; @@ -51,13 +51,21 @@ import mage.target.common.TargetCreaturePermanent; */ public class FeedingFrenzy extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + public FeedingFrenzy(UUID ownerId) { super(ownerId, 147, "Feeding Frenzy", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); this.expansionSetCode = "ONS"; // Target creature gets -X/-X until end of turn, where X is the number of Zombies on the battlefield. - DynamicValue x = new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("Zombie", "Zombie on the battlefield"), -1); - this.getSpellAbility().addEffect(new BoostTargetEffect(x, x, Duration.EndOfTurn)); + DynamicValue x = new PermanentsOnBattlefieldCount(filter, -1); + Effect effect = new BoostTargetEffect(x, x, Duration.EndOfTurn); + effect.setText("Target creature gets -X/-X until end of turn, where X is the number of Zombies on the battlefield"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/sets/onslaught/FlamestickCourier.java b/Mage.Sets/src/mage/sets/onslaught/FlamestickCourier.java new file mode 100644 index 00000000000..33ca61ca662 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/FlamestickCourier.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.sets.onslaught; + +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.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class FlamestickCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + + public FlamestickCourier(UUID ownerId) { + super(ownerId, 203, "Flamestick Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Goblin"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Flamestick Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{R}, {tap}: Target Goblin creature gets +2/+2 and has haste for as long as Flamestick Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Goblin creature gets +2/+2"), new ManaCostsImpl("{2}{R}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has haste for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public FlamestickCourier(final FlamestickCourier card) { + super(card); + } + + @Override + public FlamestickCourier copy() { + return new FlamestickCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/FrightshroudCourier.java b/Mage.Sets/src/mage/sets/onslaught/FrightshroudCourier.java new file mode 100644 index 00000000000..71a3e443cba --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/FrightshroudCourier.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.sets.onslaught; + +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.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FearAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class FrightshroudCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie creature"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public FrightshroudCourier(UUID ownerId) { + super(ownerId, 149, "Frightshroud Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Frightshroud Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{B}, {tap}: Target Zombie creature gets +2/+2 and has fear for as long as Frightshroud Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Zombie creature gets +2/+2"), new ManaCostsImpl("{2}{B}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(FearAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has fear for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public FrightshroudCourier(final FrightshroudCourier card) { + super(card); + } + + @Override + public FrightshroudCourier copy() { + return new FrightshroudCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/GhosthelmCourier.java b/Mage.Sets/src/mage/sets/onslaught/GhosthelmCourier.java new file mode 100644 index 00000000000..415aab1d5cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/GhosthelmCourier.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.sets.onslaught; + +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.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GhosthelmCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wizard creature"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public GhosthelmCourier(UUID ownerId) { + super(ownerId, 85, "Ghosthelm Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Ghosthelm Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{U}, {tap}: Target Wizard creature gets +2/+2 and has shroud for as long as Ghosthelm Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Wizard creature gets +2/+2"), new ManaCostsImpl("{2}{U}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(ShroudAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has shroud for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public GhosthelmCourier(final GhosthelmCourier card) { + super(card); + } + + @Override + public GhosthelmCourier copy() { + return new GhosthelmCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java b/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java index 9d27c1aa72f..e6fe04dc554 100644 --- a/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java +++ b/Mage.Sets/src/mage/sets/onslaught/GoblinTaskmaster.java @@ -48,8 +48,8 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class GoblinTaskmaster extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin"); + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature"); static { filter.add(new SubtypePredicate("Goblin")); @@ -66,7 +66,7 @@ public class GoblinTaskmaster extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); - + // Morph {R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{R}"))); } diff --git a/Mage.Sets/src/mage/sets/onslaught/GrasslandCrusader.java b/Mage.Sets/src/mage/sets/onslaught/GrasslandCrusader.java new file mode 100644 index 00000000000..e7d0cebe0a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/GrasslandCrusader.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.sets.onslaught; + +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.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GrasslandCrusader extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf or Soldier creature"); + + static { + filter.add(Predicates.or(new SubtypePredicate("Elf"), new SubtypePredicate("Soldier"))); + } + + public GrasslandCrusader(UUID ownerId) { + super(ownerId, 32, "Grassland Crusader", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // {tap}: Target Elf or Soldier creature gets +2/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public GrasslandCrusader(final GrasslandCrusader card) { + super(card); + } + + @Override + public GrasslandCrusader copy() { + return new GrasslandCrusader(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/GravelSlinger.java b/Mage.Sets/src/mage/sets/onslaught/GravelSlinger.java new file mode 100644 index 00000000000..23b3b50eeb0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/GravelSlinger.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.sets.onslaught; + +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.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GravelSlinger extends CardImpl { + + public GravelSlinger(UUID ownerId) { + super(ownerId, 33, "Gravel Slinger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {tap}: Gravel Slinger deals 1 damage to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(new FilterAttackingOrBlockingCreature())); + this.addAbility(ability); + // Morph {1}{W} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{W}"))); + } + + public GravelSlinger(final GravelSlinger card) { + super(card); + } + + @Override + public GravelSlinger copy() { + return new GravelSlinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java b/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java index 6fd87e1ddd7..d275b1ca5f3 100644 --- a/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java +++ b/Mage.Sets/src/mage/sets/onslaught/HeedlessOne.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class HeedlessOne extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elves on the battlefield"); + private static final FilterPermanent filter = new FilterPermanent("Elves on the battlefield"); static { filter.add(new SubtypePredicate("Elf")); diff --git a/Mage.Sets/src/mage/sets/onslaught/ImprovisedArmor.java b/Mage.Sets/src/mage/sets/onslaught/ImprovisedArmor.java new file mode 100644 index 00000000000..f186ac5f089 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ImprovisedArmor.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.sets.onslaught; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ImprovisedArmor extends CardImpl { + + public ImprovisedArmor(UUID ownerId) { + super(ownerId, 40, "Improvised Armor", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + this.expansionSetCode = "ONS"; + 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 gets +2/+5. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 5, Duration.WhileOnBattlefield))); + // Cycling {3} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{3}"))); + } + + public ImprovisedArmor(final ImprovisedArmor card) { + super(card); + } + + @Override + public ImprovisedArmor copy() { + return new ImprovisedArmor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/InformationDealer.java b/Mage.Sets/src/mage/sets/onslaught/InformationDealer.java new file mode 100644 index 00000000000..e9cb8b80e36 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/InformationDealer.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class InformationDealer extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Wizards on the battlefield"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public InformationDealer(UUID ownerId) { + super(ownerId, 88, "Information Dealer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Look at the top X cards of your library, where X is the number of Wizards on the battlefield, then put them back in any order. + Effect effect = new LookLibraryControllerEffect(new PermanentsOnBattlefieldCount(filter)); + effect.setText("Look at the top X cards of your library, where X is the number of Wizards on the battlefield, then put them back in any order."); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost())); + } + + public InformationDealer(final InformationDealer card) { + super(card); + } + + @Override + public InformationDealer copy() { + return new InformationDealer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/KrosanGroundshaker.java b/Mage.Sets/src/mage/sets/onslaught/KrosanGroundshaker.java new file mode 100644 index 00000000000..e33d105a911 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/KrosanGroundshaker.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.sets.onslaught; + +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.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class KrosanGroundshaker extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature"); + + static { + filter.add(new SubtypePredicate("Beast")); + } + + public KrosanGroundshaker(UUID ownerId) { + super(ownerId, 271, "Krosan Groundshaker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // {G}: Target Beast creature gains trample until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public KrosanGroundshaker(final KrosanGroundshaker card) { + super(card); + } + + @Override + public KrosanGroundshaker copy() { + return new KrosanGroundshaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/MagesGuile.java b/Mage.Sets/src/mage/sets/onslaught/MagesGuile.java new file mode 100644 index 00000000000..d8609439697 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/MagesGuile.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.sets.onslaught; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class MagesGuile extends CardImpl { + + public MagesGuile(UUID ownerId) { + super(ownerId, 91, "Mage's Guile", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "ONS"; + + // Target creature gains shroud until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(ShroudAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Cycling {U} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{U}"))); + } + + public MagesGuile(final MagesGuile card) { + super(card); + } + + @Override + public MagesGuile copy() { + return new MagesGuile(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/NamelessOne.java b/Mage.Sets/src/mage/sets/onslaught/NamelessOne.java new file mode 100644 index 00000000000..76e6b6cc06e --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/NamelessOne.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class NamelessOne extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Wizards on the battlefield"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public NamelessOne(UUID ownerId) { + super(ownerId, 100, "Nameless One", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Wizard"); + this.subtype.add("Avatar"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Nameless One's power and toughness are each equal to the number of Wizards on the battlefield. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); + // Morph {2}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}"))); + } + + public NamelessOne(final NamelessOne card) { + super(card); + } + + @Override + public NamelessOne copy() { + return new NamelessOne(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/PearlspearCourier.java b/Mage.Sets/src/mage/sets/onslaught/PearlspearCourier.java new file mode 100644 index 00000000000..337976c425f --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/PearlspearCourier.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.sets.onslaught; + +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.common.SourceTappedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class PearlspearCourier extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature"); + + static { + filter.add(new SubtypePredicate("Soldier")); + } + + public PearlspearCourier(UUID ownerId) { + super(ownerId, 48, "Pearlspear Courier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may choose not to untap Pearlspear Courier during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + // {2}{W}, {tap}: Target Soldier creature gets +2/+2 and has vigilance for as long as Pearlspear Courier remains tapped. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostTargetEffect(2, 2, Duration.Custom), SourceTappedCondition.getInstance(), + "target Soldier creature gets +2/+2"), new ManaCostsImpl("{2}{W}")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), + Duration.Custom), SourceTappedCondition.getInstance(),"and has vigilance for as long as {this} remains tapped")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public PearlspearCourier(final PearlspearCourier card) { + super(card); + } + + @Override + public PearlspearCourier copy() { + return new PearlspearCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/PinpointAvalanche.java b/Mage.Sets/src/mage/sets/onslaught/PinpointAvalanche.java new file mode 100644 index 00000000000..e92467ae501 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/PinpointAvalanche.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.sets.onslaught; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class PinpointAvalanche extends CardImpl { + + public PinpointAvalanche(UUID ownerId) { + super(ownerId, 221, "Pinpoint Avalanche", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{R}{R}"); + this.expansionSetCode = "ONS"; + + // Pinpoint Avalanche deals 4 damage to target creature. The damage can't be prevented. + this.getSpellAbility().addEffect(new DamageTargetEffect(4, false)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public PinpointAvalanche(final PinpointAvalanche card) { + super(card); + } + + @Override + public PinpointAvalanche copy() { + return new PinpointAvalanche(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java b/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java index c79f35586ee..a6808042b8f 100644 --- a/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java +++ b/Mage.Sets/src/mage/sets/onslaught/RecklessOne.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class RecklessOne extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblins on the battlefield"); + private static final FilterPermanent filter = new FilterPermanent("Goblins on the battlefield"); static { filter.add(new SubtypePredicate("Goblin")); diff --git a/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java b/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java index 06b74c0ec8d..808150e100c 100644 --- a/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java +++ b/Mage.Sets/src/mage/sets/onslaught/RiptideLaboratory.java @@ -38,17 +38,18 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; /** * * @author emerald000 */ public class RiptideLaboratory extends CardImpl { - - private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Wizard"); + + private final static FilterControlledPermanent filter = new FilterControlledPermanent("Wizard you control"); + static { filter.add(new SubtypePredicate("Wizard")); } @@ -59,11 +60,11 @@ public class RiptideLaboratory extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); - + // {1}{U}, {tap}: Return target Wizard you control to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{U}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetControlledCreaturePermanent(filter)); + ability.addTarget(new TargetControlledPermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java b/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java index eaccc8185cf..ab893d66547 100644 --- a/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java +++ b/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java @@ -49,7 +49,7 @@ import mage.target.common.TargetControlledPermanent; */ public class SeasideHaven extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Bird"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Bird"); static{ filter.add(new SubtypePredicate("Bird")); diff --git a/Mage.Sets/src/mage/sets/onslaught/SkirkProspector.java b/Mage.Sets/src/mage/sets/onslaught/SkirkProspector.java index eaaf87a86e1..ac5a8bfc43d 100644 --- a/Mage.Sets/src/mage/sets/onslaught/SkirkProspector.java +++ b/Mage.Sets/src/mage/sets/onslaught/SkirkProspector.java @@ -63,7 +63,7 @@ public class SkirkProspector extends CardImpl { this.toughness = new MageInt(1); // Sacrifice a Goblin: Add {R} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filter,true)))); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filter,true)))); } public SkirkProspector(final SkirkProspector card) { diff --git a/Mage.Sets/src/mage/sets/onslaught/SnarlingUndorak.java b/Mage.Sets/src/mage/sets/onslaught/SnarlingUndorak.java new file mode 100644 index 00000000000..b7f2be02a46 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SnarlingUndorak.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.sets.onslaught; + +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.continuous.BoostTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SnarlingUndorak extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature"); + + static { + filter.add(new SubtypePredicate("Beast")); + } + + public SnarlingUndorak(UUID ownerId) { + super(ownerId, 283, "Snarling Undorak", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}{G}: Target Beast creature gets +1/+1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{2}{G}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + // Morph {1}{G}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{G}{G}"))); + } + + public SnarlingUndorak(final SnarlingUndorak card) { + super(card); + } + + @Override + public SnarlingUndorak copy() { + return new SnarlingUndorak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SpurredWolverine.java b/Mage.Sets/src/mage/sets/onslaught/SpurredWolverine.java new file mode 100644 index 00000000000..10ad8ce064d --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SpurredWolverine.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +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; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpurredWolverine extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Beasts you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Beast")); + } + + public SpurredWolverine(UUID ownerId) { + super(ownerId, 237, "Spurred Wolverine", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Wolverine"); + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Tap two untapped Beasts you control: Target creature gains first strike until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect( + FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SpurredWolverine(final SpurredWolverine card) { + super(card); + } + + @Override + public SpurredWolverine copy() { + return new SpurredWolverine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/StagBeetle.java b/Mage.Sets/src/mage/sets/onslaught/StagBeetle.java new file mode 100644 index 00000000000..665e8a1dbb3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/StagBeetle.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LoneFox + */ +public class StagBeetle extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creatures"); + + static { + filter.add(new AnotherPredicate()); + } + + public StagBeetle(UUID ownerId) { + super(ownerId, 285, "Stag Beetle", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Insect"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Stag Beetle enters the battlefield with X +1/+1 counters on it, where X is the number of other creatures on the battlefield. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), + new PermanentsOnBattlefieldCount(filter), false), + "with X +1/+1 counters on it, where X is the number of other creatures on the battlefield")); + } + + public StagBeetle(final StagBeetle card) { + super(card); + } + + @Override + public StagBeetle copy() { + return new StagBeetle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Standardize.java b/Mage.Sets/src/mage/sets/onslaught/Standardize.java index c2c6f8624d0..07ffd013875 100644 --- a/Mage.Sets/src/mage/sets/onslaught/Standardize.java +++ b/Mage.Sets/src/mage/sets/onslaught/Standardize.java @@ -29,7 +29,6 @@ package mage.sets.onslaught; import java.util.Set; import java.util.UUID; - import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; @@ -58,7 +57,6 @@ public class Standardize extends CardImpl { this.expansionSetCode = "ONS"; // Choose a creature type other than Wall. Each creature becomes that type until end of turn. - this.getSpellAbility().addEffect(new StandardizeEffect()); } @@ -78,7 +76,7 @@ class StandardizeEffect extends OneShotEffect { public StandardizeEffect() { super(Outcome.BoostCreature); - staticText = "choose a creature type other than wall, each creature's type becomes that type until end of turn"; + staticText = "choose a creature type other than Wall. Each creature becomes that type until end of turn"; } @@ -93,7 +91,7 @@ class StandardizeEffect extends OneShotEffect { String chosenType = ""; if (player != null && permanent != null) { Choice typeChoice = new ChoiceImpl(true); - typeChoice.setMessage("Choose creature type other than Wall"); + typeChoice.setMessage("Choose a creature type other than Wall"); Set types = CardRepository.instance.getCreatureTypes(); types.remove("Wall"); typeChoice.setChoices(types); diff --git a/Mage.Sets/src/mage/sets/onslaught/SymbioticElf.java b/Mage.Sets/src/mage/sets/onslaught/SymbioticElf.java new file mode 100644 index 00000000000..4ad72947189 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SymbioticElf.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.sets.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.InsectToken; + +/** + * + * @author LoneFox + */ +public class SymbioticElf extends CardImpl { + + public SymbioticElf(UUID ownerId) { + super(ownerId, 288, "Symbiotic Elf", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Elf"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Symbiotic Elf dies, put two 1/1 green Insect creature tokens onto the battlefield. + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new InsectToken(), 2))); + } + + public SymbioticElf(final SymbioticElf card) { + super(card); + } + + @Override + public SymbioticElf copy() { + return new SymbioticElf(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java b/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java index b10c2dfa800..5395bdf8339 100644 --- a/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java +++ b/Mage.Sets/src/mage/sets/onslaught/VoiceOfTheWoods.java @@ -38,12 +38,12 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; 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.game.permanent.token.Token; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; /** * @@ -51,7 +51,7 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public class VoiceOfTheWoods extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Elves you control"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Elves you control"); static { filter.add(Predicates.not(new TappedPredicate())); @@ -69,7 +69,7 @@ public class VoiceOfTheWoods extends CardImpl { // Tap five untapped Elves you control: Put a 7/7 green Elemental creature token with trample onto the battlefield. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new VoiceOfTheWoodsElementalToken()), - new TapTargetCost(new TargetControlledCreaturePermanent(5,5, filter, false))); + new TapTargetCost(new TargetControlledPermanent(5,5, filter, false))); this.addAbility(ability); } @@ -97,4 +97,4 @@ class VoiceOfTheWoodsElementalToken extends Token { addAbility(TrampleAbility.getInstance()); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java b/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java index 43851a1fd76..eb80dcfae3e 100644 --- a/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java +++ b/Mage.Sets/src/mage/sets/onslaught/Wellwisher.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class Wellwisher extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf on the battlefield"); + private static final FilterPermanent filter = new FilterPermanent("Elf on the battlefield"); static { filter.add(new SubtypePredicate("Elf")); diff --git a/Mage.Sets/src/mage/sets/onslaught/WheelAndDeal.java b/Mage.Sets/src/mage/sets/onslaught/WheelAndDeal.java new file mode 100644 index 00000000000..2d1d551ecd9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/WheelAndDeal.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.sets.onslaught; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.common.discard.DiscardHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterPlayer; +import mage.filter.predicate.other.PlayerPredicate; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class WheelAndDeal extends CardImpl { + + private static final FilterPlayer filter = new FilterPlayer("opponent"); + + static { + filter.add(new PlayerPredicate(TargetController.OPPONENT)); + } + + public WheelAndDeal(UUID ownerId) { + super(ownerId, 121, "Wheel and Deal", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}"); + this.expansionSetCode = "ONS"; + + // Any number of target opponents each discards his or her hand and draws seven cards. + Effect effect = new DiscardHandTargetEffect(); + effect.setText("Any number of target opponents each discards his or her hand"); + this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false, filter)); + this.getSpellAbility().addEffect(effect); + effect = new DrawCardTargetEffect(7); + effect.setText("and draws seven cards"); + this.getSpellAbility().addEffect(effect); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public WheelAndDeal(final WheelAndDeal card) { + super(card); + } + + @Override + public WheelAndDeal copy() { + return new WheelAndDeal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java b/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java index 209057bb5e8..1db70103973 100644 --- a/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java +++ b/Mage.Sets/src/mage/sets/onslaught/WirewoodHerald.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.filter.common.FilterCreatureCard; +import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; @@ -44,7 +44,7 @@ import mage.target.common.TargetCardInLibrary; */ public class WirewoodHerald extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("Elf card"); + private static final FilterCard filter = new FilterCard("Elf card"); static { filter.add(new SubtypePredicate("Elf")); diff --git a/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java b/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java index be1dc8700a9..594d11f12bf 100644 --- a/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java +++ b/Mage.Sets/src/mage/sets/onslaught/WirewoodLodge.java @@ -38,9 +38,9 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreaturePermanent; +import mage.target.TargetPermanent; /** * @@ -48,7 +48,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class WirewoodLodge extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf"); + private static final FilterPermanent filter = new FilterPermanent("Elf"); + static { filter.add(new SubtypePredicate("Elf")); } @@ -56,14 +57,14 @@ public class WirewoodLodge extends CardImpl { public WirewoodLodge(UUID ownerId) { super(ownerId, 329, "Wirewood Lodge", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "ONS"; - + // {T}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); - + // {G}, {T}: Untap target Elf. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{G}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java b/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java index e6935282b58..1f91cb2fb19 100644 --- a/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java +++ b/Mage.Sets/src/mage/sets/onslaught/WirewoodSavage.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -44,7 +44,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class WirewoodSavage extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a Beast"); + private static final FilterPermanent filter = new FilterPermanent("a Beast"); static { filter.add(new SubtypePredicate("Beast")); diff --git a/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/HornetCannon.java b/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/HornetCannon.java index 921db990ae4..df761c9c72c 100644 --- a/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/HornetCannon.java +++ b/Mage.Sets/src/mage/sets/phyrexiavsthecoalition/HornetCannon.java @@ -29,7 +29,6 @@ package mage.sets.phyrexiavsthecoalition; import java.util.UUID; 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; @@ -42,6 +41,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.HornetToken; import mage.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; @@ -73,33 +73,33 @@ public class HornetCannon extends CardImpl { } class HornetCannonEffect extends OneShotEffect { - + public HornetCannonEffect() { super(Outcome.PutCreatureInPlay); staticText = "Put a 1/1 colorless Insect artifact creature token with flying and haste named Hornet onto the battlefield. Destroy it at the beginning of the next end step."; } - + public HornetCannonEffect(final HornetCannonEffect effect) { super(effect); } - + @Override public HornetCannonEffect copy() { return new HornetCannonEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Token hornetToken = new HornetToken(); hornetToken.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - - DestroyTargetEffect destroyEffect = new DestroyTargetEffect("destroy the token."); - destroyEffect.setTargetPointer(new FixedTarget(hornetToken.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(destroyEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : hornetToken.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + DestroyTargetEffect destroyEffect = new DestroyTargetEffect(false); + destroyEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(destroyEffect), source); + } + } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/ErraticMutation.java b/Mage.Sets/src/mage/sets/planarchaos/ErraticMutation.java index f7ac4e93c3e..0aacfa5dfe8 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/ErraticMutation.java +++ b/Mage.Sets/src/mage/sets/planarchaos/ErraticMutation.java @@ -28,6 +28,8 @@ package mage.sets.planarchaos; import java.util.UUID; + +import mage.MageObject; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; @@ -40,13 +42,10 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardsImpl; import mage.game.Game; -import mage.players.Library; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.FixedTarget; - - /** * * @author LevelX2 @@ -57,7 +56,6 @@ public class ErraticMutation extends CardImpl { super(ownerId, 41, "Erratic Mutation", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); this.expansionSetCode = "PLC"; - // Choose target creature. Reveal cards from the top of your library until you reveal a nonland card. That creature gets +X/-X until end of turn, where X is that card's converted mana cost. Put all cards revealed this way on the bottom of your library in any order. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ErraticMutationEffect()); @@ -77,7 +75,7 @@ public class ErraticMutation extends CardImpl { class ErraticMutationEffect extends OneShotEffect { public ErraticMutationEffect() { - super(Outcome.DrawCard); + super(Outcome.UnboostCreature); this.staticText = "Choose target creature. Reveal cards from the top of your library until you reveal a nonland card. That creature gets +X/-X until end of turn, where X is that card's converted mana cost. Put all cards revealed this way on the bottom of your library in any order"; } @@ -92,29 +90,33 @@ class ErraticMutationEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null && player.getLibrary().size() > 0) { - 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 = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + CardsImpl toReveal = new CardsImpl(); + Card nonLandCard = null; + + while (nonLandCard == null && controller.getLibrary().size() > 0) { + Card card = controller.getLibrary().removeFromTop(game); + toReveal.add(card); + if (!card.getCardType().contains(CardType.LAND)) { + nonLandCard = card; } - } while (library.size() > 0 && card != null && card.getCardType().contains(CardType.LAND)); + } // reveal cards - if (!cards.isEmpty()) { - player.revealCards("Erratic Mutation", cards, game); + if (!toReveal.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), toReveal, game); } // the nonland card - int boostValue = card.getManaCost().convertedManaCost(); - // unboost target - ContinuousEffect effect = new BoostTargetEffect(boostValue, boostValue * -1, Duration.EndOfTurn); - effect.setTargetPointer(new FixedTarget(this.getTargetPointer().getFirst(game, source))); - game.addEffect(effect, source); + if (nonLandCard != null) { + int boostValue = nonLandCard.getManaCost().convertedManaCost(); + // unboost target + ContinuousEffect effect = new BoostTargetEffect(boostValue, -boostValue, Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(this.getTargetPointer().getFirst(game, source))); + game.addEffect(effect, source); + } // put the cards on the bottom of the library in any order - return player.putCardsOnBottomOfLibrary(cards, game, source, true); + return controller.putCardsOnBottomOfLibrary(toReveal, game, source, true); } return false; } diff --git a/Mage.Sets/src/mage/sets/planarchaos/FungalBehemoth.java b/Mage.Sets/src/mage/sets/planarchaos/FungalBehemoth.java index 7317d947f4c..d701c130fe1 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/FungalBehemoth.java +++ b/Mage.Sets/src/mage/sets/planarchaos/FungalBehemoth.java @@ -44,6 +44,7 @@ import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -122,7 +123,7 @@ class P1P1CountersOnControlledCreaturesCount implements DynamicValue { @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int count = 0; - for (Permanent permanent :game.getBattlefield().getAllActivePermanents(CardType.CREATURE)) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), sourceAbility.getControllerId(), game)) { count += permanent.getCounters().getCount(CounterType.P1P1); } return count; diff --git a/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java b/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java index d3107a9bfb4..4e45cd7b79c 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java +++ b/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java @@ -166,7 +166,7 @@ class IntetTheDreamerCastEffect extends AsThoughEffectImpl { return controller.chooseUse(outcome, "Play " + card.getName() + "?", source, game); } } else { - controller.setCastSourceIdWithAlternateMana(objectId, null); + controller.setCastSourceIdWithAlternateMana(objectId, null, null); return true; } } diff --git a/Mage.Sets/src/mage/sets/planarchaos/SimianSpiritGuide.java b/Mage.Sets/src/mage/sets/planarchaos/SimianSpiritGuide.java index 104db46db64..14b3897c0ee 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/SimianSpiritGuide.java +++ b/Mage.Sets/src/mage/sets/planarchaos/SimianSpiritGuide.java @@ -59,7 +59,7 @@ public class SimianSpiritGuide extends CardImpl { this.toughness = new MageInt(2); // Exile Simian Spirit Guide from your hand: Add {R} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.HAND, new BasicManaEffect(Mana.RedMana), new ExileSourceFromHandCost())); + this.addAbility(new SimpleManaAbility(Zone.HAND, new BasicManaEffect(Mana.RedMana(1)), new ExileSourceFromHandCost())); } public SimianSpiritGuide(final SimianSpiritGuide card) { diff --git a/Mage.Sets/src/mage/sets/planarchaos/SophicCentaur.java b/Mage.Sets/src/mage/sets/planarchaos/SophicCentaur.java new file mode 100644 index 00000000000..82a85a27141 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/SophicCentaur.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.sets.planarchaos; + +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.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class SophicCentaur extends CardImpl { + + public SophicCentaur(UUID ownerId) { + super(ownerId, 139, "Sophic Centaur", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Centaur"); + this.subtype.add("Spellshaper"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{G}{G}, {tap}, Discard a card: You gain 2 life for each card in your hand. + DynamicValue lifeToGainAmount = new MultipliedValue(new CardsInControllerHandCount(), 2); + Effect effect = new GainLifeEffect(lifeToGainAmount); + effect.setText("You gain 2 life for each card in your hand"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{G}{G}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public SophicCentaur(final SophicCentaur card) { + super(card); + } + + @Override + public SophicCentaur copy() { + return new SophicCentaur(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/BogardanFirefiend.java b/Mage.Sets/src/mage/sets/planechase/BogardanFirefiend.java index 0b4a65412d6..4a454f826db 100644 --- a/Mage.Sets/src/mage/sets/planechase/BogardanFirefiend.java +++ b/Mage.Sets/src/mage/sets/planechase/BogardanFirefiend.java @@ -35,7 +35,7 @@ import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; /** * @@ -52,7 +52,7 @@ public class BogardanFirefiend extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(2), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/planechase/CabalCoffers.java b/Mage.Sets/src/mage/sets/planechase/CabalCoffers.java index 965e0eefa75..36afb746bfd 100644 --- a/Mage.Sets/src/mage/sets/planechase/CabalCoffers.java +++ b/Mage.Sets/src/mage/sets/planechase/CabalCoffers.java @@ -57,7 +57,7 @@ public class CabalCoffers extends CardImpl { this.expansionSetCode = "HOP"; // {2}, {tap}: Add {B} to your mana pool for each Swamp you control. - Ability ability = new DynamicManaAbility(Mana.BlackMana, new PermanentsOnBattlefieldCount(filter), new GenericManaCost(2)); + Ability ability = new DynamicManaAbility(Mana.BlackMana(1), new PermanentsOnBattlefieldCount(filter), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/planechase/LoxodonWarhammer.java b/Mage.Sets/src/mage/sets/planechase/LoxodonWarhammer.java index 8b84efc9598..c6a48c99003 100644 --- a/Mage.Sets/src/mage/sets/planechase/LoxodonWarhammer.java +++ b/Mage.Sets/src/mage/sets/planechase/LoxodonWarhammer.java @@ -60,7 +60,7 @@ public class LoxodonWarhammer extends CardImpl { effect.setText("and has trample"); ability.addEffect(effect); effect = new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.EQUIPMENT); - effect.setText("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.setText("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.)"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/planechase2012/ErraticExplosion.java b/Mage.Sets/src/mage/sets/planechase2012/ErraticExplosion.java new file mode 100644 index 00000000000..3495a42414b --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase2012/ErraticExplosion.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.sets.planechase2012; + +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.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author nigelzor + */ +public class ErraticExplosion extends CardImpl { + + public ErraticExplosion(UUID ownerId) { + super(ownerId, 41, "Erratic Explosion", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); + this.expansionSetCode = "PC2"; + + // Choose target creature or player. Reveal cards from the top of your library until you reveal a nonland card. Erratic Explosion deals damage equal to that card's converted mana cost to that creature or player. Put the revealed cards on the bottom of your library in any order. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new ErraticExplosionEffect()); + } + + public ErraticExplosion(final ErraticExplosion card) { + super(card); + } + + @Override + public ErraticExplosion copy() { + return new ErraticExplosion(this); + } +} + +class ErraticExplosionEffect extends OneShotEffect { + + public ErraticExplosionEffect() { + super(Outcome.Damage); + this.staticText = "Choose target creature or player. Reveal cards from the top of your library until you reveal a nonland card. {this} deals damage equal to that card's converted mana cost to that creature or player. Put the revealed cards on the bottom of your library in any order"; + } + + public ErraticExplosionEffect(ErraticExplosionEffect effect) { + super(effect); + } + + @Override + public ErraticExplosionEffect copy() { + return new ErraticExplosionEffect(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) { + CardsImpl toReveal = new CardsImpl(); + Card nonLandCard = null; + + while (nonLandCard == null && controller.getLibrary().size() > 0) { + Card card = controller.getLibrary().removeFromTop(game); + toReveal.add(card); + if (!card.getCardType().contains(CardType.LAND)) { + nonLandCard = card; + } + } + // reveal cards + if (!toReveal.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), toReveal, game); + } + // the nonland card + if (nonLandCard != null) { + Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (targetCreature != null) { + targetCreature.damage(nonLandCard.getManaCost().convertedManaCost(), source.getSourceId(), game, false, true); + } else { + Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (targetPlayer != null) { + targetPlayer.damage(nonLandCard.getManaCost().convertedManaCost(), source.getSourceId(), game, false, true); + } + } + } + // put the cards on the bottom of the library in any order + return controller.putCardsOnBottomOfLibrary(toReveal, game, source, true); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java b/Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java index 81f8242dc1e..b7038bd470f 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java +++ b/Mage.Sets/src/mage/sets/planechase2012/IllusoryAngel.java @@ -28,21 +28,14 @@ package mage.sets.planechase2012; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.ruleModifying.CastOnlyIfYouHaveCastAnotherSpellEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.watchers.common.CastSpellLastTurnWatcher; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; /** * @@ -55,7 +48,6 @@ public class IllusoryAngel extends CardImpl { this.expansionSetCode = "PC2"; this.subtype.add("Angel"); this.subtype.add("Illusion"); - this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -63,7 +55,7 @@ public class IllusoryAngel extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Cast Illusory Angel only if you've cast another spell this turn. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new IllusoryAngelEffect())); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastOnlyIfYouHaveCastAnotherSpellEffect())); } public IllusoryAngel(final IllusoryAngel card) { @@ -75,36 +67,3 @@ public class IllusoryAngel extends CardImpl { return new IllusoryAngel(this); } } - -class IllusoryAngelEffect extends ContinuousRuleModifyingEffectImpl { - IllusoryAngelEffect() { - super(Duration.EndOfGame, Outcome.Detriment); - staticText = "Cast {this} only if you've cast another spell this turn"; - } - - IllusoryAngelEffect(final IllusoryAngelEffect effect) { - super(effect); - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.CAST_SPELL; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getSourceId().equals(source.getSourceId())) { - CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher"); - if (watcher != null && watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId()) == 0) { - return true; - } - } - return false; - - } - - @Override - public IllusoryAngelEffect copy() { - return new IllusoryAngelEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/planechase2012/PrimalPlasma.java b/Mage.Sets/src/mage/sets/planechase2012/PrimalPlasma.java index 55b7eb6adb2..273836df79d 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/PrimalPlasma.java +++ b/Mage.Sets/src/mage/sets/planechase2012/PrimalPlasma.java @@ -43,6 +43,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.game.Game; import mage.game.events.EntersTheBattlefieldEvent; @@ -152,7 +153,7 @@ class PrimalPlasmaReplacementEffect extends ReplacementEffectImpl { game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), source); break; } - game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom), source); + game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source); } return false; diff --git a/Mage.Sets/src/mage/sets/planechase2012/TaintedIsle.java b/Mage.Sets/src/mage/sets/planechase2012/TaintedIsle.java index d6506757e79..f56d3ea3e28 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/TaintedIsle.java +++ b/Mage.Sets/src/mage/sets/planechase2012/TaintedIsle.java @@ -62,12 +62,12 @@ public class TaintedIsle extends CardImpl { // {tap}: Add {U} or {B} to your mana pool. Activate this ability only if you control a Swamp. this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.BlueMana), + new BasicManaEffect(Mana.BlueMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.BlackMana), + new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); diff --git a/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java b/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java index 059d5a709c2..5b32fa15d15 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java +++ b/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java @@ -29,6 +29,7 @@ package mage.sets.planechase2012; import java.util.LinkedHashMap; import java.util.Map; +import java.util.Map.Entry; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; @@ -37,7 +38,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; +import mage.abilities.effects.common.ShuffleHandIntoLibraryDrawThatManySourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -62,7 +63,7 @@ public class WhirlpoolWarrior extends CardImpl { this.toughness = new MageInt(2); // When Whirlpool Warrior enters the battlefield, shuffle the cards from your hand into your library, then draw that many cards. - this.addAbility(new EntersBattlefieldTriggeredAbility(new WhirlpoolWarriorTriggeredEffect())); + this.addAbility(new EntersBattlefieldTriggeredAbility(new ShuffleHandIntoLibraryDrawThatManySourceEffect())); // {R}, Sacrifice Whirlpool Warrior: Each player shuffles the cards from his or her hand into his or her library, then draws that many cards. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WhirlpoolWarriorActivatedEffect(), new ManaCostsImpl("{R}")); @@ -80,51 +81,6 @@ public class WhirlpoolWarrior extends CardImpl { } } -class WhirlpoolWarriorTriggeredEffect extends OneShotEffect { - - public WhirlpoolWarriorTriggeredEffect() { - super(Outcome.DrawCard); - this.staticText = "shuffle the cards from your hand into your library, then draw that many cards"; - } - - public WhirlpoolWarriorTriggeredEffect(final WhirlpoolWarriorTriggeredEffect effect) { - super(effect); - } - - @Override - public WhirlpoolWarriorTriggeredEffect copy() { - return new WhirlpoolWarriorTriggeredEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Map cardsToDraw = new LinkedHashMap<>(); - for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { - Player player = game.getPlayer(playerId); - if (player != null) { - int cardsInHand = player.getHand().size(); - if (cardsInHand > 0) { - cardsToDraw.put(playerId, cardsInHand); - } - player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game); - player.shuffleLibrary(game); - } - } - for (UUID playerId : cardsToDraw.keySet()) { - Player player = game.getPlayer(playerId); - if (player != null) { - player.drawCards(cardsToDraw.get(playerId), game); - } - } - return true; - } - - return false; - } -} - class WhirlpoolWarriorActivatedEffect extends OneShotEffect { public WhirlpoolWarriorActivatedEffect() { @@ -145,23 +101,24 @@ class WhirlpoolWarriorActivatedEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - for (UUID playerId : controller.getInRange()) { + Map playerCards = new LinkedHashMap<>(); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { int cardsHand = player.getHand().size(); if (cardsHand > 0) { - for (Card card : player.getHand().getCards(game)) { - if (card != null) { - player.removeFromHand(card, game); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - } - game.informPlayers(player.getLogName() + " shuffles the cards from his or her hand into his or her library"); + playerCards.put(playerId, cardsHand); + player.moveCards(player.getHand(), Zone.LIBRARY, source, game); player.shuffleLibrary(game); - player.drawCards(cardsHand, game); } } } + for (Entry entry : playerCards.entrySet()) { + Player player = game.getPlayer(entry.getKey()); + if (player != null) { + player.drawCards(entry.getValue(), game); + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/sets/planeshift/MeteorCrater.java b/Mage.Sets/src/mage/sets/planeshift/MeteorCrater.java index c64976c569b..24e2ad28160 100644 --- a/Mage.Sets/src/mage/sets/planeshift/MeteorCrater.java +++ b/Mage.Sets/src/mage/sets/planeshift/MeteorCrater.java @@ -180,19 +180,19 @@ class MeteorCraterEffect extends ManaEffect { for (Permanent permanent : controlledPermanents) { ObjectColor color = permanent.getColor(game); if (color.isBlack()) { - types.add(Mana.BlackMana); + types.add(Mana.BlackMana(1)); } if (color.isBlue()) { - types.add(Mana.BlueMana); + types.add(Mana.BlueMana(1)); } if (color.isGreen()) { - types.add(Mana.GreenMana); + types.add(Mana.GreenMana(1)); } if(color.isRed()) { - types.add(Mana.RedMana); + types.add(Mana.RedMana(1)); } if(color.isWhite()) { - types.add(Mana.WhiteMana); + types.add(Mana.WhiteMana(1)); } } return types; diff --git a/Mage.Sets/src/mage/sets/planeshift/MoggJailer.java b/Mage.Sets/src/mage/sets/planeshift/MoggJailer.java index d4c0a32314c..e58a1f87559 100644 --- a/Mage.Sets/src/mage/sets/planeshift/MoggJailer.java +++ b/Mage.Sets/src/mage/sets/planeshift/MoggJailer.java @@ -29,24 +29,18 @@ package mage.sets.planeshift; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantAttackIfDefenderControlsPermanent; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.Filter; -import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.TappedPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -59,7 +53,6 @@ public class MoggJailer extends CardImpl { static { filter.add(Predicates.and(new PowerPredicate(Filter.ComparisonType.LessThan, 2), Predicates.not(new TappedPredicate()))); - //filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); } public MoggJailer(UUID ownerId) { @@ -70,7 +63,7 @@ public class MoggJailer extends CardImpl { this.toughness = new MageInt(2); // Mogg Jailer can't attack if defending player controls an untapped creature with power 2 or less. - Effect effect = new CantAttackIfDefenderControllsPermanent(filter); + Effect effect = new CantAttackIfDefenderControlsPermanent(filter); effect.setText("Mogg Jailer can't attack if defending player controls an untapped creature with power 2 or less."); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } @@ -84,50 +77,3 @@ public class MoggJailer extends CardImpl { return new MoggJailer(this); } } - -class CantAttackIfDefenderControllsPermanent extends RestrictionEffect { - - private final FilterPermanent filter; - - public CantAttackIfDefenderControllsPermanent(FilterPermanent filter) { - super(Duration.WhileOnBattlefield); - this.filter = filter; - staticText = new StringBuilder("{this} can't attack if defending player controls ").append(filter.getMessage()).toString(); - } - - public CantAttackIfDefenderControllsPermanent(final CantAttackIfDefenderControllsPermanent effect) { - super(effect); - this.filter = effect.filter; - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getId().equals(source.getSourceId()); - } - - @Override - public boolean canAttack(UUID defenderId, Ability source, Game game) { - UUID defendingPlayerId; - Player player = game.getPlayer(defenderId); - if (player == null) { - Permanent permanent = game.getPermanent(defenderId); - if (permanent != null) { - defendingPlayerId = permanent.getControllerId(); - } else { - return true; - } - } else { - defendingPlayerId = defenderId; - } - if (defendingPlayerId != null && game.getBattlefield().countAll(filter, defendingPlayerId, game) > 0) { - return false; - } - return true; - } - - @Override - public CantAttackIfDefenderControllsPermanent copy() { - return new CantAttackIfDefenderControllsPermanent(this); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/portal/Anaconda.java b/Mage.Sets/src/mage/sets/portal/Anaconda1.java similarity index 89% rename from Mage.Sets/src/mage/sets/portal/Anaconda.java rename to Mage.Sets/src/mage/sets/portal/Anaconda1.java index 75c7907736a..1300b5f2988 100644 --- a/Mage.Sets/src/mage/sets/portal/Anaconda.java +++ b/Mage.Sets/src/mage/sets/portal/Anaconda1.java @@ -33,20 +33,20 @@ import java.util.UUID; * * @author Plopman */ -public class Anaconda extends mage.sets.urzassaga.Anaconda { +public class Anaconda1 extends mage.sets.urzassaga.Anaconda { - public Anaconda(UUID ownerId) { + public Anaconda1(UUID ownerId) { super(ownerId); this.cardNumber = 81; this.expansionSetCode = "POR"; } - public Anaconda(final Anaconda card) { + public Anaconda1(final Anaconda1 card) { super(card); } @Override - public Anaconda copy() { - return new Anaconda(this); + public Anaconda1 copy() { + return new Anaconda1(this); } } diff --git a/Mage.Sets/src/mage/sets/portal/Anaconda2.java b/Mage.Sets/src/mage/sets/portal/Anaconda2.java new file mode 100644 index 00000000000..9e01a0beb40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Anaconda2.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author Plopman + */ +public class Anaconda2 extends mage.sets.urzassaga.Anaconda { + + public Anaconda2(UUID ownerId) { + super(ownerId); + this.cardNumber = 82; + this.expansionSetCode = "POR"; + } + + public Anaconda2(final Anaconda2 card) { + super(card); + } + + @Override + public Anaconda2 copy() { + return new Anaconda2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/Blaze.java b/Mage.Sets/src/mage/sets/portal/Blaze1.java similarity index 90% rename from Mage.Sets/src/mage/sets/portal/Blaze.java rename to Mage.Sets/src/mage/sets/portal/Blaze1.java index 29a3fae9042..22f800c0d4c 100644 --- a/Mage.Sets/src/mage/sets/portal/Blaze.java +++ b/Mage.Sets/src/mage/sets/portal/Blaze1.java @@ -33,20 +33,20 @@ import java.util.UUID; * * @author Plopman */ -public class Blaze extends mage.sets.planechase.Blaze { +public class Blaze1 extends mage.sets.planechase.Blaze { - public Blaze(UUID ownerId) { + public Blaze1(UUID ownerId) { super(ownerId); this.cardNumber = 122; this.expansionSetCode = "POR"; } - public Blaze(final Blaze card) { + public Blaze1(final Blaze1 card) { super(card); } @Override - public Blaze copy() { - return new Blaze(this); + public Blaze1 copy() { + return new Blaze1(this); } } diff --git a/Mage.Sets/src/mage/sets/portal/Blaze2.java b/Mage.Sets/src/mage/sets/portal/Blaze2.java new file mode 100644 index 00000000000..1ca245b852d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Blaze2.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author Plopman + */ +public class Blaze2 extends mage.sets.planechase.Blaze { + + public Blaze2(UUID ownerId) { + super(ownerId); + this.cardNumber = 123; + this.expansionSetCode = "POR"; + } + + public Blaze2(final Blaze2 card) { + super(card); + } + + @Override + public Blaze2 copy() { + return new Blaze2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/BreathOfLife.java b/Mage.Sets/src/mage/sets/portal/BreathOfLife.java index abf9b5453ed..2dc1454cf27 100644 --- a/Mage.Sets/src/mage/sets/portal/BreathOfLife.java +++ b/Mage.Sets/src/mage/sets/portal/BreathOfLife.java @@ -1,54 +1,54 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.portal; - +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portal; + import java.util.UUID; -import mage.constants.Rarity; - -/** - * - * @author dustinconrad - */ -public class BreathOfLife extends mage.sets.starter2000.BreathOfLife { - - public BreathOfLife(UUID ownerId) { - super(ownerId); - this.cardNumber = 135; +import mage.constants.Rarity; + +/** + * + * @author dustinconrad + */ +public class BreathOfLife extends mage.sets.starter2000.BreathOfLife { + + public BreathOfLife(UUID ownerId) { + super(ownerId); + this.cardNumber = 172; this.expansionSetCode = "POR"; - this.rarity = Rarity.COMMON; - } - - public BreathOfLife(final BreathOfLife card) { - super(card); - } - - @Override - public BreathOfLife copy() { - return new BreathOfLife(this); - } -} + this.rarity = Rarity.COMMON; + } + + public BreathOfLife(final BreathOfLife card) { + super(card); + } + + @Override + public BreathOfLife copy() { + return new BreathOfLife(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/BurningCloak.java b/Mage.Sets/src/mage/sets/portal/BurningCloak.java new file mode 100644 index 00000000000..497c66567dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/BurningCloak.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class BurningCloak extends CardImpl { + + public BurningCloak(UUID ownerId) { + super(ownerId, 125, "Burning Cloak", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{R}"); + this.expansionSetCode = "POR"; + + // Target creature gets +2/+0 until end of turn. Burning Cloak deals 2 damage to that creature. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)); + Effect effect = new DamageTargetEffect(2); + effect.setText("{this} deals 2 damage to that creature"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public BurningCloak(final BurningCloak card) { + super(card); + } + + @Override + public BurningCloak copy() { + return new BurningCloak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/ChargingBandits.java b/Mage.Sets/src/mage/sets/portal/ChargingBandits.java new file mode 100644 index 00000000000..c688412ea0a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/ChargingBandits.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ChargingBandits extends CardImpl { + + public ChargingBandits(UUID ownerId) { + super(ownerId, 6, "Charging Bandits", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "POR"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Charging Bandits attacks, it gets +2/+0 until end of turn. + Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn); + effect.setText("it gets +2/+2 until end of turn"); + this.addAbility(new AttacksTriggeredAbility(effect, false)); + } + + public ChargingBandits(final ChargingBandits card) { + super(card); + } + + @Override + public ChargingBandits copy() { + return new ChargingBandits(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/CloakOfFeathers.java b/Mage.Sets/src/mage/sets/portal/CloakOfFeathers.java new file mode 100644 index 00000000000..428646d6765 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/CloakOfFeathers.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class CloakOfFeathers extends CardImpl { + + public CloakOfFeathers(UUID ownerId) { + super(ownerId, 45, "Cloak of Feathers", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}"); + this.expansionSetCode = "POR"; + + // Target creature gains flying until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public CloakOfFeathers(final CloakOfFeathers card) { + super(card); + } + + @Override + public CloakOfFeathers copy() { + return new CloakOfFeathers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/CravenKnight.java b/Mage.Sets/src/mage/sets/portal/CravenKnight.java new file mode 100644 index 00000000000..e5e017e286c --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/CravenKnight.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CravenKnight extends CardImpl { + + public CravenKnight(UUID ownerId) { + super(ownerId, 7, "Craven Knight", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "POR"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Craven Knight can't block. + this.addAbility(new CantBlockAbility()); + } + + public CravenKnight(final CravenKnight card) { + super(card); + } + + @Override + public CravenKnight copy() { + return new CravenKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/DejaVu.java b/Mage.Sets/src/mage/sets/portal/DejaVu.java new file mode 100644 index 00000000000..bac41715fb9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/DejaVu.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LoneFox + */ +public class DejaVu extends CardImpl { + + public static final FilterCard filter = new FilterCard("sorcery card from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.SORCERY)); + } + + public DejaVu(UUID ownerId) { + super(ownerId, 53, "Deja Vu", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "POR"; + + // Return target sorcery card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + } + + public DejaVu(final DejaVu card) { + super(card); + } + + @Override + public DejaVu copy() { + return new DejaVu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/DreadReaper.java b/Mage.Sets/src/mage/sets/portal/DreadReaper.java new file mode 100644 index 00000000000..d00d26c5bce --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/DreadReaper.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DreadReaper extends mage.sets.starter1999.DreadReaper { + + public DreadReaper(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "POR"; + } + + public DreadReaper(final DreadReaper card) { + super(card); + } + + @Override + public DreadReaper copy() { + return new DreadReaper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/EbonDragon.java b/Mage.Sets/src/mage/sets/portal/EbonDragon.java new file mode 100644 index 00000000000..805a8930784 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/EbonDragon.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EbonDragon extends mage.sets.ftvdragons.EbonDragon { + + public EbonDragon(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "POR"; + } + + public EbonDragon(final EbonDragon card) { + super(card); + } + + @Override + public EbonDragon copy() { + return new EbonDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/EliteCatWarrior.java b/Mage.Sets/src/mage/sets/portal/EliteCatWarrior1.java similarity index 90% rename from Mage.Sets/src/mage/sets/portal/EliteCatWarrior.java rename to Mage.Sets/src/mage/sets/portal/EliteCatWarrior1.java index 3c484adc889..6f3c3fd8763 100644 --- a/Mage.Sets/src/mage/sets/portal/EliteCatWarrior.java +++ b/Mage.Sets/src/mage/sets/portal/EliteCatWarrior1.java @@ -38,9 +38,9 @@ import mage.constants.Rarity; * * @author Plopman */ -public class EliteCatWarrior extends CardImpl { +public class EliteCatWarrior1 extends CardImpl { - public EliteCatWarrior(UUID ownerId) { + public EliteCatWarrior1(UUID ownerId) { super(ownerId, 87, "Elite Cat Warrior", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.expansionSetCode = "POR"; this.subtype.add("Cat"); @@ -53,12 +53,12 @@ public class EliteCatWarrior extends CardImpl { this.addAbility(new ForestwalkAbility()); } - public EliteCatWarrior(final EliteCatWarrior card) { + public EliteCatWarrior1(final EliteCatWarrior1 card) { super(card); } @Override - public EliteCatWarrior copy() { - return new EliteCatWarrior(this); + public EliteCatWarrior1 copy() { + return new EliteCatWarrior1(this); } } diff --git a/Mage.Sets/src/mage/sets/portal/EliteCatWarrior2.java b/Mage.Sets/src/mage/sets/portal/EliteCatWarrior2.java new file mode 100644 index 00000000000..11f0782259f --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/EliteCatWarrior2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portal; + +import java.util.UUID; + +/** + * + * @author Plopman + */ +public class EliteCatWarrior2 extends mage.sets.portal.EliteCatWarrior1 { + + public EliteCatWarrior2(UUID ownerId) { + super(ownerId); + this.cardNumber = 88; + } + + public EliteCatWarrior2(final EliteCatWarrior2 card) { + super(card); + } + + @Override + public EliteCatWarrior2 copy() { + return new EliteCatWarrior2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/Exhaustion.java b/Mage.Sets/src/mage/sets/portal/Exhaustion.java index 8987df56403..82a1e0be2d4 100644 --- a/Mage.Sets/src/mage/sets/portal/Exhaustion.java +++ b/Mage.Sets/src/mage/sets/portal/Exhaustion.java @@ -1,52 +1,52 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.portal; - -import java.util.UUID; - -/** - * - * @author emerald000 - */ -public class Exhaustion extends mage.sets.portalthreekingdoms.Exhaustion { - - public Exhaustion(UUID ownerId) { - super(ownerId); - this.cardNumber = 42; - this.expansionSetCode = "POR"; - } - - public Exhaustion(final Exhaustion card) { - super(card); - } - - @Override - public Exhaustion copy() { - return new Exhaustion(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.sets.portal; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class Exhaustion extends mage.sets.portalthreekingdoms.Exhaustion { + + public Exhaustion(UUID ownerId) { + super(ownerId); + this.cardNumber = 55; + this.expansionSetCode = "POR"; + } + + public Exhaustion(final Exhaustion card) { + super(card); + } + + @Override + public Exhaustion copy() { + return new Exhaustion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/FinalStrike.java b/Mage.Sets/src/mage/sets/portal/FinalStrike.java new file mode 100644 index 00000000000..a557e32bd09 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/FinalStrike.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.sets.portal; + +import java.util.UUID; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesPower; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class FinalStrike extends CardImpl { + + public FinalStrike(UUID ownerId) { + super(ownerId, 16, "Final Strike", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + this.expansionSetCode = "POR"; + + // As an additional cost to cast Final Strike, sacrifice a creature. + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); + + // Final Strike deals damage to target opponent equal to the sacrificed creature's power. + Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower()); + effect.setText("{this} deals damage to target opponent equal to the sacrificed creature's power"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public FinalStrike(final FinalStrike card) { + super(card); + } + + @Override + public FinalStrike copy() { + return new FinalStrike(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/FireDragon.java b/Mage.Sets/src/mage/sets/portal/FireDragon.java new file mode 100644 index 00000000000..a4814964ad4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/FireDragon.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.sets.portal; + +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.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class FireDragon extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("for each Mountain you control"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public FireDragon(UUID ownerId) { + super(ownerId, 130, "Fire Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{R}{R}{R}"); + this.expansionSetCode = "POR"; + this.subtype.add("Dragon"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Fire Dragon enters the battlefield, it deals damage equal to the number of Mountains you control to target creature. + Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)); + effect.setText("it deals damage equal to the number of Mountains you control to target creature"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public FireDragon(final FireDragon card) { + super(card); + } + + @Override + public FireDragon copy() { + return new FireDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/FireSnake.java b/Mage.Sets/src/mage/sets/portal/FireSnake.java new file mode 100644 index 00000000000..86f58ce15a5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/FireSnake.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author fireshoes + */ +public class FireSnake extends CardImpl { + + public FireSnake(UUID ownerId) { + super(ownerId, 132, "Fire Snake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "POR"; + this.subtype.add("Snake"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // When Fire Snake dies, destroy target land. + Ability ability = new DiesTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public FireSnake(final FireSnake card) { + super(card); + } + + @Override + public FireSnake copy() { + return new FireSnake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/FleetFootedMonk.java b/Mage.Sets/src/mage/sets/portal/FleetFootedMonk.java new file mode 100644 index 00000000000..2fdb7a96a20 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/FleetFootedMonk.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +/** + * + * @author fireshoes + */ +public class FleetFootedMonk extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + } + + public FleetFootedMonk(UUID ownerId) { + super(ownerId, 177, "Fleet-Footed Monk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "POR"; + this.subtype.add("Human"); + this.subtype.add("Monk"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Fleet-Footed Monk can't be blocked by creatures with power 2 or greater. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public FleetFootedMonk(final FleetFootedMonk card) { + super(card); + } + + @Override + public FleetFootedMonk copy() { + return new FleetFootedMonk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/Fruition.java b/Mage.Sets/src/mage/sets/portal/Fruition.java new file mode 100644 index 00000000000..43ed21c5e6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Fruition.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.sets.portal; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class Fruition extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("for each Forest on the battlefield"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public Fruition(UUID ownerId) { + super(ownerId, 91, "Fruition", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{G}"); + this.expansionSetCode = "POR"; + + // You gain 1 life for each Forest on the battlefield. + this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter))); + } + + public Fruition(final Fruition card) { + super(card); + } + + @Override + public Fruition copy() { + return new Fruition(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/HandOfDeath.java b/Mage.Sets/src/mage/sets/portal/HandOfDeath1.java similarity index 85% rename from Mage.Sets/src/mage/sets/portal/HandOfDeath.java rename to Mage.Sets/src/mage/sets/portal/HandOfDeath1.java index 65f858f7b1c..8cc4b9e9b5f 100644 --- a/Mage.Sets/src/mage/sets/portal/HandOfDeath.java +++ b/Mage.Sets/src/mage/sets/portal/HandOfDeath1.java @@ -1,52 +1,52 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.portal; - -import java.util.UUID; - -/** - * - * @author anonymous - */ -public class HandOfDeath extends mage.sets.starter2000.HandOfDeath { - - public HandOfDeath(UUID ownerId) { - super(ownerId); - this.cardNumber = 14; - this.expansionSetCode = "POR"; - } - - public HandOfDeath(final HandOfDeath card) { - super(card); - } - - @Override - public HandOfDeath copy() { - return new HandOfDeath(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.sets.portal; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class HandOfDeath1 extends mage.sets.starter2000.HandOfDeath { + + public HandOfDeath1(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "POR"; + } + + public HandOfDeath1(final HandOfDeath1 card) { + super(card); + } + + @Override + public HandOfDeath1 copy() { + return new HandOfDeath1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/HandOfDeath2.java b/Mage.Sets/src/mage/sets/portal/HandOfDeath2.java new file mode 100644 index 00000000000..1ccf01bbc15 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/HandOfDeath2.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class HandOfDeath2 extends mage.sets.starter2000.HandOfDeath { + + public HandOfDeath2(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "POR"; + } + + public HandOfDeath2(final HandOfDeath2 card) { + super(card); + } + + @Override + public HandOfDeath2 copy() { + return new HandOfDeath2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/HowlingFury.java b/Mage.Sets/src/mage/sets/portal/HowlingFury.java new file mode 100644 index 00000000000..e5cea6ffcbd --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/HowlingFury.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.portal; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class HowlingFury extends mage.sets.starter1999.HowlingFury { + + public HowlingFury(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "POR"; + this.rarity = Rarity.COMMON; + } + + public HowlingFury(final HowlingFury card) { + super(card); + } + + @Override + public HowlingFury copy() { + return new HowlingFury(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/IngeniousThief.java b/Mage.Sets/src/mage/sets/portal/IngeniousThief.java index d6e59b8c80d..37e244c39e5 100644 --- a/Mage.Sets/src/mage/sets/portal/IngeniousThief.java +++ b/Mage.Sets/src/mage/sets/portal/IngeniousThief.java @@ -29,17 +29,13 @@ package mage.sets.portal; import java.util.UUID; import mage.MageInt; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.game.Game; -import mage.players.Player; import mage.target.TargetPlayer; /** @@ -60,7 +56,7 @@ public class IngeniousThief extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Ingenious Thief enters the battlefield, look at target player's hand. - Ability ability = new EntersBattlefieldTriggeredAbility(new IngeniousThiefEffect(), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new LookAtTargetPlayerHandEffect(), false); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } @@ -74,32 +70,3 @@ public class IngeniousThief extends CardImpl { return new IngeniousThief(this); } } - -class IngeniousThiefEffect extends OneShotEffect { - - IngeniousThiefEffect() { - super(Outcome.Benefit); - staticText = "Look at target player's hand"; - } - - IngeniousThiefEffect(final IngeniousThiefEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - MageObject sourceObject = source.getSourceObject(game); - if (player != null && controller != null && sourceObject != null) { - controller.lookAtCards(sourceObject.getIdName() + " (" + player.getName() + ")", player.getHand(), game); - } - return true; - } - - @Override - public IngeniousThiefEffect copy() { - return new IngeniousThiefEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/portal/MindKnives.java b/Mage.Sets/src/mage/sets/portal/MindKnives.java new file mode 100644 index 00000000000..fcfb7dc7dc6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/MindKnives.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class MindKnives extends CardImpl { + + public MindKnives(UUID ownerId) { + super(ownerId, 23, "Mind Knives", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{B}"); + this.expansionSetCode = "POR"; + + // Target opponent discards a card at random. + this.getSpellAbility().addEffect(new DiscardTargetEffect(1, true)); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public MindKnives(final MindKnives card) { + super(card); + } + + @Override + public MindKnives copy() { + return new MindKnives(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/Mobilize.java b/Mage.Sets/src/mage/sets/portal/Mobilize.java new file mode 100644 index 00000000000..91b84ebb252 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Mobilize.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class Mobilize extends CardImpl { + + private static final String rule = "untap all creatures you control"; + + public Mobilize(UUID ownerId) { + super(ownerId, 97, "Mobilize", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{G}"); + this.expansionSetCode = "POR"; + + // Untap all creatures you control. + this.getSpellAbility().addEffect(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), rule)); + } + + public Mobilize(final Mobilize card) { + super(card); + } + + @Override + public Mobilize copy() { + return new Mobilize(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/MonstrousGrowth.java b/Mage.Sets/src/mage/sets/portal/MonstrousGrowth1.java similarity index 87% rename from Mage.Sets/src/mage/sets/portal/MonstrousGrowth.java rename to Mage.Sets/src/mage/sets/portal/MonstrousGrowth1.java index 2a4a89c39be..24188f146e8 100644 --- a/Mage.Sets/src/mage/sets/portal/MonstrousGrowth.java +++ b/Mage.Sets/src/mage/sets/portal/MonstrousGrowth1.java @@ -33,20 +33,20 @@ import java.util.UUID; * * @author Plopman */ -public class MonstrousGrowth extends mage.sets.seventhedition.MonstrousGrowth { +public class MonstrousGrowth1 extends mage.sets.seventhedition.MonstrousGrowth { - public MonstrousGrowth(UUID ownerId) { + public MonstrousGrowth1(UUID ownerId) { super(ownerId); this.cardNumber = 98; this.expansionSetCode = "POR"; } - public MonstrousGrowth(final MonstrousGrowth card) { + public MonstrousGrowth1(final MonstrousGrowth1 card) { super(card); } @Override - public MonstrousGrowth copy() { - return new MonstrousGrowth(this); + public MonstrousGrowth1 copy() { + return new MonstrousGrowth1(this); } } diff --git a/Mage.Sets/src/mage/sets/portal/MonstrousGrowth2.java b/Mage.Sets/src/mage/sets/portal/MonstrousGrowth2.java new file mode 100644 index 00000000000..eb54028cfa7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/MonstrousGrowth2.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author Plopman + */ +public class MonstrousGrowth2 extends mage.sets.seventhedition.MonstrousGrowth { + + public MonstrousGrowth2(UUID ownerId) { + super(ownerId); + this.cardNumber = 99; + this.expansionSetCode = "POR"; + } + + public MonstrousGrowth2(final MonstrousGrowth2 card) { + super(card); + } + + @Override + public MonstrousGrowth2 copy() { + return new MonstrousGrowth2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/NoxiousToad.java b/Mage.Sets/src/mage/sets/portal/NoxiousToad.java new file mode 100644 index 00000000000..f899da2f659 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/NoxiousToad.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author fireshoes + */ +public class NoxiousToad extends CardImpl { + + public NoxiousToad(UUID ownerId) { + super(ownerId, 27, "Noxious Toad", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "POR"; + this.subtype.add("Frog"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Noxious Toad dies, each opponent discards a card. + this.addAbility(new DiesTriggeredAbility(new DiscardEachPlayerEffect(TargetController.OPPONENT), false)); + } + + public NoxiousToad(final NoxiousToad card) { + super(card); + } + + @Override + public NoxiousToad copy() { + return new NoxiousToad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/Omen.java b/Mage.Sets/src/mage/sets/portal/Omen.java new file mode 100644 index 00000000000..9ecc65472b9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Omen.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Omen extends CardImpl { + + public Omen(UUID ownerId) { + super(ownerId, 63, "Omen", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{U}"); + this.expansionSetCode = "POR"; + + // Look at the top three cards of your library, then put them back in any order. You may shuffle your library. + this.getSpellAbility().addEffect(new LookLibraryControllerEffect(3, true)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Omen(final Omen card) { + super(card); + } + + @Override + public Omen copy() { + return new Omen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/RagingGoblin.java b/Mage.Sets/src/mage/sets/portal/RagingGoblin1.java similarity index 88% rename from Mage.Sets/src/mage/sets/portal/RagingGoblin.java rename to Mage.Sets/src/mage/sets/portal/RagingGoblin1.java index a3e2bf5ce58..e43a721f054 100644 --- a/Mage.Sets/src/mage/sets/portal/RagingGoblin.java +++ b/Mage.Sets/src/mage/sets/portal/RagingGoblin1.java @@ -33,20 +33,20 @@ import java.util.UUID; * * @author Plopman */ -public class RagingGoblin extends mage.sets.tenthedition.RagingGoblin { +public class RagingGoblin1 extends mage.sets.tenthedition.RagingGoblin { - public RagingGoblin(UUID ownerId) { + public RagingGoblin1(UUID ownerId) { super(ownerId); this.cardNumber = 150; this.expansionSetCode = "POR"; } - public RagingGoblin(final RagingGoblin card) { + public RagingGoblin1(final RagingGoblin1 card) { super(card); } @Override - public RagingGoblin copy() { - return new RagingGoblin(this); + public RagingGoblin1 copy() { + return new RagingGoblin1(this); } } diff --git a/Mage.Sets/src/mage/sets/portal/RagingGoblin2.java b/Mage.Sets/src/mage/sets/portal/RagingGoblin2.java new file mode 100644 index 00000000000..84361fc83ce --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/RagingGoblin2.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author Plopman + */ +public class RagingGoblin2 extends mage.sets.tenthedition.RagingGoblin { + + public RagingGoblin2(UUID ownerId) { + super(ownerId); + this.cardNumber = 151; + this.expansionSetCode = "POR"; + } + + public RagingGoblin2(final RagingGoblin2 card) { + super(card); + } + + @Override + public RagingGoblin2 copy() { + return new RagingGoblin2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/RenewingDawn.java b/Mage.Sets/src/mage/sets/portal/RenewingDawn.java new file mode 100644 index 00000000000..7d1d1c4056c --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/RenewingDawn.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.sets.portal; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class RenewingDawn extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Mountain"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public RenewingDawn(UUID ownerId) { + super(ownerId, 185, "Renewing Dawn", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{W}"); + this.expansionSetCode = "POR"; + + // You gain 2 life for each Mountain target opponent controls. + DynamicValue amount = new MultipliedValue(new PermanentsTargetOpponentControlsCount(filter), 2); + Effect effect = new GainLifeEffect(amount); + effect.setText("You gain 2 life for each Mountain target opponent controls"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public RenewingDawn(final RenewingDawn card) { + super(card); + } + + @Override + public RenewingDawn copy() { + return new RenewingDawn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/SacredKnight.java b/Mage.Sets/src/mage/sets/portal/SacredKnight.java new file mode 100644 index 00000000000..2b74e7b460a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/SacredKnight.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author fireshoes + */ +public class SacredKnight extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black and/or red creatures"); + + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), + (new ColorPredicate(ObjectColor.RED)))); + } + + public SacredKnight(UUID ownerId) { + super(ownerId, 186, "Sacred Knight", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "POR"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Sacred Knight can't be blocked by black and/or red creatures. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public SacredKnight(final SacredKnight card) { + super(card); + } + + @Override + public SacredKnight copy() { + return new SacredKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/ScorchingSpear.java b/Mage.Sets/src/mage/sets/portal/ScorchingSpear.java new file mode 100644 index 00000000000..b19a5211c78 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/ScorchingSpear.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ScorchingSpear extends mage.sets.starter1999.ScorchingSpear { + + public ScorchingSpear(UUID ownerId) { + super(ownerId); + this.cardNumber = 154; + this.expansionSetCode = "POR"; + } + + public ScorchingSpear(final ScorchingSpear card) { + super(card); + } + + @Override + public ScorchingSpear copy() { + return new ScorchingSpear(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/SerpentAssassin.java b/Mage.Sets/src/mage/sets/portal/SerpentAssassin.java new file mode 100644 index 00000000000..bda795bbe89 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/SerpentAssassin.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class SerpentAssassin extends CardImpl { + + public static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public SerpentAssassin(UUID ownerId) { + super(ownerId, 31, "Serpent Assassin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "POR"; + this.subtype.add("Snake"); + this.subtype.add("Assassin"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Serpent Assassin enters the battlefield, you may destroy target nonblack creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SerpentAssassin(final SerpentAssassin card) { + super(card); + } + + @Override + public SerpentAssassin copy() { + return new SerpentAssassin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/SorcerousSight.java b/Mage.Sets/src/mage/sets/portal/SorcerousSight.java new file mode 100644 index 00000000000..ebe908a5389 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/SorcerousSight.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class SorcerousSight extends CardImpl { + + public SorcerousSight(UUID ownerId) { + super(ownerId, 69, "Sorcerous Sight", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}"); + this.expansionSetCode = "POR"; + + // Look at target opponent's hand. + Effect effect = new LookAtTargetPlayerHandEffect(); + effect.setText("Look at target opponent's hand"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetOpponent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public SorcerousSight(final SorcerousSight card) { + super(card); + } + + @Override + public SorcerousSight copy() { + return new SorcerousSight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/SoulShred.java b/Mage.Sets/src/mage/sets/portal/SoulShred.java new file mode 100644 index 00000000000..b357ce6ecfc --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/SoulShred.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SoulShred extends mage.sets.masterseditioniv.SoulShred { + + public SoulShred(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "POR"; + } + + public SoulShred(final SoulShred card) { + super(card); + } + + @Override + public SoulShred copy() { + return new SoulShred(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/SpiritualGuardian.java b/Mage.Sets/src/mage/sets/portal/SpiritualGuardian.java new file mode 100644 index 00000000000..04df7d20122 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/SpiritualGuardian.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SpiritualGuardian extends CardImpl { + + public SpiritualGuardian(UUID ownerId) { + super(ownerId, 189, "Spiritual Guardian", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "POR"; + this.subtype.add("Spirit"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // When Spiritual Guardian enters the battlefield, you gain 4 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4), false)); + } + + public SpiritualGuardian(final SpiritualGuardian card) { + super(card); + } + + @Override + public SpiritualGuardian copy() { + return new SpiritualGuardian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/Steadfastness.java b/Mage.Sets/src/mage/sets/portal/Steadfastness.java new file mode 100644 index 00000000000..ee102d439b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/Steadfastness.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Steadfastness extends mage.sets.starter1999.Steadfastness { + + public Steadfastness(UUID ownerId) { + super(ownerId); + this.cardNumber = 193; + this.expansionSetCode = "POR"; + } + + public Steadfastness(final Steadfastness card) { + super(card); + } + + @Override + public Steadfastness copy() { + return new Steadfastness(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/SymbolOfUnsummoning.java b/Mage.Sets/src/mage/sets/portal/SymbolOfUnsummoning.java new file mode 100644 index 00000000000..271b7bb144b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/SymbolOfUnsummoning.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.sets.portal; + +import java.util.UUID; + +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author nigelzor + */ +public class SymbolOfUnsummoning extends CardImpl { + + public SymbolOfUnsummoning(UUID ownerId) { + super(ownerId, 71, "Symbol of Unsummoning", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "POR"; + + // Return target creature to its owner's hand. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public SymbolOfUnsummoning(final SymbolOfUnsummoning card) { + super(card); + } + + @Override + public SymbolOfUnsummoning copy() { + return new SymbolOfUnsummoning(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/ThingFromTheDeep.java b/Mage.Sets/src/mage/sets/portal/ThingFromTheDeep.java new file mode 100644 index 00000000000..89b110e6d30 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/ThingFromTheDeep.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ThingFromTheDeep extends mage.sets.masterseditioniv.ThingFromTheDeep { + + public ThingFromTheDeep(UUID ownerId) { + super(ownerId); + this.cardNumber = 74; + this.expansionSetCode = "POR"; + } + + public ThingFromTheDeep(final ThingFromTheDeep card) { + super(card); + } + + @Override + public ThingFromTheDeep copy() { + return new ThingFromTheDeep(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/ThunderingWurm.java b/Mage.Sets/src/mage/sets/portal/ThunderingWurm.java new file mode 100644 index 00000000000..bbb6fc0ad62 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/ThunderingWurm.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandCard; + +/** + * + * @author fireshoes + */ +public class ThunderingWurm extends CardImpl { + + public ThunderingWurm(UUID ownerId) { + super(ownerId, 115, "Thundering Wurm", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "POR"; + this.subtype.add("Wurm"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Thundering Wurm enters the battlefield, sacrifice it unless you discard a land card. + Effect effect = new SacrificeSourceUnlessPaysEffect(new DiscardCardCost(new FilterLandCard("a land card"))); + effect.setText("sacrifice it unless you discard a land card"); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); + } + + public ThunderingWurm(final ThunderingWurm card) { + super(card); + } + + @Override + public ThunderingWurm copy() { + return new ThunderingWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/TouchOfBrilliance.java b/Mage.Sets/src/mage/sets/portal/TouchOfBrilliance.java new file mode 100644 index 00000000000..9ae563b566c --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/TouchOfBrilliance.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.sets.portal; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class TouchOfBrilliance extends mage.sets.portalsecondage.TouchOfBrilliance { + + public TouchOfBrilliance(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "POR"; + } + + public TouchOfBrilliance(final TouchOfBrilliance card) { + super(card); + } + + @Override + public TouchOfBrilliance copy() { + return new TouchOfBrilliance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/UndyingBeast.java b/Mage.Sets/src/mage/sets/portal/UndyingBeast.java new file mode 100644 index 00000000000..9489ba1f77c --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/UndyingBeast.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.sets.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class UndyingBeast extends CardImpl { + + public UndyingBeast(UUID ownerId) { + super(ownerId, 36, "Undying Beast", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "POR"; + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Undying Beast dies, put it on top of its owner's library. + this.addAbility(new DiesTriggeredAbility(new UndyingBeastEffect())); + } + + public UndyingBeast(final UndyingBeast card) { + super(card); + } + + @Override + public UndyingBeast copy() { + return new UndyingBeast(this); + } +} + +class UndyingBeastEffect extends OneShotEffect { + + public UndyingBeastEffect() { + super(Outcome.ReturnToHand); + staticText = "put it on top of its owner's library"; + } + + public UndyingBeastEffect(final UndyingBeastEffect effect) { + super(effect); + } + + @Override + public UndyingBeastEffect copy() { + return new UndyingBeastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(source.getSourceId()); + if (card != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) { + Player owner = game.getPlayer(card.getOwnerId()); + owner.getGraveyard().remove(card); + return card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/portal/ValorousCharge.java b/Mage.Sets/src/mage/sets/portal/ValorousCharge.java new file mode 100644 index 00000000000..475cd987add --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/ValorousCharge.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.sets.portal; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author fireshoes + */ +public class ValorousCharge extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public ValorousCharge(UUID ownerId) { + super(ownerId, 196, "Valorous Charge", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{W}{W}"); + this.expansionSetCode = "POR"; + + // White creatures get +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false)); + } + + public ValorousCharge(final ValorousCharge card) { + super(card); + } + + @Override + public ValorousCharge copy() { + return new ValorousCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/VampiricFeast.java b/Mage.Sets/src/mage/sets/portal/VampiricFeast.java new file mode 100644 index 00000000000..6cb232c8037 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/VampiricFeast.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class VampiricFeast extends CardImpl { + + public VampiricFeast(UUID ownerId) { + super(ownerId, 37, "Vampiric Feast", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{5}{B}{B}"); + this.expansionSetCode = "POR"; + + // Vampiric Feast deals 4 damage to target creature or player and you gain 4 life. + Effect effect = new DamageTargetEffect(4); + effect.setText("{this} deals 4 damage to target creature or player"); + this.getSpellAbility().addEffect(effect); + // and you gain 4 life. + effect = new GainLifeEffect(4); + effect.setText("and you gain 4 life"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public VampiricFeast(final VampiricFeast card) { + super(card); + } + + @Override + public VampiricFeast copy() { + return new VampiricFeast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/VampiricTouch.java b/Mage.Sets/src/mage/sets/portal/VampiricTouch.java new file mode 100644 index 00000000000..e1bf82c771b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/VampiricTouch.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class VampiricTouch extends CardImpl { + + public VampiricTouch(UUID ownerId) { + super(ownerId, 38, "Vampiric Touch", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "POR"; + + // Vampiric Touch deals 2 damage to target opponent and you gain 2 life. + Effect effect = new DamageTargetEffect(2); + effect.setText("{this} deals 2 damage to target opponent"); + this.getSpellAbility().addEffect(effect); + effect = new GainLifeEffect(2); + effect.setText("and you gain 2 life"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public VampiricTouch(final VampiricTouch card) { + super(card); + } + + @Override + public VampiricTouch copy() { + return new VampiricTouch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/WarriorsCharge1.java b/Mage.Sets/src/mage/sets/portal/WarriorsCharge1.java new file mode 100644 index 00000000000..d98e1e52736 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/WarriorsCharge1.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.sets.portal; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WarriorsCharge1 extends CardImpl { + + public WarriorsCharge1(UUID ownerId) { + super(ownerId, 200, "Warrior's Charge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "POR"; + + // Creatures you control get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); + } + + public WarriorsCharge1(final WarriorsCharge1 card) { + super(card); + } + + @Override + public WarriorsCharge1 copy() { + return new WarriorsCharge1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/WarriorsCharge2.java b/Mage.Sets/src/mage/sets/portal/WarriorsCharge2.java new file mode 100644 index 00000000000..9c3d686cba1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/WarriorsCharge2.java @@ -0,0 +1,51 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WarriorsCharge2 extends mage.sets.portal.WarriorsCharge1 { + + public WarriorsCharge2(UUID ownerId) { + super(ownerId); + this.cardNumber = 201; + } + + public WarriorsCharge2(final WarriorsCharge2 card) { + super(card); + } + + @Override + public WarriorsCharge2 copy() { + return new WarriorsCharge2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/DakmorPlague.java b/Mage.Sets/src/mage/sets/portalsecondage/DakmorPlague.java new file mode 100644 index 00000000000..aba3368403b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/DakmorPlague.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.sets.portalsecondage; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DakmorPlague extends mage.sets.starter1999.DakmorPlague { + + public DakmorPlague(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "PO2"; + } + + public DakmorPlague(final DakmorPlague card) { + super(card); + } + + @Override + public DakmorPlague copy() { + return new DakmorPlague(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/DeathcoilWurm.java b/Mage.Sets/src/mage/sets/portalsecondage/DeathcoilWurm.java new file mode 100644 index 00000000000..88383036963 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/DeathcoilWurm.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.sets.portalsecondage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DamageAsThoughNotBlockedAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author nigelzor + */ +public class DeathcoilWurm extends CardImpl { + + public DeathcoilWurm(UUID ownerId) { + super(ownerId, 65, "Deathcoil Wurm", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); + this.expansionSetCode = "PO2"; + this.subtype.add("Wurm"); + this.power = new MageInt(7); + this.toughness = new MageInt(6); + + // You may have Deathcoil Wurm assign its combat damage as though it weren't blocked. + this.addAbility(DamageAsThoughNotBlockedAbility.getInstance()); + } + + public DeathcoilWurm(final DeathcoilWurm card) { + super(card); + } + + @Override + public DeathcoilWurm copy() { + return new DeathcoilWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/DejaVu.java b/Mage.Sets/src/mage/sets/portalsecondage/DejaVu.java new file mode 100644 index 00000000000..86e3c48c098 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/DejaVu.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.sets.portalsecondage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class DejaVu extends mage.sets.portal.DejaVu { + + public DejaVu(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "PO2"; + } + + public DejaVu(final DejaVu card) { + super(card); + } + + @Override + public DejaVu copy() { + return new DejaVu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/SylvanYeti.java b/Mage.Sets/src/mage/sets/portalsecondage/SylvanYeti.java new file mode 100644 index 00000000000..afd4a6b14be --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/SylvanYeti.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.sets.portalsecondage; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SylvanYeti extends mage.sets.starter1999.SylvanYeti { + + public SylvanYeti(UUID ownerId) { + super(ownerId); + this.cardNumber = 87; + this.expansionSetCode = "PO2"; + } + + public SylvanYeti(final SylvanYeti card) { + super(card); + } + + @Override + public SylvanYeti copy() { + return new SylvanYeti(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/TouchOfBrilliance.java b/Mage.Sets/src/mage/sets/portalsecondage/TouchOfBrilliance.java new file mode 100644 index 00000000000..cfe638a689b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/TouchOfBrilliance.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.sets.portalsecondage; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class TouchOfBrilliance extends CardImpl { + + public TouchOfBrilliance(UUID ownerId) { + super(ownerId, 58, "Touch of Brilliance", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{U}"); + this.expansionSetCode = "PO2"; + + // Draw two cards. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + } + + public TouchOfBrilliance(final TouchOfBrilliance card) { + super(card); + } + + @Override + public TouchOfBrilliance copy() { + return new TouchOfBrilliance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prereleaseevents/QuestingPhelddagrif.java b/Mage.Sets/src/mage/sets/prereleaseevents/QuestingPhelddagrif.java index 1aee4f8fb02..30f15d65b72 100644 --- a/Mage.Sets/src/mage/sets/prereleaseevents/QuestingPhelddagrif.java +++ b/Mage.Sets/src/mage/sets/prereleaseevents/QuestingPhelddagrif.java @@ -65,7 +65,7 @@ public class QuestingPhelddagrif extends CardImpl { } public QuestingPhelddagrif(UUID ownerId) { - super(ownerId, 13, "Questing Phelddagrif", Rarity.SPECIAL, new CardType[]{CardType.CREATURE}, "{1}{W}{U}{G}"); + super(ownerId, 13, "Questing Phelddagrif", Rarity.SPECIAL, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); this.expansionSetCode = "PTC"; this.subtype.add("Phelddagrif"); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/sets/prophecy/InfernalGenesis.java b/Mage.Sets/src/mage/sets/prophecy/InfernalGenesis.java index 166bde321cf..9bcd7e97784 100644 --- a/Mage.Sets/src/mage/sets/prophecy/InfernalGenesis.java +++ b/Mage.Sets/src/mage/sets/prophecy/InfernalGenesis.java @@ -31,7 +31,6 @@ import java.util.UUID; import mage.constants.*; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -51,7 +50,6 @@ public class InfernalGenesis extends CardImpl { super(ownerId, 68, "Infernal Genesis", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{B}"); this.expansionSetCode = "PCY"; - // At the beginning of each player's upkeep, that player puts the top card of his or her library into his or her graveyard. Then he or she puts X 1/1 black Minion creature tokens onto the battlefield, where X is that card's converted mana cost. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new InfernalGenesisEffect(), TargetController.ANY, false)); } @@ -81,9 +79,9 @@ class InfernalGenesisEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); if (player != null) { - Card card = player.getLibrary().removeFromTop(game); + Card card = player.getLibrary().getFromTop(game); if (card != null) { - if (player.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, source, game)) { + if (player.moveCards(card, Zone.GRAVEYARD, source, game)) { int cmc = card.getManaCost().convertedManaCost(); MinionToken token = new MinionToken(); token.putOntoBattlefield(cmc, game, source.getSourceId(), player.getId()); diff --git a/Mage.Sets/src/mage/sets/prophecy/JolraelEmpressOfBeasts.java b/Mage.Sets/src/mage/sets/prophecy/JolraelEmpressOfBeasts.java index b2c681bde0f..835d2329344 100644 --- a/Mage.Sets/src/mage/sets/prophecy/JolraelEmpressOfBeasts.java +++ b/Mage.Sets/src/mage/sets/prophecy/JolraelEmpressOfBeasts.java @@ -45,7 +45,7 @@ import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.FilterPermanent; import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.other.PlayerIdPredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; import mage.game.permanent.token.Token; import mage.players.Player; @@ -106,7 +106,7 @@ class JolraelEmpressOfBeastsEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); if (targetPlayer != null) { FilterPermanent filter = new FilterLandPermanent(); - filter.add(new PlayerIdPredicate(targetPlayer.getId())); + filter.add(new ControllerIdPredicate(targetPlayer.getId())); game.addEffect(new BecomesCreatureAllEffect(new JolraelLandsToken(), "lands", filter, Duration.EndOfTurn), source); return true; } diff --git a/Mage.Sets/src/mage/sets/prophecy/LivingTerrain.java b/Mage.Sets/src/mage/sets/prophecy/LivingTerrain.java index 2430cec8be6..1e2a615e112 100644 --- a/Mage.Sets/src/mage/sets/prophecy/LivingTerrain.java +++ b/Mage.Sets/src/mage/sets/prophecy/LivingTerrain.java @@ -80,7 +80,7 @@ class TreefolkToken extends Token { super("Treefolk", "5/6 green Treefolk creature"); cardType.add(CardType.CREATURE); this.color.setGreen(true); - subtype.add("Spirit"); + subtype.add("Treefolk"); power = new MageInt(5); toughness = new MageInt(6); } diff --git a/Mage.Sets/src/mage/sets/prophecy/RootCage.java b/Mage.Sets/src/mage/sets/prophecy/RootCage.java new file mode 100644 index 00000000000..8e433ba8f53 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/RootCage.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.sets.prophecy; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class RootCage extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Mercenaries"); + + static { + filter.add(new SubtypePredicate("Mercenary")); + } + + public RootCage(UUID ownerId) { + super(ownerId, 122, "Root Cage", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "PCY"; + + // Mercenaries don't untap during their controllers' untap steps. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter))); + } + + public RootCage(final RootCage card) { + super(card); + } + + @Override + public RootCage copy() { + return new RootCage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/Blockbuster.java b/Mage.Sets/src/mage/sets/ravnica/Blockbuster.java index 0a3520ac9b0..d00e6549334 100644 --- a/Mage.Sets/src/mage/sets/ravnica/Blockbuster.java +++ b/Mage.Sets/src/mage/sets/ravnica/Blockbuster.java @@ -28,7 +28,10 @@ package mage.sets.ravnica; import java.util.UUID; + +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.DamageEverythingEffect; import mage.cards.CardImpl; @@ -55,7 +58,9 @@ public class Blockbuster extends CardImpl { this.expansionSetCode = "RAV"; // {1}{R}, Sacrifice Blockbuster: Blockbuster deals 3 damage to each tapped creature and each player. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(3, filter), new ManaCostsImpl("{1}{R}"))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(3, filter), new ManaCostsImpl("{1}{R}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); } public Blockbuster(final Blockbuster card) { diff --git a/Mage.Sets/src/mage/sets/ravnica/Brainspoil.java b/Mage.Sets/src/mage/sets/ravnica/Brainspoil.java new file mode 100644 index 00000000000..0ecbcfd747b --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/Brainspoil.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.sets.ravnica; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.TransmuteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.EnchantedPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class Brainspoil extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that isn't enchanted"); + + static { + filter.add(Predicates.not(new EnchantedPredicate())); + } + + public Brainspoil(UUID ownerId) { + super(ownerId, 78, "Brainspoil", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "RAV"; + + // Destroy target creature that isn't enchanted. It can't be regenerated. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + + // Transmute {1}{B}{B} + this.addAbility(new TransmuteAbility("{1}{B}{B}")); + } + + public Brainspoil(final Brainspoil card) { + super(card); + } + + @Override + public Brainspoil copy() { + return new Brainspoil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/ClutchOfTheUndercity.java b/Mage.Sets/src/mage/sets/ravnica/ClutchOfTheUndercity.java index 0c0f2447614..e17da5e0726 100644 --- a/Mage.Sets/src/mage/sets/ravnica/ClutchOfTheUndercity.java +++ b/Mage.Sets/src/mage/sets/ravnica/ClutchOfTheUndercity.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.LoseLifeTargetControllerEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.TransmuteAbility; import mage.cards.CardImpl; -import mage.target.common.TargetCreaturePermanent; +import mage.target.TargetPermanent; /** * @author Loki @@ -50,7 +50,7 @@ public class ClutchOfTheUndercity extends CardImpl { // Return target permanent to its owner's hand. Its controller loses 3 life. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(3)); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetPermanent()); // Transmute {1}{U}{B} this.addAbility(new TransmuteAbility("{1}{U}{B}")); } diff --git a/Mage.Sets/src/mage/sets/ravnica/ConcertedEffort.java b/Mage.Sets/src/mage/sets/ravnica/ConcertedEffort.java index 672cfe903ef..f4998a9b5b1 100644 --- a/Mage.Sets/src/mage/sets/ravnica/ConcertedEffort.java +++ b/Mage.Sets/src/mage/sets/ravnica/ConcertedEffort.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.FearAbility; import mage.abilities.keyword.FirstStrikeAbility; @@ -46,7 +46,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.TargetController; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -76,15 +76,16 @@ public class ConcertedEffort extends CardImpl { } class ConcertedEffortEffect extends OneShotEffect { - - private static final FilterCreaturePermanent filterFlying = new FilterCreaturePermanent(); - private static final FilterCreaturePermanent filterFear = new FilterCreaturePermanent(); - private static final FilterCreaturePermanent filterFirstStrike = new FilterCreaturePermanent(); - private static final FilterCreaturePermanent filterDoubleStrike = new FilterCreaturePermanent(); - private static final FilterCreaturePermanent filterLandwalk = new FilterCreaturePermanent(); - private static final FilterCreaturePermanent filterProtection = new FilterCreaturePermanent(); - private static final FilterCreaturePermanent filterTrample = new FilterCreaturePermanent(); - private static final FilterCreaturePermanent filterVigilance = new FilterCreaturePermanent(); + + private static final FilterControlledCreaturePermanent filterFlying = new FilterControlledCreaturePermanent(); + private static final FilterControlledCreaturePermanent filterFear = new FilterControlledCreaturePermanent(); + private static final FilterControlledCreaturePermanent filterFirstStrike = new FilterControlledCreaturePermanent(); + private static final FilterControlledCreaturePermanent filterDoubleStrike = new FilterControlledCreaturePermanent(); + private static final FilterControlledCreaturePermanent filterLandwalk = new FilterControlledCreaturePermanent(); + private static final FilterControlledCreaturePermanent filterProtection = new FilterControlledCreaturePermanent(); + private static final FilterControlledCreaturePermanent filterTrample = new FilterControlledCreaturePermanent(); + private static final FilterControlledCreaturePermanent filterVigilance = new FilterControlledCreaturePermanent(); + static { filterFlying.add(new AbilityPredicate(FlyingAbility.class)); filterFear.add(new AbilityPredicate(FearAbility.class)); @@ -95,69 +96,69 @@ class ConcertedEffortEffect extends OneShotEffect { filterTrample.add(new AbilityPredicate(TrampleAbility.class)); filterVigilance.add(new AbilityPredicate(VigilanceAbility.class)); } - + ConcertedEffortEffect() { super(Outcome.BoostCreature); this.staticText = "creatures you control gain flying until end of turn if a creature you control has flying. The same is true for fear, first strike, double strike, landwalk, protection, trample, and vigilance"; } - + ConcertedEffortEffect(final ConcertedEffortEffect effect) { super(effect); } - + @Override public ConcertedEffortEffect copy() { return new ConcertedEffortEffect(this); } - + @Override public boolean apply(Game game, Ability source) { // Flying if (game.getBattlefield().contains(filterFlying, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), source); } - + // Fear if (game.getBattlefield().contains(filterFear, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityAllEffect(FearAbility.getInstance(), Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(FearAbility.getInstance(), Duration.EndOfTurn), source); } - + // First strike if (game.getBattlefield().contains(filterFirstStrike, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), source); } - - // Double strike + + // Double strike if (game.getBattlefield().contains(filterDoubleStrike, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn), source); } - + // Landwalk for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filterLandwalk, source.getControllerId(), game)) { for (Ability ability : permanent.getAbilities(game)) { if (ability instanceof LandwalkAbility) { - game.addEffect(new GainAbilityAllEffect(ability, Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn), source); } } } - + // Protection for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filterProtection, source.getControllerId(), game)) { for (Ability ability : permanent.getAbilities(game)) { if (ability instanceof ProtectionAbility) { - game.addEffect(new GainAbilityAllEffect(ability, Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn), source); } } } - + // Trample if (game.getBattlefield().contains(filterTrample, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), source); } - + // Vigilance if (game.getBattlefield().contains(filterVigilance, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityAllEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn), source); + game.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn), source); } return true; } diff --git a/Mage.Sets/src/mage/sets/ravnica/ElvesOfDeepShadow.java b/Mage.Sets/src/mage/sets/ravnica/ElvesOfDeepShadow.java index 5239af3ab9a..af006e95b8b 100644 --- a/Mage.Sets/src/mage/sets/ravnica/ElvesOfDeepShadow.java +++ b/Mage.Sets/src/mage/sets/ravnica/ElvesOfDeepShadow.java @@ -56,7 +56,7 @@ public class ElvesOfDeepShadow extends CardImpl { this.toughness = new MageInt(1); // {tap}: Add {B} to your mana pool. Elves of Deep Shadow deals 1 damage to you. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost()); ability.addEffect(new DamageControllerEffect(1)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/ravnica/MoltenSentry.java b/Mage.Sets/src/mage/sets/ravnica/MoltenSentry.java new file mode 100644 index 00000000000..fe9f25f3b27 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/MoltenSentry.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.sets.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class MoltenSentry extends CardImpl { + + private final static String rule = "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."; + + public MoltenSentry(UUID ownerId) { + super(ownerId, 136, "Molten Sentry", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Elemental"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // 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. + this.addAbility(new EntersBattlefieldAbility(new MoltenSentryEffect(), null, rule, "")); + } + + public MoltenSentry(final MoltenSentry card) { + super(card); + } + + @Override + public MoltenSentry copy() { + return new MoltenSentry(this); + } +} + +class MoltenSentryEffect extends OneShotEffect { + + public MoltenSentryEffect() { + super(Outcome.Damage); + } + + public MoltenSentryEffect(MoltenSentryEffect 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) { + if (controller.flipCoin(game)) { + game.informPlayers("Heads: Molten Sentry enters the battlefield as a 5/2 creature with haste"); + game.addEffect(new SetPowerSourceEffect(new StaticValue(5), Duration.WhileOnBattlefield), source); + game.addEffect(new SetToughnessSourceEffect(new StaticValue(2), Duration.WhileOnBattlefield), source); + game.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield), source); + return true; + } else { + game.informPlayers("Tails: Molten Sentry enters the battlefield as a 2/5 creature with defender"); + game.addEffect(new SetPowerSourceEffect(new StaticValue(2), Duration.WhileOnBattlefield), source); + game.addEffect(new SetToughnessSourceEffect(new StaticValue(5), Duration.WhileOnBattlefield), source); + game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.WhileOnBattlefield), source); + return true; + } + } + return false; + } + + @Override + public MoltenSentryEffect copy() { + return new MoltenSentryEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/SavraQueenOfTheGolgari.java b/Mage.Sets/src/mage/sets/ravnica/SavraQueenOfTheGolgari.java new file mode 100644 index 00000000000..a3521d9cbdc --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/SavraQueenOfTheGolgari.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.sets.ravnica; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class SavraQueenOfTheGolgari extends CardImpl { + + public SavraQueenOfTheGolgari(UUID ownerId) { + super(ownerId, 225, "Savra, Queen of the Golgari", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{G}"); + this.expansionSetCode = "RAV"; + this.supertype.add("Legendary"); + this.subtype.add("Elf"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature. + this.addAbility(new SavraSacrificeBlackCreatureAbility()); + + // Whenever you sacrifice a green creature, you may gain 2 life. + this.addAbility(new SavraSacrificeGreenCreatureAbility()); + } + + public SavraQueenOfTheGolgari(final SavraQueenOfTheGolgari card) { + super(card); + } + + @Override + public SavraQueenOfTheGolgari copy() { + return new SavraQueenOfTheGolgari(this); + } +} + +class SavraSacrificeBlackCreatureAbility extends TriggeredAbilityImpl { + + public SavraSacrificeBlackCreatureAbility() { + super(Zone.BATTLEFIELD, new DoIfCostPaid(new SavraSacrificeEffect(), new PayLifeCost(2))); + this.addTarget(new TargetCreatureOrPlayer()); + } + + public SavraSacrificeBlackCreatureAbility(final SavraSacrificeBlackCreatureAbility ability) { + super(ability); + } + + @Override + public SavraSacrificeBlackCreatureAbility copy() { + return new SavraSacrificeBlackCreatureAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.SACRIFICED_PERMANENT; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getPlayerId().equals(this.getControllerId()) + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getCardType().contains(CardType.CREATURE) + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getColor(game).isBlack(); + } + + @Override + public String getRule() { + return "Whenever you sacrifice a black creature, " + super.getRule(); + } +} + +class SavraSacrificeEffect extends OneShotEffect { + + public SavraSacrificeEffect() { + super(Outcome.Sacrifice); + this.staticText = "each other player sacrifices a creature"; + } + + public SavraSacrificeEffect(final SavraSacrificeEffect effect) { + super(effect); + } + + @Override + public SavraSacrificeEffect copy() { + return new SavraSacrificeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + List perms = new ArrayList<>(); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null && !playerId.equals(source.getControllerId())) { + TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(); + target.setNotTarget(true); + if (target.canChoose(player.getId(), game)) { + player.chooseTarget(Outcome.Sacrifice, target, source, game); + perms.addAll(target.getTargets()); + } + } + } + for (UUID permID : perms) { + Permanent permanent = game.getPermanent(permID); + if (permanent != null) { + permanent.sacrifice(source.getSourceId(), game); + } + } + return true; + } + return false; + } +} + +class SavraSacrificeGreenCreatureAbility extends TriggeredAbilityImpl { + + public SavraSacrificeGreenCreatureAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(2)); + } + + public SavraSacrificeGreenCreatureAbility(final SavraSacrificeGreenCreatureAbility ability) { + super(ability); + } + + @Override + public SavraSacrificeGreenCreatureAbility copy() { + return new SavraSacrificeGreenCreatureAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.SACRIFICED_PERMANENT; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getPlayerId().equals(this.getControllerId()) + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getCardType().contains(CardType.CREATURE) + && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getColor(game).isGreen(); + } + + @Override + public String getRule() { + return "Whenever you sacrifice a green creature, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/SelesnyaSagittars.java b/Mage.Sets/src/mage/sets/ravnica/SelesnyaSagittars.java new file mode 100644 index 00000000000..bb827afb961 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/SelesnyaSagittars.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.sets.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author nigelzor + */ +public class SelesnyaSagittars extends CardImpl { + + public SelesnyaSagittars(UUID ownerId) { + super(ownerId, 229, "Selesnya Sagittars", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{W}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Elf"); + this.subtype.add("Archer"); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Reach + this.addAbility(ReachAbility.getInstance()); + // Selesnya Sagittars can block an additional creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect())); + } + + public SelesnyaSagittars(final SelesnyaSagittars card) { + super(card); + } + + @Override + public SelesnyaSagittars copy() { + return new SelesnyaSagittars(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/SinsOfThePast.java b/Mage.Sets/src/mage/sets/ravnica/SinsOfThePast.java index a199e0cfe0c..ba8dd13ec2c 100644 --- a/Mage.Sets/src/mage/sets/ravnica/SinsOfThePast.java +++ b/Mage.Sets/src/mage/sets/ravnica/SinsOfThePast.java @@ -131,7 +131,7 @@ class SinsOfThePastCastFromGraveyardEffect extends AsThoughEffectImpl { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { if (sourceId.equals(this.getTargetPointer().getFirst(game, source)) && affectedControllerId.equals(source.getControllerId())) { Player player = game.getPlayer(affectedControllerId); - player.setCastSourceIdWithAlternateMana(sourceId, null); + player.setCastSourceIdWithAlternateMana(sourceId, null, null); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/ravnica/SunhomeEnforcer.java b/Mage.Sets/src/mage/sets/ravnica/SunhomeEnforcer.java new file mode 100644 index 00000000000..4ea3335350a --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/SunhomeEnforcer.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.sets.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamagedEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author fireshoes + */ +public class SunhomeEnforcer extends CardImpl { + + public SunhomeEnforcer(UUID ownerId) { + super(ownerId, 233, "Sunhome Enforcer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Giant"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Whenever Sunhome Enforcer deals combat damage, you gain that much life. + this.addAbility(new SunhomeEnforcerTriggeredAbility()); + + // {1}{R}: Sunhome Enforcer gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); + } + + public SunhomeEnforcer(final SunhomeEnforcer card) { + super(card); + } + + @Override + public SunhomeEnforcer copy() { + return new SunhomeEnforcer(this); + } +} + +class SunhomeEnforcerTriggeredAbility extends TriggeredAbilityImpl { + + public SunhomeEnforcerTriggeredAbility() { + super(Zone.BATTLEFIELD, null); + } + + public SunhomeEnforcerTriggeredAbility(final SunhomeEnforcerTriggeredAbility ability) { + super(ability); + } + + @Override + public SunhomeEnforcerTriggeredAbility copy() { + return new SunhomeEnforcerTriggeredAbility(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/sets/ravnica/Terraformer.java b/Mage.Sets/src/mage/sets/ravnica/Terraformer.java index 13e12446010..9e1325f9297 100644 --- a/Mage.Sets/src/mage/sets/ravnica/Terraformer.java +++ b/Mage.Sets/src/mage/sets/ravnica/Terraformer.java @@ -27,7 +27,6 @@ */ package mage.sets.ravnica; -import java.util.Set; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; @@ -41,7 +40,8 @@ import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceImpl; +import mage.choices.Choice; +import mage.choices.ChoiceBasicLandType; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; @@ -103,15 +103,9 @@ class TerraformerEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - ChoiceImpl choices = new ChoiceImpl(true); - Set choicesSet = choices.getChoices(); - choicesSet.add("Forest"); - choicesSet.add("Plains"); - choicesSet.add("Mountain"); - choicesSet.add("Island"); - choicesSet.add("Swamp"); - if (player.choose(Outcome.Neutral, choices, game)) { - game.getState().setValue(source.getSourceId().toString() + "_Terraformer", choices.getChoice()); + Choice choice = new ChoiceBasicLandType(); + if (player.choose(Outcome.Neutral, choice, game)) { + game.getState().setValue(source.getSourceId().toString() + "_Terraformer", choice.getChoice()); } game.addEffect(new TerraformerContinuousEffect(), source); return true; diff --git a/Mage.Sets/src/mage/sets/ravnica/Transluminant.java b/Mage.Sets/src/mage/sets/ravnica/Transluminant.java new file mode 100644 index 00000000000..cfdf4b4ac02 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/Transluminant.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.sets.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.SpiritWhiteToken; + +/** + * + * @author LoneFox + */ +public class Transluminant extends CardImpl { + + public Transluminant(UUID ownerId) { + super(ownerId, 186, "Transluminant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Dryad"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {W}, Sacrifice Transluminant: Put a 1/1 white Spirit creature token with flying onto the battlefield at the beginning of the next end step. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken()))), + new ManaCostsImpl("{W}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public Transluminant(final Transluminant card) { + super(card); + } + + @Override + public Transluminant copy() { + return new Transluminant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/VoyagerStaff.java b/Mage.Sets/src/mage/sets/ravnica/VoyagerStaff.java new file mode 100644 index 00000000000..fb3eb5ab80c --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/VoyagerStaff.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.sets.ravnica; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class VoyagerStaff extends CardImpl { + + public VoyagerStaff(UUID ownerId) { + super(ownerId, 274, "Voyager Staff", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "RAV"; + + // {2}, Sacrifice Voyager Staff: Exile target creature. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new VoyagerStaffEffect(), new GenericManaCost(2)); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public VoyagerStaff(final VoyagerStaff card) { + super(card); + } + + @Override + public VoyagerStaff copy() { + return new VoyagerStaff(this); + } +} + +class VoyagerStaffEffect extends OneShotEffect { + + public VoyagerStaffEffect() { + super(Outcome.Detriment); + staticText = "exile target creature. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step"; + } + + public VoyagerStaffEffect(final VoyagerStaffEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getFirstTarget()); + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && creature != null && sourcePermanent != null) { + if (controller.moveCardToExileWithInfo(creature, source.getSourceId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) { + //create delayed triggered ability + AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, false)); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } + } + return false; + } + + @Override + public VoyagerStaffEffect copy() { + return new VoyagerStaffEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ravnica/WizenedSnitches.java b/Mage.Sets/src/mage/sets/ravnica/WizenedSnitches.java new file mode 100644 index 00000000000..ae7d34724e7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/WizenedSnitches.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.sets.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class WizenedSnitches extends CardImpl { + + public WizenedSnitches(UUID ownerId) { + super(ownerId, 75, "Wizened Snitches", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Faerie"); + this.subtype.add("Rogue"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Players play with the top card of their libraries revealed. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect(true))); + } + + public WizenedSnitches(final WizenedSnitches card) { + super(card); + } + + @Override + public WizenedSnitches copy() { + return new WizenedSnitches(this); + } +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java b/Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java index 9ec377e67ea..402a1df1aa6 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/AnnihilatingFire.java @@ -37,6 +37,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.common.DamagedByWatcher; /** * @@ -45,20 +46,20 @@ import mage.target.common.TargetCreatureOrPlayer; public class AnnihilatingFire extends CardImpl { public AnnihilatingFire(UUID ownerId) { - super(ownerId, 85, "Annihilating Fire", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); - this.expansionSetCode = "RTR"; + super(ownerId, 85, "Annihilating Fire", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); + this.expansionSetCode = "RTR"; + // Annihilating Fire deals 3 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); - // Annihilating Fire deals 3 damage to target creature or player. - this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // If a creature dealt damage this way would die this turn, exile it instead. + this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); + this.getSpellAbility().addWatcher(new DamagedByWatcher()); + } - // If a creature dealt damage this way would die this turn, exile it instead. - this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); - } - - public AnnihilatingFire(final AnnihilatingFire card) { - super(card); + public AnnihilatingFire(final AnnihilatingFire card) { + super(card); } @Override diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ChromaticLantern.java b/Mage.Sets/src/mage/sets/returntoravnica/ChromaticLantern.java index f17b07b1179..7f402061824 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/ChromaticLantern.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/ChromaticLantern.java @@ -28,14 +28,13 @@ package mage.sets.returntoravnica; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; @@ -51,7 +50,6 @@ public class ChromaticLantern extends CardImpl { // Lands you control have "{T}: Add one mana of any color to your mana pool." this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new AnyColorManaAbility(), Duration.WhileOnBattlefield, new FilterLandPermanent("Lands"), false))); - // {T}: Add one mana of any color to your mana pool. this.addAbility(new AnyColorManaAbility()); @@ -66,4 +64,3 @@ public class ChromaticLantern extends CardImpl { return new ChromaticLantern(this); } } - diff --git a/Mage.Sets/src/mage/sets/returntoravnica/EpicExperiment.java b/Mage.Sets/src/mage/sets/returntoravnica/EpicExperiment.java index e656a073fb3..1014b5d1a2a 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/EpicExperiment.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/EpicExperiment.java @@ -27,26 +27,26 @@ */ package mage.sets.returntoravnica; -import java.util.ArrayList; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.Filter; import mage.filter.FilterCard; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.ExileZone; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCardInExile; +import mage.target.TargetCard; /** * @@ -76,13 +76,6 @@ public class EpicExperiment extends CardImpl { class EpicExperimentEffect extends OneShotEffect { - private static final FilterCard filterStatic = new FilterCard(); - - static { - filterStatic.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), - new CardTypePredicate(CardType.SORCERY))); - } - public EpicExperimentEffect() { super(Outcome.PlayForFree); staticText = "Exile the top X cards of your library. For each instant and sorcery card with converted mana cost X or less among them, you may cast that card without paying its mana cost. Then put all cards exiled this way that weren't cast into your graveyard"; @@ -95,38 +88,38 @@ class EpicExperimentEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - MageObject sourceObject = source.getSourceObject(game); + MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { // move cards from library to exile - for (int i = 0; i < source.getManaCostsToPay().getX(); i++) { - if (controller.getLibrary().size() > 0) { - Card topCard = controller.getLibrary().getFromTop(game); - controller.moveCardToExileWithInfo(topCard, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true); - } - } + controller.moveCardsToExile(controller.getLibrary().getTopCards(game, source.getManaCostsToPay().getX()), source, game, true, source.getSourceId(), sourceObject.getIdName()); // cast the possible cards without paying the mana ExileZone epicExperimentExileZone = game.getExile().getExileZone(source.getSourceId()); - FilterCard filter = filterStatic.copy(); + FilterCard filter = new FilterInstantOrSorceryCard(); filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); - filter.setMessage("instant and sorcery cards with converted mana cost "+ source.getManaCostsToPay().getX() +" or less"); - while (epicExperimentExileZone != null && epicExperimentExileZone.count(filter, game) > 0 - && controller.chooseUse(Outcome.PlayForFree, "Cast cards exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) { - TargetCardInExile target = new TargetCardInExile(filter, source.getSourceId()); - while (epicExperimentExileZone.count(filter, game) > 0 && controller.choose(Outcome.PlayForFree, epicExperimentExileZone, target, game)) { - Card card = game.getCard(target.getFirstTarget()); - if (card != null) { - if (controller.cast(card.getSpellAbility(), game, true)) { - game.getExile().removeCard(card, game); - } + filter.setMessage("instant and sorcery cards with converted mana cost " + source.getManaCostsToPay().getX() + " or less"); + Cards cardsToCast = new CardsImpl(); + if (epicExperimentExileZone == null) { + return true; + } + cardsToCast.addAll(epicExperimentExileZone.getCards(filter, source.getSourceId(), source.getControllerId(), game)); + while (cardsToCast.size() > 0) { + if (!controller.chooseUse(Outcome.PlayForFree, "Cast (another) a card exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) { + break; + } + TargetCard targetCard = new TargetCard(1, Zone.EXILED, new FilterCard("instant or sorcery card to cast for free")); + if (controller.choose(Outcome.PlayForFree, cardsToCast, targetCard, game)) { + Card card = game.getCard(targetCard.getFirstTarget()); + if (card != null) { + if (controller.cast(card.getSpellAbility(), game, true)) { + cardsToCast.remove(card); + } else { + game.informPlayer(controller, "You're not able to cast " + card.getIdName() + " or you canceled the casting."); } - target.clearChosen(); + } } } // move cards not cast to graveyard - ExileZone exile = game.getExile().getExileZone(source.getSourceId()); - if (exile != null) { - controller.moveCards(exile, Zone.EXILED, Zone.GRAVEYARD, source, game); - } + controller.moveCards(game.getExile().getExileZone(source.getSourceId()).getCards(game), Zone.GRAVEYARD, source, game); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java b/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java index 9b151e75285..321e056a6c0 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java @@ -27,7 +27,6 @@ */ package mage.sets.returntoravnica; -import java.util.List; import java.util.UUID; import mage.constants.CardType; @@ -61,7 +60,6 @@ public class IzzetStaticaster extends CardImpl { this.subtype.add("Human"); this.subtype.add("Wizard"); - this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java b/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java index 753401fbf69..3c20ab8aee8 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/SoulTithe.java @@ -30,13 +30,6 @@ package mage.sets.returntoravnica; import java.util.UUID; import mage.MageObject; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.TargetController; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -47,6 +40,13 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -76,9 +76,7 @@ public class SoulTithe extends CardImpl { // At the beginning of the upkeep of enchanted permanent's controller, // that player sacrifices it unless he or she pays {X}, // where X is its converted mana cost. - Ability gainedAbility = new BeginningOfUpkeepTriggeredAbility(new SoulTitheSacrificeSourceUnlessPaysEffect(), TargetController.YOU, false); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, rule))); - + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SoulTitheEffect(), TargetController.CONTROLLER_ATTACHED_TO, false)); } public SoulTithe (final SoulTithe card) { @@ -91,38 +89,42 @@ public class SoulTithe extends CardImpl { } } -class SoulTitheSacrificeSourceUnlessPaysEffect extends OneShotEffect { +class SoulTitheEffect extends OneShotEffect { - public SoulTitheSacrificeSourceUnlessPaysEffect() { + public SoulTitheEffect() { super(Outcome.Sacrifice); staticText = "that player sacrifices it unless he or she pays {X}, where X is its converted mana cost"; } - public SoulTitheSacrificeSourceUnlessPaysEffect(final SoulTitheSacrificeSourceUnlessPaysEffect effect) { + public SoulTitheEffect(final SoulTitheEffect effect) { super(effect); } @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(source.getSourceId()); - MageObject sourceObject = source.getSourceObject(game); - if (player != null && permanent != null && sourceObject != null) { - int cmc = permanent.getManaCost().convertedManaCost(); - if (player.chooseUse(Outcome.Benefit, "Pay {" + cmc + "} for " + permanent.getName() + "? (otherwise you sacrifice it)", source, game)) { - Cost cost = new GenericManaCost(cmc); - if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { + Permanent aura = game.getPermanent(source.getSourceId()); + if(aura != null) { + Permanent permanent = game.getPermanent(aura.getAttachedTo()); + if(permanent != null) { + Player player = game.getPlayer(permanent.getControllerId()); + if(player != null) { + int cmc = permanent.getManaCost().convertedManaCost(); + if (player.chooseUse(Outcome.Benefit, "Pay {" + cmc + "} for " + permanent.getName() + "? (otherwise you sacrifice it)", source, game)) { + Cost cost = new GenericManaCost(cmc); + if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) { + return true; + } + } + permanent.sacrifice(source.getSourceId(), game); return true; } } - permanent.sacrifice(source.getSourceId(), game); - return true; } return false; } @Override - public SoulTitheSacrificeSourceUnlessPaysEffect copy() { - return new SoulTitheSacrificeSourceUnlessPaysEffect(this); + public SoulTitheEffect copy() { + return new SoulTitheEffect(this); } } diff --git a/Mage.Sets/src/mage/sets/revisededition/Channel.java b/Mage.Sets/src/mage/sets/revisededition/Channel.java index 0eb11c09a12..98f7d7197a7 100644 --- a/Mage.Sets/src/mage/sets/revisededition/Channel.java +++ b/Mage.Sets/src/mage/sets/revisededition/Channel.java @@ -103,7 +103,7 @@ class ChannelSpecialAction extends SpecialAction { ChannelSpecialAction() { super(); this.addCost(new PayLifeCost(1)); - this.addEffect(new BasicManaEffect(Mana.ColorlessMana)); + this.addEffect(new BasicManaEffect(Mana.ColorlessMana(1))); } ChannelSpecialAction(final ChannelSpecialAction ability) { diff --git a/Mage.Sets/src/mage/sets/revisededition/Lifetap.java b/Mage.Sets/src/mage/sets/revisededition/Lifetap.java new file mode 100644 index 00000000000..fecddb4c9e3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/Lifetap.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.sets.revisededition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Lifetap extends mage.sets.fifthedition.Lifetap { + + public Lifetap(UUID ownerId) { + super(ownerId); + this.cardNumber = 63; + this.expansionSetCode = "3ED"; + } + + public Lifetap(final Lifetap card) { + super(card); + } + + @Override + public Lifetap copy() { + return new Lifetap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/revisededition/MijaeDjinn.java b/Mage.Sets/src/mage/sets/revisededition/MijaeDjinn.java new file mode 100644 index 00000000000..3bb1969e87b --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/MijaeDjinn.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.sets.revisededition; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MijaeDjinn extends mage.sets.masterseditioniv.MijaeDjinn { + + public MijaeDjinn(UUID ownerId) { + super(ownerId); + this.cardNumber = 165; + this.expansionSetCode = "3ED"; + } + + public MijaeDjinn(final MijaeDjinn card) { + super(card); + } + + @Override + public MijaeDjinn copy() { + return new MijaeDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NirkanaRevenant.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NirkanaRevenant.java index a38db325a64..73f47cf906c 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NirkanaRevenant.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NirkanaRevenant.java @@ -87,7 +87,7 @@ class NirkanaRevenantTriggeredAbility extends TriggeredManaAbility { } public NirkanaRevenantTriggeredAbility() { - super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana), false); + super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), false); this.usesStack = false; } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NotOfThisWorld.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NotOfThisWorld.java index 42b6e9c8f46..ba19a176b1b 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NotOfThisWorld.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NotOfThisWorld.java @@ -103,10 +103,7 @@ class TargetStackObjectTargetingControlledPermanent extends TargetObject { @Override public boolean canTarget(UUID id, Ability source, Game game) { StackObject stackObject = game.getStack().getStackObject(id); - if ((stackObject instanceof Spell) || (stackObject instanceof StackAbility)) { - return true; - } - return false; + return (stackObject instanceof Spell) || (stackObject instanceof StackAbility); } @Override diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/OvergrownBattlement.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/OvergrownBattlement.java index b1762872eeb..07286bc4c1e 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/OvergrownBattlement.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/OvergrownBattlement.java @@ -60,7 +60,7 @@ public class OvergrownBattlement extends CardImpl { this.toughness = new MageInt(4); this.addAbility(DefenderAbility.getInstance()); - this.addAbility(new DynamicManaAbility(Mana.GreenMana, new PermanentsOnBattlefieldCount(filter))); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new PermanentsOnBattlefieldCount(filter))); } public OvergrownBattlement(final OvergrownBattlement card) { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java index f346e94a319..1abf24633d2 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java @@ -39,9 +39,6 @@ import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; -import mage.filter.predicate.permanent.BlockingPredicate; -import mage.game.Game; -import mage.target.Target; import mage.target.common.TargetCreaturePermanent; /** @@ -50,14 +47,6 @@ import mage.target.common.TargetCreaturePermanent; */ public class GodosIrregulars extends CardImpl { - private static final FilterCreaturePermanent basicFilter = new FilterCreaturePermanent("creature blocking it"); - - static { - basicFilter.add(new BlockingPredicate()); - } - - public UUID originalAbilityIdToAdjust; - public GodosIrregulars(UUID ownerId) { super(ownerId, 101, "Godo's Irregulars", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); this.expansionSetCode = "SOK"; @@ -69,25 +58,14 @@ public class GodosIrregulars extends CardImpl { // {R}: Godo's Irregulars deals 1 damage to target creature blocking it. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R")); - ability.addTarget(new TargetCreaturePermanent()); - originalAbilityIdToAdjust = ability.getOriginalId(); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking it"); + filter.add(new BlockingAttackerIdPredicate(this.getId())); + ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } - @Override - public void adjustTargets(Ability ability, Game game) { - if (originalAbilityIdToAdjust.equals(ability.getOriginalId())) { - ability.getTargets().clear(); - FilterCreaturePermanent filter = basicFilter.copy(); - filter.add(new BlockingAttackerIdPredicate(this.getId())); - Target target = new TargetCreaturePermanent(filter); - ability.addTarget(target); - } - } - public GodosIrregulars(final GodosIrregulars card) { super(card); - this.originalAbilityIdToAdjust = card.originalAbilityIdToAdjust; } @Override diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/InnerFire.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/InnerFire.java index 80fd5d5ba04..445c1e50d27 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/InnerFire.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/InnerFire.java @@ -47,7 +47,7 @@ public class InnerFire extends CardImpl { // Add {R} to your mana pool for each card in your hand. - this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana, new CardsInControllerHandCount())); + this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), new CardsInControllerHandCount())); } public InnerFire(final InnerFire card) { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/PithingNeedle.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PithingNeedle.java index 8edb0491e20..c219622eba1 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/PithingNeedle.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PithingNeedle.java @@ -56,7 +56,7 @@ public class PithingNeedle extends CardImpl { // As Pithing Needle enters the battlefield, name a card. this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL))); - + // Activated abilities of sources with the chosen name can't be activated unless they're mana abilities. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PithingNeedleEffect())); } @@ -92,16 +92,19 @@ class PithingNeedleEffect extends ContinuousRuleModifyingEffectImpl { 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) { - if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) { - MageObject object = game.getObject(event.getSourceId()); - Ability ability = game.getAbility(event.getTargetId(), event.getSourceId()); - if (ability != null && object != null) { - if (ability.getAbilityType() != AbilityType.MANA && - object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { - return true; - } + MageObject object = game.getObject(event.getSourceId()); + Ability ability = game.getAbility(event.getTargetId(), event.getSourceId()); + if (ability != null && object != null) { + if (!ability.getAbilityType().equals(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/sets/saviorsofkamigawa/SasayaOrochiAscendant.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SasayaOrochiAscendant.java index 3bc2a38c378..3804d61c11c 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SasayaOrochiAscendant.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SasayaOrochiAscendant.java @@ -202,22 +202,22 @@ class SasayasEssenceManaEffectEffect extends ManaEffect { } switch (choice.getChoice()) { case "Black": - newMana.addBlack(); + newMana.increaseBlack(); break; case "Blue": - newMana.addBlue(); + newMana.increaseBlue(); break; case "Red": - newMana.addRed(); + newMana.increaseRed(); break; case "Green": - newMana.addGreen(); + newMana.increaseGreen(); break; case "White": - newMana.addWhite(); + newMana.increaseWhite(); break; case "Colorless": - newMana.addColorless(); + newMana.increaseColorless(); break; } } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java index 51cddc6978c..8ce0408692b 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ShapeStealer.java @@ -39,6 +39,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -56,14 +57,13 @@ public class ShapeStealer extends CardImpl { this.subtype.add("Spirit"); this.power = new MageInt(1); this.toughness = new MageInt(1); - - // This ability triggers once for each creature blocked by or blocking Shape Stealer. + + // This ability triggers once for each creature blocked by or blocking Shape Stealer. // If multiple creatures block it, Shape Stealer's power and toughness will change for // each one in succession. The first trigger put on the stack will be the last to resolve, // so that will set Shape Stealer's final power and toughness. - // Whenever Shape Stealer blocks or becomes blocked by a creature, change Shape Stealer's base power and toughness to that creature's power and toughness until end of turn. - this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(new ShapeStealerEffect(), false)); + this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(new ShapeStealerEffect(), false)); } public ShapeStealer(final ShapeStealer card) { @@ -77,28 +77,28 @@ public class ShapeStealer extends CardImpl { } class ShapeStealerEffect extends OneShotEffect { - + public ShapeStealerEffect() { super(Outcome.Detriment); this.staticText = "change {this}'s base power and toughness to that creature's power and toughness until end of turn"; } - + public ShapeStealerEffect(final ShapeStealerEffect effect) { super(effect); } - + @Override public ShapeStealerEffect copy() { return new ShapeStealerEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); if (permanent != null) { - ContinuousEffect effect = new SetPowerToughnessSourceEffect(permanent.getPower().getValue(), permanent.getToughness().getValue(), Duration.EndOfTurn); + ContinuousEffect effect = new SetPowerToughnessSourceEffect(permanent.getPower().getValue(), permanent.getToughness().getValue(), Duration.EndOfTurn, SubLayer.SetPT_7b); game.addEffect(effect, source); return true; } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java index 7fce2704922..8cbed9fd441 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java @@ -35,9 +35,7 @@ import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.abilities.keyword.FlyingAbility; -import mage.cards.Card; import mage.cards.CardImpl; -import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; @@ -60,6 +58,8 @@ import mage.target.targetpointer.FixedTarget; */ public class SkyfireKirin extends CardImpl { + private final UUID originalId; + public SkyfireKirin(UUID ownerId) { super(ownerId, 113, "Skyfire Kirin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.expansionSetCode = "SOK"; @@ -75,12 +75,13 @@ public class SkyfireKirin extends CardImpl { // Whenever you cast a Spirit or Arcane spell, you may gain control of target creature with that spell's converted mana cost until end of turn. Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new SkyfireKirinEffect(), new FilterSpiritOrArcaneCard(), true, true); ability.addTarget(new TargetCreaturePermanent()); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability.getAbilityType().equals(AbilityType.TRIGGERED)) { + if (ability.getOriginalId().equals(originalId)) { Spell spell = game.getStack().getSpell(ability.getEffects().get(0).getTargetPointer().getFirst(game, ability)); if (spell != null) { int cmc = spell.getConvertedManaCost(); @@ -94,6 +95,7 @@ public class SkyfireKirin extends CardImpl { public SkyfireKirin(final SkyfireKirin card) { super(card); + this.originalId = card.originalId; } @Override @@ -121,7 +123,7 @@ class SkyfireKirinEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Permanent targetCreature = null; - for(Target target: source.getTargets()) { + for (Target target : source.getTargets()) { if (target instanceof TargetPermanent) { targetCreature = game.getPermanent(target.getFirstTarget()); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java index 33beef31b35..c18638982bd 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java @@ -25,21 +25,20 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterLandPermanent; /** @@ -50,18 +49,18 @@ public class BlackcleaveCliffs extends CardImpl { private static final FilterLandPermanent filter = new FilterLandPermanent(); - public BlackcleaveCliffs (UUID ownerId) { + public BlackcleaveCliffs(UUID ownerId) { super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3)); String abilityText = "tapped unless you control fewer than 3 lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); } - public BlackcleaveCliffs (final BlackcleaveCliffs card) { + public BlackcleaveCliffs(final BlackcleaveCliffs card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Blistergrub.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Blistergrub.java index 4d091c48df8..ea6f1bd8ca9 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Blistergrub.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Blistergrub.java @@ -30,16 +30,13 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.keyword.SwampwalkAbility; import mage.constants.CardType; import mage.constants.Rarity; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; /** * @@ -54,7 +51,11 @@ public class Blistergrub extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - this.addAbility(new DiesTriggeredAbility(new BlistergrubEffect(), false)); + + // Swampwalk (This creature can't be blocked as long as defending player controls a Swamp.) + this.addAbility(new SwampwalkAbility()); + // When Blistergrub dies, each opponent loses 2 life. + this.addAbility(new DiesTriggeredAbility(new LoseLifeOpponentsEffect(2), false)); } public Blistergrub (final Blistergrub card) { @@ -66,30 +67,3 @@ public class Blistergrub extends CardImpl { return new Blistergrub(this); } } - -class BlistergrubEffect extends OneShotEffect { - - public BlistergrubEffect() { - super(Outcome.Damage); - staticText = "each opponent loses 2 life"; - } - - public BlistergrubEffect(final BlistergrubEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - for (UUID opp : game.getOpponents(source.getControllerId())) { - Player opponent = game.getPlayer(opp); - if (opponent != null) - opponent.loseLife(2, game); - } - return true; - } - - @Override - public BlistergrubEffect copy() { - return new BlistergrubEffect(this); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/CloneShell.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/CloneShell.java index 4f984aaf754..68eae298900 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CloneShell.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CloneShell.java @@ -27,8 +27,8 @@ */ package mage.sets.scarsofmirrodin; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.List; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; @@ -38,7 +38,9 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.Cards; import mage.cards.CardsImpl; +import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; @@ -46,9 +48,6 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetCard; -import java.util.List; -import java.util.UUID; - /** * @author nantuko */ @@ -161,19 +160,22 @@ class CloneShellDiesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - if (permanent != null) { - List imprinted = permanent.getImprinted(); - if (imprinted.size() > 0) { - Card imprintedCard = game.getCard(imprinted.get(0)); - imprintedCard.setFaceDown(false, game); - if (imprintedCard.getCardType().contains(CardType.CREATURE)) { - imprintedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + if (permanent != null) { + List imprinted = permanent.getImprinted(); + if (imprinted.size() > 0) { + Card imprintedCard = game.getCard(imprinted.get(0)); + imprintedCard.setFaceDown(false, game); + if (imprintedCard.getCardType().contains(CardType.CREATURE)) { + controller.moveCards(imprintedCard, Zone.BATTLEFIELD, source, game); + } } } + return true; } - - return true; + return false; } @Override diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java index 7a0f5ed0907..6c5a7eb2f84 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java @@ -25,21 +25,20 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterLandPermanent; /** @@ -50,19 +49,19 @@ public class CopperlineGorge extends CardImpl { private static FilterLandPermanent filter = new FilterLandPermanent(); - public CopperlineGorge (UUID ownerId) { + public CopperlineGorge(UUID ownerId) { super(ownerId, 225, "Copperline Gorge", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; // Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands. - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3)); 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()); } - public CopperlineGorge (final CopperlineGorge card) { + public CopperlineGorge(final CopperlineGorge card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GethLordOfTheVault.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GethLordOfTheVault.java index 28f18c2e72b..789abba3b4d 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GethLordOfTheVault.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GethLordOfTheVault.java @@ -25,14 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -41,6 +36,10 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.IntimidateAbility; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; @@ -57,7 +56,9 @@ import mage.target.common.TargetCardInOpponentsGraveyard; */ public class GethLordOfTheVault extends CardImpl { - public GethLordOfTheVault (UUID ownerId) { + private final UUID originalId; + + public GethLordOfTheVault(UUID ownerId) { super(ownerId, 64, "Geth, Lord of the Vault", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); this.expansionSetCode = "SOM"; this.supertype.add("Legendary"); @@ -71,27 +72,29 @@ 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"))); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + if (ability.getOriginalId().equals(originalId)) { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); - FilterCard filter = new FilterCard(new StringBuilder("artifact or creature card with converted mana cost ").append(xValue).append(" from an opponent's graveyard").toString()); + 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))); + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE))); filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); Target target = new TargetCardInOpponentsGraveyard(filter); ability.addTarget(target); } } - public GethLordOfTheVault (final GethLordOfTheVault card) { + public GethLordOfTheVault(final GethLordOfTheVault card) { super(card); + this.originalId = card.originalId; } @Override @@ -100,6 +103,7 @@ public class GethLordOfTheVault extends CardImpl { } } + class GethLordOfTheVaultEffect extends OneShotEffect { public GethLordOfTheVaultEffect() { @@ -113,15 +117,19 @@ class GethLordOfTheVaultEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Card card = game.getCard(getTargetPointer().getFirst(game, source)); - if (card != null) { - card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId(), true); - Player player = game.getPlayer(card.getOwnerId()); - if (player != null) { - player.moveCards(player.getLibrary().getTopCards(game, card.getManaCost().convertedManaCost()), Zone.LIBRARY, Zone.GRAVEYARD, source, game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = game.getCard(getTargetPointer().getFirst(game, source)); + if (card != null) { + controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null); + Player player = game.getPlayer(card.getOwnerId()); + if (player != null) { + player.moveCards(player.getLibrary().getTopCards(game, card.getManaCost().convertedManaCost()), Zone.GRAVEYARD, source, game); + } } + return true; } - return true; + return false; } @Override diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java index 1af105c5b8e..e07cb66231a 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/KothOfTheHammer.java @@ -73,7 +73,7 @@ public class KothOfTheHammer extends CardImpl { static { filter.add(new SubtypePredicate("Mountain")); - filter.add(new ControllerPredicate(TargetController.YOU)); + filterCount.add(new SubtypePredicate("Mountain")); filterCount.add(new ControllerPredicate(TargetController.YOU)); } @@ -92,7 +92,7 @@ public class KothOfTheHammer extends CardImpl { this.addAbility(ability); // -2: Add {R} to your mana pool for each Mountain you control. - this.addAbility(new LoyaltyAbility(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(filterCount)), -2)); + this.addAbility(new LoyaltyAbility(new DynamicManaEffect(Mana.RedMana(1), new PermanentsOnBattlefieldCount(filterCount)), -2)); // -5: You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player.' this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new KothOfTheHammerEmblem()), -5)); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java index 2f8ea8af1a8..1b522322159 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java @@ -78,7 +78,7 @@ class MoltenPsycheEffect extends OneShotEffect { public MoltenPsycheEffect() { super(Outcome.Neutral); staticText = "Each player shuffles the cards from his or her hand into his or her library, then draws that many cards.\n" - + "Metalcraft - If you control three or more artifacts, {this} deals damage to each opponent equal to the number of cards that player has drawn this turn."; + + "Metalcraft - If you control three or more artifacts, {this} deals damage to each opponent equal to the number of cards that player has drawn this turn."; } public MoltenPsycheEffect(final MoltenPsycheEffect effect) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Myrsmith.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Myrsmith.java index 7e1ebce026c..845fe559621 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Myrsmith.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Myrsmith.java @@ -36,9 +36,8 @@ import mage.abilities.Ability; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; -import mage.constants.Outcome; import mage.filter.common.FilterArtifactSpell; import mage.game.Game; import mage.game.permanent.token.MyrToken; @@ -71,9 +70,9 @@ public class Myrsmith extends CardImpl { } } -class MyrsmithEffect extends OneShotEffect { +class MyrsmithEffect extends CreateTokenEffect { public MyrsmithEffect() { - super(Outcome.PutCreatureInPlay); + super(new MyrToken()); staticText = "you may pay {1}. If you do, put a 1/1 colorless Myr artifact creature token onto the battlefield"; } @@ -86,7 +85,7 @@ class MyrsmithEffect extends OneShotEffect { Cost cost = new GenericManaCost(1); cost.clearPaid(); if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { - new MyrToken().putOntoBattlefield(1, game, source.getControllerId(), source.getControllerId()); + super.apply(game, source); } return true; } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java index 45f8b9878cc..0de1da15612 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java @@ -113,18 +113,8 @@ class NimDeathmantleTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - // make sure card is on battlefield - UUID sourceId = getSourceId(); - if (game.getPermanent(sourceId) == null) { - // or it is being removed - if (game.getLastKnownInformation(sourceId, Zone.BATTLEFIELD) == null) { - return false; - } - } - ZoneChangeEvent zEvent = (ZoneChangeEvent) event; Permanent permanent = zEvent.getTarget(); - if (permanent != null && permanent.getControllerId().equals(this.controllerId) && zEvent.getToZone() == Zone.GRAVEYARD @@ -159,29 +149,28 @@ class NimDeathmantleEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); Permanent equipment = game.getPermanent(source.getSourceId()); - if (player != null && equipment != null) { - if (player.chooseUse(Outcome.Benefit, equipment.getName() + " - Pay " + cost.getText() + "?", source, game)) { + if (controller != null && equipment != null) { + if (controller.chooseUse(Outcome.Benefit, equipment.getName() + " - Pay " + cost.getText() + "?", source, game)) { cost.clearPaid(); if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { UUID target = targetPointer.getFirst(game, source); - if (target != null && equipment != null) { + if (target != null) { Card card = game.getCard(target); // check if it's still in graveyard if (card != null && game.getState().getZone(card.getId()).equals(Zone.GRAVEYARD)) { - Player owner = game.getPlayer(card.getOwnerId()); - if (card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId())) { + if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) { Permanent permanent = game.getPermanent(card.getId()); if (permanent != null) { permanent.addAttachment(equipment.getId(), game); - return true; } } } } } } + return true; } return false; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/QuicksilverGargantuan.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/QuicksilverGargantuan.java index a02bb9ccda7..c7c1f7b3bcb 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/QuicksilverGargantuan.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/QuicksilverGargantuan.java @@ -25,27 +25,20 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.cards.Card; +import mage.abilities.effects.common.CopyPermanentEffect; import mage.cards.CardImpl; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreaturePermanent; - -import java.util.UUID; -import mage.target.Target; +import mage.util.functions.ApplyToPermanent; /** * @author ayratn @@ -60,11 +53,8 @@ public class QuicksilverGargantuan extends CardImpl { this.power = new MageInt(7); this.toughness = new MageInt(7); - Ability ability = new EntersBattlefieldAbility(new QuicksilverGargantuanCopyEffect(), + Ability ability = new EntersBattlefieldAbility(new CopyPermanentEffect(new QuicksilverGargantuanApplyToPermanent()), "You may have {this} enter the battlefield as a copy of any creature on the battlefield, except it's still 7/7"); - Target target = new TargetCreaturePermanent(); - target.setNotTarget(true); - ability.addTarget(target); this.addAbility(ability); } @@ -76,52 +66,22 @@ public class QuicksilverGargantuan extends CardImpl { public QuicksilverGargantuan copy() { return new QuicksilverGargantuan(this); } +} - private class QuicksilverGargantuanCopyEffect extends ContinuousEffectImpl { +class QuicksilverGargantuanApplyToPermanent extends ApplyToPermanent { - public QuicksilverGargantuanCopyEffect() { - super(Duration.WhileOnBattlefield, Layer.CopyEffects_1, SubLayer.NA, Outcome.BecomeCreature); - staticText = "You may have {this} enter the battlefield as a copy of any creature on the battlefield, except it's still 7/7"; - } - - public QuicksilverGargantuanCopyEffect(final QuicksilverGargantuanCopyEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Card card = game.getCard(source.getFirstTarget()); - Permanent permanent = game.getPermanent(source.getSourceId()); - permanent.setName(card.getName()); - permanent.getColor(game).setColor(card.getColor(game)); - permanent.getManaCost().clear(); - permanent.getManaCost().add(card.getManaCost()); - permanent.getCardType().clear(); - for (CardType type : card.getCardType()) { - permanent.getCardType().add(type); - } - permanent.getSubtype().clear(); - for (String type : card.getSubtype()) { - permanent.getSubtype().add(type); - } - permanent.getSupertype().clear(); - for (String type : card.getSupertype()) { - permanent.getSupertype().add(type); - } - permanent.setExpansionSetCode(card.getExpansionSetCode()); - permanent.getAbilities().clear(); - for (Ability ability : card.getAbilities()) { - permanent.addAbility(ability, game); - } - - return true; - } - - @Override - public QuicksilverGargantuanCopyEffect copy() { - return new QuicksilverGargantuanCopyEffect(this); - } + @Override + public Boolean apply(Game game, Permanent permanent) { + permanent.getPower().initValue(7); + permanent.getToughness().initValue(7); + return true; + } + @Override + public Boolean apply(Game game, MageObject mageObject) { + mageObject.getPower().initValue(7); + mageObject.getToughness().initValue(7); + return true; } } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java index ae33a638f33..0cf9a06debf 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java @@ -25,21 +25,20 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterLandPermanent; /** @@ -50,18 +49,19 @@ public class RazorvergeThicket extends CardImpl { private static FilterLandPermanent filter = new FilterLandPermanent(); - public RazorvergeThicket (UUID ownerId) { + public RazorvergeThicket(UUID ownerId) { super(ownerId, 228, "Razorverge Thicket", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3)); String abilityText = "tap it unless you control fewer than 3 lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); + this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); } - public RazorvergeThicket (final RazorvergeThicket card) { + public RazorvergeThicket(final RazorvergeThicket card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java index 2aca41fbcf8..6f98e8a9366 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java @@ -25,21 +25,20 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterLandPermanent; /** @@ -50,18 +49,21 @@ public class SeachromeCoast extends CardImpl { private static FilterLandPermanent filter = new FilterLandPermanent(); - public SeachromeCoast (UUID ownerId) { + public SeachromeCoast(UUID ownerId) { super(ownerId, 229, "Seachrome Coast", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 4)); + // Seachrome Coast enters the battlefield tapped unless you control two or fewer other lands. + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 3)); String abilityText = "tap it unless you control fewer than 3 lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); + + // {T}: Add {W} or {U} to your mana pool. this.addAbility(new WhiteManaAbility()); this.addAbility(new BlueManaAbility()); } - public SeachromeCoast (final SeachromeCoast card) { + public SeachromeCoast(final SeachromeCoast card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.java index b02ce34d87e..c42e48fa8e1 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.java @@ -115,9 +115,9 @@ public class ShapeAnew extends CardImpl { } targetController.revealCards(sourcePermanent.getIdName(), revealed, game); if (artifactCard != null) { - artifactCard.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), targetController.getId()); + targetController.moveCards(artifactCard, Zone.BATTLEFIELD, source, game); } - targetController.moveCards(nonArtifactCards, null, Zone.LIBRARY, source, game); + targetController.putCardsOnTopOfLibrary(nonArtifactCards, game, source, false); targetController.shuffleLibrary(game); return true; } diff --git a/Mage.Sets/src/mage/sets/scourge/AcceleratedMutation.java b/Mage.Sets/src/mage/sets/scourge/AcceleratedMutation.java new file mode 100644 index 00000000000..297a2b16752 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/AcceleratedMutation.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.sets.scourge; + +import java.util.UUID; + +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author nigelzor + */ +public class AcceleratedMutation extends CardImpl { + + public AcceleratedMutation(UUID ownerId) { + super(ownerId, 109, "Accelerated Mutation", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{G}{G}"); + this.expansionSetCode = "SCG"; + + // Target creature gets +X/+X until end of turn, where X is the highest converted mana cost among permanents you control. + DynamicValue amount = new HighestConvertedManaCostValue(); + this.getSpellAbility().addEffect(new BoostTargetEffect(amount, amount, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public AcceleratedMutation(final AcceleratedMutation card) { + super(card); + } + + @Override + public AcceleratedMutation copy() { + return new AcceleratedMutation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/CabalConditioning.java b/Mage.Sets/src/mage/sets/scourge/CabalConditioning.java new file mode 100644 index 00000000000..4bb0d6dedc2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/CabalConditioning.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.sets.scourge; + +import java.util.UUID; + +import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author nigelzor + */ +public class CabalConditioning extends CardImpl { + + public CabalConditioning(UUID ownerId) { + super(ownerId, 56, "Cabal Conditioning", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{6}{B}"); + this.expansionSetCode = "SCG"; + + // 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().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); + } + + public CabalConditioning(final CabalConditioning card) { + super(card); + } + + @Override + public CabalConditioning copy() { + return new CabalConditioning(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/DayOfTheDragons.java b/Mage.Sets/src/mage/sets/scourge/DayOfTheDragons.java index 8ce01074263..3f3303be3c5 100644 --- a/Mage.Sets/src/mage/sets/scourge/DayOfTheDragons.java +++ b/Mage.Sets/src/mage/sets/scourge/DayOfTheDragons.java @@ -27,9 +27,10 @@ */ package mage.sets.scourge; +import java.util.HashSet; +import java.util.Set; import java.util.UUID; -import mage.MageInt; -import mage.ObjectColor; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; @@ -48,7 +49,10 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.ExileZone; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.PermanentToken; import mage.game.permanent.token.DragonToken2; +import mage.players.Player; +import mage.util.CardUtil; /** * @@ -60,7 +64,6 @@ public class DayOfTheDragons extends CardImpl { super(ownerId, 31, "Day of the Dragons", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}{U}{U}"); this.expansionSetCode = "SCG"; - // When Day of the Dragons enters the battlefield, exile all creatures you control. Then put that many 5/5 red Dragon creature tokens with flying onto the battlefield. this.addAbility(new EntersBattlefieldTriggeredAbility(new DayOfTheDragonsEntersEffect(), false)); @@ -98,18 +101,17 @@ class DayOfTheDragonsEntersEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - UUID exileId = source.getSourceId(); - int creaturesExiled = 0; - if (exileId != null) { - for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { - if (creature != null) { - if (creature.moveToExile(exileId, "Day of the Dragons", source.getSourceId(), game)) { - creaturesExiled++; - } - } + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + Set toExile = new HashSet<>(); + toExile.addAll(game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)); + if (!toExile.isEmpty()) { + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); + controller.moveCardsToExile(toExile, source, game, true, exileId, sourceObject.getIdName()); + DragonToken2 token = new DragonToken2(); + token.putOntoBattlefield(toExile.size(), game, source.getSourceId(), source.getControllerId()); } - DragonToken2 token = new DragonToken2(); - token.putOntoBattlefield(creaturesExiled, game, source.getSourceId(), source.getControllerId()); return true; } return false; @@ -141,20 +143,22 @@ class DayOfTheDragonsLeavesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - UUID exileId = source.getSourceId(); - for (Permanent dragon : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { - if (dragon != null) { - dragon.sacrifice(source.getSourceId(), game); + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null) { + for (Permanent dragon : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { + if (dragon != null) { + dragon.sacrifice(source.getSourceId(), game); + } } - } - ExileZone exile = game.getExile().getExileZone(exileId); - if (exile != null) { - exile = exile.copy(); - for (UUID cardId : exile) { - Card card = game.getCard(cardId); - card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId()); + int zoneChangeCounter = source.getSourceObjectZoneChangeCounter(); + if (zoneChangeCounter > 0 && !(sourceObject instanceof PermanentToken)) { + zoneChangeCounter--; + } + ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), zoneChangeCounter)); + if (exile != null) { + controller.moveCards(exile, Zone.BATTLEFIELD, source, game); } - game.getExile().getExileZone(exileId).clear(); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/scourge/DispersalShield.java b/Mage.Sets/src/mage/sets/scourge/DispersalShield.java new file mode 100644 index 00000000000..d35c015d0f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/DispersalShield.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.sets.scourge; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.target.TargetSpell; + +/** + * + * @author nigelzor + */ +public class DispersalShield extends CardImpl { + + public DispersalShield(UUID ownerId) { + super(ownerId, 33, "Dispersal Shield", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "SCG"; + + // Counter target spell if its converted mana cost is less than or equal to the highest converted mana cost among permanents you control. + this.getSpellAbility().addEffect(new DispersalShieldEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public DispersalShield(final DispersalShield card) { + super(card); + } + + @Override + public DispersalShield copy() { + return new DispersalShield(this); + } +} + +class DispersalShieldEffect extends OneShotEffect { + + public DispersalShieldEffect() { + super(Outcome.Detriment); + staticText = "Counter target spell if its converted mana cost is less than or equal to the highest converted mana cost among permanents you control"; + } + + public DispersalShieldEffect(DispersalShieldEffect effect) { + super(effect); + } + + @Override + public Effect copy() { + return new DispersalShieldEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + DynamicValue amount = new HighestConvertedManaCostValue(); + Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + if (spell != null && spell.getConvertedManaCost() <= amount.calculate(game, source, this)) { + return game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/DragonBreath.java b/Mage.Sets/src/mage/sets/scourge/DragonBreath.java new file mode 100644 index 00000000000..5b4c0d988c4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/DragonBreath.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.sets.scourge; + +import java.util.UUID; + +/** + * + * @author emerald000 + */ +public class DragonBreath extends mage.sets.archenemy.DragonBreath { + + public DragonBreath(UUID ownerId) { + super(ownerId); + this.cardNumber = 86; + this.expansionSetCode = "SCG"; + } + + public DragonBreath(final DragonBreath card) { + super(card); + } + + @Override + public DragonBreath copy() { + return new DragonBreath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/PutridRaptor.java b/Mage.Sets/src/mage/sets/scourge/PutridRaptor.java new file mode 100644 index 00000000000..1efb8f7687e --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/PutridRaptor.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.sets.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class PutridRaptor extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Zombie card"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public PutridRaptor(UUID ownerId) { + super(ownerId, 71, "Putrid Raptor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Zombie"); + this.subtype.add("Lizard"); + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Morph-Discard a Zombie card. + this.addAbility(new MorphAbility(this, new DiscardCardCost(filter))); + } + + public PutridRaptor(final PutridRaptor card) { + super(card); + } + + @Override + public PutridRaptor copy() { + return new PutridRaptor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/RewardTheFaithful.java b/Mage.Sets/src/mage/sets/scourge/RewardTheFaithful.java new file mode 100644 index 00000000000..93d1b92440b --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/RewardTheFaithful.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.sets.scourge; + +import java.util.UUID; + +import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author nigelzor + */ +public class RewardTheFaithful extends CardImpl { + + public RewardTheFaithful(UUID ownerId) { + super(ownerId, 22, "Reward the Faithful", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "SCG"; + + // 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().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); + } + + public RewardTheFaithful(final RewardTheFaithful card) { + super(card); + } + + @Override + public RewardTheFaithful copy() { + return new RewardTheFaithful(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/TorrentOfFire.java b/Mage.Sets/src/mage/sets/scourge/TorrentOfFire.java new file mode 100644 index 00000000000..6d6cda15ed3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/TorrentOfFire.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.sets.scourge; + +import java.util.UUID; + +import mage.abilities.dynamicvalue.common.HighestConvertedManaCostValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author nigelzor + */ +public class TorrentOfFire extends CardImpl { + + public TorrentOfFire(UUID ownerId) { + super(ownerId, 107, "Torrent of Fire", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); + this.expansionSetCode = "SCG"; + + // 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().addTarget(new TargetCreatureOrPlayer()); + } + + public TorrentOfFire(final TorrentOfFire card) { + super(card); + } + + @Override + public TorrentOfFire copy() { + return new TorrentOfFire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/ZealousInquisitor.java b/Mage.Sets/src/mage/sets/scourge/ZealousInquisitor.java new file mode 100644 index 00000000000..bc7954686e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/ZealousInquisitor.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.scourge; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ZealousInquisitor extends mage.sets.ninthedition.ZealousInquisitor { + + public ZealousInquisitor(UUID ownerId) { + super(ownerId); + this.cardNumber = 27; + this.expansionSetCode = "SCG"; + this.rarity = Rarity.COMMON; + } + + public ZealousInquisitor(final ZealousInquisitor card) { + super(card); + } + + @Override + public ZealousInquisitor copy() { + return new ZealousInquisitor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/CityOfBrass.java b/Mage.Sets/src/mage/sets/seventhedition/CityOfBrass.java index 6071037d519..35bb06cb880 100644 --- a/Mage.Sets/src/mage/sets/seventhedition/CityOfBrass.java +++ b/Mage.Sets/src/mage/sets/seventhedition/CityOfBrass.java @@ -30,7 +30,7 @@ package mage.sets.seventhedition; import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; -import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; import mage.abilities.effects.common.DamageControllerEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; @@ -46,7 +46,7 @@ public class CityOfBrass extends CardImpl { this.expansionSetCode = "7ED"; // Whenever City of Brass becomes tapped, it deals 1 damage to you. - this.addAbility(new BecomesTappedTriggeredAbility(new DamageControllerEffect(1))); + this.addAbility(new BecomesTappedSourceTriggeredAbility(new DamageControllerEffect(1))); // {tap}: Add one mana of any color to your mana pool. this.addAbility(new AnyColorManaAbility()); diff --git a/Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java b/Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java index 2354dc80e48..1650ce93e7e 100644 --- a/Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java +++ b/Mage.Sets/src/mage/sets/seventhedition/Thoughtleech.java @@ -28,16 +28,15 @@ package mage.sets.seventhedition; import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent.EventType; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; /** * @@ -46,12 +45,19 @@ import mage.game.permanent.Permanent; */ public class Thoughtleech extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("an Island an opponent controls"); + + static { + filter.add(new SubtypePredicate("Island")); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + public Thoughtleech(UUID ownerId) { super(ownerId, 274, "Thoughtleech", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}{G}"); this.expansionSetCode = "7ED"; // Whenever an Island an opponent controls becomes tapped, you may gain 1 life. - this.addAbility(new ThoughtleechTriggeredAbility()); + this.addAbility(new BecomesTappedTriggeredAbility(new GainLifeEffect(1), true, filter)); } public Thoughtleech(final Thoughtleech card) { @@ -63,39 +69,3 @@ public class Thoughtleech extends CardImpl { return new Thoughtleech(this); } } - -class ThoughtleechTriggeredAbility extends TriggeredAbilityImpl { - - ThoughtleechTriggeredAbility() { - super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); - } - - ThoughtleechTriggeredAbility(final ThoughtleechTriggeredAbility ability) { - super(ability); - } - - @Override - public ThoughtleechTriggeredAbility copy() { - return new ThoughtleechTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent p = game.getPermanent(event.getTargetId()); - if(p != null && p.getSubtype().contains("Island")) { - if(game.getOpponents(this.controllerId).contains(p.getControllerId())) - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever an Island an opponent controls becomes tapped, " + modes.getText(); - } -} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/DemigodOfRevenge.java b/Mage.Sets/src/mage/sets/shadowmoor/DemigodOfRevenge.java index 85977dde261..73181fa222e 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/DemigodOfRevenge.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/DemigodOfRevenge.java @@ -34,7 +34,6 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.HasteAbility; -import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -106,10 +105,7 @@ class DemigodOfRevengeReturnEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - for (Card creature : controller.getGraveyard().getCards(filter, game)) { - creature.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId()); - } - return true; + return controller.moveCards(controller.getGraveyard().getCards(filter, game), Zone.BATTLEFIELD, source, game); } return false; } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/ElementalMastery.java b/Mage.Sets/src/mage/sets/shadowmoor/ElementalMastery.java index 7d06f996307..13c125f5bfc 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/ElementalMastery.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/ElementalMastery.java @@ -30,7 +30,6 @@ package mage.sets.shadowmoor; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -65,7 +64,6 @@ public class ElementalMastery extends CardImpl { this.expansionSetCode = "SHM"; this.subtype.add("Aura"); - // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); @@ -110,16 +108,17 @@ class ElementalMasteryEffect extends OneShotEffect { Permanent creatureAttached = game.getPermanent(source.getSourceId()); if (creatureAttached != null) { int power = creatureAttached.getPower().getValue(); - for (int i = 0; i < power; i++) { + if (power > 0) { ElementalToken token = new ElementalToken(); - token.putOntoBattlefield(1, game, creatureAttached.getId(), creatureAttached.getControllerId()); - ExileTargetEffect exileEffect = new ExileTargetEffect("exile the token"); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + token.putOntoBattlefield(power, game, creatureAttached.getId(), creatureAttached.getControllerId()); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } } return true; } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/ElsewhereFlask.java b/Mage.Sets/src/mage/sets/shadowmoor/ElsewhereFlask.java index ae8d945447e..b370c7dc878 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/ElsewhereFlask.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/ElsewhereFlask.java @@ -27,7 +27,6 @@ */ package mage.sets.shadowmoor; -import java.util.Set; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -42,7 +41,8 @@ import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; -import mage.choices.ChoiceImpl; +import mage.choices.Choice; +import mage.choices.ChoiceBasicLandType; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; @@ -103,15 +103,9 @@ class ElsewhereFlaskEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - ChoiceImpl choices = new ChoiceImpl(true); - Set choicesSet = choices.getChoices(); - choicesSet.add("Forest"); - choicesSet.add("Plains"); - choicesSet.add("Mountain"); - choicesSet.add("Island"); - choicesSet.add("Swamp"); - if (player.choose(Outcome.Neutral, choices, game)) { - game.getState().setValue(source.getSourceId().toString() + "_ElsewhereFlask", choices.getChoice()); + Choice choice = new ChoiceBasicLandType(); + if (player.choose(Outcome.Neutral, choice, game)) { + game.getState().setValue(source.getSourceId().toString() + "_ElsewhereFlask", choice.getChoice()); } game.addEffect(new ElsewhereFlaskContinuousEffect(), source); return true; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/Giantbaiting.java b/Mage.Sets/src/mage/sets/shadowmoor/Giantbaiting.java index 146c80a3a34..38482fdf379 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/Giantbaiting.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/Giantbaiting.java @@ -30,7 +30,6 @@ package mage.sets.shadowmoor; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; @@ -41,6 +40,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; @@ -92,13 +92,14 @@ class GiantbaitingEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Token token = new GiantWarriorToken(); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/GloomwidowsFeast.java b/Mage.Sets/src/mage/sets/shadowmoor/GloomwidowsFeast.java index f2b8a590bef..018b0eebfd0 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/GloomwidowsFeast.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/GloomwidowsFeast.java @@ -1,126 +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.sets.shadowmoor; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.ReachAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.permanent.token.Token; -import mage.target.TargetPermanent; - -/** - * - * @author jeffwadsworth - */ -public class GloomwidowsFeast extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature with flying"); - - static { - filter.add(new AbilityPredicate(FlyingAbility.class)); - } - - public GloomwidowsFeast(UUID ownerId) { - super(ownerId, 118, "Gloomwidow's Feast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); - this.expansionSetCode = "SHM"; - - - // Destroy target creature with flying. If that creature was blue or black, put a 1/2 green Spider creature token with reach onto the battlefield. - this.getSpellAbility().addEffect(new GloomwidowsFeastEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(filter)); - - } - - public GloomwidowsFeast(final GloomwidowsFeast card) { - super(card); - } - - @Override - public GloomwidowsFeast copy() { - return new GloomwidowsFeast(this); - } -} - -class GloomwidowsFeastEffect extends OneShotEffect { - - boolean applied = false; - - public GloomwidowsFeastEffect() { - super(Outcome.DestroyPermanent); - this.staticText = "Destroy target creature with flying. If that creature was blue or black, put a 1/2 green Spider creature token with reach onto the battlefield"; - } - - public GloomwidowsFeastEffect(final GloomwidowsFeastEffect effect) { - super(effect); - } - - @Override - public GloomwidowsFeastEffect copy() { - return new GloomwidowsFeastEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent targetCreature = game.getPermanent(source.getFirstTarget()); - if (targetCreature != null) { - targetCreature.destroy(source.getSourceId(), game, false); - Permanent destroyedCreature = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); - if (destroyedCreature.getColor(game).isBlue() - || destroyedCreature.getColor(game).isBlack()) { - SpiderToken token = new SpiderToken(); - token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - return true; - } - } - return false; - } -} - -class SpiderToken extends Token { - - public SpiderToken() { - super("Spider", "1/2 green Spider creature token with reach"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Spider"); - power = new MageInt(1); - toughness = new MageInt(2); - addAbility(ReachAbility.getInstance()); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.shadowmoor; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.SpiderToken; +import mage.target.TargetPermanent; + +/** + * + * @author jeffwadsworth + */ +public class GloomwidowsFeast extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public GloomwidowsFeast(UUID ownerId) { + super(ownerId, 118, "Gloomwidow's Feast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); + this.expansionSetCode = "SHM"; + + + // Destroy target creature with flying. If that creature was blue or black, put a 1/2 green Spider creature token with reach onto the battlefield. + this.getSpellAbility().addEffect(new GloomwidowsFeastEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + + } + + public GloomwidowsFeast(final GloomwidowsFeast card) { + super(card); + } + + @Override + public GloomwidowsFeast copy() { + return new GloomwidowsFeast(this); + } +} + +class GloomwidowsFeastEffect extends OneShotEffect { + + boolean applied = false; + + public GloomwidowsFeastEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy target creature with flying. If that creature was blue or black, put a 1/2 green Spider creature token with reach onto the battlefield"; + } + + public GloomwidowsFeastEffect(final GloomwidowsFeastEffect effect) { + super(effect); + } + + @Override + public GloomwidowsFeastEffect copy() { + return new GloomwidowsFeastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent targetCreature = game.getPermanent(source.getFirstTarget()); + if (targetCreature != null) { + targetCreature.destroy(source.getSourceId(), game, false); + Permanent destroyedCreature = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); + if (destroyedCreature.getColor(game).isBlue() + || destroyedCreature.getColor(game).isBlack()) { + SpiderToken token = new SpiderToken(); + token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/KnacksawClique.java b/Mage.Sets/src/mage/sets/shadowmoor/KnacksawClique.java index 24e5ea3e54c..a0d6be1d305 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/KnacksawClique.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/KnacksawClique.java @@ -29,11 +29,13 @@ package mage.sets.shadowmoor; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.UntapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.Card; @@ -45,14 +47,14 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; +import mage.players.Library; import mage.players.Player; import mage.target.common.TargetOpponent; -import mage.util.CardUtil; +import mage.target.targetpointer.FixedTarget; /** * * @author jeffwadsworth - */ public class KnacksawClique extends CardImpl { @@ -104,16 +106,17 @@ class KnacksawCliqueEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player opponent = game.getPlayer(source.getFirstTarget()); - if (opponent != null) { - Player you = game.getPlayer(source.getControllerId()); - UUID exileId = CardUtil.getCardExileZoneId(game, source); - Card card = opponent.getLibrary().getFromTop(game); - if (card != null - && you != null) { - card.moveToExile(exileId, "Knacksaw Clique", source.getSourceId(), game); - if (card.getSpellAbility() != null) { - game.addEffect(new KnacksawCliqueCastFromExileEffect(card.getId(), exileId), source); + Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (sourceObject != null && opponent != null) { + if (opponent.getLibrary().size() > 0) { + Library library = opponent.getLibrary(); + Card card = library.getFromTop(game); + if (card != null) { + opponent.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true); + ContinuousEffect effect = new KnacksawCliqueCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId())); + game.addEffect(effect, source); } } return true; @@ -124,20 +127,13 @@ class KnacksawCliqueEffect extends OneShotEffect { class KnacksawCliqueCastFromExileEffect extends AsThoughEffectImpl { - private final UUID cardId; - private final UUID exileId; - - public KnacksawCliqueCastFromExileEffect(UUID cardId, UUID exileId) { + public KnacksawCliqueCastFromExileEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); staticText = "Until end of turn, you may play that card"; - this.cardId = cardId; - this.exileId = exileId; } public KnacksawCliqueCastFromExileEffect(final KnacksawCliqueCastFromExileEffect effect) { super(effect); - this.cardId = effect.cardId; - this.exileId = effect.exileId; } @Override @@ -152,12 +148,8 @@ class KnacksawCliqueCastFromExileEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - if (sourceId.equals(this.cardId) && source.getControllerId().equals(affectedControllerId)) { - Card card = game.getCard(this.cardId); - if (card != null && game.getState().getExile().getExileZone(exileId).contains(cardId)) { - return true; - } - } - return false; + return source.getControllerId().equals(affectedControllerId) + && sourceId.equals(getTargetPointer().getFirst(game, source)); + } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java b/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java index 900fb98760c..cd8202dba1c 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java @@ -68,7 +68,7 @@ public class LeechriddenSwamp extends CardImpl { this.subtype.add("Swamp"); // ({tap}: Add {B} to your mana pool.) - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost())); // Leechridden Swamp enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/sets/shadowmoor/ManaforgeCinder.java b/Mage.Sets/src/mage/sets/shadowmoor/ManaforgeCinder.java index c650a49008d..5501ab9aded 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/ManaforgeCinder.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/ManaforgeCinder.java @@ -114,10 +114,10 @@ class ManaforgeCinderManaEffect extends OneShotEffect { } switch (manaChoice.getChoice()) { case "Black": - mana.addBlack(); + mana.increaseBlack(); break; case "Red": - mana.addRed(); + mana.increaseRed(); break; } controller.getManaPool().addMana(mana, game, source); diff --git a/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java b/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java index 002c393ef77..5c122ca7ae3 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/MedicineRunner.java @@ -27,29 +27,19 @@ */ package mage.sets.shadowmoor; -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.abilities.effects.common.counter.RemoveCounterTargetEffect; import mage.cards.CardImpl; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.counters.Counter; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.TargetPermanent; /** * - * @author jeffwadsworth using code from LevelX + * @author jeffwadsworth */ public class MedicineRunner extends CardImpl { @@ -77,75 +67,3 @@ public class MedicineRunner extends CardImpl { return new MedicineRunner(this); } } - -class RemoveCounterTargetEffect extends OneShotEffect { - - private CounterType counterTypeToRemove; - - public RemoveCounterTargetEffect() { - super(Outcome.Detriment); - this.staticText = "remove a counter from target permanent"; - } - - public RemoveCounterTargetEffect(CounterType counterTypeToRemove) { - super(Outcome.Detriment); - this.staticText = "remove a " + counterTypeToRemove.getName() + " counter from target permanent"; - this.counterTypeToRemove = counterTypeToRemove; - } - - public RemoveCounterTargetEffect(final RemoveCounterTargetEffect effect) { - super(effect); - this.counterTypeToRemove = effect.counterTypeToRemove; - } - - @Override - public RemoveCounterTargetEffect copy() { - return new RemoveCounterTargetEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - boolean result = false; - Player controller = game.getPlayer(source.getControllerId()); - for (UUID targetId : getTargetPointer().getTargets(game, source)) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null) { - if (permanent.getCounters().size() > 0 && (counterTypeToRemove == null || permanent.getCounters().containsKey(counterTypeToRemove))) { - String counterName = null; - if (counterTypeToRemove != null) { - counterName = counterTypeToRemove.getName(); - } else { - if (permanent.getCounters().size() > 1 && counterTypeToRemove == null) { - Choice choice = new ChoiceImpl(true); - Set choices = new HashSet<>(); - for (Counter counter : permanent.getCounters().values()) { - if (permanent.getCounters().getCount(counter.getName()) > 0) { - choices.add(counter.getName()); - } - } - choice.setChoices(choices); - choice.setMessage("Choose a counter type to remove from " + permanent.getName()); - controller.choose(Outcome.Detriment, choice, game); - counterName = choice.getChoice(); - } else { - for (Counter counter : permanent.getCounters().values()) { - if (counter.getCount() > 0) { - counterName = counter.getName(); - } - } - } - } - if (counterName != null) { - permanent.removeCounters(counterName, 1, game); - if (permanent.getCounters().getCount(counterName) == 0) { - permanent.getCounters().removeCounter(counterName); - } - result |= true; - game.informPlayers(new StringBuilder(controller.getLogName()).append(" removes a ").append(counterName).append(" counter from ").append(permanent.getName()).toString()); - } - } - } - } - return result; - } -} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/RunedHalo.java b/Mage.Sets/src/mage/sets/shadowmoor/RunedHalo.java index df76fd6ff8a..a89115c7d3a 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/RunedHalo.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/RunedHalo.java @@ -85,7 +85,7 @@ class RunedHaloSetProtectionEffect extends OneShotEffect { public RunedHaloSetProtectionEffect() { super(Outcome.Protect); - staticText = "

You have protection from the chosen name (You can't be targeted, dealt damage, or enchanted by anything with that name.)"; + staticText = "

You have protection from the chosen name (You can't be targeted, dealt damage, or enchanted by anything with that name.)"; } public RunedHaloSetProtectionEffect(final RunedHaloSetProtectionEffect effect) { diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java b/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java index 1f7020d8412..795c79dea3e 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java @@ -30,6 +30,7 @@ package mage.sets.shardsofalara; import java.util.ArrayList; import java.util.List; import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -56,11 +57,8 @@ public class BrilliantUltimatum extends CardImpl { super(ownerId, 159, "Brilliant Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{W}{W}{U}{U}{U}{B}{B}"); this.expansionSetCode = "ALA"; - // Exile the top five cards of your library. An opponent separates those cards into two piles. You may play any number of cards from one of those piles without paying their mana costs. this.getSpellAbility().addEffect(new BrilliantUltimatumEffect()); - this.getSpellAbility().addTarget(new TargetOpponent(true)); - } public BrilliantUltimatum(final BrilliantUltimatum card) { @@ -91,22 +89,19 @@ class BrilliantUltimatumEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player you = game.getPlayer(source.getControllerId()); - if (you == null) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { return false; } Cards pile2 = new CardsImpl(); - int max = Math.min(you.getLibrary().size(), 5); - for (int i = 0; i < max; i++) { - Card card = you.getLibrary().removeFromTop(game); - if (card != null) { - card.moveToExile(source.getSourceId(), "Brilliant Ultimatum", source.getSourceId(), game); - pile2.add(card); - } - } + pile2.addAll(controller.getLibrary().getTopCards(game, 5)); + controller.moveCardsToExile(pile2.getCards(game), source, game, true, source.getSourceId(), sourceObject.getIdName()); - Player opponent = game.getPlayer(source.getFirstTarget()); + TargetOpponent targetOpponent = new TargetOpponent(true); + targetOpponent.choose(outcome, source.getControllerId(), source.getSourceId(), game); + Player opponent = game.getPlayer(targetOpponent.getFirstTarget()); if (opponent != null) { TargetCard target = new TargetCard(0, pile2.size(), Zone.EXILED, new FilterCard("cards to put in the first pile")); target.setRequired(false); @@ -123,55 +118,32 @@ class BrilliantUltimatumEffect extends OneShotEffect { } } } - for (UUID cardID : pile1) { - Card card = pile1.get(cardID, game); - pileOne.add(card); - } - for (UUID cardId : pile2) { - Card card = pile2.get(cardId, game); - pileTwo.add(card); - } - - you.revealCards("Pile 1 (Brilliant Ultimatum)", pile1, game); - you.revealCards("Pile 2 (Brilliant Ultimatum)", pile2, game); - - boolean choice = you.choosePile(Outcome.PlayForFree, "Which pile (play for free)?", pileOne, pileTwo, game); + pileOne.addAll(pile1.getCards(game)); + pileTwo.addAll(pile2.getCards(game)); + controller.revealCards("Pile 1 - " + sourceObject.getIdName(), pile1, game); + controller.revealCards("Pile 2 - " + sourceObject.getIdName(), pile2, game); + + boolean choice = controller.choosePile(Outcome.PlayForFree, "Which pile (play for free)?", pileOne, pileTwo, game); + String selectedPileName; + List selectedPileCards; + Cards selectedPile; if (choice) { - game.informPlayer(you, you.getLogName() + " chose Pile 1."); - while (!pileOne.isEmpty() && you.chooseUse(Outcome.PlayForFree, "Do you want to play a card from Pile 1?", source, game)) { - TargetCard targetExiledCard = new TargetCard(Zone.EXILED, new FilterCard()); - if (you.chooseTarget(Outcome.PlayForFree, pile1, targetExiledCard, source, game)) { - Card card = pile1.get(targetExiledCard.getFirstTarget(), game); - if (card != null) { - if (card.getCardType().contains(CardType.LAND)) { - you.playLand(card, game); - pileOne.remove(card); - pile1.remove(card); - } else { - you.cast(card.getSpellAbility(), game, true); - pileOne.remove(card); - pile1.remove(card); - } - } - } - } + selectedPileName = "pile 1"; + selectedPileCards = pileOne; + selectedPile = pile1; } else { - game.informPlayer(you, you.getLogName() + " chose Pile 2."); - while (!pileTwo.isEmpty() && you.chooseUse(Outcome.PlayForFree, "Do you want to play a card from Pile 2?", source, game)) { - TargetCard targetExiledCard = new TargetCard(Zone.EXILED, new FilterCard()); - if (you.chooseTarget(Outcome.PlayForFree, pile2, targetExiledCard, source, game)) { - Card card = pile2.get(targetExiledCard.getFirstTarget(), game); - if (card != null) { - if (card.getCardType().contains(CardType.LAND)) { - you.playLand(card, game); - pileTwo.remove(card); - pile2.remove(card); - } else { - you.cast(card.getSpellAbility(), game, true); - pileTwo.remove(card); - pile2.remove(card); - } - } + selectedPileName = "pile 2"; + selectedPileCards = pileTwo; + selectedPile = pile2; + } + game.informPlayers(controller.getLogName() + " chose " + selectedPileName + "."); + while (!selectedPileCards.isEmpty() && controller.chooseUse(Outcome.PlayForFree, "Do you want to play a card for free from " + selectedPileName + "?", source, game)) { + TargetCard targetExiledCard = new TargetCard(Zone.EXILED, new FilterCard()); + if (controller.chooseTarget(Outcome.PlayForFree, selectedPile, targetExiledCard, source, game)) { + Card card = selectedPile.get(targetExiledCard.getFirstTarget(), game); + if (controller.playCard(card, game, true, true)) { + selectedPileCards.remove(card); + selectedPile.remove(card); } } } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java b/Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java index 180c48059a7..86ba12cbe9c 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java @@ -28,16 +28,18 @@ package mage.sets.shardsofalara; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.game.Game; @@ -56,7 +58,6 @@ public class ClarionUltimatum extends CardImpl { super(ownerId, 163, "Clarion Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{G}{G}{W}{W}{W}{U}{U}"); this.expansionSetCode = "ALA"; - // Choose five permanents you control. For each of those permanents, you may search your library for a card with the same name as that permanent. Put those cards onto the battlefield tapped, then shuffle your library. this.getSpellAbility().addEffect(new ClarionUltimatumEffect()); } @@ -90,32 +91,28 @@ class ClarionUltimatumEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); int permanentsCount = game.getBattlefield().getAllActivePermanents(source.getControllerId()).size(); - if (player == null || permanentsCount < 1) { + if (controller == null || permanentsCount < 1) { return false; } TargetControlledPermanent permanentsTarget = new TargetControlledPermanent(Math.min(permanentsCount, 5)); - player.choose(Outcome.Benefit, permanentsTarget, source.getSourceId(), game); + controller.choose(Outcome.Benefit, permanentsTarget, source.getSourceId(), game); - List chosenCards = new ArrayList(); - List namesFiltered = new ArrayList(); + Set chosenCards = new LinkedHashSet<>(); + List namesFiltered = new ArrayList<>(); List permanents = permanentsTarget.getTargets(); for (UUID permanentId : permanents) { Permanent permanent = game.getPermanent(permanentId); final String cardName = permanent.getName(); if (!namesFiltered.contains(cardName)) { - StringBuilder sb = new StringBuilder(); - sb.append("Search for ").append(cardName).append(" in your library?"); - - if (player.chooseUse(Outcome.PutCardInPlay, sb.toString(), source, game)) { + if (controller.chooseUse(Outcome.PutCardInPlay, "Search for " + cardName + " in your library?", source, game)) { FilterCard filter = new FilterCard("card named " + cardName); filter.add(new NamePredicate(cardName)); TargetCardInLibrary target = new TargetCardInLibrary(filter); - - if (player.searchLibrary(target, game)) { - Card card = player.getLibrary().getCard(target.getFirstTarget(), game); + if (controller.searchLibrary(target, game)) { + Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); if (card != null) { chosenCards.add(card); } @@ -126,14 +123,8 @@ class ClarionUltimatumEffect extends OneShotEffect { } } - for (Card card : chosenCards) { - card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId()); - Permanent permanent = game.getPermanent(card.getId()); - if (permanent != null) { - permanent.setTapped(true); - } - } - player.shuffleLibrary(game); + controller.moveCards(chosenCards, Zone.BATTLEFIELD, source, game, true, false, false, null); + controller.shuffleLibrary(game); return true; } } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/CouriersCapsule.java b/Mage.Sets/src/mage/sets/shardsofalara/CouriersCapsule.java index 903cf74c23b..8aab811a414 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/CouriersCapsule.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/CouriersCapsule.java @@ -29,6 +29,8 @@ package mage.sets.shardsofalara; import java.util.UUID; + +import mage.abilities.costs.common.TapSourceCost; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; @@ -51,6 +53,7 @@ public class CouriersCapsule extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(2), new ManaCostsImpl("{1}{U}")); + ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/HinderingLight.java b/Mage.Sets/src/mage/sets/shardsofalara/HinderingLight.java index cd0dbc8e7f7..7726f3ab806 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/HinderingLight.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/HinderingLight.java @@ -28,11 +28,12 @@ package mage.sets.shardsofalara; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; +import mage.abilities.Mode; import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.FilterSpell; import mage.filter.predicate.ObjectPlayer; import mage.filter.predicate.ObjectPlayerPredicate; @@ -58,7 +59,6 @@ public class HinderingLight extends CardImpl { super(ownerId, 173, "Hindering Light", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}{U}"); this.expansionSetCode = "ALA"; - // Counter target spell that targets you or a permanent you control. this.getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellAbility().addTarget(new TargetSpell(filter)); @@ -84,9 +84,8 @@ class HinderingLightPredicate implements ObjectPlayerPredicate permanents = game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), source.getSourceId(), game); - for (Permanent permanent: permanents) { + for (Permanent permanent : permanents) { permanent.moveToExile(source.getSourceId(), "Realm Razer", source.getSourceId(), game); } return true; @@ -103,7 +102,6 @@ class ExileAllEffect extends OneShotEffect { } - class RealmRazerEffect extends OneShotEffect { public RealmRazerEffect() { @@ -122,17 +120,14 @@ class RealmRazerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - ExileZone exZone = game.getExile().getExileZone(source.getSourceId()); - if (exZone != null) { - for (Card card : exZone.getCards(game)) { - if (card != null) { - if(card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), card.getOwnerId())){ - game.getPermanent(card.getId()).setTapped(true); - } - } + 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.BATTLEFIELD, source, game, true, false, false, null); } return true; } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Skeletonize.java b/Mage.Sets/src/mage/sets/shardsofalara/Skeletonize.java index f9000f459ea..18cf0faca35 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/Skeletonize.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/Skeletonize.java @@ -152,7 +152,7 @@ class SkeletonToken extends Token { super("Skeleton", "1/1 black Skeleton creature token with \"{B}: Regenerate this creature.\""); this.cardType.add(CardType.CREATURE); this.color = ObjectColor.BLACK; - this.subtype.add("Bat"); + this.subtype.add("Skeleton"); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/sets/starter1999/CinderStorm.java b/Mage.Sets/src/mage/sets/starter1999/CinderStorm.java new file mode 100644 index 00000000000..e930ab1839c --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/CinderStorm.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.sets.starter1999; + +import java.util.UUID; + +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author nigelzor + */ +public class CinderStorm extends CardImpl { + + public CinderStorm(UUID ownerId) { + super(ownerId, 93, "Cinder Storm", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{6}{R}"); + this.expansionSetCode = "S99"; + + // Cinder Storm deals 7 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new DamageTargetEffect(7)); + } + + public CinderStorm(final CinderStorm card) { + super(card); + } + + @Override + public CinderStorm copy() { + return new CinderStorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/DakmorGhoul.java b/Mage.Sets/src/mage/sets/starter1999/DakmorGhoul.java new file mode 100644 index 00000000000..db966dd5818 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/DakmorGhoul.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.sets.starter1999; + +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.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class DakmorGhoul extends CardImpl { + + public DakmorGhoul(UUID ownerId) { + super(ownerId, 70, "Dakmor Ghoul", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "S99"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Dakmor Ghoul enters the battlefield, target opponent loses 2 life and you gain 2 life. + Effect effect = new GainLifeEffect(2); + effect.setText("and you gain 2 life"); + Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(2), false); + ability.addTarget(new TargetOpponent()); + ability.addEffect(effect); + this.addAbility(ability); + } + + public DakmorGhoul(final DakmorGhoul card) { + super(card); + } + + @Override + public DakmorGhoul copy() { + return new DakmorGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/DakmorPlague.java b/Mage.Sets/src/mage/sets/starter1999/DakmorPlague.java new file mode 100644 index 00000000000..4d3150c9e0f --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/DakmorPlague.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.sets.starter1999; + +import java.util.UUID; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DakmorPlague extends CardImpl { + + public DakmorPlague(UUID ownerId) { + super(ownerId, 72, "Dakmor Plague", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "S99"; + + // Dakmor Plague deals 3 damage to each creature and each player. + this.getSpellAbility().addEffect(new DamageEverythingEffect(3)); + } + + public DakmorPlague(final DakmorPlague card) { + super(card); + } + + @Override + public DakmorPlague copy() { + return new DakmorPlague(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/DevoutMonk.java b/Mage.Sets/src/mage/sets/starter1999/DevoutMonk.java new file mode 100644 index 00000000000..0c29947555b --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/DevoutMonk.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.sets.starter1999; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DevoutMonk extends CardImpl { + + public DevoutMonk(UUID ownerId) { + super(ownerId, 14, "Devout Monk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "S99"; + this.subtype.add("Human"); + this.subtype.add("Monk"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Devout Monk enters the battlefield, you gain 1 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1), false)); + } + + public DevoutMonk(final DevoutMonk card) { + super(card); + } + + @Override + public DevoutMonk copy() { + return new DevoutMonk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/DreadReaper.java b/Mage.Sets/src/mage/sets/starter1999/DreadReaper.java new file mode 100644 index 00000000000..9c38640442b --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/DreadReaper.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.sets.starter1999; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class DreadReaper extends CardImpl { + + public DreadReaper(UUID ownerId) { + super(ownerId, 76, "Dread Reaper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}"); + this.expansionSetCode = "S99"; + this.subtype.add("Horror"); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Dread Reaper enters the battlefield, you lose 5 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(5), false)); + } + + public DreadReaper(final DreadReaper card) { + super(card); + } + + @Override + public DreadReaper copy() { + return new DreadReaper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/HowlingFury.java b/Mage.Sets/src/mage/sets/starter1999/HowlingFury.java new file mode 100644 index 00000000000..67896da006b --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/HowlingFury.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.sets.starter1999; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class HowlingFury extends CardImpl { + + public HowlingFury(UUID ownerId) { + super(ownerId, 82, "Howling Fury", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "S99"; + + // Target creature gets +4/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(4, 0, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public HowlingFury(final HowlingFury card) { + super(card); + } + + @Override + public HowlingFury copy() { + return new HowlingFury(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/RoyalTrooper.java b/Mage.Sets/src/mage/sets/starter1999/RoyalTrooper.java new file mode 100644 index 00000000000..6f5c36e52e8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/RoyalTrooper.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.sets.starter1999; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class RoyalTrooper extends CardImpl { + + public RoyalTrooper(UUID ownerId) { + super(ownerId, 25, "Royal Trooper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "S99"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Royal Trooper blocks, it gets +2/+2 until end of turn. + Effect effect = new BoostSourceEffect(2, 2, Duration.EndOfTurn); + effect.setText("it gets +2/+2 until end of turn"); + this.addAbility(new BlocksTriggeredAbility(effect, false)); + } + + public RoyalTrooper(final RoyalTrooper card) { + super(card); + } + + @Override + public RoyalTrooper copy() { + return new RoyalTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/ScorchingSpear.java b/Mage.Sets/src/mage/sets/starter1999/ScorchingSpear.java new file mode 100644 index 00000000000..2535439b4ee --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/ScorchingSpear.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.sets.starter1999; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class ScorchingSpear extends CardImpl { + + public ScorchingSpear(UUID ownerId) { + super(ownerId, 116, "Scorching Spear", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{R}"); + this.expansionSetCode = "S99"; + + // Scorching Spear deals 1 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(1)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public ScorchingSpear(final ScorchingSpear card) { + super(card); + } + + @Override + public ScorchingSpear copy() { + return new ScorchingSpear(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/ShriekingSpecter.java b/Mage.Sets/src/mage/sets/starter1999/ShriekingSpecter.java new file mode 100644 index 00000000000..ec22bc1372e --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/ShriekingSpecter.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.sets.starter1999; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; + +/** + * + * @author fireshoes + */ +public class ShriekingSpecter extends CardImpl { + + public ShriekingSpecter(UUID ownerId) { + super(ownerId, 89, "Shrieking Specter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{B}"); + this.expansionSetCode = "S99"; + this.subtype.add("Specter"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Shrieking Specter attacks, defending player discards a card. + this.addAbility(new AttacksTriggeredAbility(new DiscardTargetEffect(1), false, "Whenever {this} attacks, defending player discards a card.", SetTargetPointer.PLAYER)); + } + + public ShriekingSpecter(final ShriekingSpecter card) { + super(card); + } + + @Override + public ShriekingSpecter copy() { + return new ShriekingSpecter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/Steadfastness.java b/Mage.Sets/src/mage/sets/starter1999/Steadfastness.java new file mode 100644 index 00000000000..8770120e836 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/Steadfastness.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.sets.starter1999; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Steadfastness extends CardImpl { + + public Steadfastness(UUID ownerId) { + super(ownerId, 27, "Steadfastness", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{W}"); + this.expansionSetCode = "S99"; + + // Creatures you control get +0/+3 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(0, 3, Duration.EndOfTurn)); + } + + public Steadfastness(final Steadfastness card) { + super(card); + } + + @Override + public Steadfastness copy() { + return new Steadfastness(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/StreamOfAcid.java b/Mage.Sets/src/mage/sets/starter1999/StreamOfAcid.java new file mode 100644 index 00000000000..24608a61646 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/StreamOfAcid.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.sets.starter1999; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class StreamOfAcid extends CardImpl { + + public static final FilterPermanent filter = new FilterPermanent("land or nonblack creature"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.LAND), + Predicates.and( + Predicates.not(new ColorPredicate(ObjectColor.BLACK)), + new CardTypePredicate(CardType.CREATURE)))); + } + + public StreamOfAcid(UUID ownerId) { + super(ownerId, 91, "Stream of Acid", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + this.expansionSetCode = "S99"; + + // Destroy target land or nonblack creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public StreamOfAcid(final StreamOfAcid card) { + super(card); + } + + @Override + public StreamOfAcid copy() { + return new StreamOfAcid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/SylvanYeti.java b/Mage.Sets/src/mage/sets/starter1999/SylvanYeti.java new file mode 100644 index 00000000000..501a0dbc171 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/SylvanYeti.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.sets.starter1999; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class SylvanYeti extends CardImpl { + + public SylvanYeti(UUID ownerId) { + super(ownerId, 146, "Sylvan Yeti", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "S99"; + this.subtype.add("Yeti"); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Sylvan Yeti's power is equal to the number of cards in your hand. + Effect effect = new SetPowerSourceEffect(new CardsInControllerHandCount(), Duration.EndOfGame); + this.addAbility(new SimpleStaticAbility(Zone.ALL, effect)); + } + + public SylvanYeti(final SylvanYeti card) { + super(card); + } + + @Override + public SylvanYeti copy() { + return new SylvanYeti(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/TouchOfBrilliance.java b/Mage.Sets/src/mage/sets/starter1999/TouchOfBrilliance.java new file mode 100644 index 00000000000..03234776a57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/TouchOfBrilliance.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.sets.starter1999; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class TouchOfBrilliance extends mage.sets.portalsecondage.TouchOfBrilliance { + + public TouchOfBrilliance(UUID ownerId) { + super(ownerId); + this.cardNumber = 57; + this.expansionSetCode = "S99"; + } + + public TouchOfBrilliance(final TouchOfBrilliance card) { + super(card); + } + + @Override + public TouchOfBrilliance copy() { + return new TouchOfBrilliance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Conviction.java b/Mage.Sets/src/mage/sets/stronghold/Conviction.java index 4cb431c4808..fe1d2a67de2 100644 --- a/Mage.Sets/src/mage/sets/stronghold/Conviction.java +++ b/Mage.Sets/src/mage/sets/stronghold/Conviction.java @@ -62,12 +62,12 @@ public class Conviction extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Enchanted creature gets +1/+3. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 3, Duration.WhileOnBattlefield))); - + // {W}: Return Conviction to its owner's hand. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("U"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("W"))); } public Conviction(final Conviction card) { diff --git a/Mage.Sets/src/mage/sets/stronghold/LancersEnKor.java b/Mage.Sets/src/mage/sets/stronghold/LancersEnKor.java new file mode 100644 index 00000000000..45b9ceefb42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/LancersEnKor.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.sets.stronghold; + +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.RedirectDamageFromSourceToTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class LancersEnKor extends CardImpl { + + public LancersEnKor(UUID ownerId) { + super(ownerId, 108, "Lancers en-Kor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "STH"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // {0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0)); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public LancersEnKor(final LancersEnKor card) { + super(card); + } + + @Override + public LancersEnKor copy() { + return new LancersEnKor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/PursuitOfKnowledge.java b/Mage.Sets/src/mage/sets/stronghold/PursuitOfKnowledge.java new file mode 100644 index 00000000000..4a8c05ed398 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/PursuitOfKnowledge.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.sets.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author LoneFox + */ +public class PursuitOfKnowledge extends CardImpl { + + public PursuitOfKnowledge(UUID ownerId) { + super(ownerId, 110, "Pursuit of Knowledge", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + this.expansionSetCode = "STH"; + + // If you would draw a card, you may put a study counter on Pursuit of Knowledge instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PursuitOfKnowledgeEffect())); + // Remove three study counters from Pursuit of Knowledge, Sacrifice Pursuit of Knowledge: Draw seven cards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(7), + new RemoveCountersSourceCost(CounterType.STUDY.createInstance(3))); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public PursuitOfKnowledge(final PursuitOfKnowledge card) { + super(card); + } + + @Override + public PursuitOfKnowledge copy() { + return new PursuitOfKnowledge(this); + } +} + +class PursuitOfKnowledgeEffect extends ReplacementEffectImpl { + + public PursuitOfKnowledgeEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "If you would draw a card, you may put a study counter on {this} instead"; + } + + public PursuitOfKnowledgeEffect(final PursuitOfKnowledgeEffect effect) { + super(effect); + } + + @Override + public PursuitOfKnowledgeEffect copy() { + return new PursuitOfKnowledgeEffect(this); + } + + @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 event.getPlayerId().equals(source.getControllerId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(event.getPlayerId()); + if(controller != null) { + if(controller.chooseUse(Outcome.Benefit, "Add a study counter instead of drawing a card?", source, game)) { + new AddCountersSourceEffect(CounterType.STUDY.createInstance()).apply(game, source); + return true; + } + } + return false; + } +} + diff --git a/Mage.Sets/src/mage/sets/stronghold/ReinsOfPower.java b/Mage.Sets/src/mage/sets/stronghold/ReinsOfPower.java new file mode 100644 index 00000000000..98c5bcd4548 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/ReinsOfPower.java @@ -0,0 +1,133 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.stronghold; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.UntapAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author emerald000 + */ +public class ReinsOfPower extends CardImpl { + + public ReinsOfPower(UUID ownerId) { + super(ownerId, 41, "Reins of Power", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); + this.expansionSetCode = "STH"; + + // Untap all creatures you control and all creatures target opponent controls. You and that opponent each gain control of all creatures the other controls until end of turn. Those creatures gain haste until end of turn. + this.getSpellAbility().addEffect(new ReinsOfPowerEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public ReinsOfPower(final ReinsOfPower card) { + super(card); + } + + @Override + public ReinsOfPower copy() { + return new ReinsOfPower(this); + } +} + +class ReinsOfPowerEffect extends OneShotEffect { + + ReinsOfPowerEffect() { + super(Outcome.Benefit); + this.staticText = "Untap all creatures you control and all creatures target opponent controls. You and that opponent each gain control of all creatures the other controls until end of turn. Those creatures gain haste until end of turn"; + } + + ReinsOfPowerEffect(final ReinsOfPowerEffect effect) { + super(effect); + } + + @Override + public ReinsOfPowerEffect copy() { + return new ReinsOfPowerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID opponentId = this.getTargetPointer().getFirst(game, source); + if (opponentId != null) { + // Untap all creatures you control and all creatures target opponent controls. + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(Predicates.or(new ControllerIdPredicate(source.getControllerId()), new ControllerIdPredicate(opponentId))); + new UntapAllEffect(filter).apply(game, source); + + // You and that opponent each gain control of all creatures the other controls until end of turn. + Set yourCreatures = new HashSet<>(); + Set opponentCreatures = new HashSet<>(); + for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) { + yourCreatures.add(permanent.getId()); + } + FilterCreaturePermanent filterOpponent = new FilterCreaturePermanent(); + filterOpponent.add(new ControllerIdPredicate(opponentId)); + for (Permanent permanent : game.getBattlefield().getActivePermanents(filterOpponent, source.getControllerId(), source.getSourceId(), game)) { + opponentCreatures.add(permanent.getId()); + } + for (UUID creatureId : yourCreatures) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn, opponentId); + effect.setTargetPointer(new FixedTarget(creatureId)); + game.addEffect(effect, source); + } + for (UUID creatureId : opponentCreatures) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(creatureId)); + game.addEffect(effect, source); + } + + // Those creatures gain haste until end of turn. + game.addEffect(new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, filter), source); + + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/ShiftingWall.java b/Mage.Sets/src/mage/sets/stronghold/ShiftingWall.java new file mode 100644 index 00000000000..ec925d98134 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/ShiftingWall.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.sets.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class ShiftingWall extends CardImpl { + + public ShiftingWall(UUID ownerId) { + super(ownerId, 134, "Shifting Wall", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{X}"); + this.expansionSetCode = "STH"; + this.subtype.add("Wall"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Shifting Wall enters the battlefield with X +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); + } + + public ShiftingWall(final ShiftingWall card) { + super(card); + } + + @Override + public ShiftingWall copy() { + return new ShiftingWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/CityOfBrass.java b/Mage.Sets/src/mage/sets/superseries/CityOfBrass.java new file mode 100644 index 00000000000..ced5d77a579 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/CityOfBrass.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CityOfBrass extends mage.sets.seventhedition.CityOfBrass { + + public CityOfBrass(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public CityOfBrass(final CityOfBrass card) { + super(card); + } + + @Override + public CityOfBrass copy() { + return new CityOfBrass(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/Crusade.java b/Mage.Sets/src/mage/sets/superseries/Crusade.java new file mode 100644 index 00000000000..30e87f600d2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/Crusade.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Crusade extends mage.sets.elspethvstezzeret.Crusade { + + public Crusade(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public Crusade(final Crusade card) { + super(card); + } + + @Override + public Crusade copy() { + return new Crusade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ElvishChampion1.java b/Mage.Sets/src/mage/sets/superseries/ElvishChampion1.java new file mode 100644 index 00000000000..0bcd650b008 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ElvishChampion1.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ElvishChampion1 extends mage.sets.tenthedition.ElvishChampion { + + public ElvishChampion1(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public ElvishChampion1(final ElvishChampion1 card) { + super(card); + } + + @Override + public ElvishChampion1 copy() { + return new ElvishChampion1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ElvishChampion2.java b/Mage.Sets/src/mage/sets/superseries/ElvishChampion2.java new file mode 100644 index 00000000000..b90878c4c20 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ElvishChampion2.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ElvishChampion2 extends mage.sets.tenthedition.ElvishChampion { + + public ElvishChampion2(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public ElvishChampion2(final ElvishChampion2 card) { + super(card); + } + + @Override + public ElvishChampion2 copy() { + return new ElvishChampion2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ElvishChampion3.java b/Mage.Sets/src/mage/sets/superseries/ElvishChampion3.java new file mode 100644 index 00000000000..7fe8f0650c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ElvishChampion3.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ElvishChampion3 extends mage.sets.tenthedition.ElvishChampion { + + public ElvishChampion3(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public ElvishChampion3(final ElvishChampion3 card) { + super(card); + } + + @Override + public ElvishChampion3 copy() { + return new ElvishChampion3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ElvishLyrist.java b/Mage.Sets/src/mage/sets/superseries/ElvishLyrist.java new file mode 100644 index 00000000000..3f9aaffbc0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ElvishLyrist.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ElvishLyrist extends mage.sets.urzassaga.ElvishLyrist { + + public ElvishLyrist(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "SUS"; + } + + public ElvishLyrist(final ElvishLyrist card) { + super(card); + } + + @Override + public ElvishLyrist copy() { + return new ElvishLyrist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/GiantGrowth.java b/Mage.Sets/src/mage/sets/superseries/GiantGrowth.java new file mode 100644 index 00000000000..39bfb7bc15f --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/GiantGrowth.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GiantGrowth extends mage.sets.tenthedition.GiantGrowth { + + public GiantGrowth(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "SUS"; + } + + public GiantGrowth(final GiantGrowth card) { + super(card); + } + + @Override + public GiantGrowth copy() { + return new GiantGrowth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/GloriousAnthem1.java b/Mage.Sets/src/mage/sets/superseries/GloriousAnthem1.java new file mode 100644 index 00000000000..3a7bf0a125d --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/GloriousAnthem1.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class GloriousAnthem1 extends mage.sets.tenthedition.GloriousAnthem { + + public GloriousAnthem1(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public GloriousAnthem1(final GloriousAnthem1 card) { + super(card); + } + + @Override + public GloriousAnthem1 copy() { + return new GloriousAnthem1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/GloriousAnthem2.java b/Mage.Sets/src/mage/sets/superseries/GloriousAnthem2.java new file mode 100644 index 00000000000..82242c60556 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/GloriousAnthem2.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class GloriousAnthem2 extends mage.sets.tenthedition.GloriousAnthem { + + public GloriousAnthem2(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public GloriousAnthem2(final GloriousAnthem2 card) { + super(card); + } + + @Override + public GloriousAnthem2 copy() { + return new GloriousAnthem2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/GloriousAnthem3.java b/Mage.Sets/src/mage/sets/superseries/GloriousAnthem3.java new file mode 100644 index 00000000000..88fad1fb1c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/GloriousAnthem3.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class GloriousAnthem3 extends mage.sets.tenthedition.GloriousAnthem { + + public GloriousAnthem3(UUID ownerId) { + super(ownerId); + this.cardNumber = 31; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public GloriousAnthem3(final GloriousAnthem3 card) { + super(card); + } + + @Override + public GloriousAnthem3 copy() { + return new GloriousAnthem3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/LordOfAtlantis.java b/Mage.Sets/src/mage/sets/superseries/LordOfAtlantis.java new file mode 100644 index 00000000000..b860394e15a --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/LordOfAtlantis.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class LordOfAtlantis extends mage.sets.fifthedition.LordOfAtlantis { + + public LordOfAtlantis(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public LordOfAtlantis(final LordOfAtlantis card) { + super(card); + } + + @Override + public LordOfAtlantis copy() { + return new LordOfAtlantis(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/MadAuntie.java b/Mage.Sets/src/mage/sets/superseries/MadAuntie.java new file mode 100644 index 00000000000..72cd1633661 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/MadAuntie.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MadAuntie extends mage.sets.lorwyn.MadAuntie { + + public MadAuntie(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public MadAuntie(final MadAuntie card) { + super(card); + } + + @Override + public MadAuntie copy() { + return new MadAuntie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/RoyalAssassin.java b/Mage.Sets/src/mage/sets/superseries/RoyalAssassin.java new file mode 100644 index 00000000000..2a39f4b1467 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/RoyalAssassin.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class RoyalAssassin extends mage.sets.tenthedition.RoyalAssassin { + + public RoyalAssassin(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public RoyalAssassin(final RoyalAssassin card) { + super(card); + } + + @Override + public RoyalAssassin copy() { + return new RoyalAssassin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder1.java b/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder1.java new file mode 100644 index 00000000000..f8986e1b405 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder1.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SakuraTribeElder1 extends mage.sets.championsofkamigawa.SakuraTribeElder { + + public SakuraTribeElder1(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "SUS"; + } + + public SakuraTribeElder1(final SakuraTribeElder1 card) { + super(card); + } + + @Override + public SakuraTribeElder1 copy() { + return new SakuraTribeElder1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder2.java b/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder2.java new file mode 100644 index 00000000000..51ab9b3bd07 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder2.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SakuraTribeElder2 extends mage.sets.championsofkamigawa.SakuraTribeElder { + + public SakuraTribeElder2(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "SUS"; + } + + public SakuraTribeElder2(final SakuraTribeElder2 card) { + super(card); + } + + @Override + public SakuraTribeElder2 copy() { + return new SakuraTribeElder2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder3.java b/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder3.java new file mode 100644 index 00000000000..0606ed31bbb --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SakuraTribeElder3.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SakuraTribeElder3 extends mage.sets.championsofkamigawa.SakuraTribeElder { + + public SakuraTribeElder3(UUID ownerId) { + super(ownerId); + this.cardNumber = 27; + this.expansionSetCode = "SUS"; + } + + public SakuraTribeElder3(final SakuraTribeElder3 card) { + super(card); + } + + @Override + public SakuraTribeElder3 copy() { + return new SakuraTribeElder3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SerraAvatar.java b/Mage.Sets/src/mage/sets/superseries/SerraAvatar.java new file mode 100644 index 00000000000..83c644c68f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SerraAvatar.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SerraAvatar extends mage.sets.urzassaga.SerraAvatar { + + public SerraAvatar(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public SerraAvatar(final SerraAvatar card) { + super(card); + } + + @Override + public SerraAvatar copy() { + return new SerraAvatar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ShardPhoenix1.java b/Mage.Sets/src/mage/sets/superseries/ShardPhoenix1.java new file mode 100644 index 00000000000..e96cac62bce --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ShardPhoenix1.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ShardPhoenix1 extends mage.sets.tempestremastered.ShardPhoenix { + + public ShardPhoenix1(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public ShardPhoenix1(final ShardPhoenix1 card) { + super(card); + } + + @Override + public ShardPhoenix1 copy() { + return new ShardPhoenix1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ShardPhoenix2.java b/Mage.Sets/src/mage/sets/superseries/ShardPhoenix2.java new file mode 100644 index 00000000000..3ba9f6b1bc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ShardPhoenix2.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ShardPhoenix2 extends mage.sets.tempestremastered.ShardPhoenix { + + public ShardPhoenix2(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public ShardPhoenix2(final ShardPhoenix2 card) { + super(card); + } + + @Override + public ShardPhoenix2 copy() { + return new ShardPhoenix2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ShardPhoenix3.java b/Mage.Sets/src/mage/sets/superseries/ShardPhoenix3.java new file mode 100644 index 00000000000..40b3e66901d --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ShardPhoenix3.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ShardPhoenix3 extends mage.sets.tempestremastered.ShardPhoenix { + + public ShardPhoenix3(UUID ownerId) { + super(ownerId); + this.cardNumber = 28; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public ShardPhoenix3(final ShardPhoenix3 card) { + super(card); + } + + @Override + public ShardPhoenix3 copy() { + return new ShardPhoenix3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SlithFirewalker.java b/Mage.Sets/src/mage/sets/superseries/SlithFirewalker.java new file mode 100644 index 00000000000..8d498ebbd00 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SlithFirewalker.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SlithFirewalker extends mage.sets.mirrodin.SlithFirewalker { + + public SlithFirewalker(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public SlithFirewalker(final SlithFirewalker card) { + super(card); + } + + @Override + public SlithFirewalker copy() { + return new SlithFirewalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SoltariPriest1.java b/Mage.Sets/src/mage/sets/superseries/SoltariPriest1.java new file mode 100644 index 00000000000..5242d4dc76f --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SoltariPriest1.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SoltariPriest1 extends mage.sets.tempest.SoltariPriest { + + public SoltariPriest1(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public SoltariPriest1(final SoltariPriest1 card) { + super(card); + } + + @Override + public SoltariPriest1 copy() { + return new SoltariPriest1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SoltariPriest2.java b/Mage.Sets/src/mage/sets/superseries/SoltariPriest2.java new file mode 100644 index 00000000000..0993e89dff4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SoltariPriest2.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SoltariPriest2 extends mage.sets.tempest.SoltariPriest { + + public SoltariPriest2(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public SoltariPriest2(final SoltariPriest2 card) { + super(card); + } + + @Override + public SoltariPriest2 copy() { + return new SoltariPriest2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/SoltariPriest3.java b/Mage.Sets/src/mage/sets/superseries/SoltariPriest3.java new file mode 100644 index 00000000000..096dc6f4979 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/SoltariPriest3.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SoltariPriest3 extends mage.sets.tempest.SoltariPriest { + + public SoltariPriest3(UUID ownerId) { + super(ownerId); + this.cardNumber = 29; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public SoltariPriest3(final SoltariPriest3 card) { + super(card); + } + + @Override + public SoltariPriest3 copy() { + return new SoltariPriest3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/ThranQuarry.java b/Mage.Sets/src/mage/sets/superseries/ThranQuarry.java new file mode 100644 index 00000000000..4524a1c377d --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/ThranQuarry.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ThranQuarry extends mage.sets.urzassaga.ThranQuarry { + + public ThranQuarry(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public ThranQuarry(final ThranQuarry card) { + super(card); + } + + @Override + public ThranQuarry copy() { + return new ThranQuarry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/TwoHeadedDragon.java b/Mage.Sets/src/mage/sets/superseries/TwoHeadedDragon.java new file mode 100644 index 00000000000..0f1950f486f --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/TwoHeadedDragon.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.superseries; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class TwoHeadedDragon extends mage.sets.mercadianmasques.TwoHeadedDragon { + + public TwoHeadedDragon(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "SUS"; + this.rarity = Rarity.SPECIAL; + } + + public TwoHeadedDragon(final TwoHeadedDragon card) { + super(card); + } + + @Override + public TwoHeadedDragon copy() { + return new TwoHeadedDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/VolcanicHammer.java b/Mage.Sets/src/mage/sets/superseries/VolcanicHammer.java new file mode 100644 index 00000000000..8cfba73c23a --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/VolcanicHammer.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VolcanicHammer extends mage.sets.ninthedition.VolcanicHammer { + + public VolcanicHammer(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "SUS"; + } + + public VolcanicHammer(final VolcanicHammer card) { + super(card); + } + + @Override + public VolcanicHammer copy() { + return new VolcanicHammer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/WhirlingDervish1.java b/Mage.Sets/src/mage/sets/superseries/WhirlingDervish1.java new file mode 100644 index 00000000000..648c0c8e967 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/WhirlingDervish1.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WhirlingDervish1 extends mage.sets.timeshifted.WhirlingDervish { + + public WhirlingDervish1(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "SUS"; + } + + public WhirlingDervish1(final WhirlingDervish1 card) { + super(card); + } + + @Override + public WhirlingDervish1 copy() { + return new WhirlingDervish1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/WhirlingDervish2.java b/Mage.Sets/src/mage/sets/superseries/WhirlingDervish2.java new file mode 100644 index 00000000000..75d7637e9b2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/WhirlingDervish2.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WhirlingDervish2 extends mage.sets.timeshifted.WhirlingDervish { + + public WhirlingDervish2(UUID ownerId) { + super(ownerId); + this.cardNumber = 24; + this.expansionSetCode = "SUS"; + } + + public WhirlingDervish2(final WhirlingDervish2 card) { + super(card); + } + + @Override + public WhirlingDervish2 copy() { + return new WhirlingDervish2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/superseries/WhirlingDervish3.java b/Mage.Sets/src/mage/sets/superseries/WhirlingDervish3.java new file mode 100644 index 00000000000..f2155e47d21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/superseries/WhirlingDervish3.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.sets.superseries; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WhirlingDervish3 extends mage.sets.timeshifted.WhirlingDervish { + + public WhirlingDervish3(UUID ownerId) { + super(ownerId); + this.cardNumber = 30; + this.expansionSetCode = "SUS"; + } + + public WhirlingDervish3(final WhirlingDervish3 card) { + super(card); + } + + @Override + public WhirlingDervish3 copy() { + return new WhirlingDervish3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ApesOfRath.java b/Mage.Sets/src/mage/sets/tempest/ApesOfRath.java new file mode 100644 index 00000000000..9716244bdb9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/ApesOfRath.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.sets.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ApesOfRath extends CardImpl { + + public ApesOfRath(UUID ownerId) { + super(ownerId, 108, "Apes of Rath", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Ape"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Whenever Apes of Rath attacks, it doesn't untap during its controller's next untap step. + this.addAbility(new AttacksTriggeredAbility(new DontUntapInControllersNextUntapStepSourceEffect(), false)); + } + + public ApesOfRath(final ApesOfRath card) { + super(card); + } + + @Override + public ApesOfRath copy() { + return new ApesOfRath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/BloodFrenzy.java b/Mage.Sets/src/mage/sets/tempest/BloodFrenzy.java new file mode 100644 index 00000000000..14096501176 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/BloodFrenzy.java @@ -0,0 +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.sets.tempest; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.DestroyTargetAtBeginningOfNextEndStepEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.TurnPhase; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetAttackingOrBlockingCreature; + +/** + * + * @author LoneFox + */ +public class BloodFrenzy extends CardImpl { + + public BloodFrenzy(UUID ownerId) { + super(ownerId, 164, "Blood Frenzy", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "TMP"; + + // Cast Blood Frenzy only before the combat damage step. + Ability ability = new SimpleStaticAbility(Zone.ALL, new BloodFrenzyCastRestriction()); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Target attacking or blocking creature gets +4/+0 until end of turn. Destroy that creature at the beginning of the next end step. + this.getSpellAbility().addEffect(new BoostTargetEffect(4, 0, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new DestroyTargetAtBeginningOfNextEndStepEffect()); + this.getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature()); + } + + public BloodFrenzy(final BloodFrenzy card) { + super(card); + } + + @Override + public BloodFrenzy copy() { + return new BloodFrenzy(this); + } +} + + +class BloodFrenzyCastRestriction extends ContinuousRuleModifyingEffectImpl { + + BloodFrenzyCastRestriction() { + super(Duration.EndOfGame, Outcome.Detriment); + staticText = "Cast {this} only before the combat damage step"; + } + + BloodFrenzyCastRestriction(final BloodFrenzyCastRestriction effect) { + super(effect); + } + + @Override + public BloodFrenzyCastRestriction copy() { + return new BloodFrenzyCastRestriction(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType().equals(GameEvent.EventType.CAST_SPELL); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if(event.getSourceId().equals(source.getSourceId())) { + if(game.getPhase().getType().equals(TurnPhase.COMBAT) + // There cannot be a legal target before declare attackers, + // so in practice it is limited to these two steps. + && (game.getStep().getType().equals(PhaseStep.DECLARE_ATTACKERS) + || game.getStep().getType().equals(PhaseStep.DECLARE_BLOCKERS))) { + return false; + } + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/BloodPet.java b/Mage.Sets/src/mage/sets/tempest/BloodPet.java index 1f851fb6012..0b9475baace 100644 --- a/Mage.Sets/src/mage/sets/tempest/BloodPet.java +++ b/Mage.Sets/src/mage/sets/tempest/BloodPet.java @@ -53,7 +53,7 @@ public class BloodPet extends CardImpl { this.toughness = new MageInt(1); // Sacrifice Blood Pet: Add {B} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new SacrificeSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new SacrificeSourceCost())); } public BloodPet(final BloodPet card) { diff --git a/Mage.Sets/src/mage/sets/tempest/CanyonDrake.java b/Mage.Sets/src/mage/sets/tempest/CanyonDrake.java new file mode 100644 index 00000000000..8cdbe60df54 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/CanyonDrake.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.sets.tempest; + +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.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class CanyonDrake extends CardImpl { + + public CanyonDrake(UUID ownerId) { + super(ownerId, 166, "Canyon Drake", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Drake"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {1}, Discard a card at random: Canyon Drake gets +2/+0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}")); + ability.addCost(new DiscardCardCost(true)); + this.addAbility(ability); + } + + public CanyonDrake(final CanyonDrake card) { + super(card); + } + + @Override + public CanyonDrake copy() { + return new CanyonDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ChaoticGoo.java b/Mage.Sets/src/mage/sets/tempest/ChaoticGoo.java new file mode 100644 index 00000000000..422687e5e08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/ChaoticGoo.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.sets.tempest; + +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.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class ChaoticGoo extends CardImpl { + + public ChaoticGoo(UUID ownerId) { + super(ownerId, 168, "Chaotic Goo", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Ooze"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Chaotic Goo enters the battlefield with three +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), + "{this} enters the battlefield with three +1/+1 counters on it")); + + // At the beginning of your upkeep, you may flip a coin. If you win the flip, put a +1/+1 counter on Chaotic Goo. If you lose the flip, remove a +1/+1 counter from Chaotic Goo. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ChaoticGooEffect(), TargetController.YOU, true)); + } + + public ChaoticGoo(final ChaoticGoo card) { + super(card); + } + + @Override + public ChaoticGoo copy() { + return new ChaoticGoo(this); + } +} + +class ChaoticGooEffect extends OneShotEffect { + + public ChaoticGooEffect() { + super(Outcome.Damage); + staticText = "flip a coin. If you win the flip, put a +1/+1 counter on {this}. If you lose the flip, remove a +1/+1 counter from {this}"; + } + + public ChaoticGooEffect(ChaoticGooEffect 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) { + if (controller.flipCoin(game)) { + game.informPlayers("Chaotic Goo: Won flip. Put a +1/+1 counter on Chaotic Goo."); + new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)).apply(game, source); + return true; + } else { + game.informPlayers("Chaotic Goo: Lost flip. Remove a +1/+1 counter on Chaotic Goo."); + new RemoveCounterSourceEffect(CounterType.P1P1.createInstance(1)).apply(game, source); + return true; + } + } + return false; + } + + @Override + public ChaoticGooEffect copy() { + return new ChaoticGooEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/Dracoplasm.java b/Mage.Sets/src/mage/sets/tempest/Dracoplasm.java index 8776797ba03..914dd47cd6d 100644 --- a/Mage.Sets/src/mage/sets/tempest/Dracoplasm.java +++ b/Mage.Sets/src/mage/sets/tempest/Dracoplasm.java @@ -44,6 +44,7 @@ import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -141,7 +142,7 @@ class DracoplasmEffect extends ReplacementEffectImpl { toughness += targetCreature.getToughness().getValue(); } } - ContinuousEffect effect = new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom); + ContinuousEffect effect = new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b); game.addEffect(effect, source); } } diff --git a/Mage.Sets/src/mage/sets/tempest/DreamCache.java b/Mage.Sets/src/mage/sets/tempest/DreamCache.java index 6d223175be0..0aa934b4bf7 100644 --- a/Mage.Sets/src/mage/sets/tempest/DreamCache.java +++ b/Mage.Sets/src/mage/sets/tempest/DreamCache.java @@ -30,12 +30,13 @@ package mage.sets.tempest; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; +import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInHand; @@ -50,7 +51,6 @@ public class DreamCache extends CardImpl { super(ownerId, 59, "Dream Cache", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); this.expansionSetCode = "TMP"; - // Draw three cards, then put two cards from your hand both on top of your library or both on the bottom of your library. this.getSpellAbility().addEffect(new DreamCacheEffect()); } @@ -71,7 +71,7 @@ class DreamCacheEffect extends OneShotEffect { super(Outcome.DrawCard); this.staticText = "Draw three cards, then put two cards from your hand both on top of your library or both on the bottom of your library."; } - + public DreamCacheEffect(final DreamCacheEffect effect) { super(effect); } @@ -80,33 +80,26 @@ class DreamCacheEffect extends OneShotEffect { public DreamCacheEffect copy() { return new DreamCacheEffect(this); } - + @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.drawCards(3, game); - - boolean putOnTop = player.chooseUse(Outcome.Neutral, "Put cards on top?", source, game); - putInLibrary(player, source, game, putOnTop); - putInLibrary(player, source, game, putOnTop); - + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.drawCards(3, game); + boolean putOnTop = controller.chooseUse(Outcome.Neutral, "Put cards on top?", source, game); + TargetCardInHand target = new TargetCardInHand(2, 2, new FilterCard()); + controller.chooseTarget(Outcome.Detriment, target, source, game); + Cards cardsToLibrary = new CardsImpl(target.getTargets()); + if (!cardsToLibrary.isEmpty()) { + if (putOnTop) { + controller.putCardsOnTopOfLibrary(cardsToLibrary, game, source, false); + } else { + controller.putCardsOnBottomOfLibrary(cardsToLibrary, game, source, false); + } + } return true; } return false; } - - private boolean putInLibrary(Player player, Ability source, Game game, boolean putOnTop) { - if (player.getHand().size() > 0) { - TargetCardInHand target = new TargetCardInHand(); - player.chooseTarget(Outcome.Detriment, target, source, game); - Card card = player.getHand().get(target.getFirstTarget(), game); - if (card != null) { - player.getHand().remove(card); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, putOnTop); - return true; - } - } - return false; - } + } diff --git a/Mage.Sets/src/mage/sets/tempest/EladamrisVineyard.java b/Mage.Sets/src/mage/sets/tempest/EladamrisVineyard.java index 1ce24ec645d..0c6d10bee11 100644 --- a/Mage.Sets/src/mage/sets/tempest/EladamrisVineyard.java +++ b/Mage.Sets/src/mage/sets/tempest/EladamrisVineyard.java @@ -28,7 +28,8 @@ package mage.sets.tempest; import java.util.UUID; -import static mage.Mana.GreenMana; + +import mage.Mana; import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility; import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; import mage.cards.CardImpl; @@ -50,7 +51,7 @@ public class EladamrisVineyard extends CardImpl { // At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool. this.addAbility(new BeginningOfPreCombatMainTriggeredAbility( - Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(GreenMana(2), "that player's"), TargetController.ANY, false, true)); + Zone.BATTLEFIELD, new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(2), "that player's"), TargetController.ANY, false, true)); } public EladamrisVineyard(final EladamrisVineyard card) { diff --git a/Mage.Sets/src/mage/sets/tempest/EndlessScream.java b/Mage.Sets/src/mage/sets/tempest/EndlessScream.java new file mode 100644 index 00000000000..0b9e96f4228 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/EndlessScream.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.sets.tempest; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class EndlessScream extends CardImpl { + + public EndlessScream(UUID ownerId) { + super(ownerId, 26, "Endless Scream", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{X}{B}"); + this.expansionSetCode = "TMP"; + 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); + // Endless Scream enters the battlefield with X scream counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.SCREAM.createInstance()))); + // Enchanted creature gets +1/+0 for each scream counter on Endless Scream. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(new CountersCount(CounterType.SCREAM), new StaticValue(0), Duration.WhileOnBattlefield))); + } + + public EndlessScream(final EndlessScream card) { + super(card); + } + + @Override + public EndlessScream copy() { + return new EndlessScream(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/FlowstoneSalamander.java b/Mage.Sets/src/mage/sets/tempest/FlowstoneSalamander.java new file mode 100644 index 00000000000..15ffce46037 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/FlowstoneSalamander.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.sets.tempest; + +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.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class FlowstoneSalamander extends CardImpl { + + public FlowstoneSalamander(UUID ownerId) { + super(ownerId, 175, "Flowstone Salamander", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Salamander"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // {R}: Flowstone Salamander deals 1 damage to target creature blocking it. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R")); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking it"); + filter.add(new BlockingAttackerIdPredicate(this.getId())); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public FlowstoneSalamander(final FlowstoneSalamander card) { + super(card); + } + + @Override + public FlowstoneSalamander copy() { + return new FlowstoneSalamander(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/FlowstoneSculpture.java b/Mage.Sets/src/mage/sets/tempest/FlowstoneSculpture.java new file mode 100644 index 00000000000..cc468438c4d --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/FlowstoneSculpture.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.sets.tempest; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class FlowstoneSculpture extends mage.sets.vintagemasters.FlowstoneSculpture { + + public FlowstoneSculpture(UUID ownerId) { + super(ownerId); + this.cardNumber = 278; + this.expansionSetCode = "TMP"; + } + + public FlowstoneSculpture(final FlowstoneSculpture card) { + super(card); + } + + @Override + public FlowstoneSculpture copy() { + return new FlowstoneSculpture(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/FoolsTome.java b/Mage.Sets/src/mage/sets/tempest/FoolsTome.java new file mode 100644 index 00000000000..0e242c64b75 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/FoolsTome.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.sets.tempest; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.HellbentCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class FoolsTome extends CardImpl { + + public FoolsTome(UUID ownerId) { + super(ownerId, 279, "Fool's Tome", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "TMP"; + + // {2}, {tap}: Draw a card. Activate this ability only if you have no cards in hand. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), + new ManaCostsImpl("{2}"), HellbentCondition.getInstance()); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public FoolsTome(final FoolsTome card) { + super(card); + } + + @Override + public FoolsTome copy() { + return new FoolsTome(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/Fylamarid.java b/Mage.Sets/src/mage/sets/tempest/Fylamarid.java new file mode 100644 index 00000000000..38c20f6172a --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/Fylamarid.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.sets.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Fylamarid extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public Fylamarid(UUID ownerId) { + super(ownerId, 64, "Fylamarid", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Squid"); + this.subtype.add("Beast"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Fylamarid can't be blocked by blue creatures. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + // {U}: Target creature becomes blue until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorTargetEffect(ObjectColor.BLUE, + Duration.EndOfTurn), new ManaCostsImpl("{U}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Fylamarid(final Fylamarid card) { + super(card); + } + + @Override + public Fylamarid copy() { + return new Fylamarid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/Havoc.java b/Mage.Sets/src/mage/sets/tempest/Havoc.java new file mode 100644 index 00000000000..9fa6a6ae8ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/Havoc.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.sets.tempest; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class Havoc extends CardImpl { + + private final static FilterSpell filter = new FilterSpell("a white spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public Havoc(UUID ownerId) { + super(ownerId, 181, "Havoc", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "TMP"; + + // Whenever an opponent casts a white spell, he or she loses 2 life. + Effect effect = new LoseLifeTargetEffect(2); + effect.setText("he or she loses 2 life"); + this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false, SetTargetPointer.PLAYER)); + } + + public Havoc(final Havoc card) { + super(card); + } + + @Override + public Havoc copy() { + return new Havoc(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ImpsTaunt.java b/Mage.Sets/src/mage/sets/tempest/ImpsTaunt.java new file mode 100644 index 00000000000..19e76245e1e --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/ImpsTaunt.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.sets.tempest; + +import java.util.UUID; +import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ImpsTaunt extends CardImpl { + + public ImpsTaunt(UUID ownerId) { + super(ownerId, 32, "Imps' Taunt", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "TMP"; + + // Buyback {3} + this.addAbility(new BuybackAbility("{3}")); + // Target creature attacks this turn if able. + this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ImpsTaunt(final ImpsTaunt card) { + super(card); + } + + @Override + public ImpsTaunt copy() { + return new ImpsTaunt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java b/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java index 902a7442732..88294061de6 100644 --- a/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java +++ b/Mage.Sets/src/mage/sets/tempest/LegacysAllure.java @@ -54,6 +54,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class LegacysAllure extends CardImpl { + private final UUID originalId; + public LegacysAllure(UUID ownerId) { super(ownerId, 71, "Legacy's Allure", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); this.expansionSetCode = "TMP"; @@ -62,18 +64,20 @@ public class LegacysAllure extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(new Counter("treasure")), 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 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(); this.addAbility(ability); } public LegacysAllure(final LegacysAllure card) { super(card); + this.originalId = card.originalId; } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { + if (ability.getOriginalId().equals(originalId)) { Permanent sourcePermanent = game.getPermanent(ability.getSourceId()); if (sourcePermanent != null) { int numbCounters = sourcePermanent.getCounters().getCount("treasure"); diff --git a/Mage.Sets/src/mage/sets/tempest/MoggCannon.java b/Mage.Sets/src/mage/sets/tempest/MoggCannon.java new file mode 100644 index 00000000000..45a20e8f8f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/MoggCannon.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.sets.tempest; + +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.DestroyTargetAtBeginningOfNextEndStepEffect; +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class MoggCannon extends CardImpl { + + public MoggCannon(UUID ownerId) { + super(ownerId, 288, "Mogg Cannon", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "TMP"; + + // {tap}: Target creature you control gets +1/+0 and gains flying until end of turn. Destroy that creature at the beginning of the next end step. + Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn); + effect.setText("target 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 DestroyTargetAtBeginningOfNextEndStepEffect()); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public MoggCannon(final MoggCannon card) { + super(card); + } + + @Override + public MoggCannon copy() { + return new MoggCannon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/PitImp.java b/Mage.Sets/src/mage/sets/tempest/PitImp.java new file mode 100644 index 00000000000..c2ed9d8b2f6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/PitImp.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.sets.tempest; + +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.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class PitImp extends CardImpl { + + public PitImp(UUID ownerId) { + super(ownerId, 42, "Pit Imp", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Imp"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {B}: Pit Imp gets +1/+0 until end of turn. Activate this ability no more than twice each turn. + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0,Duration.EndOfTurn), new ManaCostsImpl("{B}"), 2)); + } + + public PitImp(final PitImp card) { + super(card); + } + + @Override + public PitImp copy() { + return new PitImp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java b/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java index 48386fc4bf3..85d1496ca5c 100644 --- a/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java +++ b/Mage.Sets/src/mage/sets/tempest/SadisticGlee.java @@ -30,13 +30,10 @@ package mage.sets.tempest; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DiesCreatureTriggeredAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; -import mage.constants.AttachmentType; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; @@ -61,11 +58,9 @@ public class SadisticGlee extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Whenever a creature dies, put a +1/+1 counter on enchanted creature. - Effect effect = new GainAbilityAttachedEffect(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), AttachmentType.AURA); - ability.addEffect(effect); - effect.setText("Whenever a creature dies, put a +1/+1 counter on enchanted creature."); + this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersAttachedEffect( + CounterType.P1P1.createInstance(), "enchanted creature"), false)); } public SadisticGlee(final SadisticGlee card) { diff --git a/Mage.Sets/src/mage/sets/tempest/Safeguard.java b/Mage.Sets/src/mage/sets/tempest/Safeguard.java new file mode 100644 index 00000000000..0b8df614879 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/Safeguard.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.sets.tempest; + +import java.util.UUID; +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.PreventDamageByTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Safeguard extends CardImpl { + + public Safeguard(UUID ownerId) { + super(ownerId, 251, "Safeguard", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}"); + this.expansionSetCode = "TMP"; + + // {2}{W}: Prevent all combat damage that would be dealt by target creature this turn. + Effect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, true); + effect.setText("Prevent all combat damage that would be dealt by target creature this turn."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{W}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Safeguard(final Safeguard card) { + super(card); + } + + @Override + public Safeguard copy() { + return new Safeguard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java index db4100fe0e7..6e792063af6 100644 --- a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java +++ b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java @@ -27,7 +27,6 @@ */ package mage.sets.tempest; -import java.util.Set; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; @@ -111,11 +110,7 @@ class ScrollRackEffect extends OneShotEffect { } // Put that many cards from the top of your library into your hand. if (amountExiled > 0) { - Set cards = controller.getLibrary().getTopCards(game, amountExiled); - for (Card card : cards) { - card.setFaceDown(true, game); - } - controller.moveCards(cards, null, Zone.HAND, source, game); + controller.moveCards(controller.getLibrary().getTopCards(game, amountExiled), Zone.HAND, source, game); } // Then look at the exiled cards and put them on top of your library in any order controller.putCardsOnTopOfLibrary(game.getExile().getExileZone(source.getSourceId()), game, source, true); diff --git a/Mage.Sets/src/mage/sets/tempest/SereneOffering.java b/Mage.Sets/src/mage/sets/tempest/SereneOffering.java new file mode 100644 index 00000000000..c0d9c5746b2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/SereneOffering.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.sets.tempest; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.TargetConvertedManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetEnchantmentPermanent; + +/** + * + * @author LoneFox + */ +public class SereneOffering extends CardImpl { + + public SereneOffering(UUID ownerId) { + super(ownerId, 252, "Serene Offering", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "TMP"; + + // Destroy target enchantment. You gain life equal to its converted mana cost. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + Effect effect = new GainLifeEffect(new TargetConvertedManaCost()); + effect.setText("You gain life equal to its converted mana cost"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetEnchantmentPermanent()); + } + + public SereneOffering(final SereneOffering card) { + super(card); + } + + @Override + public SereneOffering copy() { + return new SereneOffering(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/SkyshroudCondor.java b/Mage.Sets/src/mage/sets/tempest/SkyshroudCondor.java new file mode 100644 index 00000000000..79ba487f4d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/SkyshroudCondor.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.sets.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ruleModifying.CastOnlyIfYouHaveCastAnotherSpellEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class SkyshroudCondor extends CardImpl { + + public SkyshroudCondor(UUID ownerId) { + super(ownerId, 88, "Skyshroud Condor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Bird"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Cast Skyshroud Condor only if you've cast another spell this turn. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastOnlyIfYouHaveCastAnotherSpellEffect())); + } + + public SkyshroudCondor(final SkyshroudCondor card) { + super(card); + } + + @Override + public SkyshroudCondor copy() { + return new SkyshroudCondor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/SkyshroudElf.java b/Mage.Sets/src/mage/sets/tempest/SkyshroudElf.java index f715f11300e..3c68fbd5a50 100644 --- a/Mage.Sets/src/mage/sets/tempest/SkyshroudElf.java +++ b/Mage.Sets/src/mage/sets/tempest/SkyshroudElf.java @@ -59,9 +59,9 @@ public class SkyshroudElf extends CardImpl { this.addAbility(new GreenManaAbility()); // {1}: Add {R} or {W} to your mana pool. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new ManaCostsImpl("{1}")); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new ManaCostsImpl("{1}")); this.addAbility(ability); - Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new ManaCostsImpl("{1}")); + Ability ability2 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new ManaCostsImpl("{1}")); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java b/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java index 3fca3587a1e..794c6e82228 100644 --- a/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java +++ b/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java @@ -1,80 +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.sets.tempest; - -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.cards.CardImpl; -import mage.constants.Zone; -import mage.counters.CounterType; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Loki - */ -public class SpikeDrone extends CardImpl { - - public SpikeDrone(UUID ownerId) { - super(ownerId, 152, "Spike Drone", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetCode = "TMP"; - this.subtype.add("Spike"); - this.subtype.add("Drone"); - - this.power = new MageInt(0); - this.toughness = new MageInt(0); - - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), - "{this} enters the battlefield with a +1/+1 counters on it")); - - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(2)); - ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public SpikeDrone(final SpikeDrone card) { - super(card); - } - - @Override - public SpikeDrone copy() { - return new SpikeDrone(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.sets.tempest; + +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.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class SpikeDrone extends CardImpl { + + public SpikeDrone(UUID ownerId) { + super(ownerId, 152, "Spike Drone", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Spike"); + this.subtype.add("Drone"); + + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), + "{this} enters the battlefield with a +1/+1 counters on it")); + + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(2)); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SpikeDrone(final SpikeDrone card) { + super(card); + } + + @Override + public SpikeDrone copy() { + return new SpikeDrone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/WildWurm.java b/Mage.Sets/src/mage/sets/tempest/WildWurm.java new file mode 100644 index 00000000000..36315ca6bd1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/WildWurm.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.sets.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class WildWurm extends CardImpl { + + public WildWurm(UUID ownerId) { + super(ownerId, 212, "Wild Wurm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Wurm"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // When Wild Wurm enters the battlefield, flip a coin. If you lose the flip, return Wild Wurm to its owner's hand. + this.addAbility(new EntersBattlefieldTriggeredAbility(new WildWurmEffect(), false)); + } + + public WildWurm(final WildWurm card) { + super(card); + } + + @Override + public WildWurm copy() { + return new WildWurm(this); + } +} + +class WildWurmEffect extends OneShotEffect { + + public WildWurmEffect() { + super(Outcome.Damage); + staticText = "flip a coin. If you lose the flip, return {this} to its owner's hand"; + } + + public WildWurmEffect(WildWurmEffect 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) { + if (controller.flipCoin(game)) { + return true; + } else { + new ReturnToHandSourceEffect().apply(game, source); + return true; + } + } + return false; + } + + @Override + public WildWurmEffect copy() { + return new WildWurmEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempestremastered/FieldOfSouls.java b/Mage.Sets/src/mage/sets/tempestremastered/FieldOfSouls.java index b74ed27145d..9afdd7e1acd 100644 --- a/Mage.Sets/src/mage/sets/tempestremastered/FieldOfSouls.java +++ b/Mage.Sets/src/mage/sets/tempestremastered/FieldOfSouls.java @@ -57,7 +57,7 @@ public class FieldOfSouls extends CardImpl { this.expansionSetCode = "TPR"; // Whenever a nontoken creature is put into your graveyard from the battlefield, put a 1/1 white Spirit creature token with flying onto the battlefield. - this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken("KTK")), false, filter)); + this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken()), false, filter)); } public FieldOfSouls(final FieldOfSouls card) { diff --git a/Mage.Sets/src/mage/sets/tenthedition/AdarkarWastes.java b/Mage.Sets/src/mage/sets/tenthedition/AdarkarWastes.java index 228735a65a0..3e645729d65 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/AdarkarWastes.java +++ b/Mage.Sets/src/mage/sets/tenthedition/AdarkarWastes.java @@ -51,10 +51,10 @@ public class AdarkarWastes extends CardImpl { this.addAbility(new ColorlessManaAbility()); - Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new TapSourceCost()); + Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new TapSourceCost()); whiteManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(whiteManaAbility); - Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new TapSourceCost()); + Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new TapSourceCost()); blueManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blueManaAbility); } diff --git a/Mage.Sets/src/mage/sets/tenthedition/Brushland.java b/Mage.Sets/src/mage/sets/tenthedition/Brushland.java index 7b54de575ae..d77c0800bd3 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/Brushland.java +++ b/Mage.Sets/src/mage/sets/tenthedition/Brushland.java @@ -50,10 +50,10 @@ public class Brushland extends CardImpl { this.expansionSetCode = "10E"; this.addAbility(new ColorlessManaAbility()); - Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new TapSourceCost()); + Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new TapSourceCost()); greenManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(greenManaAbility); - Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new TapSourceCost()); + Ability whiteManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana(1), new TapSourceCost()); whiteManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(whiteManaAbility); } diff --git a/Mage.Sets/src/mage/sets/tenthedition/DoublingCube.java b/Mage.Sets/src/mage/sets/tenthedition/DoublingCube.java index 86c0ba07ee5..99ea557b4ee 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/DoublingCube.java +++ b/Mage.Sets/src/mage/sets/tenthedition/DoublingCube.java @@ -36,7 +36,6 @@ import mage.abilities.effects.common.ManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; @@ -57,7 +56,7 @@ public class DoublingCube extends CardImpl { Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new DoublingCubeEffect(), new ManaCostsImpl("{3}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); - + } public DoublingCube(final DoublingCube card) { @@ -83,11 +82,11 @@ class DoublingCubeEffect extends ManaEffect { @Override public boolean apply(Game game, Ability source) { - Player you = game.getPlayer(source.getControllerId()); - if (you == null) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { return false; } - ManaPool pool = you.getManaPool(); + ManaPool pool = controller.getManaPool(); int blackMana = pool.getBlack(); int whiteMana = pool.getWhite(); int blueMana = pool.getBlue(); @@ -105,10 +104,9 @@ class DoublingCubeEffect extends ManaEffect { return null; } - @Override public DoublingCubeEffect copy() { return new DoublingCubeEffect(this); } - } +} diff --git a/Mage.Sets/src/mage/sets/tenthedition/KarplusanForest.java b/Mage.Sets/src/mage/sets/tenthedition/KarplusanForest.java index b635ac97ace..f93fe7ca627 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/KarplusanForest.java +++ b/Mage.Sets/src/mage/sets/tenthedition/KarplusanForest.java @@ -51,10 +51,10 @@ public class KarplusanForest extends CardImpl { this.addAbility(new ColorlessManaAbility()); - Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new TapSourceCost()); + Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new TapSourceCost()); redManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(redManaAbility); - Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana, new TapSourceCost()); + Ability greenManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new TapSourceCost()); greenManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(greenManaAbility); } diff --git a/Mage.Sets/src/mage/sets/tenthedition/Peek.java b/Mage.Sets/src/mage/sets/tenthedition/Peek.java index b4428101533..01a5efcb2e8 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/Peek.java +++ b/Mage.Sets/src/mage/sets/tenthedition/Peek.java @@ -1,98 +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.sets.tenthedition; - -import java.util.UUID; -import mage.MageObject; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.cards.CardImpl; -import mage.constants.Outcome; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetPlayer; - -/** - * - * @author Loki - */ -public class Peek extends CardImpl { - - public Peek(UUID ownerId) { - super(ownerId, 94, "Peek", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); - this.expansionSetCode = "10E"; - - // Look at target player's hand. - this.getSpellAbility().addEffect(new PeekEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); - - // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - } - - public Peek(final Peek card) { - super(card); - } - - @Override - public Peek copy() { - return new Peek(this); - } -} - -class PeekEffect extends OneShotEffect { - PeekEffect() { - super(Outcome.Detriment); - staticText = "look at target player's hand"; - } - - PeekEffect(final PeekEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - MageObject sourceObject = source.getSourceObject(game); - if (player != null && controller != null && sourceObject != null) { - controller.lookAtCards(sourceObject.getIdName() + " " + player.getName() + " (" + game.getTurnNum()+"|"+game.getPhase().getType() +")", player.getHand(), game); - } - return true; - } - - @Override - public PeekEffect copy() { - return new PeekEffect(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.sets.tenthedition; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author Loki + */ +public class Peek extends CardImpl { + + public Peek(UUID ownerId) { + super(ownerId, 94, "Peek", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "10E"; + + // Look at target player's hand. + this.getSpellAbility().addEffect(new LookAtTargetPlayerHandEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Peek(final Peek card) { + super(card); + } + + @Override + public Peek copy() { + return new Peek(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenthedition/ScoriaWurm.java b/Mage.Sets/src/mage/sets/tenthedition/ScoriaWurm.java new file mode 100644 index 00000000000..20d67c1bd5d --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenthedition/ScoriaWurm.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.sets.tenthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class ScoriaWurm extends CardImpl { + + public ScoriaWurm(UUID ownerId) { + super(ownerId, 227, "Scoria Wurm", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "10E"; + this.subtype.add("Wurm"); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // At the beginning of your upkeep, flip a coin. If you lose the flip, return Scoria Wurm to its owner's hand. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ScoriaWurmEffect(), TargetController.YOU, false)); + } + + public ScoriaWurm(final ScoriaWurm card) { + super(card); + } + + @Override + public ScoriaWurm copy() { + return new ScoriaWurm(this); + } +} + +class ScoriaWurmEffect extends OneShotEffect { + + public ScoriaWurmEffect() { + super(Outcome.Damage); + staticText = "flip a coin. If you lose the flip, return {this} to its owner's hand"; + } + + public ScoriaWurmEffect(ScoriaWurmEffect 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) { + if (controller.flipCoin(game)) { + return true; + } else { + new ReturnToHandSourceEffect().apply(game, source); + return true; + } + } + return false; + } + + @Override + public ScoriaWurmEffect copy() { + return new ScoriaWurmEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenthedition/SerrasEmbrace.java b/Mage.Sets/src/mage/sets/tenthedition/SerrasEmbrace.java index e4e3c20d733..fa86b26eafe 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/SerrasEmbrace.java +++ b/Mage.Sets/src/mage/sets/tenthedition/SerrasEmbrace.java @@ -29,9 +29,10 @@ package mage.sets.tenthedition; import java.util.UUID; -import mage.constants.*; +import java.util.UUID; 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; @@ -39,6 +40,11 @@ import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -53,14 +59,21 @@ public class SerrasEmbrace extends CardImpl { this.expansionSetCode = "10E"; 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); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA))); + // Enchanted creature gets +2/+2 and has flying and vigilance. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2)); + Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has flying"); + ability.addEffect(effect); + effect = new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA); + effect.setText("and vigilance"); + ability.addEffect(effect); + this.addAbility(ability); } public SerrasEmbrace(final SerrasEmbrace card) { diff --git a/Mage.Sets/src/mage/sets/tenthedition/SulfurousSprings.java b/Mage.Sets/src/mage/sets/tenthedition/SulfurousSprings.java index c66ff9147f1..c5b51324a0e 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/SulfurousSprings.java +++ b/Mage.Sets/src/mage/sets/tenthedition/SulfurousSprings.java @@ -51,10 +51,10 @@ public class SulfurousSprings extends CardImpl { this.addAbility(new ColorlessManaAbility()); - Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()); + Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost()); blackManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blackManaAbility); - Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana, new TapSourceCost()); + Ability redManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new TapSourceCost()); redManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(redManaAbility); } diff --git a/Mage.Sets/src/mage/sets/tenthedition/UndergroundRiver.java b/Mage.Sets/src/mage/sets/tenthedition/UndergroundRiver.java index b8e270e810d..6a3cf2b2fd1 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/UndergroundRiver.java +++ b/Mage.Sets/src/mage/sets/tenthedition/UndergroundRiver.java @@ -51,10 +51,10 @@ public class UndergroundRiver extends CardImpl { this.addAbility(new ColorlessManaAbility()); - Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana, new TapSourceCost()); + Ability blueManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlueMana(1), new TapSourceCost()); blueManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blueManaAbility); - Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new TapSourceCost()); + Ability blackManaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new TapSourceCost()); blackManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(blackManaAbility); } diff --git a/Mage.Sets/src/mage/sets/thedark/Amnesia.java b/Mage.Sets/src/mage/sets/thedark/Amnesia.java new file mode 100644 index 00000000000..fb2695e08a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/Amnesia.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.sets.thedark; + +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.Cards; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class Amnesia extends CardImpl { + + public Amnesia(UUID ownerId) { + super(ownerId, 19, "Amnesia", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{U}{U}{U}"); + this.expansionSetCode = "DRK"; + + // Target player reveals his or her hand and discards all nonland cards. + this.getSpellAbility().addEffect(new AmnesiaEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public Amnesia(final Amnesia card) { + super(card); + } + + @Override + public Amnesia copy() { + return new Amnesia(this); + } +} + +class AmnesiaEffect extends OneShotEffect { + + public AmnesiaEffect() { + super(Outcome.Discard); + this.staticText = "Target player reveals his or her hand and discards all nonland cards"; + } + + public AmnesiaEffect(final AmnesiaEffect effect) { + super(effect); + } + + @Override + public AmnesiaEffect copy() { + return new AmnesiaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + Cards hand = player.getHand(); + player.revealCards("Amnesia", hand, game); + Set cards = hand.getCards(game); + for (Card card : cards) { + if (card != null && !card.getCardType().contains(CardType.LAND)) { + player.discard(card, source, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/BookOfRass.java b/Mage.Sets/src/mage/sets/thedark/BookOfRass.java new file mode 100644 index 00000000000..ca0a589254f --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/BookOfRass.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.sets.thedark; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author nigelzor + */ +public class BookOfRass extends CardImpl { + + public BookOfRass(UUID ownerId) { + super(ownerId, 95, "Book of Rass", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{6}"); + this.expansionSetCode = "DRK"; + + // {2}, Pay 2 life: Draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); + ability.addCost(new PayLifeCost(2)); + this.addAbility(ability); + } + + public BookOfRass(final BookOfRass card) { + super(card); + } + + @Override + public BookOfRass copy() { + return new BookOfRass(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/CavePeople.java b/Mage.Sets/src/mage/sets/thedark/CavePeople.java new file mode 100644 index 00000000000..1bb0eef3cc6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/CavePeople.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.sets.thedark; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class CavePeople extends CardImpl { + + public CavePeople(UUID ownerId) { + super(ownerId, 59, "Cave People", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "DRK"; + this.subtype.add("Human"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Whenever Cave People attacks, it gets +1/-2 until end of turn. + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(1, -2, Duration.EndOfTurn), false)); + + // {1}{R}{R}, {tap}: Target creature gains mountainwalk until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new MountainwalkAbility(), Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CavePeople(final CavePeople card) { + super(card); + } + + @Override + public CavePeople copy() { + return new CavePeople(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java b/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java index 781370f3cec..3a90f2d451a 100644 --- a/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java +++ b/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java @@ -59,7 +59,7 @@ public class CityOfShadows extends CardImpl { this.addAbility(ability); // {T}: Add {X} to your mana pool, where X is the number of storage counters on City of Shadows. - ability = new DynamicManaAbility(Mana.ColorlessMana, new CountersCount(CounterType.STORAGE), + ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersCount(CounterType.STORAGE), "Add {X} to your mana pool, where X is the number of storage counters on {this}"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/thedark/DiabolicMachine.java b/Mage.Sets/src/mage/sets/thedark/DiabolicMachine.java new file mode 100644 index 00000000000..5466c2308af --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/DiabolicMachine.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.sets.thedark; + +import java.util.UUID; + +/** + * + * @author nigelzor + */ +public class DiabolicMachine extends mage.sets.fourthedition.DiabolicMachine { + + public DiabolicMachine(UUID ownerId) { + super(ownerId); + this.cardNumber = 98; + this.expansionSetCode = "DRK"; + } + + public DiabolicMachine(final DiabolicMachine card) { + super(card); + } + + @Override + public DiabolicMachine copy() { + return new DiabolicMachine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/GoblinCaves.java b/Mage.Sets/src/mage/sets/thedark/GoblinCaves.java new file mode 100644 index 00000000000..641d77f9a0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/GoblinCaves.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.sets.thedark; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author nigelzor + */ +public class GoblinCaves extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin", "Goblin creatures"); + + public GoblinCaves(UUID ownerId) { + super(ownerId, 63, "Goblin Caves", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); + this.expansionSetCode = "DRK"; + this.subtype.add("Aura"); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // As long as enchanted land is a basic Mountain, Goblin creatures get +0/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostAllEffect(0, 2, Duration.WhileOnBattlefield, filter, false), + new AttachedToBasicMountainCondition(), + "As long as enchanted land is a basic Mountain, Goblin creatures get +0/+2" + ))); + } + + public GoblinCaves(final GoblinCaves card) { + super(card); + } + + @Override + public GoblinCaves copy() { + return new GoblinCaves(this); + } +} + +class AttachedToBasicMountainCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null) { + Permanent enchanted = game.getPermanent(enchantment.getAttachedTo()); + if (enchanted != null) { + if (enchanted.hasSubtype("Mountain") && enchanted.getSupertype().contains("Basic")) { + return true; + } + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/thedark/MerfolkAssassin.java b/Mage.Sets/src/mage/sets/thedark/MerfolkAssassin.java new file mode 100644 index 00000000000..514698b1f18 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/MerfolkAssassin.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.sets.thedark; + +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.abilities.keyword.IslandwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class MerfolkAssassin extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with islandwalk"); + + static { + filter.add(new AbilityPredicate(IslandwalkAbility.class)); + } + + public MerfolkAssassin(UUID ownerId) { + super(ownerId, 31, "Merfolk Assassin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}{U}"); + this.expansionSetCode = "DRK"; + this.subtype.add("Merfolk"); + this.subtype.add("Assassin"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {tap}: Destroy target creature with islandwalk. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public MerfolkAssassin(final MerfolkAssassin card) { + super(card); + } + + @Override + public MerfolkAssassin copy() { + return new MerfolkAssassin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/SkullOfOrm.java b/Mage.Sets/src/mage/sets/thedark/SkullOfOrm.java index dfc74fba39c..d6ca4b86d30 100644 --- a/Mage.Sets/src/mage/sets/thedark/SkullOfOrm.java +++ b/Mage.Sets/src/mage/sets/thedark/SkullOfOrm.java @@ -40,7 +40,7 @@ import mage.cards.CardImpl; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInYourGraveyard; /** * @@ -48,7 +48,7 @@ import mage.target.common.TargetCardInGraveyard; */ public class SkullOfOrm extends CardImpl { - private static final FilterCard filter = new FilterCard("enchantment cards"); + private static final FilterCard filter = new FilterCard("enchantment card from your graveyard"); static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); @@ -60,7 +60,7 @@ public class SkullOfOrm extends CardImpl { // {5}, {tap}: Return target enchantment card from your graveyard to your hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{5}")); - ability.addTarget(new TargetCardInGraveyard(filter)); + ability.addTarget(new TargetCardInYourGraveyard(filter)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/thedark/Venom.java b/Mage.Sets/src/mage/sets/thedark/Venom.java index 42eb58e7165..5c736ca71e6 100644 --- a/Mage.Sets/src/mage/sets/thedark/Venom.java +++ b/Mage.Sets/src/mage/sets/thedark/Venom.java @@ -31,8 +31,9 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; @@ -66,7 +67,10 @@ public class Venom extends CardImpl { this.addAbility(ability); // Whenever enchanted creature blocks or becomes blocked by a non-Wall creature, destroy the other creature at end of combat. - this.addAbility(new VenomTriggeredAbility()); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + this.addAbility(new VenomTriggeredAbility(effect)); } public Venom(final Venom card) { @@ -81,8 +85,8 @@ public class Venom extends CardImpl { class VenomTriggeredAbility extends TriggeredAbilityImpl { - VenomTriggeredAbility() { - super(Zone.BATTLEFIELD, new VenomEffect()); + VenomTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect); } VenomTriggeredAbility(final VenomTriggeredAbility ability) { @@ -128,35 +132,3 @@ class VenomTriggeredAbility extends TriggeredAbilityImpl { return "Whenever enchanted creature blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat."; } } - -class VenomEffect extends OneShotEffect { - - VenomEffect() { - super(Outcome.DestroyPermanent); - staticText = "destroy that creature at end of combat"; - } - - VenomEffect(final VenomEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - if (targetCreature != null) { - AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId())); - game.addDelayedTriggeredAbility(delayedAbility); - return true; - } - return false; - } - - @Override - public VenomEffect copy() { - return new VenomEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/theros/KarametrasAcolyte.java b/Mage.Sets/src/mage/sets/theros/KarametrasAcolyte.java index 32db880b516..bc9989a1118 100644 --- a/Mage.Sets/src/mage/sets/theros/KarametrasAcolyte.java +++ b/Mage.Sets/src/mage/sets/theros/KarametrasAcolyte.java @@ -53,7 +53,7 @@ public class KarametrasAcolyte extends CardImpl { this.toughness = new MageInt(4); // {T}: Add an amount of {G} to your mana pool equal to your devotion to green. - this.addAbility(new DynamicManaAbility(Mana.GreenMana, new DevotionCount(ColoredManaSymbol.G), + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new DevotionCount(ColoredManaSymbol.G), "Add an amount of {G} to your mana pool equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts towards your devotion to green.)")); } diff --git a/Mage.Sets/src/mage/sets/theros/PolisCrusher.java b/Mage.Sets/src/mage/sets/theros/PolisCrusher.java index 2d169d80853..84757edc1f5 100644 --- a/Mage.Sets/src/mage/sets/theros/PolisCrusher.java +++ b/Mage.Sets/src/mage/sets/theros/PolisCrusher.java @@ -64,6 +64,8 @@ public class PolisCrusher extends CardImpl { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); } + private final UUID originalId; + public PolisCrusher(UUID ownerId) { super(ownerId, 198, "Polis Crusher", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); this.expansionSetCode = "THS"; @@ -83,16 +85,18 @@ public class PolisCrusher extends CardImpl { new DealsCombatDamageToAPlayerTriggeredAbility(new DestroyTargetEffect(), false, true), MonstrousCondition.getInstance(), "Whenever {this} deals combat damage to a player, if {this} is monstrous, destroy target enchantment that player controls."); + originalId = ability.getOriginalId(); this.addAbility(ability); } public PolisCrusher(final PolisCrusher card) { super(card); + this.originalId = card.originalId; } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof ConditionalTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { for (Effect effect : ability.getEffects()) { if (effect instanceof DestroyTargetEffect) { Player attackedPlayer = game.getPlayer(effect.getTargetPointer().getFirst(game, ability)); diff --git a/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java b/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java index 6878692be27..d5e83a36b87 100644 --- a/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java +++ b/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java @@ -57,20 +57,24 @@ import mage.target.common.TargetControlledCreaturePermanent; /** * - * Once you announce you’re casting Rescue from the Underworld, no player may attempt to - * stop you from casting the spell by removing the creature you want to sacrifice. + * Once you announce you’re casting Rescue from the Underworld, no player may + * attempt to stop you from casting the spell by removing the creature you want + * to sacrifice. * - * If you sacrifice a creature token to cast Rescue from the Underworld, it won’t return - * to the battlefield, although the target creature card will. + * If you sacrifice a creature token to cast Rescue from the Underworld, it + * won’t return to the battlefield, although the target creature card will. * - * If either the sacrificed creature or the target creature card leaves the graveyard - * before the delayed triggered ability resolves during your next upkeep, it won’t return. + * If either the sacrificed creature or the target creature card leaves the + * graveyard before the delayed triggered ability resolves during your next + * upkeep, it won’t return. * - * However, if the sacrificed creature is put into another public zone instead of the graveyard, - * perhaps because it’s your commander or because of another replacement effect, it will return - * to the battlefield from the zone it went to. + * However, if the sacrificed creature is put into another public zone instead + * of the graveyard, perhaps because it’s your commander or because of another + * replacement effect, it will return to the battlefield from the zone it went + * to. * - * Rescue from the Underworld is exiled as it resolves, not later as its delayed trigger resolves. + * Rescue from the Underworld is exiled as it resolves, not later as its delayed + * trigger resolves. * * * @author LevelX2 @@ -81,9 +85,8 @@ public class RescueFromTheUnderworld extends CardImpl { super(ownerId, 102, "Rescue from the Underworld", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{B}"); this.expansionSetCode = "THS"; - // As an additional cost to cast Rescue from the Underworld, sacrifice a creature. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), false))); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), false))); // Choose target creature card in your graveyard. Return that card and the sacrificed card to the battlefield under your control at the beginning of your next upkeep. Exile Rescue from the Underworld. this.getSpellAbility().addEffect(new RescueFromTheUnderworldTextEffect()); @@ -151,15 +154,15 @@ class RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect extends OneShot delayedAbility.setControllerId(source.getControllerId()); delayedAbility.setSourceObject(source.getSourceObject(game), game); delayedAbility.getTargets().addAll(source.getTargets()); - for(Effect effect : delayedAbility.getEffects()) { + for (Effect effect : delayedAbility.getEffects()) { effect.getTargetPointer().init(game, source); } // add the sacrificed creature as target - for (Cost cost :source.getCosts()) { + for (Cost cost : source.getCosts()) { if (cost instanceof SacrificeTargetCost) { SacrificeTargetCost sacCost = (SacrificeTargetCost) cost; TargetCardInGraveyard target = new TargetCardInGraveyard(); - for(Permanent permanent : sacCost.getPermanents()) { + for (Permanent permanent : sacCost.getPermanents()) { target.add(permanent.getId(), game); delayedAbility.getTargets().add(target); } @@ -214,20 +217,12 @@ class RescueFromTheUnderworldDelayedTriggeredAbility extends DelayedTriggeredAbi class RescueFromTheUnderworldReturnEffect extends OneShotEffect { - private boolean tapped; - public RescueFromTheUnderworldReturnEffect() { - this(false); - } - - public RescueFromTheUnderworldReturnEffect(boolean tapped) { super(Outcome.PutCreatureInPlay); - this.tapped = tapped; } public RescueFromTheUnderworldReturnEffect(final RescueFromTheUnderworldReturnEffect effect) { super(effect); - this.tapped = effect.tapped; } @Override @@ -237,39 +232,36 @@ class RescueFromTheUnderworldReturnEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - boolean result = false; - // Target card comes only back if in graveyard - for (UUID targetId: getTargetPointer().getTargets(game, source)) { - Card card = game.getCard(targetId); - if (card != null) { - Player player = game.getPlayer(card.getOwnerId()); - if (player != null) { - if(card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId(), tapped)){ - result = true; - } + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + // Target card comes only back if in graveyard + for (UUID targetId : getTargetPointer().getTargets(game, source)) { + Card card = game.getCard(targetId); + if (card != null) { + controller.moveCards(card, Zone.BATTLEFIELD, source, game); } } - } - // However, if the sacrificed creature is put into another public zone instead of the graveyard, - // perhaps because it’s your commander or because of another replacement effect, it will return - // to the battlefield from the zone it went to. - if (source.getTargets().get(1) != null) { - for (UUID targetId: ((Target) source.getTargets().get(1)).getTargets()) { - Card card = game.getCard(targetId); - if (card != null && !card.isFaceDown(game)) { - Player player = game.getPlayer(card.getOwnerId()); - if (player != null) { - Zone currentZone = game.getState().getZone(card.getId()); - if (currentZone.equals(Zone.COMMAND) || currentZone.equals(Zone.GRAVEYARD) || currentZone.equals(Zone.EXILED)) { - if(card.putOntoBattlefield(game, currentZone, source.getSourceId(), source.getControllerId(), false)){ - result = true; + // However, if the sacrificed creature is put into another public zone instead of the graveyard, + // perhaps because it’s your commander or because of another replacement effect, it will return + // to the battlefield from the zone it went to. + if (source.getTargets().get(1) != null) { + for (UUID targetId : ((Target) source.getTargets().get(1)).getTargets()) { + Card card = game.getCard(targetId); + if (card != null && !card.isFaceDown(game)) { + Player player = game.getPlayer(card.getOwnerId()); + if (player != null) { + Zone currentZone = game.getState().getZone(card.getId()); + if (currentZone.equals(Zone.COMMAND) || currentZone.equals(Zone.GRAVEYARD) || currentZone.equals(Zone.EXILED)) { + return player.moveCards(card, Zone.BATTLEFIELD, source, game); } } } } } + return true; } - return result; + return false; + } } diff --git a/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java b/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java index 8dca6413956..781fe57fdb0 100644 --- a/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java +++ b/Mage.Sets/src/mage/sets/theros/XenagosTheReveler.java @@ -130,10 +130,10 @@ class XenagosManaEffect extends OneShotEffect { } switch (manaChoice.getChoice()) { case "Green": - mana.addGreen(); + mana.increaseGreen(); break; case "Red": - mana.addRed(); + mana.increaseRed(); break; } player.getManaPool().addMana(mana, game, source); diff --git a/Mage.Sets/src/mage/sets/timeshifted/CoalitionVictory.java b/Mage.Sets/src/mage/sets/timeshifted/CoalitionVictory.java new file mode 100644 index 00000000000..cbc0ae7fda2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/CoalitionVictory.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.sets.timeshifted; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.WinGameSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; + +/** + * + * @author fireshoes + */ +public class CoalitionVictory extends CardImpl { + + public static final FilterControlledLandPermanent filterPlains = new FilterControlledLandPermanent(); + public static final FilterControlledLandPermanent filterIsland = new FilterControlledLandPermanent(); + public static final FilterControlledLandPermanent filterSwamp = new FilterControlledLandPermanent(); + public static final FilterControlledLandPermanent filterMountain = new FilterControlledLandPermanent(); + public static final FilterControlledLandPermanent filterForest = new FilterControlledLandPermanent(); + public static final FilterControlledCreaturePermanent filterWhite = new FilterControlledCreaturePermanent(); + public static final FilterControlledCreaturePermanent filterBlue = new FilterControlledCreaturePermanent(); + public static final FilterControlledCreaturePermanent filterBlack = new FilterControlledCreaturePermanent(); + public static final FilterControlledCreaturePermanent filterRed = new FilterControlledCreaturePermanent(); + public static final FilterControlledCreaturePermanent filterGreen = new FilterControlledCreaturePermanent(); + + static { + filterPlains.add(new SubtypePredicate("Plains")); + filterIsland.add(new SubtypePredicate("Island")); + filterSwamp.add(new SubtypePredicate("Swamp")); + filterMountain.add(new SubtypePredicate("Mountain")); + filterForest.add(new SubtypePredicate("Forest")); + filterWhite.add(new ColorPredicate(ObjectColor.WHITE)); + filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); + filterBlack.add(new ColorPredicate(ObjectColor.BLACK)); + filterRed.add(new ColorPredicate(ObjectColor.RED)); + filterGreen.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public CoalitionVictory(UUID ownerId) { + super(ownerId, 91, "Coalition Victory", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{W}{U}{B}{R}{G}"); + this.expansionSetCode = "TSB"; + + // You win the game if you control a land of each basic land type and a creature of each color. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new WinGameSourceControllerEffect(), + new CoalitionVictoryCondition(), + "You win the game if you control a land of each basic land type and a creature of each color.")); + } + + public CoalitionVictory(final CoalitionVictory card) { + super(card); + } + + @Override + public CoalitionVictory copy() { + return new CoalitionVictory(this); + } +} + +class CoalitionVictoryCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + if (game.getBattlefield().count(CoalitionVictory.filterPlains, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterIsland, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterSwamp, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterMountain, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterForest, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterWhite, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterBlue, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterBlack, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + if (game.getBattlefield().count(CoalitionVictory.filterRed, source.getSourceId(), source.getControllerId(), game) < 1) { + return false; + } + return game.getBattlefield().count(CoalitionVictory.filterGreen, source.getSourceId(), source.getControllerId(), game) >= 1; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/timeshifted/GemstoneMine.java b/Mage.Sets/src/mage/sets/timeshifted/GemstoneMine.java index ab0701cce46..60298b92a7e 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/GemstoneMine.java +++ b/Mage.Sets/src/mage/sets/timeshifted/GemstoneMine.java @@ -40,9 +40,6 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.counters.CounterType; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.permanent.AnotherPredicate; /** * @@ -50,12 +47,6 @@ import mage.filter.predicate.permanent.AnotherPredicate; */ public class GemstoneMine extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent(); - - static { - filter.add(Predicates.not(new AnotherPredicate())); - } - public GemstoneMine(UUID ownerId) { super(ownerId, 119, "Gemstone Mine", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "TSB"; diff --git a/Mage.Sets/src/mage/sets/timeshifted/GrinningTotem.java b/Mage.Sets/src/mage/sets/timeshifted/GrinningTotem.java index 5ae1263948b..cd144347d15 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/GrinningTotem.java +++ b/Mage.Sets/src/mage/sets/timeshifted/GrinningTotem.java @@ -32,14 +32,12 @@ import mage.MageObject; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.Condition; import mage.abilities.costs.common.SacrificeSourceCost; 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.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.AsThoughEffectType; @@ -71,13 +69,11 @@ public class GrinningTotem extends CardImpl { // {2}, {tap}, Sacrifice Grinning Totem: Search target opponent's library for a card and exile it. Then that player shuffles his or her library. // Until the beginning of your next upkeep, you may play that card. + // At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GrinningTotemSearchAndExileEffect(), new ManaCostsImpl("{2}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetOpponent()); - // At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard. - ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new GrinningTotemDelayedTriggeredAbility())); - this.addAbility(ability); } @@ -95,7 +91,9 @@ class GrinningTotemSearchAndExileEffect extends OneShotEffect { public GrinningTotemSearchAndExileEffect() { super(Outcome.Benefit); - this.staticText = "Search target opponent's library for a card and exile it. Then that player shuffles his or her library. Until the beginning of your next upkeep, you may play that card"; + this.staticText = "Search target opponent's library for a card and exile it. Then that player shuffles his or her library. " + + "Until the beginning of your next upkeep, you may play that card. " + + "At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard"; } public GrinningTotemSearchAndExileEffect(final GrinningTotemSearchAndExileEffect effect) { @@ -111,18 +109,21 @@ class GrinningTotemSearchAndExileEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player you = game.getPlayer(source.getControllerId()); Player targetOpponent = game.getPlayer(source.getFirstTarget()); - MageObject sourcObject = game.getObject(source.getSourceId()); + MageObject sourceObject = game.getObject(source.getSourceId()); if (you != null && targetOpponent != null) { if (targetOpponent.getLibrary().size() > 0) { TargetCardInLibrary targetCard = new TargetCardInLibrary(); if (you.searchLibrary(targetCard, game, targetOpponent.getId())) { Card card = targetOpponent.getLibrary().remove(targetCard.getFirstTarget(), game); if (card != null) { - you.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), sourcObject != null ? sourcObject.getIdName() : "", source.getSourceId(), game, Zone.LIBRARY, true); + UUID exileZoneId = CardUtil.getCardExileZoneId(game, source); + you.moveCardToExileWithInfo(card, exileZoneId, sourceObject != null ? sourceObject.getIdName() : "", source.getSourceId(), game, Zone.LIBRARY, true); ContinuousEffect effect = new GrinningTotemMayPlayEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); - } + + game.addDelayedTriggeredAbility(new GrinningTotemDelayedTriggeredAbility(exileZoneId), source); + } } } targetOpponent.shuffleLibrary(game); @@ -166,27 +167,29 @@ class GrinningTotemMayPlayEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - if (targetPointer.getTargets(game, source).contains(sourceId)) { - return game.getState().getZone(sourceId).equals(Zone.EXILED); - } - return false; + return source.getControllerId().equals(affectedControllerId) + && sourceId.equals(getTargetPointer().getFirst(game, source)); } } class GrinningTotemDelayedTriggeredAbility extends DelayedTriggeredAbility { - public GrinningTotemDelayedTriggeredAbility() { - super(new GrinningTotemPutIntoGraveyardEffect()); + private final UUID exileZoneId; + + public GrinningTotemDelayedTriggeredAbility(UUID exileZoneId) { + super(new GrinningTotemPutIntoGraveyardEffect(exileZoneId)); + this.exileZoneId = exileZoneId; } public GrinningTotemDelayedTriggeredAbility(final GrinningTotemDelayedTriggeredAbility ability) { super(ability); + this.exileZoneId = ability.exileZoneId; } @Override public boolean checkInterveningIfClause(Game game) { - ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, this.getSourceId())); + ExileZone exileZone = game.getExile().getExileZone(exileZoneId); return exileZone != null && exileZone.getCards(game).size() > 0; } @@ -211,26 +214,19 @@ class GrinningTotemDelayedTriggeredAbility extends DelayedTriggeredAbility { } } - -class GrinningTotemYouHaveNotPlayedCondition implements Condition { - - @Override - public boolean apply(Game game, Ability source) { - ExileZone zone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); - return zone.getCards(game).size() > 0; - } - -} - class GrinningTotemPutIntoGraveyardEffect extends OneShotEffect { - public GrinningTotemPutIntoGraveyardEffect() { + private final UUID exileZoneId; + + public GrinningTotemPutIntoGraveyardEffect(UUID exileZoneId) { super(Outcome.Detriment); + this.exileZoneId = exileZoneId; this.staticText = "put it into its owner's graveyard"; } public GrinningTotemPutIntoGraveyardEffect(final GrinningTotemPutIntoGraveyardEffect effect) { super(effect); + this.exileZoneId = effect.exileZoneId; } @Override @@ -241,7 +237,7 @@ class GrinningTotemPutIntoGraveyardEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - ExileZone zone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); + ExileZone zone = game.getExile().getExileZone(exileZoneId); if (controller != null && zone != null) { return controller.moveCards(zone, Zone.EXILED, Zone.GRAVEYARD, source, game); } diff --git a/Mage.Sets/src/mage/sets/timeshifted/MerfolkAssassin.java b/Mage.Sets/src/mage/sets/timeshifted/MerfolkAssassin.java new file mode 100644 index 00000000000..c0f621caf55 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/MerfolkAssassin.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.timeshifted; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MerfolkAssassin extends mage.sets.thedark.MerfolkAssassin { + + public MerfolkAssassin(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public MerfolkAssassin(final MerfolkAssassin card) { + super(card); + } + + @Override + public MerfolkAssassin copy() { + return new MerfolkAssassin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/Pandemonium.java b/Mage.Sets/src/mage/sets/timeshifted/Pandemonium.java index 588ee3e077f..b7e23c7c344 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/Pandemonium.java +++ b/Mage.Sets/src/mage/sets/timeshifted/Pandemonium.java @@ -49,6 +49,8 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class Pandemonium extends CardImpl { + private final UUID originalId; + public Pandemonium(UUID ownerId) { super(ownerId, 68, "Pandemonium", Rarity.SPECIAL, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); this.expansionSetCode = "TSB"; @@ -56,22 +58,24 @@ public class Pandemonium extends CardImpl { // Whenever a creature enters the battlefield, that creature's controller may have it deal damage equal to its power to target creature or player of his or her choice. Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new PandemoniumEffect(), new FilterCreaturePermanent(), false, SetTargetPointer.PERMANENT, ""); ability.addTarget(new TargetCreatureOrPlayer()); + originalId = ability.getOriginalId(); this.addAbility(ability); } public Pandemonium(final Pandemonium card) { super(card); + this.originalId = card.originalId; } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof EntersBattlefieldAllTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { UUID creatureId = ability.getEffects().get(0).getTargetPointer().getFirst(game, ability); Permanent creature = game.getPermanent(creatureId); if (creature != null) { ability.getTargets().get(0).setTargetController(creature.getControllerId()); } - } + } } @Override @@ -81,21 +85,21 @@ public class Pandemonium extends CardImpl { } class PandemoniumEffect extends OneShotEffect { - + public PandemoniumEffect() { super(Outcome.Benefit); this.staticText = "that creature's controller may have it deal damage equal to its power to target creature or player of his or her choice"; } - + public PandemoniumEffect(final PandemoniumEffect effect) { super(effect); } - + @Override public PandemoniumEffect copy() { return new PandemoniumEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); @@ -106,7 +110,7 @@ class PandemoniumEffect extends OneShotEffect { if (targetPermanent != null) { targetPermanent.damage(enteringCreature.getPower().getValue(), source.getSourceId(), game, false, true); } else { - Player targetPlayer = game.getPlayer(source.getTargets().getFirstTarget()); + Player targetPlayer = game.getPlayer(source.getTargets().getFirstTarget()); if (targetPlayer != null) { targetPlayer.damage(enteringCreature.getPower().getValue(), source.getSourceId(), game, false, true); } diff --git a/Mage.Sets/src/mage/sets/timeshifted/WallOfRoots.java b/Mage.Sets/src/mage/sets/timeshifted/WallOfRoots.java index 71808f02fa0..eb85758d6e5 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/WallOfRoots.java +++ b/Mage.Sets/src/mage/sets/timeshifted/WallOfRoots.java @@ -61,7 +61,7 @@ public class WallOfRoots extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn. - this.addAbility(new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana), new WallOfRootsCost())); + this.addAbility(new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(1)), new WallOfRootsCost())); } public WallOfRoots(final WallOfRoots card) { diff --git a/Mage.Sets/src/mage/sets/timespiral/AssemblyWorker.java b/Mage.Sets/src/mage/sets/timespiral/AssemblyWorker.java index 221de05930a..95ad4df2897 100644 --- a/Mage.Sets/src/mage/sets/timespiral/AssemblyWorker.java +++ b/Mage.Sets/src/mage/sets/timespiral/AssemblyWorker.java @@ -32,12 +32,12 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; +import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; -import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; @@ -63,7 +63,7 @@ public class AssemblyWorker extends CardImpl { this.toughness = new MageInt(2); // {tap}: Target Assembly-Worker creature gets +1/+1 until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/timespiral/BrassGnat.java b/Mage.Sets/src/mage/sets/timespiral/BrassGnat.java new file mode 100644 index 00000000000..ffc42c4e19c --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/BrassGnat.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.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author nigelzor + */ +public class BrassGnat extends CardImpl { + + public BrassGnat(UUID ownerId) { + super(ownerId, 249, "Brass Gnat", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Insect"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Brass Gnat doesn't untap during your untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); + // At the beginning of your upkeep, you may pay {1}. If you do, untap Brass Gnat. + this.addAbility(new BeginningOfUpkeepTriggeredAbility( + Zone.BATTLEFIELD, + new DoIfCostPaid(new UntapSourceEffect(), new GenericManaCost(1)), + TargetController.YOU, + false)); + } + + public BrassGnat(final BrassGnat card) { + super(card); + } + + @Override + public BrassGnat copy() { + return new BrassGnat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/CallToTheNetherworld.java b/Mage.Sets/src/mage/sets/timespiral/CallToTheNetherworld.java new file mode 100644 index 00000000000..9c17bb589af --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/CallToTheNetherworld.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.sets.timespiral; + +import java.util.UUID; + +import mage.ObjectColor; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author nigelzor + */ +public class CallToTheNetherworld extends CardImpl { + + private static FilterCreatureCard filter = new FilterCreatureCard("black creature card from your graveyard"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public CallToTheNetherworld(UUID ownerId) { + super(ownerId, 97, "Call to the Netherworld", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "TSP"; + + // Return target black creature card from your graveyard to your hand. + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + // Madness {0} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{0}"))); + } + + public CallToTheNetherworld(final CallToTheNetherworld card) { + super(card); + } + + @Override + public CallToTheNetherworld copy() { + return new CallToTheNetherworld(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/ChronatogTotem.java b/Mage.Sets/src/mage/sets/timespiral/ChronatogTotem.java index 35c67c7ff64..492a19ee6c9 100644 --- a/Mage.Sets/src/mage/sets/timespiral/ChronatogTotem.java +++ b/Mage.Sets/src/mage/sets/timespiral/ChronatogTotem.java @@ -27,35 +27,29 @@ */ package mage.sets.timespiral; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; 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.Condition; +import mage.abilities.costs.Cost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.Effects; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect; import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; -import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.EffectType; import mage.constants.Rarity; -import mage.constants.WatcherScope; 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.permanent.token.Token; -import mage.game.stack.StackAbility; -import mage.game.stack.StackObject; -import mage.watchers.Watcher; /** * @@ -74,14 +68,13 @@ public class ChronatogTotem extends CardImpl { 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 ConditionalActivatedAbility( + Ability ability = new ChronatogTotemAbility( Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.EndOfTurn), new ManaCostsImpl<>("{0}"), - new ChronatogTotemCondition(), - "{0}: {this} gets +3/+3 until end of turn. You skip your next turn. Activate this ability only once each turn and only if {this} is a creature"); + new ChronatogTotemCondition()); ability.addEffect(new SkipNextTurnSourceEffect()); - this.addAbility(ability, new ActivatedAbilityUsedThisTurnWatcher()); + this.addAbility(ability); } public ChronatogTotem(final ChronatogTotem card) { @@ -94,6 +87,52 @@ public class ChronatogTotem extends CardImpl { } } +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; + } + + public ChronatogTotemAbility(ChronatogTotemAbility ability) { + super(ability); + this.condition = ability.condition; + } + + @Override + public Effects getEffects(Game game, EffectType effectType) { + if (!condition.apply(game, this)) { + return emptyEffects; + } + 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); + } + + @Override + public String getRule() { + StringBuilder sb = new StringBuilder(super.getRule()); + sb.deleteCharAt(sb.length() - 1); // remove last '.' + sb.append(" and only if ").append(condition.toString()).append("."); + return sb.toString(); + } +} + class ChronatogTotemToken extends Token { ChronatogTotemToken() { @@ -111,60 +150,15 @@ class ChronatogTotemCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - ActivatedAbilityUsedThisTurnWatcher watcher = (ActivatedAbilityUsedThisTurnWatcher) game.getState().getWatchers().get("ActivatedAbilityUsedThisTurn"); - if (!watcher.getActivatedThisTurn().contains(source.getOriginalId())) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - return permanent.getCardType().contains(CardType.CREATURE); - } + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + return permanent.getCardType().contains(CardType.CREATURE); } return false; } @Override public String toString() { - return "once each turn and only if an opponent controls a flying creature"; + return "{this} is a creature"; } } - -class ActivatedAbilityUsedThisTurnWatcher extends Watcher { - - public Set activatedThisTurn = new HashSet<>(0); - - ActivatedAbilityUsedThisTurnWatcher() { - super("ActivatedAbilityUsedThisTurn", WatcherScope.GAME); - } - - ActivatedAbilityUsedThisTurnWatcher(final ActivatedAbilityUsedThisTurnWatcher watcher) { - super(watcher); - this.activatedThisTurn.addAll(watcher.activatedThisTurn); - } - - @Override - public void watch(GameEvent event, Game game) { - if (event.getType() == EventType.ACTIVATED_ABILITY) { - StackObject stackObject = game.getStack().getStackObject(event.getTargetId()); - if (stackObject != null) { - StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getTargetId()); - if (stackAbility != null && stackAbility.getAbilityType() == AbilityType.ACTIVATED) { - this.activatedThisTurn.add(stackAbility.getOriginalId()); - } - } - } - } - - public Set getActivatedThisTurn() { - return Collections.unmodifiableSet(this.activatedThisTurn); - } - - @Override - public ActivatedAbilityUsedThisTurnWatcher copy() { - return new ActivatedAbilityUsedThisTurnWatcher(this); - } - - @Override - public void reset() { - super.reset(); - this.activatedThisTurn.clear(); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/timespiral/Conflagrate.java b/Mage.Sets/src/mage/sets/timespiral/Conflagrate.java index 1294976b01c..e31f05b7610 100644 --- a/Mage.Sets/src/mage/sets/timespiral/Conflagrate.java +++ b/Mage.Sets/src/mage/sets/timespiral/Conflagrate.java @@ -29,10 +29,12 @@ package mage.sets.timespiral; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.DiscardTargetCost; import mage.abilities.costs.common.DiscardXTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageMultiEffect; import mage.abilities.keyword.FlashbackAbility; import mage.cards.CardImpl; @@ -40,6 +42,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.TimingRule; import mage.filter.FilterCard; +import mage.game.Game; import mage.target.common.TargetCreatureOrPlayerAmount; /** @@ -52,17 +55,16 @@ public class Conflagrate extends CardImpl { super(ownerId, 151, "Conflagrate", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{X}{R}"); this.expansionSetCode = "TSP"; - // Conflagrate deals X damage divided as you choose among any number of target creatures and/or players. - DynamicValue xValue = new ManacostVariableValue(); + DynamicValue xValue = new ConflagrateVariableValue(); this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); - + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); + // Flashback-{R}{R}, Discard X cards. Ability ability = new FlashbackAbility(new ManaCostsImpl("{R}{R}"), TimingRule.SORCERY); ability.addCost(new DiscardXTargetCost(new FilterCard("cards"))); this.addAbility(ability); - + } public Conflagrate(final Conflagrate card) { @@ -74,3 +76,31 @@ public class Conflagrate extends CardImpl { return new Conflagrate(this); } } + +class ConflagrateVariableValue implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + for (Cost cost : sourceAbility.getCosts()) { + if (cost instanceof DiscardTargetCost) { + return ((DiscardTargetCost) cost).getCards().size(); + } + } + return sourceAbility.getManaCostsToPay().getX(); + } + + @Override + public ConflagrateVariableValue copy() { + return new ConflagrateVariableValue(); + } + + @Override + public String toString() { + return "X"; + } + + @Override + public String getMessage() { + return ""; + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/DementiaSliver.java b/Mage.Sets/src/mage/sets/timespiral/DementiaSliver.java index 838e853ff7c..444e703bb59 100644 --- a/Mage.Sets/src/mage/sets/timespiral/DementiaSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/DementiaSliver.java @@ -72,13 +72,13 @@ public class DementiaSliver extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // All Slivers have "{tap}: 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. Activate this ability only during your turn." + // 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. Activate this ability only during your turn." Ability gainedAbility = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new NameACardEffect(NameACardEffect.TypeOfName.ALL), new TapSourceCost(), MyTurnCondition.getInstance()); gainedAbility.addEffect(new DementiaSliverEffect()); gainedAbility.addTarget(new TargetOpponent()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, - "All Slivers have \"{tap}: 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}: 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\""))); } public DementiaSliver(final DementiaSliver card) { diff --git a/Mage.Sets/src/mage/sets/timespiral/ErrantDoomsayers.java b/Mage.Sets/src/mage/sets/timespiral/ErrantDoomsayers.java new file mode 100644 index 00000000000..9167c2d475d --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/ErrantDoomsayers.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.sets.timespiral; + +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.TapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ToughnessPredicate; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ErrantDoomsayers extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 2 or less"); + static { + filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); + } + + public ErrantDoomsayers(UUID ownerId) { + super(ownerId, 15, "Errant Doomsayers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Human"); + this.subtype.add("Rebel"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Tap target creature with toughness 2 or less. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); + Target target = new TargetCreaturePermanent(filter); + ability.addTarget(target); + this.addAbility(ability); + } + + public ErrantDoomsayers(final ErrantDoomsayers card) { + super(card); + } + + @Override + public ErrantDoomsayers copy() { + return new ErrantDoomsayers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/Feebleness.java b/Mage.Sets/src/mage/sets/timespiral/Feebleness.java new file mode 100644 index 00000000000..3f02843db9f --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/Feebleness.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.sets.timespiral; + +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.keyword.EnchantAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author nigelzor + */ +public class Feebleness extends CardImpl { + + public Feebleness(UUID ownerId) { + super(ownerId, 110, "Feebleness", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Aura"); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature gets -2/-1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-2, -1, Duration.WhileOnBattlefield))); + } + + public Feebleness(final Feebleness card) { + super(card); + } + + @Override + public Feebleness copy() { + return new Feebleness(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/GemstoneCaverns.java b/Mage.Sets/src/mage/sets/timespiral/GemstoneCaverns.java index 2171ee5be6c..d3d7bae1323 100644 --- a/Mage.Sets/src/mage/sets/timespiral/GemstoneCaverns.java +++ b/Mage.Sets/src/mage/sets/timespiral/GemstoneCaverns.java @@ -61,7 +61,7 @@ public class GemstoneCaverns extends CardImpl { Ability ability = new ConditionalManaAbility(Zone.BATTLEFIELD, new ConditionalManaEffect( new AddManaOfAnyColorEffect(), - new BasicManaEffect(Mana.ColorlessMana), + new BasicManaEffect(Mana.ColorlessMana(1)), new SourceHasCounterCondition(CounterType.LUCK), "Add {1} to your mana pool. If {this} has a luck counter on it, instead add one mana of any color to your mana pool."), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/sets/timespiral/GorgonRecluse.java b/Mage.Sets/src/mage/sets/timespiral/GorgonRecluse.java new file mode 100644 index 00000000000..fec34f76e4a --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/GorgonRecluse.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.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author nigelzor + */ +public class GorgonRecluse extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public GorgonRecluse(UUID ownerId) { + super(ownerId, 111, "Gorgon Recluse", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Gorgon"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Whenever Gorgon Recluse blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat. + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that creature at end of combat"); + this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(effect, filter, false)); + // Madness {B}{B} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{B}{B}"))); + } + + public GorgonRecluse(final GorgonRecluse card) { + super(card); + } + + @Override + public GorgonRecluse copy() { + return new GorgonRecluse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/GriffinGuide.java b/Mage.Sets/src/mage/sets/timespiral/GriffinGuide.java index c086c8bf41e..b94762aca65 100644 --- a/Mage.Sets/src/mage/sets/timespiral/GriffinGuide.java +++ b/Mage.Sets/src/mage/sets/timespiral/GriffinGuide.java @@ -93,7 +93,7 @@ class GriffinToken extends Token { cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Soldier"); + subtype.add("Griffin"); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/timespiral/HauntingHymn.java b/Mage.Sets/src/mage/sets/timespiral/HauntingHymn.java new file mode 100644 index 00000000000..0e0a924ce11 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/HauntingHymn.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.sets.timespiral; + +import java.util.UUID; + +import mage.abilities.condition.common.MyMainPhaseCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author nigelzor + */ +public class HauntingHymn extends CardImpl { + + public HauntingHymn(UUID ownerId) { + super(ownerId, 112, "Haunting Hymn", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{B}{B}"); + this.expansionSetCode = "TSP"; + + // Target player discards two cards. If you cast this spell during your main phase, that player discards four cards instead. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DiscardTargetEffect(4), + new DiscardTargetEffect(2), + MyMainPhaseCondition.getInstance(), + "Target player discards two cards. If you cast this spell during your main phase, that player discards four cards instead")); + this.getSpellAbility().addTarget(new TargetPlayer()); + + } + + public HauntingHymn(final HauntingHymn card) { + super(card); + } + + @Override + public HauntingHymn copy() { + return new HauntingHymn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java b/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java index daf9621e884..7839ac9c469 100644 --- a/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java +++ b/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java @@ -52,6 +52,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.TargetPermanent; import mage.target.targetpointer.FixedTarget; @@ -116,17 +117,19 @@ class LimDulTheNecromancerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Card card = game.getCard(targetPointer.getFirst(game, source)); - if (card != null) { - Zone currentZone = game.getState().getZone(card.getId()); - if (card.putOntoBattlefield(game, currentZone, source.getSourceId(), source.getControllerId()) - && card.getCardType().contains(CardType.CREATURE)) { - Permanent creature = game.getPermanent(card.getId()); - ContinuousEffect effect = new AddCardSubTypeTargetEffect("Zombie", Duration.WhileOnBattlefield); - effect.setTargetPointer(new FixedTarget(creature.getId())); - game.addEffect(effect, source); - return true; + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = game.getCard(targetPointer.getFirst(game, source)); + if (card != null) { + if (controller.moveCards(card, Zone.BATTLEFIELD, source, game) + && card.getCardType().contains(CardType.CREATURE)) { + Permanent creature = game.getPermanent(card.getId()); + ContinuousEffect effect = new AddCardSubTypeTargetEffect("Zombie", Duration.WhileOnBattlefield); + effect.setTargetPointer(new FixedTarget(creature.getId())); + game.addEffect(effect, source); + } } + return true; } return false; } diff --git a/Mage.Sets/src/mage/sets/timespiral/ManaSkimmer.java b/Mage.Sets/src/mage/sets/timespiral/ManaSkimmer.java new file mode 100644 index 00000000000..a149585d332 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/ManaSkimmer.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.sets.timespiral; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author nigelzor + */ +public class ManaSkimmer extends CardImpl { + + public ManaSkimmer(UUID ownerId) { + super(ownerId, 117, "Mana Skimmer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Leech"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever Mana Skimmer deals damage to a player, tap target land that player controls. That land doesn't untap during its controller's next untap step. + this.addAbility(new ManaSkimmerTriggeredAbility()); + } + + public ManaSkimmer(final ManaSkimmer card) { + super(card); + } + + @Override + public ManaSkimmer copy() { + return new ManaSkimmer(this); + } +} + +class ManaSkimmerTriggeredAbility extends TriggeredAbilityImpl { + + ManaSkimmerTriggeredAbility() { + super(Zone.BATTLEFIELD, new TapTargetEffect(), false); + addEffect(new DontUntapInControllersNextUntapStepTargetEffect()); + } + + ManaSkimmerTriggeredAbility(ManaSkimmerTriggeredAbility ability) { + super(ability); + } + + @Override + public ManaSkimmerTriggeredAbility copy() { + return new ManaSkimmerTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent source = game.getPermanent(event.getSourceId()); + if (source != null && source.getId().equals(this.getSourceId())) { + FilterLandPermanent filter = new FilterLandPermanent("land that player controls"); + filter.add(new ControllerIdPredicate(event.getPlayerId())); + filter.setMessage("land controlled by " + game.getPlayer(event.getTargetId()).getLogName()); + this.getTargets().clear(); + this.addTarget(new TargetPermanent(filter)); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} deals damage to a player, tap target land that player controls. That land doesn't untap during its controller's next untap step."; + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java b/Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java index 04e6861f177..56c436d813c 100644 --- a/Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java +++ b/Mage.Sets/src/mage/sets/timespiral/OpalGuardian.java @@ -86,7 +86,7 @@ class OpalGuardianGargoyle extends Token { public OpalGuardianGargoyle() { super("Gargoyle", "a 3/4 Gargoyle creature with flying and protection from red"); cardType.add(CardType.CREATURE); - subtype.add("Knight"); + subtype.add("Gargoyle"); power = new MageInt(3); toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/timespiral/OutriderEnKor.java b/Mage.Sets/src/mage/sets/timespiral/OutriderEnKor.java new file mode 100644 index 00000000000..00845989196 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/OutriderEnKor.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.sets.timespiral; + +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.RedirectDamageFromSourceToTargetEffect; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class OutriderEnKor extends CardImpl { + + public OutriderEnKor(UUID ownerId) { + super(ownerId, 31, "Outrider en-Kor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Kor"); + this.subtype.add("Rebel"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flanking + this.addAbility(new FlankingAbility()); + + // {0}: The next 1 damage that would be dealt to Outrider en-Kor this turn is dealt to target creature you control instead. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0)); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public OutriderEnKor(final OutriderEnKor card) { + super(card); + } + + @Override + public OutriderEnKor copy() { + return new OutriderEnKor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/Plunder.java b/Mage.Sets/src/mage/sets/timespiral/Plunder.java new file mode 100644 index 00000000000..f92736792d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/Plunder.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.sets.timespiral; + +import java.util.UUID; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.SuspendAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class Plunder extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or land"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.LAND))); + } + + public Plunder(UUID ownerId) { + super(ownerId, 174, "Plunder", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}"); + this.expansionSetCode = "TSP"; + + // Destroy target artifact or land. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + // Suspend 4-{1}{R} + this.addAbility(new SuspendAbility(4, new ManaCostsImpl("{1}{R}"), this)); + } + + public Plunder(final Plunder card) { + super(card); + } + + @Override + public Plunder copy() { + return new Plunder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java b/Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java index 19442525b82..305762c162c 100644 --- a/Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java @@ -60,13 +60,13 @@ public class PsionicSliver extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // All Sliver creatures have "{tap}: This creature deals 2 damage to target creature or player and 3 damage to itself." + // 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.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, - filter, "All Sliver creatures have \"{tap}: This creature deals 2 damage to target creature or player and 3 damage to itself.\""))); + 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) { diff --git a/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java b/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java index 8b3f154f19d..b0ab59b347a 100644 --- a/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java +++ b/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java @@ -46,6 +46,7 @@ import mage.game.Game; import mage.game.permanent.token.CitizenToken; import mage.game.permanent.token.GoblinToken; import mage.game.permanent.token.SaprolingToken; +import mage.game.permanent.token.ThrullToken; import mage.game.permanent.token.Token; import mage.players.Player; @@ -165,14 +166,3 @@ class CamaridToken extends Token { toughness = new MageInt(1); } } - -class ThrullToken extends Token { - public ThrullToken() { - super("Thrull", "1/1 black Thrull creature token"); - cardType.add(CardType.CREATURE); - subtype.add("Thrull"); - color.setBlack(true); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java b/Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java index e38da3c8a11..8f04fbeb05f 100644 --- a/Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java @@ -57,13 +57,13 @@ public class ScreechingSliver extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // All Slivers have "{tap}: Target player puts the top card of his or her library into his or her graveyard." + // All Slivers have "{T}: Target player puts the top card of his or her library into his or her graveyard." SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(1), new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, - filter, "All Sliver creatures have \"{tap}: Target player puts the top card of his or her library into his or her graveyard.\""))); + filter, "All Sliver creatures 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/sets/timespiral/SkitteringMonstrosity.java b/Mage.Sets/src/mage/sets/timespiral/SkitteringMonstrosity.java new file mode 100644 index 00000000000..69ab924f768 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/SkitteringMonstrosity.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.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author nigelzor + */ +public class SkitteringMonstrosity extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a creature spell"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public SkitteringMonstrosity(UUID ownerId) { + super(ownerId, 129, "Skittering Monstrosity", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Horror"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // When you cast a creature spell, sacrifice Skittering Monstrosity. + this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, false)); + } + + public SkitteringMonstrosity(final SkitteringMonstrosity card) { + super(card); + } + + @Override + public SkitteringMonstrosity copy() { + return new SkitteringMonstrosity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java b/Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java index d92e3eb48dd..c05e9cad7f2 100644 --- a/Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java @@ -58,11 +58,11 @@ public class TelekineticSliver extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // All Slivers have "{tap}: Tap target permanent." + // All Slivers have "{T}: Tap target permanent." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetPermanent()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, "All Slivers have \"{tap}: Tap target permanent.\""))); + new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, "All Slivers have \"{T}: Tap target permanent.\""))); } public TelekineticSliver(final TelekineticSliver card) { diff --git a/Mage.Sets/src/mage/sets/timespiral/TemporalEddy.java b/Mage.Sets/src/mage/sets/timespiral/TemporalEddy.java new file mode 100644 index 00000000000..7c316993ed1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/TemporalEddy.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.sets.timespiral; + +import java.util.UUID; + +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author nigelzor + */ +public class TemporalEddy extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("creature or land"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + public TemporalEddy(UUID ownerId) { + super(ownerId, 85, "Temporal Eddy", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); + this.expansionSetCode = "TSP"; + + // Put target creature or land on top of its owner's library. + this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public TemporalEddy(final TemporalEddy card) { + super(card); + } + + @Override + public TemporalEddy copy() { + return new TemporalEddy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/torment/CabalRitual.java b/Mage.Sets/src/mage/sets/torment/CabalRitual.java index d22e660ba42..203914aba3f 100644 --- a/Mage.Sets/src/mage/sets/torment/CabalRitual.java +++ b/Mage.Sets/src/mage/sets/torment/CabalRitual.java @@ -53,7 +53,7 @@ public class CabalRitual extends CardImpl { new BasicManaEffect(new Mana(0, 0, 0, 0, 5, 0, 0)), new BasicManaEffect(new Mana(0, 0, 0, 0, 3, 0, 0)), new CardsInControllerGraveCondition(7), - "Add {B}{B}{B} to your mana pool.

Threshold - Add {B}{B}{B}{B}{B} to your mana pool instead if seven or more cards are in your graveyard")); + "Add {B}{B}{B} to your mana pool.

Threshold - Add {B}{B}{B}{B}{B} to your mana pool instead if seven or more cards are in your graveyard")); } public CabalRitual(final CabalRitual card) { diff --git a/Mage.Sets/src/mage/sets/torment/ChainerDementiaMaster.java b/Mage.Sets/src/mage/sets/torment/ChainerDementiaMaster.java index 88929b04b28..253f7ade515 100644 --- a/Mage.Sets/src/mage/sets/torment/ChainerDementiaMaster.java +++ b/Mage.Sets/src/mage/sets/torment/ChainerDementiaMaster.java @@ -43,7 +43,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileAllEffect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; -import mage.abilities.effects.common.continuous.BecomesSubtypeTargetEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTypeTargetEffect; import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -133,7 +133,7 @@ class ChainerDementiaMasterEffect extends OneShotEffect { ContinuousEffectImpl effect = new BecomesColorTargetEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield); effect.setTargetPointer(new FixedTarget(permanent, game)); game.addEffect(effect, source); - effect = new BecomesSubtypeTargetEffect(Duration.WhileOnBattlefield, new ArrayList<>(Arrays.asList("Nightmare")), false); + effect = new BecomesCreatureTypeTargetEffect(Duration.WhileOnBattlefield, new ArrayList<>(Arrays.asList("Nightmare")), false); effect.setTargetPointer(new FixedTarget(permanent, game)); game.addEffect(effect, source); } diff --git a/Mage.Sets/src/mage/sets/torment/DawnOfTheDead.java b/Mage.Sets/src/mage/sets/torment/DawnOfTheDead.java new file mode 100644 index 00000000000..adff3f47f55 --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/DawnOfTheDead.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.sets.torment; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +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.TargetCardInYourGraveyard; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author fireshoes + */ +public class DawnOfTheDead extends CardImpl { + + public DawnOfTheDead(UUID ownerId) { + super(ownerId, 59, "Dawn of the Dead", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}{B}"); + this.expansionSetCode = "TOR"; + + // At the beginning of your upkeep, you lose 1 life. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeSourceControllerEffect(1), TargetController.YOU, false)); + + // At the beginning of your upkeep, you may return target creature card from your graveyard to the battlefield. + // That creature gains haste until end of turn. Exile it at the beginning of the next end step. + Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DawnOfTheDeadEffect(), TargetController.YOU, true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + this.addAbility(ability); + } + + public DawnOfTheDead(final DawnOfTheDead card) { + super(card); + } + + @Override + public DawnOfTheDead copy() { + return new DawnOfTheDead(this); + } +} + +class DawnOfTheDeadEffect extends OneShotEffect { + + public DawnOfTheDeadEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "return target creature card from your graveyard to the battlefield. That creature gains haste until end of turn. Exile it at the beginning of the next end step"; + } + + public DawnOfTheDeadEffect(final DawnOfTheDeadEffect effect) { + super(effect); + } + + @Override + public DawnOfTheDeadEffect copy() { + return new DawnOfTheDeadEffect(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.EndOfTurn); + 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); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/torment/KrosanConstrictor.java b/Mage.Sets/src/mage/sets/torment/KrosanConstrictor.java new file mode 100644 index 00000000000..05c8229f67b --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/KrosanConstrictor.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.sets.torment; + +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.continuous.BoostTargetEffect; +import mage.abilities.keyword.SwampwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class KrosanConstrictor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public KrosanConstrictor(UUID ownerId) { + super(ownerId, 129, "Krosan Constrictor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "TOR"; + this.subtype.add("Snake"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Swampwalk + this.addAbility(new SwampwalkAbility()); + // {tap}: Target black creature gets -2/-0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -0, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public KrosanConstrictor(final KrosanConstrictor card) { + super(card); + } + + @Override + public KrosanConstrictor copy() { + return new KrosanConstrictor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/torment/RancidEarth.java b/Mage.Sets/src/mage/sets/torment/RancidEarth.java index 39308e07c52..64ff991989b 100644 --- a/Mage.Sets/src/mage/sets/torment/RancidEarth.java +++ b/Mage.Sets/src/mage/sets/torment/RancidEarth.java @@ -58,7 +58,7 @@ public class RancidEarth extends CardImpl { new RancidEarthEffect(), new DestroyTargetEffect(), new CardsInControllerGraveCondition(7), - "Destroy target land.

Threshold - If seven or more cards are in your graveyard, instead destroy that land and Rancid Earth deals 1 damage to each creature and each player.")); + "Destroy target land.

Threshold - If seven or more cards are in your graveyard, instead destroy that land and Rancid Earth deals 1 damage to each creature and each player.")); this.getSpellAbility().addTarget(new TargetLandPermanent()); } diff --git a/Mage.Sets/src/mage/sets/torment/TaintedField.java b/Mage.Sets/src/mage/sets/torment/TaintedField.java index 28b855578ff..04fe0e700a2 100644 --- a/Mage.Sets/src/mage/sets/torment/TaintedField.java +++ b/Mage.Sets/src/mage/sets/torment/TaintedField.java @@ -63,12 +63,12 @@ public class TaintedField extends CardImpl { // {tap}: Add {W} or {B} to your mana pool. Activate this ability only if you control a Swamp. this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.WhiteMana), + new BasicManaEffect(Mana.WhiteMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.BlackMana), + new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); } diff --git a/Mage.Sets/src/mage/sets/torment/TaintedPeak.java b/Mage.Sets/src/mage/sets/torment/TaintedPeak.java index 9400904e836..dae03937cfb 100644 --- a/Mage.Sets/src/mage/sets/torment/TaintedPeak.java +++ b/Mage.Sets/src/mage/sets/torment/TaintedPeak.java @@ -63,12 +63,12 @@ public class TaintedPeak extends CardImpl { // {tap}: Add {B} or {R} to your mana pool. Activate this ability only if you control a Swamp. this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.BlackMana), + new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.RedMana), + new BasicManaEffect(Mana.RedMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); diff --git a/Mage.Sets/src/mage/sets/torment/TaintedWood.java b/Mage.Sets/src/mage/sets/torment/TaintedWood.java index 5464ac6f40f..4a3ce5a8121 100644 --- a/Mage.Sets/src/mage/sets/torment/TaintedWood.java +++ b/Mage.Sets/src/mage/sets/torment/TaintedWood.java @@ -63,12 +63,12 @@ public class TaintedWood extends CardImpl { // {tap}: Add {B} or {G} to your mana pool. Activate this ability only if you control a Swamp. this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.BlackMana), + new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, - new BasicManaEffect(Mana.GreenMana), + new BasicManaEffect(Mana.GreenMana(1)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0))); } diff --git a/Mage.Sets/src/mage/sets/uginsfate/AinokTracker.java b/Mage.Sets/src/mage/sets/uginsfate/AinokTracker.java new file mode 100644 index 00000000000..7b1a4c3e8b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/AinokTracker.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AinokTracker extends mage.sets.khansoftarkir.AinokTracker { + + public AinokTracker(UUID ownerId) { + super(ownerId); + this.cardNumber = 96; + this.expansionSetCode = "UGIN"; + } + + public AinokTracker(final AinokTracker card) { + super(card); + } + + @Override + public AinokTracker copy() { + return new AinokTracker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/AltarOfTheBrood.java b/Mage.Sets/src/mage/sets/uginsfate/AltarOfTheBrood.java new file mode 100644 index 00000000000..711314e60c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/AltarOfTheBrood.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AltarOfTheBrood extends mage.sets.khansoftarkir.AltarOfTheBrood { + + public AltarOfTheBrood(UUID ownerId) { + super(ownerId); + this.cardNumber = 216; + this.expansionSetCode = "UGIN"; + } + + public AltarOfTheBrood(final AltarOfTheBrood card) { + super(card); + } + + @Override + public AltarOfTheBrood copy() { + return new AltarOfTheBrood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/ArashinWarBeast.java b/Mage.Sets/src/mage/sets/uginsfate/ArashinWarBeast.java new file mode 100644 index 00000000000..47bb6e6d284 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/ArashinWarBeast.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ArashinWarBeast extends mage.sets.fatereforged.ArashinWarBeast { + + public ArashinWarBeast(UUID ownerId) { + super(ownerId); + this.cardNumber = 123; + this.expansionSetCode = "UGIN"; + } + + public ArashinWarBeast(final ArashinWarBeast card) { + super(card); + } + + @Override + public ArashinWarBeast copy() { + return new ArashinWarBeast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/ArcLightning.java b/Mage.Sets/src/mage/sets/uginsfate/ArcLightning.java new file mode 100644 index 00000000000..71c10596dc8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/ArcLightning.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.uginsfate; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ArcLightning extends mage.sets.urzassaga.ArcLightning { + + public ArcLightning(UUID ownerId) { + super(ownerId); + this.cardNumber = 97; + this.expansionSetCode = "UGIN"; + this.rarity = Rarity.UNCOMMON; + } + + public ArcLightning(final ArcLightning card) { + super(card); + } + + @Override + public ArcLightning copy() { + return new ArcLightning(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/BribersPurse.java b/Mage.Sets/src/mage/sets/uginsfate/BribersPurse.java new file mode 100644 index 00000000000..d1b043da928 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/BribersPurse.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BribersPurse extends mage.sets.khansoftarkir.BribersPurse { + + public BribersPurse(UUID ownerId) { + super(ownerId); + this.cardNumber = 217; + this.expansionSetCode = "UGIN"; + } + + public BribersPurse(final BribersPurse card) { + super(card); + } + + @Override + public BribersPurse copy() { + return new BribersPurse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/DebilitatingInjury.java b/Mage.Sets/src/mage/sets/uginsfate/DebilitatingInjury.java new file mode 100644 index 00000000000..bd96e03c587 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/DebilitatingInjury.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DebilitatingInjury extends mage.sets.khansoftarkir.DebilitatingInjury { + + public DebilitatingInjury(UUID ownerId) { + super(ownerId); + this.cardNumber = 68; + this.expansionSetCode = "UGIN"; + } + + public DebilitatingInjury(final DebilitatingInjury card) { + super(card); + } + + @Override + public DebilitatingInjury copy() { + return new DebilitatingInjury(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/DragonscaleBoon.java b/Mage.Sets/src/mage/sets/uginsfate/DragonscaleBoon.java new file mode 100644 index 00000000000..95776623f6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/DragonscaleBoon.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DragonscaleBoon extends mage.sets.khansoftarkir.DragonscaleBoon { + + public DragonscaleBoon(UUID ownerId) { + super(ownerId); + this.cardNumber = 131; + this.expansionSetCode = "UGIN"; + } + + public DragonscaleBoon(final DragonscaleBoon card) { + super(card); + } + + @Override + public DragonscaleBoon copy() { + return new DragonscaleBoon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/FierceInvocation.java b/Mage.Sets/src/mage/sets/uginsfate/FierceInvocation.java new file mode 100644 index 00000000000..4125c9e3c1a --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/FierceInvocation.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FierceInvocation extends mage.sets.fatereforged.FierceInvocation { + + public FierceInvocation(UUID ownerId) { + super(ownerId); + this.cardNumber = 98; + this.expansionSetCode = "UGIN"; + } + + public FierceInvocation(final FierceInvocation card) { + super(card); + } + + @Override + public FierceInvocation copy() { + return new FierceInvocation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/FormlessNurturing.java b/Mage.Sets/src/mage/sets/uginsfate/FormlessNurturing.java new file mode 100644 index 00000000000..ba50a6fc061 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/FormlessNurturing.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FormlessNurturing extends mage.sets.fatereforged.FormlessNurturing { + + public FormlessNurturing(UUID ownerId) { + super(ownerId); + this.cardNumber = 129; + this.expansionSetCode = "UGIN"; + } + + public FormlessNurturing(final FormlessNurturing card) { + super(card); + } + + @Override + public FormlessNurturing copy() { + return new FormlessNurturing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/GhostfireBlade.java b/Mage.Sets/src/mage/sets/uginsfate/GhostfireBlade.java new file mode 100644 index 00000000000..4245e1754cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/GhostfireBlade.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GhostfireBlade extends mage.sets.khansoftarkir.GhostfireBlade { + + public GhostfireBlade(UUID ownerId) { + super(ownerId); + this.cardNumber = 220; + this.expansionSetCode = "UGIN"; + } + + public GhostfireBlade(final GhostfireBlade card) { + super(card); + } + + @Override + public GhostfireBlade copy() { + return new GhostfireBlade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/GrimHaruspex.java b/Mage.Sets/src/mage/sets/uginsfate/GrimHaruspex.java new file mode 100644 index 00000000000..eed27094b53 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/GrimHaruspex.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GrimHaruspex extends mage.sets.khansoftarkir.GrimHaruspex { + + public GrimHaruspex(UUID ownerId) { + super(ownerId); + this.cardNumber = 73; + this.expansionSetCode = "UGIN"; + } + + public GrimHaruspex(final GrimHaruspex card) { + super(card); + } + + @Override + public GrimHaruspex copy() { + return new GrimHaruspex(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/HewedStoneRetainers.java b/Mage.Sets/src/mage/sets/uginsfate/HewedStoneRetainers.java new file mode 100644 index 00000000000..4c49ecaa24d --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/HewedStoneRetainers.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class HewedStoneRetainers extends mage.sets.fatereforged.HewedStoneRetainers { + + public HewedStoneRetainers(UUID ownerId) { + super(ownerId); + this.cardNumber = 161; + this.expansionSetCode = "UGIN"; + } + + public HewedStoneRetainers(final HewedStoneRetainers card) { + super(card); + } + + @Override + public HewedStoneRetainers copy() { + return new HewedStoneRetainers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/JeeringInstigator.java b/Mage.Sets/src/mage/sets/uginsfate/JeeringInstigator.java new file mode 100644 index 00000000000..c8239f2bf0e --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/JeeringInstigator.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class JeeringInstigator extends mage.sets.khansoftarkir.JeeringInstigator { + + public JeeringInstigator(UUID ownerId) { + super(ownerId); + this.cardNumber = 113; + this.expansionSetCode = "UGIN"; + } + + public JeeringInstigator(final JeeringInstigator card) { + super(card); + } + + @Override + public JeeringInstigator copy() { + return new JeeringInstigator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/JeskaiInfiltrator.java b/Mage.Sets/src/mage/sets/uginsfate/JeskaiInfiltrator.java new file mode 100644 index 00000000000..0752f22f4ee --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/JeskaiInfiltrator.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class JeskaiInfiltrator extends mage.sets.fatereforged.JeskaiInfiltrator { + + public JeskaiInfiltrator(UUID ownerId) { + super(ownerId); + this.cardNumber = 36; + this.expansionSetCode = "UGIN"; + } + + public JeskaiInfiltrator(final JeskaiInfiltrator card) { + super(card); + } + + @Override + public JeskaiInfiltrator copy() { + return new JeskaiInfiltrator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/MasteryOfTheUnseen.java b/Mage.Sets/src/mage/sets/uginsfate/MasteryOfTheUnseen.java new file mode 100644 index 00000000000..a855a83c8b6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/MasteryOfTheUnseen.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MasteryOfTheUnseen extends mage.sets.fatereforged.MasteryOfTheUnseen { + + public MasteryOfTheUnseen(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "UGIN"; + } + + public MasteryOfTheUnseen(final MasteryOfTheUnseen card) { + super(card); + } + + @Override + public MasteryOfTheUnseen copy() { + return new MasteryOfTheUnseen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/MysticOfTheHiddenWay.java b/Mage.Sets/src/mage/sets/uginsfate/MysticOfTheHiddenWay.java new file mode 100644 index 00000000000..16296140252 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/MysticOfTheHiddenWay.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MysticOfTheHiddenWay extends mage.sets.khansoftarkir.MysticOfTheHiddenWay { + + public MysticOfTheHiddenWay(UUID ownerId) { + super(ownerId); + this.cardNumber = 48; + this.expansionSetCode = "UGIN"; + } + + public MysticOfTheHiddenWay(final MysticOfTheHiddenWay card) { + super(card); + } + + @Override + public MysticOfTheHiddenWay copy() { + return new MysticOfTheHiddenWay(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/RealityShift.java b/Mage.Sets/src/mage/sets/uginsfate/RealityShift.java new file mode 100644 index 00000000000..a8d406146f5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/RealityShift.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RealityShift extends mage.sets.fatereforged.RealityShift { + + public RealityShift(UUID ownerId) { + super(ownerId); + this.cardNumber = 46; + this.expansionSetCode = "UGIN"; + } + + public RealityShift(final RealityShift card) { + super(card); + } + + @Override + public RealityShift copy() { + return new RealityShift(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/RuthlessRipper.java b/Mage.Sets/src/mage/sets/uginsfate/RuthlessRipper.java new file mode 100644 index 00000000000..f7c0be08b1f --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/RuthlessRipper.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RuthlessRipper extends mage.sets.khansoftarkir.RuthlessRipper { + + public RuthlessRipper(UUID ownerId) { + super(ownerId); + this.cardNumber = 88; + this.expansionSetCode = "UGIN"; + } + + public RuthlessRipper(final RuthlessRipper card) { + super(card); + } + + @Override + public RuthlessRipper copy() { + return new RuthlessRipper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/SmiteTheMonstrous.java b/Mage.Sets/src/mage/sets/uginsfate/SmiteTheMonstrous.java new file mode 100644 index 00000000000..bd022cc682a --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/SmiteTheMonstrous.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SmiteTheMonstrous extends mage.sets.innistrad.SmiteTheMonstrous { + + public SmiteTheMonstrous(UUID ownerId) { + super(ownerId); + this.cardNumber = 24; + this.expansionSetCode = "UGIN"; + } + + public SmiteTheMonstrous(final SmiteTheMonstrous card) { + super(card); + } + + @Override + public SmiteTheMonstrous copy() { + return new SmiteTheMonstrous(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/SoulSummons.java b/Mage.Sets/src/mage/sets/uginsfate/SoulSummons.java new file mode 100644 index 00000000000..2ed2f1d57b6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/SoulSummons.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SoulSummons extends mage.sets.fatereforged.SoulSummons { + + public SoulSummons(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "UGIN"; + } + + public SoulSummons(final SoulSummons card) { + super(card); + } + + @Override + public SoulSummons copy() { + return new SoulSummons(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/SultaiEmissary.java b/Mage.Sets/src/mage/sets/uginsfate/SultaiEmissary.java new file mode 100644 index 00000000000..a7351689a8c --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/SultaiEmissary.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SultaiEmissary extends mage.sets.fatereforged.SultaiEmissary { + + public SultaiEmissary(UUID ownerId) { + super(ownerId); + this.cardNumber = 85; + this.expansionSetCode = "UGIN"; + } + + public SultaiEmissary(final SultaiEmissary card) { + super(card); + } + + @Override + public SultaiEmissary copy() { + return new SultaiEmissary(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/UginTheSpiritDragon.java b/Mage.Sets/src/mage/sets/uginsfate/UginTheSpiritDragon.java new file mode 100644 index 00000000000..115fe3b22c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/UginTheSpiritDragon.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class UginTheSpiritDragon extends mage.sets.fatereforged.UginTheSpiritDragon { + + public UginTheSpiritDragon(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "UGIN"; + } + + public UginTheSpiritDragon(final UginTheSpiritDragon card) { + super(card); + } + + @Override + public UginTheSpiritDragon copy() { + return new UginTheSpiritDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/UginsConstruct.java b/Mage.Sets/src/mage/sets/uginsfate/UginsConstruct.java new file mode 100644 index 00000000000..06a37bd92a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/UginsConstruct.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class UginsConstruct extends mage.sets.fatereforged.UginsConstruct { + + public UginsConstruct(UUID ownerId) { + super(ownerId); + this.cardNumber = 164; + this.expansionSetCode = "UGIN"; + } + + public UginsConstruct(final UginsConstruct card) { + super(card); + } + + @Override + public UginsConstruct copy() { + return new UginsConstruct(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/WatcherOfTheRoost.java b/Mage.Sets/src/mage/sets/uginsfate/WatcherOfTheRoost.java new file mode 100644 index 00000000000..2b6239ddc77 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/WatcherOfTheRoost.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WatcherOfTheRoost extends mage.sets.khansoftarkir.WatcherOfTheRoost { + + public WatcherOfTheRoost(UUID ownerId) { + super(ownerId); + this.cardNumber = 30; + this.expansionSetCode = "UGIN"; + } + + public WatcherOfTheRoost(final WatcherOfTheRoost card) { + super(card); + } + + @Override + public WatcherOfTheRoost copy() { + return new WatcherOfTheRoost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/Wildcall.java b/Mage.Sets/src/mage/sets/uginsfate/Wildcall.java new file mode 100644 index 00000000000..e65b6aef50c --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/Wildcall.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Wildcall extends mage.sets.fatereforged.Wildcall { + + public Wildcall(UUID ownerId) { + super(ownerId); + this.cardNumber = 146; + this.expansionSetCode = "UGIN"; + } + + public Wildcall(final Wildcall card) { + super(card); + } + + @Override + public Wildcall copy() { + return new Wildcall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/uginsfate/WriteIntoBeing.java b/Mage.Sets/src/mage/sets/uginsfate/WriteIntoBeing.java new file mode 100644 index 00000000000..30bac9b67e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/uginsfate/WriteIntoBeing.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.sets.uginsfate; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WriteIntoBeing extends mage.sets.fatereforged.WriteIntoBeing { + + public WriteIntoBeing(UUID ownerId) { + super(ownerId); + this.cardNumber = 59; + this.expansionSetCode = "UGIN"; + } + + public WriteIntoBeing(final WriteIntoBeing card) { + super(card); + } + + @Override + public WriteIntoBeing copy() { + return new WriteIntoBeing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/unlimitededition/Lifetap.java b/Mage.Sets/src/mage/sets/unlimitededition/Lifetap.java new file mode 100644 index 00000000000..2e900c7bb5c --- /dev/null +++ b/Mage.Sets/src/mage/sets/unlimitededition/Lifetap.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.sets.unlimitededition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Lifetap extends mage.sets.fifthedition.Lifetap { + + public Lifetap(UUID ownerId) { + super(ownerId); + this.cardNumber = 62; + this.expansionSetCode = "2ED"; + } + + public Lifetap(final Lifetap card) { + super(card); + } + + @Override + public Lifetap copy() { + return new Lifetap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/unlimitededition/Sacrifice.java b/Mage.Sets/src/mage/sets/unlimitededition/Sacrifice.java index b62d1a7e564..26cd491be3b 100644 --- a/Mage.Sets/src/mage/sets/unlimitededition/Sacrifice.java +++ b/Mage.Sets/src/mage/sets/unlimitededition/Sacrifice.java @@ -50,7 +50,7 @@ public class Sacrifice extends CardImpl { // As an additional cost to cast Sacrifice, sacrifice a creature. this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); // Add to your mana pool an amount of {B} equal to the sacrificed creature's converted mana cost. - this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.BlackMana, new SacrificeCostConvertedMana("creature"), + this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.BlackMana(1), new SacrificeCostConvertedMana("creature"), "add to your mana pool an amount of {B} equal to the sacrificed creature's converted mana cost")); } diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/ColosYearling.java b/Mage.Sets/src/mage/sets/urzasdestiny/ColosYearling.java new file mode 100644 index 00000000000..790d390a4e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/ColosYearling.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.sets.urzasdestiny; + +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.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class ColosYearling extends CardImpl { + + public ColosYearling(UUID ownerId) { + super(ownerId, 79, "Colos Yearling", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "UDS"; + this.subtype.add("Goat"); + this.subtype.add("Beast"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Mountainwalk + this.addAbility(new MountainwalkAbility()); + + // {R}: Colos Yearling gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public ColosYearling(final ColosYearling card) { + super(card); + } + + @Override + public ColosYearling copy() { + return new ColosYearling(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java b/Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java index 19d40557c8f..6db9a6ae880 100644 --- a/Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java +++ b/Mage.Sets/src/mage/sets/urzasdestiny/RofellosLlanowarEmissary.java @@ -62,7 +62,7 @@ public class RofellosLlanowarEmissary extends CardImpl { this.toughness = new MageInt(1); // {tap}: Add {G} to your mana pool for each Forest you control. - this.addAbility(new DynamicManaAbility(Mana.GreenMana, new PermanentsOnBattlefieldCount(filter))); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new PermanentsOnBattlefieldCount(filter))); } public RofellosLlanowarEmissary(final RofellosLlanowarEmissary card) { diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/SigilOfSleep.java b/Mage.Sets/src/mage/sets/urzasdestiny/SigilOfSleep.java index 8594f497f6e..7db5c8d1b99 100644 --- a/Mage.Sets/src/mage/sets/urzasdestiny/SigilOfSleep.java +++ b/Mage.Sets/src/mage/sets/urzasdestiny/SigilOfSleep.java @@ -52,6 +52,8 @@ import mage.target.targetpointer.FirstTargetPointer; */ public class SigilOfSleep extends CardImpl { + private final UUID originalId; + public SigilOfSleep(UUID ownerId) { super(ownerId, 46, "Sigil of Sleep", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); this.expansionSetCode = "UDS"; @@ -67,13 +69,14 @@ public class SigilOfSleep extends CardImpl { Effect effect = new ReturnToHandTargetEffect(); effect.setText("return target creature that player controls to its owner's hand"); ability = new DealsDamageToAPlayerAttachedTriggeredAbility(effect, "enchanted", false, true, false); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof DealsDamageToAPlayerAttachedTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { UUID playerId = ability.getEffects().get(0).getTargetPointer().getFirst(game, ability); if (playerId != null) { FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that player controls"); @@ -89,6 +92,7 @@ public class SigilOfSleep extends CardImpl { public SigilOfSleep(final SigilOfSleep card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/SkitteringHorror.java b/Mage.Sets/src/mage/sets/urzasdestiny/SkitteringHorror.java new file mode 100644 index 00000000000..690ba9a05e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/SkitteringHorror.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.sets.urzasdestiny; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author nigelzor + */ +public class SkitteringHorror extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a creature spell"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public SkitteringHorror(UUID ownerId) { + super(ownerId, 70, "Skittering Horror", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "UDS"; + this.subtype.add("Horror"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When you cast a creature spell, sacrifice Skittering Horror. + this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, false)); + } + + public SkitteringHorror(final SkitteringHorror card) { + super(card); + } + + @Override + public SkitteringHorror copy() { + return new SkitteringHorror(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/GoblinMedics.java b/Mage.Sets/src/mage/sets/urzaslegacy/GoblinMedics.java index 94df69ca9ab..0f51156ce52 100644 --- a/Mage.Sets/src/mage/sets/urzaslegacy/GoblinMedics.java +++ b/Mage.Sets/src/mage/sets/urzaslegacy/GoblinMedics.java @@ -32,7 +32,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.target.common.TargetCreatureOrPlayer; @@ -53,7 +53,7 @@ public class GoblinMedics extends CardImpl { this.toughness = new MageInt(1); // Whenever Goblin Medics becomes tapped, it deals 1 damage to target creature or player. - Ability ability = new BecomesTappedTriggeredAbility(new DamageTargetEffect(1)); + Ability ability = new BecomesTappedSourceTriggeredAbility(new DamageTargetEffect(1)); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/JhoirasToolbox.java b/Mage.Sets/src/mage/sets/urzaslegacy/JhoirasToolbox.java index 667af6cd463..d3db8d8c98b 100644 --- a/Mage.Sets/src/mage/sets/urzaslegacy/JhoirasToolbox.java +++ b/Mage.Sets/src/mage/sets/urzaslegacy/JhoirasToolbox.java @@ -28,15 +28,14 @@ package mage.sets.urzaslegacy; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -48,10 +47,10 @@ import mage.target.common.TargetCreaturePermanent; */ public class JhoirasToolbox extends CardImpl { - private static final FilterCreaturePermanent filer = new FilterCreaturePermanent("artifact creature"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature"); static { - filer.add(new CardTypePredicate(CardType.ARTIFACT)); + filter.add(new CardTypePredicate(CardType.ARTIFACT)); } public JhoirasToolbox(UUID ownerId) { @@ -64,7 +63,8 @@ public class JhoirasToolbox extends CardImpl { // {2}: Regenerate target artifact creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{2}")); - ability.addTarget(new TargetCreaturePermanent(filer)); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); } public JhoirasToolbox(final JhoirasToolbox card) { diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/ViashinoSandscout.java b/Mage.Sets/src/mage/sets/urzaslegacy/ViashinoSandscout.java index 3bd1fc5154f..113d371f981 100644 --- a/Mage.Sets/src/mage/sets/urzaslegacy/ViashinoSandscout.java +++ b/Mage.Sets/src/mage/sets/urzaslegacy/ViashinoSandscout.java @@ -28,13 +28,14 @@ package mage.sets.urzaslegacy; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; -import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; /** * @@ -54,7 +55,7 @@ public class ViashinoSandscout extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // At the beginning of the end step, return Viashino Sandscout to its owner's hand. - this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new ReturnToHandSourceEffect(true), false)); + this.addAbility(new BeginningOfEndStepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.ANY, false)); } public ViashinoSandscout(final ViashinoSandscout card) { diff --git a/Mage.Sets/src/mage/sets/urzassaga/CacklingFiend.java b/Mage.Sets/src/mage/sets/urzassaga/CacklingFiend.java index 66f4639b0bc..ec7a3b1cdeb 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/CacklingFiend.java +++ b/Mage.Sets/src/mage/sets/urzassaga/CacklingFiend.java @@ -29,19 +29,13 @@ package mage.sets.urzassaga; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; -import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.TargetController; -import mage.game.Game; -import mage.players.Player; /** * @@ -57,7 +51,7 @@ public class CacklingFiend extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - this.addAbility(FlyingAbility.getInstance()); + // When Cackling Fiend enters the battlefield, each opponent discards a card. this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(TargetController.OPPONENT), false)); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/Contamination.java b/Mage.Sets/src/mage/sets/urzassaga/Contamination.java index d4ccf5e8ec8..aad9a763e9c 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/Contamination.java +++ b/Mage.Sets/src/mage/sets/urzassaga/Contamination.java @@ -102,7 +102,7 @@ class ContaminationReplacementEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); - mana.setToMana(Mana.BlackMana); + mana.setToMana(Mana.BlackMana(1)); return false; } diff --git a/Mage.Sets/src/mage/sets/urzassaga/CrystalChimes.java b/Mage.Sets/src/mage/sets/urzassaga/CrystalChimes.java new file mode 100644 index 00000000000..7f465439940 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/CrystalChimes.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.sets.urzassaga; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CrystalChimes extends mage.sets.commander2015.CrystalChimes { + + public CrystalChimes(UUID ownerId) { + super(ownerId); + this.cardNumber = 292; + this.expansionSetCode = "USG"; + } + + public CrystalChimes(final CrystalChimes card) { + super(card); + } + + @Override + public CrystalChimes copy() { + return new CrystalChimes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/GaeasCradle.java b/Mage.Sets/src/mage/sets/urzassaga/GaeasCradle.java index 5deec944bcf..45db79fcf4d 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/GaeasCradle.java +++ b/Mage.Sets/src/mage/sets/urzassaga/GaeasCradle.java @@ -56,7 +56,7 @@ public class GaeasCradle extends CardImpl { this.expansionSetCode = "USG"; this.supertype.add("Legendary"); - DynamicManaAbility ability = new DynamicManaAbility(Mana.GreenMana, new PermanentsOnBattlefieldCount(filter)); + DynamicManaAbility ability = new DynamicManaAbility(Mana.GreenMana(1), new PermanentsOnBattlefieldCount(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/GaeasEmbrace.java b/Mage.Sets/src/mage/sets/urzassaga/GaeasEmbrace.java index 62339dbe560..2931fd30691 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/GaeasEmbrace.java +++ b/Mage.Sets/src/mage/sets/urzassaga/GaeasEmbrace.java @@ -28,16 +28,11 @@ package mage.sets.urzassaga; import java.util.UUID; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.ColoredManaSymbol; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.RegenerateAttachedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; @@ -45,6 +40,12 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -58,18 +59,18 @@ public class GaeasEmbrace extends CardImpl { this.expansionSetCode = "USG"; 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 gets +3/+3 and has trample. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA))); - + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3)); + Effect effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has trample"); + ability.addEffect(effect); + this.addAbility(ability); // {G}: Regenerate enchanted creature. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), new ColoredManaCost(ColoredManaSymbol.G))); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/IllGottenGains.java b/Mage.Sets/src/mage/sets/urzassaga/IllGottenGains.java index f731566dde4..6e2a10f1d85 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/IllGottenGains.java +++ b/Mage.Sets/src/mage/sets/urzassaga/IllGottenGains.java @@ -94,12 +94,12 @@ class IllGottenGainsEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - for (UUID playerId : controller.getInRange()) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { Target target = new TargetCardInYourGraveyard(0, 3, new FilterCard()); if (target.choose(Outcome.ReturnToHand, player.getId(), source.getSourceId(), game)) { - controller.moveCards(new CardsImpl(target.getTargets()), null, Zone.HAND, source, game); + player.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game); } } } diff --git a/Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.java b/Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.java new file mode 100644 index 00000000000..d3958d12dc1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.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.sets.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.CostImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.players.Player; + +/** + * + * @author emerald000 + */ +public class LurkingEvil extends CardImpl { + + public LurkingEvil(UUID ownerId) { + super(ownerId, 140, "Lurking Evil", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}"); + this.expansionSetCode = "USG"; + + // Pay half your life, rounded up: Lurking Evil becomes a 4/4 Horror creature with flying. + Effect effect = new BecomesCreatureSourceEffect(new LurkingEvilToken(), null, Duration.EndOfGame, true); + effect.setText("{this} becomes a 4/4 Horror creature with flying"); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new LurkingEvilCost())); + } + + public LurkingEvil(final LurkingEvil card) { + super(card); + } + + @Override + public LurkingEvil copy() { + return new LurkingEvil(this); + } +} + +class LurkingEvilCost extends CostImpl { + + LurkingEvilCost() { + this.text = "Pay half your life, rounded up"; + } + + LurkingEvilCost(LurkingEvilCost cost) { + super(cost); + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Player controller = game.getPlayer(controllerId); + return controller != null && !(controller.getLife() > 0 && !controller.canPayLifeCost()); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player controller = game.getPlayer(controllerId); + if (controller != null) { + int currentLife = controller.getLife(); + int lifeToPay = (currentLife + currentLife%2) / 2; // Divide by two and round up. + if (lifeToPay < 0) { + this.paid = true; + } + else { + this.paid = (controller.loseLife(lifeToPay, game) == lifeToPay); + } + return this.paid; + } + return false; + } + + @Override + public LurkingEvilCost copy() { + return new LurkingEvilCost(this); + } +} + +class LurkingEvilToken extends Token { + + LurkingEvilToken() { + super("Horror", "4/4 Horror creature with flying"); + power = new MageInt(4); + toughness = new MageInt(4); + subtype.add("Horror"); + cardType.add(CardType.CREATURE); + this.addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/MobileFort.java b/Mage.Sets/src/mage/sets/urzassaga/MobileFort.java new file mode 100644 index 00000000000..c33774b3560 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/MobileFort.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.sets.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class MobileFort extends CardImpl { + + public MobileFort(UUID ownerId) { + super(ownerId, 303, "Mobile Fort", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "USG"; + this.subtype.add("Wall"); + this.power = new MageInt(0); + this.toughness = new MageInt(6); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {3}: Mobile Fort gets +3/-1 until end of turn and can attack this turn as though it didn't have defender. Activate this ability only once each turn. + Effect effect = new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn); + effect.setText("and can attack as though it didn't have defender"); + Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, -1, Duration.EndOfTurn), new ManaCostsImpl("{3}")); + ability.addEffect(effect); + this.addAbility(ability); + } + + public MobileFort(final MobileFort card) { + super(card); + } + + @Override + public MobileFort copy() { + return new MobileFort(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/ParasiticBond.java b/Mage.Sets/src/mage/sets/urzassaga/ParasiticBond.java new file mode 100644 index 00000000000..f92ea066e29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/ParasiticBond.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.sets.urzassaga; + +import java.util.UUID; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ParasiticBond extends CardImpl { + + public ParasiticBond(UUID ownerId) { + super(ownerId, 145, "Parasitic Bond", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + // At the beginning of the upkeep of enchanted creature's controller, Parasitic Bond deals 2 damage to that player. + Effect effect = new DamageTargetEffect(2); + effect.setText("{this} deals 2 damage to that player"); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, + TargetController.CONTROLLER_ATTACHED_TO, false, true)); + } + + public ParasiticBond(final ParasiticBond card) { + super(card); + } + + @Override + public ParasiticBond copy() { + return new ParasiticBond(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/PriestOfTitania.java b/Mage.Sets/src/mage/sets/urzassaga/PriestOfTitania.java index 29101a91bf0..5bd28d9cf41 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/PriestOfTitania.java +++ b/Mage.Sets/src/mage/sets/urzassaga/PriestOfTitania.java @@ -61,7 +61,7 @@ public class PriestOfTitania extends CardImpl { this.toughness = new MageInt(1); // {T}: Add {G} to your mana pool for each Elf on the battlefield. - this.addAbility(new DynamicManaAbility(Mana.GreenMana, new PermanentsOnBattlefieldCount(filter))); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new PermanentsOnBattlefieldCount(filter))); } public PriestOfTitania(final PriestOfTitania card) { diff --git a/Mage.Sets/src/mage/sets/urzassaga/RainOfFilth.java b/Mage.Sets/src/mage/sets/urzassaga/RainOfFilth.java index e426fb147ff..dd37bd1f3f9 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/RainOfFilth.java +++ b/Mage.Sets/src/mage/sets/urzassaga/RainOfFilth.java @@ -53,7 +53,7 @@ public class RainOfFilth extends CardImpl { // Until end of turn, lands you control gain "Sacrifice this land: Add {B} to your mana pool." - ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new SacrificeSourceCost()); + ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new SacrificeSourceCost()); this.getSpellAbility().addEffect(new GainAbilityAllEffect(ability, Duration.EndOfTurn, new FilterControlledLandPermanent())); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/ScoriaWurm.java b/Mage.Sets/src/mage/sets/urzassaga/ScoriaWurm.java new file mode 100644 index 00000000000..4941f99d6e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/ScoriaWurm.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.sets.urzassaga; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ScoriaWurm extends mage.sets.tenthedition.ScoriaWurm { + + public ScoriaWurm(UUID ownerId) { + super(ownerId); + this.cardNumber = 212; + this.expansionSetCode = "USG"; + } + + public ScoriaWurm(final ScoriaWurm card) { + super(card); + } + + @Override + public ScoriaWurm copy() { + return new ScoriaWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/SerrasSanctum.java b/Mage.Sets/src/mage/sets/urzassaga/SerrasSanctum.java index 5561ab50c3f..2cbb054907b 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/SerrasSanctum.java +++ b/Mage.Sets/src/mage/sets/urzassaga/SerrasSanctum.java @@ -56,7 +56,7 @@ public class SerrasSanctum extends CardImpl { this.expansionSetCode = "USG"; this.supertype.add("Legendary"); - DynamicManaAbility ability = new DynamicManaAbility(Mana.WhiteMana, new PermanentsOnBattlefieldCount(filter)); + DynamicManaAbility ability = new DynamicManaAbility(Mana.WhiteMana(1), new PermanentsOnBattlefieldCount(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java b/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java index be3d7a99302..1b1815af39d 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java +++ b/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.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.sets.urzassaga; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SpellCastControllerTriggeredAbility; -import mage.abilities.effects.common.SacrificeSourceEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; - -/** - * - * @author hanasu - */ -public class SkitteringSkirge extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - - public SkitteringSkirge(UUID ownerId) { - super(ownerId, 158, "Skittering Skirge", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}{B}"); - this.expansionSetCode = "USG"; - this.subtype.add("Imp"); - this.power = new MageInt(3); - this.toughness = new MageInt(2); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // When you cast a creature spell, sacrifice Skittering Skirge. - this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, true)); - } - - public SkitteringSkirge(final SkitteringSkirge card) { - super(card); - } - - @Override - public SkitteringSkirge copy() { - return new SkitteringSkirge(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.sets.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author hanasu + */ +public class SkitteringSkirge extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a creature spell"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public SkitteringSkirge(UUID ownerId) { + super(ownerId, 158, "Skittering Skirge", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Imp"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When you cast a creature spell, sacrifice Skittering Skirge. + this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, false)); + } + + public SkitteringSkirge(final SkitteringSkirge card) { + super(card); + } + + @Override + public SkitteringSkirge copy() { + return new SkitteringSkirge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/TolarianAcademy.java b/Mage.Sets/src/mage/sets/urzassaga/TolarianAcademy.java index 893432d3eaa..2ab836dae0b 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/TolarianAcademy.java +++ b/Mage.Sets/src/mage/sets/urzassaga/TolarianAcademy.java @@ -56,7 +56,7 @@ public class TolarianAcademy extends CardImpl { this.supertype.add("Legendary"); this.expansionSetCode = "USG"; - DynamicManaAbility ability = new DynamicManaAbility(Mana.BlueMana, new PermanentsOnBattlefieldCount(filter)); + DynamicManaAbility ability = new DynamicManaAbility(Mana.BlueMana(1), new PermanentsOnBattlefieldCount(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/VampiricEmbrace.java b/Mage.Sets/src/mage/sets/urzassaga/VampiricEmbrace.java index e8157d73dcb..325bceb58f1 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/VampiricEmbrace.java +++ b/Mage.Sets/src/mage/sets/urzassaga/VampiricEmbrace.java @@ -31,6 +31,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility; 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; @@ -65,11 +66,12 @@ public class VampiricEmbrace extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature gets +2/+2 and has flying. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); - + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2)); + Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has flying"); + ability.addEffect(effect); + this.addAbility(ability); // Whenever a creature dealt damage by enchanted creature this turn dies, put a +1/+1 counter on that creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new DiesAndDealtDamageThisTurnTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), AttachmentType.AURA))); } diff --git a/Mage.Sets/src/mage/sets/urzassaga/ViashinoSandswimmer.java b/Mage.Sets/src/mage/sets/urzassaga/ViashinoSandswimmer.java new file mode 100644 index 00000000000..ce8e7085628 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/ViashinoSandswimmer.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.sets.urzassaga; + +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.ReturnToHandSourceEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class ViashinoSandswimmer extends CardImpl { + + public ViashinoSandswimmer(UUID ownerId) { + super(ownerId, 225, "Viashino Sandswimmer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "USG"; + this.subtype.add("Viashino"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // {R}: Flip a coin. If you win the flip, return Viashino Sandswimmer to its owner's hand. If you lose the flip, sacrifice Viashino Sandswimmer. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ViashinoSandswimmerEffect(), new ManaCostsImpl("{R}"))); + } + + public ViashinoSandswimmer(final ViashinoSandswimmer card) { + super(card); + } + + @Override + public ViashinoSandswimmer copy() { + return new ViashinoSandswimmer(this); + } +} + +class ViashinoSandswimmerEffect extends OneShotEffect { + + public ViashinoSandswimmerEffect() { + super(Outcome.Damage); + staticText = "Flip a coin. If you win the flip, return {this} to its owner's hand. If you lose the flip, sacrifice {this}"; + } + + public ViashinoSandswimmerEffect(ViashinoSandswimmerEffect 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) { + if (controller.flipCoin(game)) { + new ReturnToHandSourceEffect().apply(game, source); + return true; + } else { + new SacrificeSourceEffect().apply(game, source); + return true; + } + } + return false; + } + + @Override + public ViashinoSandswimmerEffect copy() { + return new ViashinoSandswimmerEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/ZephidsEmbrace.java b/Mage.Sets/src/mage/sets/urzassaga/ZephidsEmbrace.java index 0c90e838c91..b3608bf3dc5 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/ZephidsEmbrace.java +++ b/Mage.Sets/src/mage/sets/urzassaga/ZephidsEmbrace.java @@ -29,23 +29,21 @@ package mage.sets.urzassaga; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.SubLayer; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffectImpl; +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.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -58,15 +56,23 @@ public class ZephidsEmbrace extends CardImpl { public ZephidsEmbrace(UUID ownerId) { super(ownerId, 114, "Zephid's Embrace", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); this.expansionSetCode = "USG"; - this.subtype.add("Aura"); + // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ZephidsEmbraceEffect())); + // Enchanted creature gets +2/+2 and has flying and shroud. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2)); + Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has flying"); + ability.addEffect(effect); + effect = new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA); + effect.setText("and shroud"); + ability.addEffect(effect); + this.addAbility(ability); } public ZephidsEmbrace(final ZephidsEmbrace card) { @@ -78,57 +84,3 @@ public class ZephidsEmbrace extends CardImpl { return new ZephidsEmbrace(this); } } - -class ZephidsEmbraceEffect extends ContinuousEffectImpl { - - public ZephidsEmbraceEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Enchanted creature gets +2/+2 and has flying and shroud"; - } - - public ZephidsEmbraceEffect(final ZephidsEmbraceEffect effect) { - super(effect); - } - - @Override - public ZephidsEmbraceEffect copy() { - return new ZephidsEmbraceEffect(this); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature != null) { - switch (layer) { - case PTChangingEffects_7: - if (sublayer == SubLayer.ModifyPT_7c) { - creature.addPower(2); - creature.addToughness(2); - } - break; - case AbilityAddingRemovingEffects_6: - if (sublayer == SubLayer.NA) { - creature.addAbility(FlyingAbility.getInstance(), game); - creature.addAbility(ShroudAbility.getInstance(), game); - } - break; - } - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.AbilityAddingRemovingEffects_6 || layer == Layer.PTChangingEffects_7; - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/venservskoth/GreaterStoneSpirit.java b/Mage.Sets/src/mage/sets/venservskoth/GreaterStoneSpirit.java new file mode 100644 index 00000000000..8ad60995aac --- /dev/null +++ b/Mage.Sets/src/mage/sets/venservskoth/GreaterStoneSpirit.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.sets.venservskoth; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +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) { + super(ownerId, 61, "Greater Stone Spirit", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.expansionSetCode = "DDI"; + this.subtype.add("Elemental"); + this.subtype.add("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}")); + 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}")); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public GreaterStoneSpirit(final GreaterStoneSpirit card) { + super(card); + } + + @Override + public GreaterStoneSpirit copy() { + return new GreaterStoneSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/venservskoth/SawtoothLoon.java b/Mage.Sets/src/mage/sets/venservskoth/SawtoothLoon.java index ccef7acff4d..a4c3ff1e73c 100644 --- a/Mage.Sets/src/mage/sets/venservskoth/SawtoothLoon.java +++ b/Mage.Sets/src/mage/sets/venservskoth/SawtoothLoon.java @@ -35,12 +35,13 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; import mage.abilities.keyword.FlyingAbility; -import mage.cards.Card; import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; +import mage.filter.FilterCard; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -58,8 +59,8 @@ public class SawtoothLoon extends CardImpl { static { Predicates.or( - new ColorPredicate(ObjectColor.WHITE), - new ColorPredicate(ObjectColor.BLUE)); + new ColorPredicate(ObjectColor.WHITE), + new ColorPredicate(ObjectColor.BLUE)); } public SawtoothLoon(UUID ownerId) { @@ -110,21 +111,15 @@ class SawtoothLoonEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { controller.drawCards(2, game); - putOnLibrary(controller, source, game); - putOnLibrary(controller, source, game); + TargetCardInHand target = new TargetCardInHand(2, 2, new FilterCard()); + controller.chooseTarget(Outcome.Detriment, target, source, game); + Cards cardsToLibrary = new CardsImpl(target.getTargets()); + if (!cardsToLibrary.isEmpty()) { + controller.putCardsOnBottomOfLibrary(cardsToLibrary, game, source, false); + } return true; } return false; } - private boolean putOnLibrary(Player player, Ability source, Game game) { - TargetCardInHand target = new TargetCardInHand(); - player.chooseTarget(Outcome.ReturnToHand, target, source, game); - Card card = player.getHand().get(target.getFirstTarget(), game); - if (card != null) { - player.getHand().remove(card); - player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, false, false); - } - return true; - } } diff --git a/Mage.Sets/src/mage/sets/vintagemasters/ArmorOfThorns.java b/Mage.Sets/src/mage/sets/vintagemasters/ArmorOfThorns.java new file mode 100644 index 00000000000..5935dd45b28 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/ArmorOfThorns.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.sets.vintagemasters; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ArmorOfThorns extends mage.sets.mirage.ArmorOfThorns { + + public ArmorOfThorns(UUID ownerId) { + super(ownerId); + this.cardNumber = 194; + this.expansionSetCode = "VMA"; + } + + public ArmorOfThorns(final ArmorOfThorns card) { + super(card); + } + + @Override + public ArmorOfThorns copy() { + return new ArmorOfThorns(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/DecreeOfJustice.java b/Mage.Sets/src/mage/sets/vintagemasters/DecreeOfJustice.java index 247b5ecf8b7..241c2d5b492 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/DecreeOfJustice.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/DecreeOfJustice.java @@ -60,7 +60,7 @@ public class DecreeOfJustice extends CardImpl { // Put X 4/4 white Angel creature tokens with flying onto the battlefield. - this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken("C14"), new ManacostVariableValue())); + this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken(), new ManacostVariableValue())); // Cycling {2}{W} this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{W}"))); diff --git a/Mage.Sets/src/mage/sets/vintagemasters/FlowstoneSculpture.java b/Mage.Sets/src/mage/sets/vintagemasters/FlowstoneSculpture.java new file mode 100644 index 00000000000..6d67f89d7a5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/FlowstoneSculpture.java @@ -0,0 +1,144 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.vintagemasters; + +import java.util.HashSet; +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.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LoneFox + */ +public class FlowstoneSculpture extends CardImpl { + + public FlowstoneSculpture(UUID ownerId) { + super(ownerId, 268, "Flowstone Sculpture", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); + this.expansionSetCode = "VMA"; + this.subtype.add("Shapeshifter"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {2}, Discard a card: Put a +1/+1 counter on Flowstone Sculpture or Flowstone Sculpture gains flying, first strike, or trample. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new FlowstoneSculptureEffect(), new ManaCostsImpl("{2}")); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public FlowstoneSculpture(final FlowstoneSculpture card) { + super(card); + } + + @Override + public FlowstoneSculpture copy() { + return new FlowstoneSculpture(this); + } +} + +class FlowstoneSculptureEffect extends OneShotEffect { + + private static final HashSet choices = new HashSet<>(); + + static { + choices.add("+1/+1 counter"); + choices.add("Flying"); + choices.add("First Strike"); + choices.add("Trample"); + } + + public FlowstoneSculptureEffect() { + super(Outcome.Benefit); + staticText = "Put a +1/+1 counter on {this} or {this} gains flying, first strike, or trample."; + } + + public FlowstoneSculptureEffect(final FlowstoneSculptureEffect effect) { + super(effect); + } + + @Override + public FlowstoneSculptureEffect copy() { + return new FlowstoneSculptureEffect(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 ability to add"); + choice.setChoices(choices); + while(!controller.choose(outcome, choice, game)) { + if(controller.canRespond()) { + return false; + } + } + + String chosen = choice.getChoice(); + if(chosen.equals("+1/+1 counter")) { + return new AddCountersSourceEffect(CounterType.P1P1.createInstance()).apply(game, source); + } + else { + Ability gainedAbility; + if(chosen.equals("Flying")) { + gainedAbility = FlyingAbility.getInstance(); + } + else if(chosen.equals("First strike")) { + gainedAbility = FirstStrikeAbility.getInstance(); + } + else { + gainedAbility = TrampleAbility.getInstance(); + } + game.addEffect(new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield), source); + return true; + } + + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/GoblinGoon.java b/Mage.Sets/src/mage/sets/vintagemasters/GoblinGoon.java new file mode 100644 index 00000000000..e36435f4894 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/GoblinGoon.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.vintagemasters; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author emerald000 + */ +public class GoblinGoon extends mage.sets.legions.GoblinGoon { + + public GoblinGoon(UUID ownerId) { + super(ownerId); + this.cardNumber = 166; + this.expansionSetCode = "VMA"; + this.rarity = Rarity.UNCOMMON; + } + + public GoblinGoon(final GoblinGoon card) { + super(card); + } + + @Override + public GoblinGoon copy() { + return new GoblinGoon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java b/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java index d94e06339c3..2af317e2e49 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java @@ -29,6 +29,7 @@ package mage.sets.vintagemasters; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.ManacostVariableValue; @@ -44,14 +45,13 @@ import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; import mage.target.Target; -import mage.target.Targets; import mage.target.common.TargetCreatureOrPlayer; import mage.util.CardUtil; /** * * @author LoneFox - + * */ public class KaerveksTorch extends CardImpl { @@ -95,13 +95,11 @@ class KaerveksTorchCostIncreaseEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - if(abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) - { - for(UUID modeId: abilityToModify.getModes().getSelectedModes()) { - abilityToModify.getModes().setActiveMode(modeId); - for(Target target: abilityToModify.getTargets()) { - for(UUID id: target.getTargets()) { - if(id.equals(source.getSourceObject(game).getId())) { + if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { + for (Mode mode : abilityToModify.getModes().getSelectedModes()) { + for (Target target : mode.getTargets()) { + for (UUID targetId : target.getTargets()) { + if (targetId.equals(source.getSourceObject(game).getId())) { return true; } } diff --git a/Mage.Sets/src/mage/sets/vintagemasters/KrovikanSorcerer.java b/Mage.Sets/src/mage/sets/vintagemasters/KrovikanSorcerer.java new file mode 100644 index 00000000000..dbc7f439960 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/KrovikanSorcerer.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.sets.vintagemasters; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetCardInHand; + +/** + * + * @author emerald000 + */ +public class KrovikanSorcerer extends CardImpl { + + private static final FilterCard filterNonBlack = new FilterCard("a nonblack card"); + private static final FilterCard filterBlack = new FilterCard("a black card"); + static { + filterNonBlack.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + filterBlack.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public KrovikanSorcerer(UUID ownerId) { + super(ownerId, 77, "Krovikan Sorcerer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "VMA"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}, Discard a nonblack card: Draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost()); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(filterNonBlack))); + this.addAbility(ability); + + // {tap}, Discard a black card: Draw two cards, then discard one of them. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KrovikanSorcererEffect(), new TapSourceCost()); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(filterBlack))); + this.addAbility(ability); + } + + public KrovikanSorcerer(final KrovikanSorcerer card) { + super(card); + } + + @Override + public KrovikanSorcerer copy() { + return new KrovikanSorcerer(this); + } +} + +class KrovikanSorcererEffect extends OneShotEffect { + + KrovikanSorcererEffect() { + super(Outcome.DrawCard); + this.staticText = "Draw two cards, then discard one of them"; + } + + KrovikanSorcererEffect(final KrovikanSorcererEffect effect) { + super(effect); + } + + @Override + public KrovikanSorcererEffect copy() { + return new KrovikanSorcererEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + Cards initialHand = player.getHand().copy(); + player.drawCards(2, game); + Cards drawnCards = new CardsImpl(Zone.PICK); + for (UUID cardId : player.getHand()) { + if (!initialHand.contains(cardId)) { + drawnCards.add(cardId); + } + } + if (drawnCards.size() > 0) { + TargetCard cardToDiscard = new TargetCard(Zone.PICK, new FilterCard("card to discard")); + cardToDiscard.setNotTarget(true); + if (player.choose(Outcome.Discard, drawnCards, cardToDiscard, game)) { + Card card = player.getHand().get(cardToDiscard.getFirstTarget(), game); + if (card != null) { + return player.discard(card, source, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/LurkingEvil.java b/Mage.Sets/src/mage/sets/vintagemasters/LurkingEvil.java new file mode 100644 index 00000000000..14cbf8bb012 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/LurkingEvil.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.vintagemasters; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author emerald000 + */ +public class LurkingEvil extends mage.sets.urzassaga.LurkingEvil { + + public LurkingEvil(UUID ownerId) { + super(ownerId); + this.cardNumber = 127; + this.expansionSetCode = "VMA"; + this.rarity = Rarity.UNCOMMON; + } + + public LurkingEvil(final LurkingEvil card) { + super(card); + } + + @Override + public LurkingEvil copy() { + return new LurkingEvil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/MindsDesire.java b/Mage.Sets/src/mage/sets/vintagemasters/MindsDesire.java index 0533cb5b646..184e2b898b9 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/MindsDesire.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/MindsDesire.java @@ -140,7 +140,7 @@ class MindsDesireCastFromExileEffect extends AsThoughEffectImpl { Card card = game.getCard(sourceId); if (card != null && game.getState().getZone(sourceId) == Zone.EXILED) { Player player = game.getPlayer(affectedControllerId); - player.setCastSourceIdWithAlternateMana(sourceId, null); + player.setCastSourceIdWithAlternateMana(sourceId, null, null); return true; } } diff --git a/Mage.Sets/src/mage/sets/vintagemasters/NorwoodPriestess.java b/Mage.Sets/src/mage/sets/vintagemasters/NorwoodPriestess.java index 423afe9b1c1..b1ca906bdae 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/NorwoodPriestess.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/NorwoodPriestess.java @@ -62,7 +62,7 @@ public class NorwoodPriestess extends CardImpl { this.toughness = new MageInt(1); // {tap}: You may put a green creature card from your hand onto the battlefield. Activate this ability only during your turn, before attackers are declared. - Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new NorwoodPriestessEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance()); this.addAbility(ability); } @@ -80,9 +80,9 @@ public class NorwoodPriestess extends CardImpl { class NorwoodPriestessEffect extends OneShotEffect { private static final String choiceText = "Put a green creature card from your hand onto the battlefield?"; - + private static final FilterCreatureCard filter = new FilterCreatureCard("a green creature card"); - + static { filter.add(new ColorPredicate(ObjectColor.GREEN)); } @@ -103,19 +103,18 @@ class NorwoodPriestessEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player == null || !player.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) { return false; } TargetCardInHand target = new TargetCardInHand(filter); - if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { + if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { - card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId()); - return true; + return controller.moveCards(card, Zone.BATTLEFIELD, source, game); } } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/ReignOfThePit.java b/Mage.Sets/src/mage/sets/vintagemasters/ReignOfThePit.java new file mode 100644 index 00000000000..46e2cf0c3ae --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/ReignOfThePit.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.sets.vintagemasters; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class ReignOfThePit extends CardImpl { + + public ReignOfThePit(UUID ownerId) { + super(ownerId, 138, "Reign of the Pit", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "VMA"; + + // Each player sacrifices a creature. Put an X/X black Demon creature token with flying onto the battlefield, where X is the total power of the creatures sacrificed this way. + this.getSpellAbility().addEffect(new ReignOfThePitEffect()); + } + + public ReignOfThePit(final ReignOfThePit card) { + super(card); + } + + @Override + public ReignOfThePit copy() { + return new ReignOfThePit(this); + } +} + +class ReignOfThePitEffect extends OneShotEffect { + + ReignOfThePitEffect() { + super(Outcome.Sacrifice); + this.staticText = "Each player sacrifices a creature. Put an X/X black Demon creature token with flying onto the battlefield, where X is the total power of the creatures sacrificed this way"; + } + + ReignOfThePitEffect(final ReignOfThePitEffect effect) { + super(effect); + } + + @Override + public ReignOfThePitEffect copy() { + return new ReignOfThePitEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + int totalPowerSacrificed = 0; + List perms = new ArrayList<>(); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true); + if (target.canChoose(player.getId(), game)) { + while (!target.isChosen() && player.canRespond()) { + player.choose(Outcome.Sacrifice, target, source.getSourceId(), game); + } + perms.addAll(target.getTargets()); + } + } + } + for (UUID permID : perms) { + Permanent permanent = game.getPermanent(permID); + if (permanent != null) { + int power = permanent.getPower().getValue(); + if (permanent.sacrifice(source.getSourceId(), game)) { + totalPowerSacrificed += power; + } + } + } + new CreateTokenEffect(new ReignOfThePitToken(totalPowerSacrificed)).apply(game, source); + return true; + } +} + +class ReignOfThePitToken extends Token { + + ReignOfThePitToken(int xValue) { + super("Demon", "X/X black Demon creature token with flying"); + power = new MageInt(xValue); + toughness = new MageInt(xValue); + color.setBlack(true); + subtype.add("Demon"); + cardType.add(CardType.CREATURE); + this.addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/RitesOfInitiation.java b/Mage.Sets/src/mage/sets/vintagemasters/RitesOfInitiation.java new file mode 100644 index 00000000000..7ce9f398b1d --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/RitesOfInitiation.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.vintagemasters; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author emerald000 + */ +public class RitesOfInitiation extends mage.sets.odyssey.RitesOfInitiation { + + public RitesOfInitiation(UUID ownerId) { + super(ownerId); + this.cardNumber = 182; + this.expansionSetCode = "VMA"; + this.rarity = Rarity.UNCOMMON; + } + + public RitesOfInitiation(final RitesOfInitiation card) { + super(card); + } + + @Override + public RitesOfInitiation copy() { + return new RitesOfInitiation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/SaprolingBurst.java b/Mage.Sets/src/mage/sets/vintagemasters/SaprolingBurst.java new file mode 100644 index 00000000000..3e8b281f8f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/SaprolingBurst.java @@ -0,0 +1,242 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.vintagemasters; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.ZoneChangeTriggeredAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.FadingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; +import mage.util.CardUtil; + +/** + * + * @author emerald000 + */ +public class SaprolingBurst extends CardImpl { + + public SaprolingBurst(UUID ownerId) { + super(ownerId, 230, "Saproling Burst", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}"); + this.expansionSetCode = "VMA"; + + // Fading 7 + this.addAbility(new FadingAbility(7, this)); + + // Remove a fade counter from Saproling Burst: Put a green Saproling creature token onto the battlefield. It has "This creature's power and toughness are each equal to the number of fade counters on Saproling Burst." + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SaprolingBurstCreateTokenEffect(), new RemoveCountersSourceCost(CounterType.FADE.createInstance()))); + + // When Saproling Burst leaves the battlefield, destroy all tokens put onto the battlefield with Saproling Burst. They can't be regenerated. + this.addAbility(new SaprolingBurstLeavesBattlefieldTriggeredAbility()); + } + + public SaprolingBurst(final SaprolingBurst card) { + super(card); + } + + @Override + public SaprolingBurst copy() { + return new SaprolingBurst(this); + } +} + +class SaprolingBurstCreateTokenEffect extends OneShotEffect { + + SaprolingBurstCreateTokenEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Put a green Saproling creature token onto the battlefield. It has \"This creature's power and toughness are each equal to the number of fade counters on {this}.\""; + } + + SaprolingBurstCreateTokenEffect(final SaprolingBurstCreateTokenEffect effect) { + super(effect); + } + + @Override + public SaprolingBurstCreateTokenEffect copy() { + return new SaprolingBurstCreateTokenEffect(this); + } + + @Override + @SuppressWarnings("unchecked") + public boolean apply(Game game, Ability source) { + Token token = new SaprolingBurstToken(new MageObjectReference(source.getSourceObject(game), game)); + token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + Object object = game.getState().getValue(CardUtil.getCardZoneString("_tokensCreated", source.getSourceId(), game)); + Set tokensCreated; + if (object != null) { + tokensCreated = (Set) object; + } + else { + tokensCreated = new HashSet<>(); + } + for (UUID tokenId : token.getLastAddedTokenIds()) { + tokensCreated.add(tokenId); + } + game.getState().setValue(CardUtil.getCardZoneString("_tokensCreated", source.getSourceId(), game), tokensCreated); + } + return true; + } +} + +class SaprolingBurstToken extends Token { + + 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.cardType.add(CardType.CREATURE); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new SaprolingBurstTokenDynamicValue(saprolingBurstMOR), Duration.WhileOnBattlefield))); + } +} + +class SaprolingBurstTokenDynamicValue implements DynamicValue { + + private final MageObjectReference saprolingBurstMOR; + + SaprolingBurstTokenDynamicValue(MageObjectReference saprolingBurstMOR) { + this.saprolingBurstMOR = saprolingBurstMOR; + } + + SaprolingBurstTokenDynamicValue(final SaprolingBurstTokenDynamicValue dynamicValue) { + this.saprolingBurstMOR = dynamicValue.saprolingBurstMOR; + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + Permanent permanent = this.saprolingBurstMOR.getPermanent(game); + if (permanent != null) { + return permanent.getCounters().getCount(CounterType.FADE); + } + return 0; + } + + @Override + public SaprolingBurstTokenDynamicValue copy() { + return new SaprolingBurstTokenDynamicValue(this); + } + + @Override + public String toString() { + return "X"; + } + + @Override + public String getMessage() { + return "the number of fade counters on Saproling Burst"; + } +} + +class SaprolingBurstLeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility { + + SaprolingBurstLeavesBattlefieldTriggeredAbility() { + super(Zone.BATTLEFIELD, null, new SaprolingBurstDestroyEffect(), "When {this} leaves the battlefield, ", false); + } + + SaprolingBurstLeavesBattlefieldTriggeredAbility(SaprolingBurstLeavesBattlefieldTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (super.checkTrigger(event, game)) { + for (Effect effect : this.getEffects()) { + if (effect instanceof SaprolingBurstDestroyEffect) { + ((SaprolingBurstDestroyEffect) effect).setCardZoneString(CardUtil.getCardZoneString("_tokensCreated", this.getSourceId(), game, true)); + } + } + return true; + } + return false; + } + + @Override + public SaprolingBurstLeavesBattlefieldTriggeredAbility copy() { + return new SaprolingBurstLeavesBattlefieldTriggeredAbility(this); + } +} + +class SaprolingBurstDestroyEffect extends OneShotEffect { + + private String cardZoneString; + + SaprolingBurstDestroyEffect() { + super(Outcome.Benefit); + this.staticText = "destroy all tokens put onto the battlefield with {this}. They can't be regenerated"; + } + + SaprolingBurstDestroyEffect(final SaprolingBurstDestroyEffect effect) { + super(effect); + this.cardZoneString = effect.cardZoneString; + } + + @Override + public SaprolingBurstDestroyEffect copy() { + return new SaprolingBurstDestroyEffect(this); + } + + @Override + @SuppressWarnings("unchecked") + 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/sets/vintagemasters/SkirgeFamiliar.java b/Mage.Sets/src/mage/sets/vintagemasters/SkirgeFamiliar.java index bcd11c0a87c..1134ee886cc 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/SkirgeFamiliar.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/SkirgeFamiliar.java @@ -55,7 +55,7 @@ public class SkirgeFamiliar extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Discard a card: Add {B} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new DiscardCardCost(false))); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new DiscardCardCost(false))); } public SkirgeFamiliar(final SkirgeFamiliar card) { diff --git a/Mage.Sets/src/mage/sets/vintagemasters/ZhalfirinCrusader.java b/Mage.Sets/src/mage/sets/vintagemasters/ZhalfirinCrusader.java new file mode 100644 index 00000000000..1720e354f31 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/ZhalfirinCrusader.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.sets.vintagemasters; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ZhalfirinCrusader extends mage.sets.visions.ZhalfirinCrusader { + + public ZhalfirinCrusader(UUID ownerId) { + super(ownerId); + this.cardNumber = 54; + this.expansionSetCode = "VMA"; + } + + public ZhalfirinCrusader(final ZhalfirinCrusader card) { + super(card); + } + + @Override + public ZhalfirinCrusader copy() { + return new ZhalfirinCrusader(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/Desertion.java b/Mage.Sets/src/mage/sets/visions/Desertion.java index 5c2f1b08387..d963b62b70c 100644 --- a/Mage.Sets/src/mage/sets/visions/Desertion.java +++ b/Mage.Sets/src/mage/sets/visions/Desertion.java @@ -28,10 +28,8 @@ package mage.sets.visions; 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.constants.CardType; import mage.constants.Outcome; @@ -41,9 +39,7 @@ import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.stack.Spell; -import mage.game.stack.StackObject; +import mage.players.Player; import mage.target.TargetSpell; /** @@ -97,25 +93,9 @@ class DesertionEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - UUID objectId = source.getFirstTarget(); - UUID sourceId = source.getSourceId(); - - StackObject stackObject = game.getStack().getStackObject(objectId); - if (stackObject != null && !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) { - if (stackObject instanceof Spell) { - game.rememberLKI(objectId, Zone.STACK, (Spell) stackObject); - game.getStack().remove(stackObject); - if (!((Spell) stackObject).isCopiedSpell() && filter.match(stackObject, source.getSourceId(), source.getControllerId(), game)) { - MageObject card = game.getObject(stackObject.getSourceId()); - if (card instanceof Card) { - ((Card) card).putOntoBattlefield(game, Zone.STACK, source.getSourceId(), source.getControllerId()); - } - } else { - stackObject.counter(sourceId, game); - } - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId())); - return true; - } + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.BATTLEFIELD, false, false); } return false; } diff --git a/Mage.Sets/src/mage/sets/visions/FloodedShoreline.java b/Mage.Sets/src/mage/sets/visions/FloodedShoreline.java new file mode 100644 index 00000000000..49d125f91b9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/FloodedShoreline.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.sets.visions; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class FloodedShoreline extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands"); + + static { + filter.add(new SubtypePredicate("Island")); + } + + public FloodedShoreline(UUID ownerId) { + super(ownerId, 32, "Flooded Shoreline", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); + this.expansionSetCode = "VIS"; + + // {U}{U}, Return two Islands you control to their owner's hand: Return target creature to its owner's hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{U}{U}")); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2,2, filter, true))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public FloodedShoreline(final FloodedShoreline card) { + super(card); + } + + @Override + public FloodedShoreline copy() { + return new FloodedShoreline(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/GiantCaterpillar.java b/Mage.Sets/src/mage/sets/visions/GiantCaterpillar.java new file mode 100644 index 00000000000..09ee570ba3d --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/GiantCaterpillar.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.sets.visions; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class GiantCaterpillar extends mage.sets.mercadianmasques.GiantCaterpillar { + + public GiantCaterpillar(UUID ownerId) { + super(ownerId); + this.cardNumber = 58; + this.expansionSetCode = "VIS"; + } + + public GiantCaterpillar(final GiantCaterpillar card) { + super(card); + } + + @Override + public GiantCaterpillar copy() { + return new GiantCaterpillar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/Impulse.java b/Mage.Sets/src/mage/sets/visions/Impulse.java index a259fd3b8e1..2a3a2bd0dba 100644 --- a/Mage.Sets/src/mage/sets/visions/Impulse.java +++ b/Mage.Sets/src/mage/sets/visions/Impulse.java @@ -46,7 +46,6 @@ public class Impulse extends CardImpl { super(ownerId, 34, "Impulse", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); this.expansionSetCode = "VIS"; - // Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); diff --git a/Mage.Sets/src/mage/sets/visions/KeeperOfKookus.java b/Mage.Sets/src/mage/sets/visions/KeeperOfKookus.java new file mode 100644 index 00000000000..6c8d798a12c --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/KeeperOfKookus.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.sets.visions; + +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.GainAbilitySourceEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author BursegSardaukar + */ +public class KeeperOfKookus extends CardImpl { + + private static final FilterCard filter = new FilterCard("from red"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + + public KeeperOfKookus(UUID ownerId) { + super(ownerId, 85, "Keeper of Kookus", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Goblin"); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Keeper of Kookus gains protection from red until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new ProtectionAbility(filter), Duration.EndOfTurn),new ManaCostsImpl("{R")); + this.addAbility(ability); + } + + public KeeperOfKookus(final KeeperOfKookus card) { + super(card); + } + + @Override + public KeeperOfKookus copy() { + return new KeeperOfKookus(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/visions/Mundungu.java b/Mage.Sets/src/mage/sets/visions/Mundungu.java new file mode 100644 index 00000000000..ca0f29d4f2b --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/Mundungu.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.sets.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetSpell; + +/** + * + * @author nigelzor + */ +public class Mundungu extends CardImpl { + + public Mundungu(UUID ownerId) { + super(ownerId, 132, "Mundungu", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Counter target spell unless its controller pays {1} and 1 life. + CostsImpl costs = new CostsImpl<>(); + costs.add(new GenericManaCost(1)); + costs.add(new PayLifeCost(1)); + costs.setText("{1} and 1 life"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(costs), new TapSourceCost()); + ability.addTarget(new TargetSpell()); + this.addAbility(ability); + } + + public Mundungu(final Mundungu card) { + super(card); + } + + @Override + public Mundungu copy() { + return new Mundungu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/MysticVeil.java b/Mage.Sets/src/mage/sets/visions/MysticVeil.java new file mode 100644 index 00000000000..bfcb4210d71 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/MysticVeil.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.sets.visions; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SacrificeIfCastAtInstantTimeTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + + * + * @author LoneFox + */ +public class MysticVeil extends CardImpl { + + public MysticVeil(UUID ownerId) { + super(ownerId, 38, "Mystic Veil", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "VIS"; + this.subtype.add("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))); + this.addAbility(new SacrificeIfCastAtInstantTimeTriggeredAbility()); + // 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 has shroud. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA))); + } + + public MysticVeil(final MysticVeil card) { + super(card); + } + + @Override + public MysticVeil copy() { + return new MysticVeil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/Necromancy.java b/Mage.Sets/src/mage/sets/visions/Necromancy.java index 89910cb3ab9..13d1bb76169 100644 --- a/Mage.Sets/src/mage/sets/visions/Necromancy.java +++ b/Mage.Sets/src/mage/sets/visions/Necromancy.java @@ -30,23 +30,19 @@ package mage.sets.visions; import java.util.UUID; import mage.MageObjectReference; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.common.SacrificeIfCastAtInstantTimeTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.common.delayed.AtTheBeginOfNextCleanupDelayedTriggeredAbility; import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; -import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect; import mage.abilities.effects.common.continuous.SourceEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.Card; import mage.cards.CardImpl; -import mage.constants.AsThoughEffectType; import mage.constants.CardType; import mage.constants.DependencyType; import mage.constants.Duration; @@ -59,10 +55,7 @@ import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.PermanentIdPredicate; import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.game.stack.Spell; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInGraveyard; @@ -79,8 +72,8 @@ public class Necromancy extends CardImpl { this.expansionSetCode = "VIS"; // 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 CastSourceAsThoughItHadFlashEffect(this, Duration.EndOfGame, true))); - this.addAbility(new CastAtInstantTimeTriggeredAbility()); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame))); + this.addAbility(new SacrificeIfCastAtInstantTimeTriggeredAbility()); // When Necromancy enters the battlefield, if it's on the battlefield, it becomes an Aura with "enchant creature put onto the battlefield with Necromancy." // Put target creature card from a graveyard onto the battlefield under your control and attach Necromancy to it. @@ -104,75 +97,6 @@ public class Necromancy extends CardImpl { } } -class CastSourceAsThoughItHadFlashEffect extends AsThoughEffectImpl { - - private final boolean sacrificeIfCastAsInstant; - - public CastSourceAsThoughItHadFlashEffect(Card card, Duration duration, boolean sacrificeIfCastAsInstant) { - super(AsThoughEffectType.CAST_AS_INSTANT, duration, Outcome.Benefit); - this.sacrificeIfCastAsInstant = sacrificeIfCastAsInstant; - staticText = "You may cast {this} as though it had flash"; - } - - public CastSourceAsThoughItHadFlashEffect(final CastSourceAsThoughItHadFlashEffect effect) { - super(effect); - this.sacrificeIfCastAsInstant = effect.sacrificeIfCastAsInstant; - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public CastSourceAsThoughItHadFlashEffect copy() { - return new CastSourceAsThoughItHadFlashEffect(this); - } - - @Override - public boolean applies(UUID affectedSpellId, Ability source, UUID affectedControllerId, Game game) { - return source.getSourceId().equals(affectedSpellId); - } - -} - -class CastAtInstantTimeTriggeredAbility extends TriggeredAbilityImpl { - - public CastAtInstantTimeTriggeredAbility() { - super(Zone.STACK, new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new SacrificeSourceEffect()))); - } - - public CastAtInstantTimeTriggeredAbility(final CastAtInstantTimeTriggeredAbility ability) { - super(ability); - } - - @Override - public CastAtInstantTimeTriggeredAbility copy() { - return new CastAtInstantTimeTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - // The sacrifice occurs only if you cast it using its own ability. If you cast it using some other - // effect (for instance, if it gained flash from Vedalken Orrery), then it won't be sacrificed. - // CHECK - Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && spell.getSourceId().equals(getSourceId())) { - return !(game.isMainPhase() && game.getActivePlayerId().equals(event.getPlayerId()) && game.getStack().size() == 1); - } - return false; - } - - @Override - public String getRule() { - return "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."; - } -} class NecromancyReAttachEffect extends OneShotEffect { @@ -246,6 +170,7 @@ class NecromancyLeavesBattlefieldTriggeredEffect extends OneShotEffect { } } + class NecromancyChangeAbilityEffect extends ContinuousEffectImpl implements SourceEffect { private final static Ability newAbility = new EnchantAbility("creature put onto the battlefield with Necromancy"); diff --git a/Mage.Sets/src/mage/sets/visions/Parapet.java b/Mage.Sets/src/mage/sets/visions/Parapet.java new file mode 100644 index 00000000000..d05703ebca6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/Parapet.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.sets.visions; + +import java.util.UUID; +import mage.abilities.common.SacrificeIfCastAtInstantTimeTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class Parapet extends CardImpl { + + public Parapet(UUID ownerId) { + super(ownerId, 114, "Parapet", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "VIS"; + + // You may cast Parapet 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))); + this.addAbility(new SacrificeIfCastAtInstantTimeTriggeredAbility()); + // Creatures you control get +0/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield))); + } + + public Parapet(final Parapet card) { + super(card); + } + + @Override + public Parapet copy() { + return new Parapet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/RelicWard.java b/Mage.Sets/src/mage/sets/visions/RelicWard.java new file mode 100644 index 00000000000..122cf167927 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/RelicWard.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.sets.visions; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SacrificeIfCastAtInstantTimeTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; +/** + * + * @author LoneFox + */ +public class RelicWard extends CardImpl { + + public RelicWard(UUID ownerId) { + super(ownerId, 116, "Relic Ward", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "VIS"; + this.subtype.add("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))); + this.addAbility(new SacrificeIfCastAtInstantTimeTriggeredAbility()); + // Enchant artifact + TargetPermanent auraTarget = new TargetArtifactPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted artifact has shroud. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA))); + } + + public RelicWard(final RelicWard card) { + super(card); + } + + @Override + public RelicWard copy() { + return new RelicWard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/SpiderClimb.java b/Mage.Sets/src/mage/sets/visions/SpiderClimb.java new file mode 100644 index 00000000000..bdccf5912c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/SpiderClimb.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.sets.visions; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SacrificeIfCastAtInstantTimeTriggeredAbility; +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.CastAsThoughItHadFlashSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpiderClimb extends CardImpl { + + public SpiderClimb(UUID ownerId) { + super(ownerId, 70, "Spider Climb", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "VIS"; + this.subtype.add("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))); + this.addAbility(new SacrificeIfCastAtInstantTimeTriggeredAbility()); + // 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/+3 and has reach. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0, 3, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityAttachedEffect(ReachAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has reach"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public SpiderClimb(final SpiderClimb card) { + super(card); + } + + @Override + public SpiderClimb copy() { + return new SpiderClimb(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/TalruumPiper.java b/Mage.Sets/src/mage/sets/visions/TalruumPiper.java new file mode 100644 index 00000000000..e37d25ad9dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/TalruumPiper.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.sets.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RequirementEffect; +import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author nigelzor + */ +public class TalruumPiper extends CardImpl { + + public TalruumPiper(UUID ownerId) { + super(ownerId, 98, "Talruum Piper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Minotaur"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // All creatures with flying able to block Talruum Piper do so. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TalruumPiperEffect())); + } + + public TalruumPiper(final TalruumPiper card) { + super(card); + } + + @Override + public TalruumPiper copy() { + return new TalruumPiper(this); + } +} + +class TalruumPiperEffect extends RequirementEffect { + + public TalruumPiperEffect() { + super(Duration.WhileOnBattlefield); + staticText = "All creatures with flying able to block {this} do so"; + } + + public TalruumPiperEffect(TalruumPiperEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + Permanent sourceCreature = game.getPermanent(source.getSourceId()); + if (sourceCreature != null && sourceCreature.isAttacking()) { + return permanent.getAbilities().contains(FlyingAbility.getInstance()) + && permanent.canBlock(source.getSourceId(), game); + } + 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.getSourceId(); + } + + @Override + public TalruumPiperEffect copy() { + return new TalruumPiperEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/UrborgMindsucker.java b/Mage.Sets/src/mage/sets/visions/UrborgMindsucker.java new file mode 100644 index 00000000000..dda4f2b245f --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/UrborgMindsucker.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.sets.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class UrborgMindsucker extends CardImpl { + + public UrborgMindsucker(UUID ownerId) { + super(ownerId, 21, "Urborg Mindsucker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Horror"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {B}, Sacrifice Urborg Mindsucker: Target opponent discards a card at random. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1, true), new ManaCostsImpl("{B}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public UrborgMindsucker(final UrborgMindsucker card) { + super(card); + } + + @Override + public UrborgMindsucker copy() { + return new UrborgMindsucker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/WakeOfVultures.java b/Mage.Sets/src/mage/sets/visions/WakeOfVultures.java new file mode 100644 index 00000000000..37f78dd9313 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/WakeOfVultures.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.sets.visions; + +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.RegenerateSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author nigelzor + */ +public class WakeOfVultures extends CardImpl { + + public WakeOfVultures(UUID ownerId) { + super(ownerId, 24, "Wake of Vultures", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Bird"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {1}{B}, Sacrifice a creature: Regenerate Wake of Vultures. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{B}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + this.addAbility(ability); + } + + public WakeOfVultures(final WakeOfVultures card) { + super(card); + } + + @Override + public WakeOfVultures copy() { + return new WakeOfVultures(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/ZhalfirinCrusader.java b/Mage.Sets/src/mage/sets/visions/ZhalfirinCrusader.java new file mode 100644 index 00000000000..e717afcf8f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/ZhalfirinCrusader.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.sets.visions; + +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.RedirectDamageFromSourceToTargetEffect; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class ZhalfirinCrusader extends CardImpl { + + public ZhalfirinCrusader(UUID ownerId) { + super(ownerId, 125, "Zhalfirin Crusader", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flanking + this.addAbility(new FlankingAbility()); + + // {1}{W}: The next 1 damage that would be dealt to Zhalfirin Crusader this turn is dealt to target creature or player instead. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public ZhalfirinCrusader(final ZhalfirinCrusader card) { + super(card); + } + + @Override + public ZhalfirinCrusader copy() { + return new ZhalfirinCrusader(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/FesteringEvil.java b/Mage.Sets/src/mage/sets/weatherlight/FesteringEvil.java new file mode 100644 index 00000000000..66e94d41ac3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/FesteringEvil.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.sets.weatherlight; + +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.common.DamageEverythingEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class FesteringEvil extends CardImpl { + + public FesteringEvil(UUID ownerId) { + super(ownerId, 10, "Festering Evil", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); + this.expansionSetCode = "WTH"; + + // At the beginning of your upkeep, Festering Evil deals 1 damage to each creature and each player. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DamageEverythingEffect(1), TargetController.YOU, false)); + + // {B}{B}, Sacrifice Festering Evil: Festering Evil deals 3 damage to each creature and each player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(3), new ManaCostsImpl("{B}{B}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public FesteringEvil(final FesteringEvil card) { + super(card); + } + + @Override + public FesteringEvil copy() { + return new FesteringEvil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/GoblinBomb.java b/Mage.Sets/src/mage/sets/weatherlight/GoblinBomb.java new file mode 100644 index 00000000000..dc6601caf81 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/GoblinBomb.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.sets.weatherlight; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class GoblinBomb extends CardImpl { + + public GoblinBomb(UUID ownerId) { + super(ownerId, 103, "Goblin Bomb", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "WTH"; + + // At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GoblinBombEffect(), TargetController.YOU, true)); + + // Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(20), new RemoveCountersSourceCost(CounterType.FUSE.createInstance(5))); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public GoblinBomb(final GoblinBomb card) { + super(card); + } + + @Override + public GoblinBomb copy() { + return new GoblinBomb(this); + } +} + +class GoblinBombEffect extends OneShotEffect { + + public GoblinBombEffect() { + super(Outcome.Damage); + staticText = "flip a coin. If you win the flip, put a fuse counter on {this}. If you lose the flip, remove a fuse counter from {this}"; + } + + public GoblinBombEffect(GoblinBombEffect 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) { + if (controller.flipCoin(game)) { + game.informPlayers("Goblin Bomb: Won flip. Put a fuse counter on Goblin Bomb."); + new AddCountersSourceEffect(CounterType.FUSE.createInstance(1)).apply(game, source); + return true; + } else { + game.informPlayers("Goblin Bomb: Lost flip. Remove a fuse counter from Goblin Bomb."); + new RemoveCounterSourceEffect(CounterType.FUSE.createInstance(1)).apply(game, source); + return true; + } + } + return false; + } + + @Override + public GoblinBombEffect copy() { + return new GoblinBombEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/AgadeemOccultist.java b/Mage.Sets/src/mage/sets/worldwake/AgadeemOccultist.java index 7deedb8ceb2..69342ccaf85 100644 --- a/Mage.Sets/src/mage/sets/worldwake/AgadeemOccultist.java +++ b/Mage.Sets/src/mage/sets/worldwake/AgadeemOccultist.java @@ -28,9 +28,6 @@ package mage.sets.worldwake; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,7 +35,9 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -96,32 +95,30 @@ class AgadeemOccultistEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - - Player you = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); int allycount = 0; for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) { if (permanent.hasSubtype("Ally")) { allycount++; } } - FilterCard filter = new FilterCard("creature card in an opponent's graveyard"); filter.add(new CardTypePredicate(CardType.CREATURE)); TargetCardInOpponentsGraveyard target = new TargetCardInOpponentsGraveyard(1, 1, filter); - if (you != null) { + if (controller != null) { if (target.canChoose(source.getControllerId(), game) - && you.choose(Outcome.GainControl, target, source.getSourceId(), game)) { + && controller.choose(Outcome.GainControl, target, source.getSourceId(), game)) { if (!target.getTargets().isEmpty()) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { if (card.getManaCost().convertedManaCost() <= allycount) { - card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId()); - return true; + return controller.moveCards(card, Zone.BATTLEFIELD, source, game); } } } } + return true; } return false; } diff --git a/Mage.Sets/src/mage/sets/worldwake/DeathsShadow.java b/Mage.Sets/src/mage/sets/worldwake/DeathsShadow.java index 06208b8a2b3..57ea6364b1c 100644 --- a/Mage.Sets/src/mage/sets/worldwake/DeathsShadow.java +++ b/Mage.Sets/src/mage/sets/worldwake/DeathsShadow.java @@ -55,7 +55,8 @@ public class DeathsShadow extends CardImpl { this.toughness = new MageInt(13); // Death's Shadow gets -X/-X, where X is your life total. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new SignInversionDynamicValue(new ControllerLifeCount()), new SignInversionDynamicValue(new ControllerLifeCount()), Duration.WhileOnBattlefield))); + SignInversionDynamicValue x = new SignInversionDynamicValue(new ControllerLifeCount()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(x, x, Duration.WhileOnBattlefield))); } public DeathsShadow(final DeathsShadow card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java index 97fafca9c23..e44701ab44d 100644 --- a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java +++ b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java @@ -64,7 +64,7 @@ public class EverflowingChalice extends CardImpl { "with a charge counter on it for each time it was kicked")); // {T}: Add {1} to your mana pool for each charge counter on Everflowing Chalice. - this.addAbility(new DynamicManaAbility(Mana.ColorlessMana, new CountersCount(CounterType.CHARGE))); + this.addAbility(new DynamicManaAbility(Mana.ColorlessMana(1), new CountersCount(CounterType.CHARGE))); } public EverflowingChalice(final EverflowingChalice card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java b/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java index d68cd5c7eda..26c00ef4c85 100644 --- a/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java +++ b/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java @@ -41,6 +41,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; +import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; @@ -148,27 +149,19 @@ class JaceTheMindSculptorEffect2 extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.drawCards(3, game); - putOnLibrary(player, source, game); - putOnLibrary(player, source, game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.drawCards(3, game); + TargetCardInHand target = new TargetCardInHand(2, 2, new FilterCard()); + controller.chooseTarget(Outcome.Detriment, target, source, game); + Cards cardsToLibrary = new CardsImpl(target.getTargets()); + if (!cardsToLibrary.isEmpty()) { + controller.putCardsOnTopOfLibrary(cardsToLibrary, game, source, true); + } return true; } return false; } - - private boolean putOnLibrary(Player player, Ability source, Game game) { - TargetCardInHand target = new TargetCardInHand(); - player.chooseTarget(Outcome.ReturnToHand, target, source, game); - Card card = player.getHand().get(target.getFirstTarget(), game); - if (card != null) { - player.getHand().remove(card); - player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false); - } - return true; - } - } class JaceTheMindSculptorEffect3 extends OneShotEffect { diff --git a/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java b/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java index a86eb44cc24..1c659222013 100644 --- a/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java +++ b/Mage.Sets/src/mage/sets/worldwake/MarshalsAnthem.java @@ -27,6 +27,7 @@ */ package mage.sets.worldwake; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -37,7 +38,11 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -45,8 +50,6 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.target.common.TargetCardInYourGraveyard; -import java.util.UUID; - /** * * @author jeffwadsworth @@ -62,11 +65,12 @@ public class MarshalsAnthem extends CardImpl { filterCard.add(new CardTypePredicate(CardType.CREATURE)); } + private final UUID originalId; + public MarshalsAnthem(UUID ownerId) { super(ownerId, 15, "Marshal's Anthem", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); this.expansionSetCode = "WWK"; - // Multikicker {1}{W} this.addAbility(new MultikickerAbility("{1}{W}")); @@ -74,18 +78,18 @@ public class MarshalsAnthem extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); // When Marshal's Anthem enters the battlefield, return up to X target creature cards from your graveyard to the battlefield, where X is the number of times Marshal's Anthem was kicked. - Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false), KickedCondition.getInstance(), "When {this} enters the battlefield, return up to X target creature cards from your graveyard to the battlefield, where X is the number of times {this} was kicked."); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof ConditionalTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { ability.getTargets().clear(); int numbTargets = new MultikickerCount().calculate(game, ability, null); if (numbTargets > 0) { @@ -96,6 +100,7 @@ public class MarshalsAnthem extends CardImpl { public MarshalsAnthem(final MarshalsAnthem card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/worldwake/QuestForRenewal.java b/Mage.Sets/src/mage/sets/worldwake/QuestForRenewal.java index 0e54dc6ac14..bea09ad6d9f 100644 --- a/Mage.Sets/src/mage/sets/worldwake/QuestForRenewal.java +++ b/Mage.Sets/src/mage/sets/worldwake/QuestForRenewal.java @@ -28,7 +28,7 @@ package mage.sets.worldwake; import java.util.UUID; -import mage.abilities.common.BecomesTappedCreatureControlledTriggeredAbility; +import mage.abilities.common.BecomesTappedTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.decorator.ConditionalContinuousEffect; @@ -46,22 +46,20 @@ import mage.filter.common.FilterControlledCreaturePermanent; * @author jeffwadsworth */ public class QuestForRenewal extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control"); public QuestForRenewal(UUID ownerId) { super(ownerId, 110, "Quest for Renewal", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); this.expansionSetCode = "WWK"; - // Whenever a creature you control becomes tapped, you may put a quest counter on Quest for Renewal. - this.addAbility(new BecomesTappedCreatureControlledTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true)); - + this.addAbility(new BecomesTappedTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), + true, new FilterControlledCreaturePermanent("a creature you control"))); + // As long as there are four or more quest counters on Quest for Renewal, untap all creatures you control during each other player's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new UntapAllDuringEachOtherPlayersUntapStepEffect(filter), - new SourceHasCounterCondition(CounterType.QUEST, 4), - "As long as there are four or more quest counters on {this}, untap all creatures you control during each other player's untap step."))); + new UntapAllDuringEachOtherPlayersUntapStepEffect(new FilterControlledCreaturePermanent()), + new SourceHasCounterCondition(CounterType.QUEST, 4), + "As long as there are four or more quest counters on {this}, untap all creatures you control during each other player's untap step."))); } public QuestForRenewal(final QuestForRenewal card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/StoneIdolTrap.java b/Mage.Sets/src/mage/sets/worldwake/StoneIdolTrap.java index 2bab309e9cc..d6f1d3c7394 100644 --- a/Mage.Sets/src/mage/sets/worldwake/StoneIdolTrap.java +++ b/Mage.Sets/src/mage/sets/worldwake/StoneIdolTrap.java @@ -30,7 +30,6 @@ package mage.sets.worldwake; import mage.constants.*; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -47,6 +46,7 @@ import mage.target.targetpointer.FixedTarget; import mage.util.CardUtil; import java.util.UUID; +import mage.game.permanent.Permanent; /** * @@ -54,7 +54,6 @@ import java.util.UUID; */ public class StoneIdolTrap extends CardImpl { - public StoneIdolTrap(UUID ownerId) { super(ownerId, 93, "Stone Idol Trap", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{5}{R}"); this.expansionSetCode = "WWK"; @@ -86,6 +85,7 @@ class StoneIdolTrapCostReductionEffect extends CostModificationEffectImpl { static { filter.add(new AttackingPredicate()); } + public StoneIdolTrapCostReductionEffect() { super(Duration.WhileOnStack, Outcome.Benefit, CostModificationType.REDUCE_COST); staticText = "{this} costs {1} less to cast for each attacking creature"; @@ -97,7 +97,7 @@ class StoneIdolTrapCostReductionEffect extends CostModificationEffectImpl { @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { - int reductionAmount = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(),game); + int reductionAmount = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); CardUtil.reduceCost(abilityToModify, reductionAmount); return true; } @@ -136,14 +136,14 @@ class StoneIdolTrapEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { StoneTrapIdolToken token = new StoneTrapIdolToken(); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - ExileTargetEffect exileEffect = new ExileTargetEffect("exile the token"); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect, TargetController.YOU); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } return true; } } diff --git a/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java b/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java index 409950b8a77..55124b98a13 100644 --- a/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java +++ b/Mage.Sets/src/mage/sets/worldwake/ThadaAdelAcquisitor.java @@ -147,6 +147,7 @@ class ThadaAdelPlayFromExileEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - return sourceId.equals(getTargetPointer().getFirst(game, source)) && game.getState().getZone(sourceId) == Zone.EXILED; + return source.getControllerId().equals(affectedControllerId) + && sourceId.equals(getTargetPointer().getFirst(game, source)); } } diff --git a/Mage.Sets/src/mage/sets/worldwake/VoyagerDrake.java b/Mage.Sets/src/mage/sets/worldwake/VoyagerDrake.java index 63fc3e04582..393be9eb6df 100644 --- a/Mage.Sets/src/mage/sets/worldwake/VoyagerDrake.java +++ b/Mage.Sets/src/mage/sets/worldwake/VoyagerDrake.java @@ -27,6 +27,7 @@ */ package mage.sets.worldwake; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -43,14 +44,14 @@ import mage.constants.Rarity; import mage.game.Game; import mage.target.common.TargetCreaturePermanent; -import java.util.UUID; - /** * * @author jeffwadsworth */ public class VoyagerDrake extends CardImpl { + private final UUID originalId; + public VoyagerDrake(UUID ownerId) { super(ownerId, 45, "Voyager Drake", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.expansionSetCode = "WWK"; @@ -70,21 +71,24 @@ public class VoyagerDrake extends CardImpl { new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), false), KickedCondition.getInstance(), "When {this} enters the battlefield, up to X target creatures gain flying until end of turn, where X is the number of times {this} was kicked."); + originalId = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability instanceof ConditionalTriggeredAbility) { + if (ability.getOriginalId().equals(originalId)) { ability.getTargets().clear(); int numbTargets = new MultikickerCount().calculate(game, ability, null); if (numbTargets > 0) { - ability.addTarget(new TargetCreaturePermanent(0,numbTargets)); + ability.addTarget(new TargetCreaturePermanent(0, numbTargets)); } } } + public VoyagerDrake(final VoyagerDrake card) { super(card); + this.originalId = card.originalId; } @Override diff --git a/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java b/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java index 74f2f9c663f..492af7f4d46 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/BalothCageTrap.java @@ -28,7 +28,6 @@ package mage.sets.zendikar; import java.util.UUID; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.costs.AlternativeCostImpl; import mage.abilities.costs.mana.ManaCostsImpl; @@ -54,7 +53,6 @@ public class BalothCageTrap extends CardImpl { this.expansionSetCode = "ZEN"; this.subtype.add("Trap"); - // If an opponent had an artifact enter the battlefield under his or her control this turn, you may pay {1}{G} rather than pay Baloth Cage Trap's mana cost. this.getSpellAbility().addAlternativeCost(new BalothCageTrapAlternativeCost()); this.getSpellAbility().addWatcher(new BalothCageTrapWatcher()); diff --git a/Mage.Sets/src/mage/sets/zendikar/CryptOfAgadeem.java b/Mage.Sets/src/mage/sets/zendikar/CryptOfAgadeem.java index 7aa5942c0a1..d0b1f83f85c 100644 --- a/Mage.Sets/src/mage/sets/zendikar/CryptOfAgadeem.java +++ b/Mage.Sets/src/mage/sets/zendikar/CryptOfAgadeem.java @@ -63,7 +63,7 @@ public class CryptOfAgadeem extends CardImpl { // {T}: Add {B} to your mana pool. this.addAbility(new BlackManaAbility()); // {2}, {T}: Add {B} to your mana pool for each black creature card in your graveyard. - DynamicManaAbility ability = new DynamicManaAbility(Mana.BlackMana, new CardsInControllerGraveyardCount(filter), new GenericManaCost(2)); + DynamicManaAbility ability = new DynamicManaAbility(Mana.BlackMana(1), new CardsInControllerGraveyardCount(filter), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java b/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java index dbe2952eb59..78c175f96c8 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java +++ b/Mage.Sets/src/mage/sets/zendikar/ElementalAppeal.java @@ -33,7 +33,6 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.condition.LockedInCondition; import mage.abilities.condition.common.KickedCondition; @@ -44,6 +43,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; /** @@ -56,7 +56,6 @@ public class ElementalAppeal extends CardImpl { super(ownerId, 123, "Elemental Appeal", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{R}{R}{R}{R}"); this.expansionSetCode = "ZEN"; - // Kicker {5} this.addAbility(new KickerAbility("{5}")); @@ -100,17 +99,14 @@ class ElementalAppealEffect extends OneShotEffect { ElementalToken token = new ElementalToken(); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - FixedTarget fixedTarget = new FixedTarget(token.getLastAddedToken()); - source.getEffects().get(1).setTargetPointer(fixedTarget); - - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(fixedTarget); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } return true; } } diff --git a/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java b/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java index 7ced325384c..a81413a9cbf 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java +++ b/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java @@ -29,10 +29,6 @@ package mage.sets.zendikar; import java.util.UUID; import mage.MageObject; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -42,6 +38,10 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.Cards; import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -56,9 +56,9 @@ public class ExplorersScope extends CardImpl { this.expansionSetCode = "ZEN"; this.subtype.add("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. + // 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())); - + // Equip ({1}: Attach to target creature you control. Equip only as a sorcery.) this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); } @@ -105,7 +105,7 @@ class ExplorersScopeEffect extends OneShotEffect { if (card.getCardType().contains(CardType.LAND)) { String message = "Put " + card.getLogName() + " onto the battlefield tapped?"; if (controller.chooseUse(Outcome.PutLandInPlay, message, source, game)) { - card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId(), true); + controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null); } } } diff --git a/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java b/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java index 15d9f689266..52cf4888409 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java +++ b/Mage.Sets/src/mage/sets/zendikar/Gigantiform.java @@ -48,6 +48,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; @@ -68,7 +69,6 @@ public class Gigantiform extends CardImpl { this.expansionSetCode = "ZEN"; this.subtype.add("Aura"); - // Kicker {4} this.addAbility(new KickerAbility("{4}")); @@ -101,7 +101,7 @@ class GigantiformAbility extends StaticAbility { public GigantiformAbility() { super(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA)); - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(8, 8, Duration.WhileOnBattlefield)); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(8, 8, Duration.WhileOnBattlefield, SubLayer.SetPT_7b)); this.addEffect(new GainAbilityAttachedEffect(ability, AttachmentType.AURA)); } @@ -143,14 +143,14 @@ class GigantiformEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); TargetCardInLibrary target = new TargetCardInLibrary(filter); - if (player != null && player.searchLibrary(target, game)) { - Card card = player.getLibrary().getCard(target.getFirstTarget(), game); + if (controller != null && controller.searchLibrary(target, game)) { + Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); if (card != null) { - card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId()); + controller.moveCards(card, Zone.BATTLEFIELD, source, game); } - player.shuffleLibrary(game); + controller.shuffleLibrary(game); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/zendikar/IorRuinExpedition.java b/Mage.Sets/src/mage/sets/zendikar/IorRuinExpedition.java index 57d4201cfc0..c8df9cd1513 100644 --- a/Mage.Sets/src/mage/sets/zendikar/IorRuinExpedition.java +++ b/Mage.Sets/src/mage/sets/zendikar/IorRuinExpedition.java @@ -27,8 +27,7 @@ */ package mage.sets.zendikar; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.LandfallAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -37,11 +36,11 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import java.util.UUID; - /** * * @author Loki @@ -52,9 +51,11 @@ public class IorRuinExpedition extends CardImpl { super(ownerId, 49, "Ior Ruin Expedition", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); this.expansionSetCode = "ZEN"; - + // Landfall - Whenever a land enters the battlefield under your control, you may put a quest counter on Ior Ruin Expedition. this.addAbility(new LandfallAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true)); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(3), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(3))); + + // Remove three quest counters from Ior Ruin Expedition and sacrifice it: Draw two cards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(2), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(3))); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java b/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java index e4b5afec2e3..5fce040e7de 100644 --- a/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java +++ b/Mage.Sets/src/mage/sets/zendikar/JourneyToNowhere.java @@ -1,43 +1,42 @@ /* -* Copyright 2010 maurer.it_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are those of the -* authors and should not be interpreted as representing official policies, either expressed -* or implied, of maurer.it_at_googlemail.com. -*/ - + * Copyright 2010 maurer.it_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of maurer.it_at_googlemail.com. + */ package mage.sets.zendikar; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.effects.common.ExileTargetForSourceEffect; import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.Target; @@ -53,7 +52,6 @@ public class JourneyToNowhere extends CardImpl { super(ownerId, 14, "Journey to Nowhere", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); this.expansionSetCode = "ZEN"; - // When Journey to Nowhere enters the battlefield, exile target creature. FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new AnotherPredicate()); @@ -61,7 +59,7 @@ public class JourneyToNowhere extends CardImpl { Target target = new TargetPermanent(filter); ability1.addTarget(target); this.addAbility(ability1); - + // When Journey to Nowhere leaves the battlefield, return the exiled card to the battlefield under its owner's control. Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); this.addAbility(ability2); diff --git a/Mage.Sets/src/mage/sets/zendikar/QuestForTheHolyRelic.java b/Mage.Sets/src/mage/sets/zendikar/QuestForTheHolyRelic.java index 5c17c3c360b..dd7ee2ac455 100644 --- a/Mage.Sets/src/mage/sets/zendikar/QuestForTheHolyRelic.java +++ b/Mage.Sets/src/mage/sets/zendikar/QuestForTheHolyRelic.java @@ -28,11 +28,6 @@ package mage.sets.zendikar; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; @@ -42,6 +37,10 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterCard; import mage.filter.FilterSpell; @@ -61,6 +60,7 @@ import mage.target.common.TargetControlledCreaturePermanent; public class QuestForTheHolyRelic extends CardImpl { private static final FilterSpell filter = new FilterSpell("a creature spell"); + static { filter.add(new CardTypePredicate(CardType.CREATURE)); } @@ -69,7 +69,6 @@ public class QuestForTheHolyRelic extends CardImpl { super(ownerId, 33, "Quest for the Holy Relic", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); this.expansionSetCode = "ZEN"; - // Whenever you cast a creature spell, you may put a quest counter on Quest for the Holy Relic. this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), filter, true)); // Remove five quest counters from Quest for the Holy Relic and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, and attach it to a creature you control. Then shuffle your library. @@ -106,28 +105,26 @@ class QuestForTheHolyRelicEffect 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()); + if (controller == null) { return false; } FilterCard filter = new FilterCard("Equipment"); filter.add(new SubtypePredicate("Equipment")); TargetCardInLibrary target = new TargetCardInLibrary(filter); - if (player.searchLibrary(target, game)) { - Card card = player.getLibrary().getCard(target.getFirstTarget(), game); - if (card != null) { - card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId()); + if (controller.searchLibrary(target, game)) { + Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); + if (card != null && controller.moveCards(card, Zone.BATTLEFIELD, source, game)) { Permanent equipment = game.getPermanent(card.getId()); - Target targetCreature = new TargetControlledCreaturePermanent(); - if (equipment != null && player.choose(Outcome.BoostCreature, targetCreature, source.getSourceId(), game)) { + if (equipment != null && controller.choose(Outcome.BoostCreature, targetCreature, source.getSourceId(), game)) { Permanent permanent = game.getPermanent(targetCreature.getFirstTarget()); permanent.addAttachment(equipment.getId(), game); } } } - player.shuffleLibrary(game); + controller.shuffleLibrary(game); return true; } } diff --git a/Mage.Sets/src/mage/sets/zendikar/ZektarShrineExpedition.java b/Mage.Sets/src/mage/sets/zendikar/ZektarShrineExpedition.java index a6d09201a64..8bc084c9f76 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ZektarShrineExpedition.java +++ b/Mage.Sets/src/mage/sets/zendikar/ZektarShrineExpedition.java @@ -28,14 +28,8 @@ package mage.sets.zendikar; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.LandfallAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -47,8 +41,13 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; @@ -62,7 +61,6 @@ public class ZektarShrineExpedition extends CardImpl { super(ownerId, 155, "Zektar Shrine Expedition", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); this.expansionSetCode = "ZEN"; - // Landfall - Whenever a land enters the battlefield under your control, you may put a quest counter on Zektar Shrine Expedition. this.addAbility(new LandfallAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true)); // Remove three quest counters from Zektar Shrine Expedition and sacrifice it: Put a 7/1 red Elemental creature token with trample and haste onto the battlefield. Exile it at the beginning of the next end step. @@ -101,15 +99,14 @@ class ZektarShrineExpeditionEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { ElementalToken token = new ElementalToken(); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - + for (UUID tokenId : token.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } return true; } } diff --git a/Mage.Stats/pom.xml b/Mage.Stats/pom.xml index e163c6b55fc..102c0d3d4c4 100644 --- a/Mage.Stats/pom.xml +++ b/Mage.Stats/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 org.mage diff --git a/Mage.Tests/pom.xml b/Mage.Tests/pom.xml index 55cc018a56f..68ccbf7bc82 100644 --- a/Mage.Tests/pom.xml +++ b/Mage.Tests/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 mage-tests @@ -85,6 +85,20 @@ + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + db + + + + + mage-tests diff --git a/Mage.Tests/src/test/java/org/mage/test/AI/basic/CastDestroySpellsTest.java b/Mage.Tests/src/test/java/org/mage/test/AI/basic/CastDestroySpellsTest.java index 458bd5012f9..1e595c19e6e 100644 --- a/Mage.Tests/src/test/java/org/mage/test/AI/basic/CastDestroySpellsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/AI/basic/CastDestroySpellsTest.java @@ -45,11 +45,13 @@ public class CastDestroySpellsTest extends CardTestPlayerBaseAI { @Test public void testOrzhovCharm() { // Choose one - - // Return target creature you control and all Auras you control attached to it to their owner's hand; - // or destroy target creature and you lose life equal to its toughness; - // or return target creature card with converted mana cost 1 or less from your graveyard to the battlefield. + // - Return target creature you control and all Auras you control attached to it to their owner's hand; + // - Destroy target creature and you lose life equal to its toughness; + // - Return target creature card with converted mana cost 1 or less from your graveyard to the battlefield. addCard(Zone.HAND, playerA, "Orzhov Charm"); // {W}{B} + // {T}: Add {1} to your mana pool. + // {T} {W/B}, {T}: Add {W}{W}, {W}{B}, or {B}{B} to your mana pool. addCard(Zone.BATTLEFIELD, playerA, "Fetid Heath", 1); addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/AI/basic/PreventRepeatedActionsTest.java b/Mage.Tests/src/test/java/org/mage/test/AI/basic/PreventRepeatedActionsTest.java index 1a6259d8e10..45e99f0806b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/AI/basic/PreventRepeatedActionsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/AI/basic/PreventRepeatedActionsTest.java @@ -73,15 +73,20 @@ public class PreventRepeatedActionsTest extends CardTestPlayerBaseAI { */ @Test public void testBasaltMonolith() { + addCard(Zone.HAND, playerA, "Phyrexian Vault", 1); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 3); // Basalt Monolith doesn't untap during your untap step. // {T}: Add {3} to your mana pool. // {3}: Untap Basalt Monolith. - addCard(Zone.BATTLEFIELD, playerA, "Basalt Monolith", 1); + addCard(Zone.BATTLEFIELD, playerA, "Basalt Monolith", 1, true); - setStopAt(1, PhaseStep.END_TURN); + setStopAt(5, PhaseStep.END_TURN); execute(); - assertTapped("Basalt Monolith", false); + // {2}, {T}, Sacrifice a creature: Draw a card. + assertPermanentCount(playerA, "Phyrexian Vault", 1); + assertTapped("Basalt Monolith", true); + assertTappedCount("Plains", false, 3); } /** diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/abilitywords/DomainTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/abilitywords/DomainTest.java new file mode 100644 index 00000000000..a74ad001f91 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/abilitywords/DomainTest.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 org.mage.test.cards.abilities.abilitywords; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class DomainTest extends CardTestPlayerBase { + + /** + * Collapsing Borders correctly does the 3 damage to each player at the + * beginning of their upkeeps. However, it does NOT add any life for each + * type of basic land the player has on the field. + */ + @Test + public void testCollapsingBorders() { + // 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. + addCard(Zone.HAND, playerA, "Collapsing Borders", 1); // {3}{R} + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + + addCard(Zone.BATTLEFIELD, playerB, "Mountain", 3); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Collapsing Borders"); + + setStopAt(3, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPermanentCount(playerA, "Collapsing Borders", 1); + + assertLife(playerA, 21); + assertLife(playerB, 18); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java index 5e55cb4d37d..22c8614b8a0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java @@ -51,10 +51,11 @@ public class ReturnToHandTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2); addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 3); - addCard(Zone.HAND, playerB, "Bone Splinters"); // As an additional cost to cast Bone Splinters, sacrifice a creature. // Destroy target creature. + addCard(Zone.HAND, playerB, "Bone Splinters"); + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Bone Splinters", "Pillarfield Ox"); setChoice(playerB, "Skarrgan Firebird"); @@ -126,7 +127,7 @@ public class ReturnToHandTest extends CardTestPlayerBase { // Devoid // Choose one or both // - Return target spell or creature to its owner's hand; - // or Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead. + // - Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead. addCard(Zone.HAND, playerA, "Brutal Expulsion"); // {2}{U}{R} addCard(Zone.BATTLEFIELD, playerB, "Plains", 4); @@ -135,6 +136,8 @@ public class ReturnToHandTest extends CardTestPlayerBase { castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Pillarfield Ox"); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Brutal Expulsion", "mode=1Pillarfield Ox^mode=2Silvercoat Lion", "Pillarfield Ox"); + setModeChoice(playerA, "1"); + setModeChoice(playerA, "2"); setStopAt(2, PhaseStep.BEGIN_COMBAT); execute(); 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 1f9a2f19cfb..780399d3e8e 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 @@ -86,7 +86,7 @@ public class DeathtouchTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Marath, Will of the Wild"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild"); + 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"); setChoice(playerA, "X=3"); @@ -123,6 +123,9 @@ public class DeathtouchTest extends CardTestPlayerBase { */ addCard(Zone.HAND, playerA, "Marath, Will of the Wild", 1); + // Vigilance + // Other creatures you control get +2/+2. + // Creatures your opponents control get -2/-2. addCard(Zone.BATTLEFIELD, playerB, "Elesh Norn, Grand Cenobite"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Marath, Will of the Wild"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DethroneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DethroneTest.java new file mode 100644 index 00000000000..b43b59f298c --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DethroneTest.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 org.mage.test.cards.abilities.keywords; + +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 DethroneTest extends CardTestPlayerBase { + + @Test + public void testAddingOnceACounterForEqualLife() { + // Dethrone (Whenever this creature attacks the player with the most life or tied for most life, put a +1/+1 counter on it.)"; + // Other creatures you control have dethrone. + // Whenever a creature you control with a +1/+1 counter on it dies, return that card to the battlefield under your control at the beginning of the next end step. + addCard(Zone.BATTLEFIELD, playerA, "Marchesa, the Black Rose"); // 3/3 + + attack(1, playerA, "Marchesa, the Black Rose"); + + attack(3, playerA, "Marchesa, the Black Rose"); + + setStopAt(3, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 12); // 4 + 4 + + assertCounterCount(playerA, "Marchesa, the Black Rose", CounterType.P1P1, 1); + assertPowerToughness(playerA, "Marchesa, the Black Rose", 4, 4); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EvolveTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EvolveTest.java index 3472d6e139f..f993b7a1339 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EvolveTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EvolveTest.java @@ -25,11 +25,11 @@ * 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.keywords; import mage.constants.PhaseStep; import mage.constants.Zone; +import mage.filter.Filter; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -37,15 +37,12 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - - public class EvolveTest extends CardTestPlayerBase { @Test public void testCreatureComesIntoPlay() { // Cloudfin Raptor gets one +1/+1 because Mindeye Drake comes into play - addCard(Zone.BATTLEFIELD, playerA, "Island", 5); addCard(Zone.BATTLEFIELD, playerA, "Cloudfin Raptor", 1); @@ -70,7 +67,6 @@ public class EvolveTest extends CardTestPlayerBase { public void testCreatureComesIntoPlayNoCounter() { // Experiment One gets no counter because Kird Ape is 1/1 with no Forest in play - addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); addCard(Zone.BATTLEFIELD, playerA, "Experiment One", 1); @@ -95,7 +91,6 @@ public class EvolveTest extends CardTestPlayerBase { public void testCreatureComesStrongerIntoPlayCounter() { // Experiment One gets a counter because Kird Ape is 2/2 with a Forest in play - addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); addCard(Zone.BATTLEFIELD, playerA, "Experiment One", 1); @@ -121,7 +116,6 @@ public class EvolveTest extends CardTestPlayerBase { public void testEvolveWithMasterBiomance() { // Experiment One gets a counter because Kird Ape is 2/2 with a Forest in play - addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); addCard(Zone.BATTLEFIELD, playerA, "Experiment One", 1); addCard(Zone.BATTLEFIELD, playerA, "Master Biomancer", 1); @@ -145,20 +139,18 @@ public class EvolveTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Experiment One", 3, 3); } - + @Test public void testMultipleCreaturesComeIntoPlay() { // Cloudfin Raptor gets one +1/+1 because itself and other creatur return from exile - addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6); addCard(Zone.BATTLEFIELD, playerA, "Judge's Familiar", 1); addCard(Zone.BATTLEFIELD, playerA, "Cloudfin Raptor", 1); addCard(Zone.HAND, playerA, "Mizzium Mortars", 1); - + addCard(Zone.BATTLEFIELD, playerB, "Plains", 6); addCard(Zone.HAND, playerB, "Banisher Priest", 2); - castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Banisher Priest"); addTarget(playerB, "Cloudfin Raptor"); @@ -174,7 +166,7 @@ public class EvolveTest extends CardTestPlayerBase { assertLife(playerB, 20); assertPermanentCount(playerB, "Banisher Priest", 0); - + assertGraveyardCount(playerB, 2); assertGraveyardCount(playerA, 1); @@ -182,26 +174,22 @@ public class EvolveTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Judge's Familiar", 1); assertPowerToughness(playerA, "Cloudfin Raptor", 1, 2); - - - } - + + } + @Test public void testMultipleCreaturesComeIntoPlaySuddenDisappearance() { // Sudden Disappearance // Sorcery {5}{W} - // Exile all nonland permanents target player controls. Return the exiled cards + // Exile all nonland permanents target player controls. Return the exiled cards // to the battlefield under their owner's control at the beginning of the next end step. - // Battering Krasis (2/1) and Crocanura (1/3) get both a +1/+1 counter each other because they come into play at the same time - addCard(Zone.BATTLEFIELD, playerA, "Battering Krasis", 1); addCard(Zone.BATTLEFIELD, playerA, "Crocanura", 1); - + addCard(Zone.BATTLEFIELD, playerB, "Plains", 6); addCard(Zone.HAND, playerB, "Sudden Disappearance", 2); - castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Sudden Disappearance", playerA); @@ -210,7 +198,7 @@ public class EvolveTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 20); - + assertGraveyardCount(playerB, 1); assertGraveyardCount(playerA, 0); @@ -219,9 +207,64 @@ public class EvolveTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Battering Krasis", 3, 2); assertPowerToughness(playerA, "Crocanura", 2, 4); - - - } - - + + } + + /* + * Renegade Krasis's ability when trigger it evolves is not triggered under + * case. + * + * I control Renegade Krasis and two Ivy Lane Denizen. (Renegade Krasis and + * one of Ivy Lane Denizen have a +1/+1 counter on it) + * I cast Adaptive Snapjaw. + * When it resolves, there are three abilities on going to stack, + * Renegade Krasis's Evolve Ability, two Ivy Lane Denizen ability. + * I take two Ivy Lane Denizen on to the stack and then Renegade Krasis's Evolve + * Ability, so resolving Renegade Krasis's Evolve Ability is first . (Maybe + * Ivy Lane Denizen's target is any.) When Renegade Krasis's Evolve Ability + * resolves, +1/+1 counter is placed on it, but doesn't triggers Renegade + * Krasis's second ability. + */ + @Test + public void testRenegadeKrasis() { + + // Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness + // than this creature, put a +1/+1 counter on this creature.) + // Whenever Renegade Krasis evolves, put a +1/+1 counter on each other creature you control with a +1/+1 counter on it. + addCard(Zone.HAND, playerA, "Renegade Krasis", 1); // {1}{G}{G} - 3/2 + // Whenever another green creature enters the battlefield under your control, put a +1/+1 counter on target creature. + addCard(Zone.BATTLEFIELD, playerA, "Forest", 16); + + // Whenever another green creature enters the battlefield under your control, put a +1/+1 counter on target creature. + addCard(Zone.HAND, playerA, "Ivy Lane Denizen", 2); // {3}{G} - Creature 2/3 + // Evolve + addCard(Zone.HAND, playerA, "Adaptive Snapjaw", 1); // {4}{G} - Creature 6/2 + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ivy Lane Denizen"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Renegade Krasis"); + addTarget(playerA, "Ivy Lane Denizen"); // Ivy target + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ivy Lane Denizen"); // Renegade Krasis evolves + addTarget(playerA, "Renegade Krasis"); // Ivy target + setChoice(playerA, "Whenever another green creature"); // So +1/+1 counter from Renegade is first put onto Ivy + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Adaptive Snapjaw"); + addTarget(playerA, "Adaptive Snapjaw"); // From Ivy 1 + addTarget(playerA, "Adaptive Snapjaw"); // From Ivy 2 + setChoice(playerA, "Evolve"); // Evolve of Renegade Krasis first on the stack, so Adaptive Snapjaw gets +1/+1 from Renegade Krasis ability + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Renegade Krasis", 1); + assertPermanentCount(playerA, "Ivy Lane Denizen", 2); + assertPermanentCount(playerA, "Adaptive Snapjaw", 1); + + assertPowerToughness(playerA, "Adaptive Snapjaw", 9, 5); // +2 from Ivys + 1 From Renegade Krasis's Evolve + assertPowerToughness(playerA, "Renegade Krasis", 6, 5); // +1 Evolve by Ivy and +1 from Ivy as 2nd Ivy enters +1 Evolve by Snapjaw + assertPowerToughness(playerA, "Ivy Lane Denizen", 2, 3, Filter.ComparisonScope.Any); + assertPowerToughness(playerA, "Ivy Lane Denizen", 5, 6, Filter.ComparisonScope.Any); // +1 from Other Ivy + 2 from Krasis + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java index 52dff9e173a..7f0273567c6 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FlashbackTest.java @@ -49,76 +49,133 @@ public class FlashbackTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Island", 2); addCard(Zone.BATTLEFIELD, playerA, "Forest", 5); addCard(Zone.HAND, playerA, "Snapcaster Mage", 1); - + // Destroy all artifacts and enchantments. You gain 2 life for each permanent destroyed this way. addCard(Zone.GRAVEYARD, playerA, "Fracturing Gust"); addCard(Zone.BATTLEFIELD, playerA, "Berserkers' Onslaught", 1); addCard(Zone.BATTLEFIELD, playerB, "Darksteel Citadel", 1); - // When Snapcaster Mage enters the battlefield, target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage"); setChoice(playerA, "Fracturing Gust"); activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback {2}{G/W}{G/W}{G/W}"); // now snapcaster mage is died so -13/-13 - setStopAt(1, PhaseStep.END_TURN); execute(); assertPermanentCount(playerA, "Snapcaster Mage", 1); assertGraveyardCount(playerA, "Berserkers' Onslaught", 1); - + assertPermanentCount(playerB, "Darksteel Citadel", 1); - + assertExileCount("Fracturing Gust", 1); } /** * My opponent put Iona on the battlefield using Unburial Rites, but my game * log didn't show me the color he has chosen. - * + * */ @Test public void testUnburialRites() { addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); addCard(Zone.BATTLEFIELD, playerA, "Plains", 8); // Return target creature card from your graveyard to the battlefield. - // Flashback {3}{W} + // Flashback {3}{W} addCard(Zone.HAND, playerA, "Unburial Rites", 1); // Sorcery - {4}{B} - + // Flying // As Iona, Shield of Emeria enters the battlefield, choose a color. // Your opponents can't cast spells of the chosen color. addCard(Zone.GRAVEYARD, playerA, "Iona, Shield of Emeria"); - + // As Lurebound Scarecrow enters the battlefield, choose a color. - // When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow. + // When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow. addCard(Zone.GRAVEYARD, playerA, "Lurebound Scarecrow"); // Enchantment - {2}{U} addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); - addCard(Zone.HAND, playerB, "Lightning Bolt", 1); + addCard(Zone.HAND, playerB, "Lightning Bolt", 1); - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unburial Rites", "Iona, Shield of Emeria"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unburial Rites", "Iona, Shield of Emeria"); setChoice(playerA, "Red"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback {3}{W}"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback {3}{W}"); addTarget(playerA, "Lurebound Scarecrow"); setChoice(playerA, "White"); - - castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA); + + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA); setStopAt(1, PhaseStep.END_TURN); execute(); assertPermanentCount(playerA, "Iona, Shield of Emeria", 1); assertPermanentCount(playerA, "Lurebound Scarecrow", 1); - + assertHandCount(playerB, "Lightning Bolt", 1); - + assertExileCount("Unburial Rites", 1); } - + + /** + * + */ + @Test + public void testFlashbackWithConverge() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); + addCard(Zone.HAND, playerA, "Snapcaster Mage", 1); + + // Converge - Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast Unified Front. + addCard(Zone.GRAVEYARD, playerA, "Unified Front"); // {3}{W} + + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {W}"); + // When Snapcaster Mage enters the battlefield, target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Snapcaster Mage"); + setChoice(playerA, "Unified Front"); + + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback {3}{W}"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "Snapcaster Mage", 1); + assertPermanentCount(playerA, "Kor Ally", 4); + assertExileCount("Unified Front", 1); + + } + + /** + * Conflagrate flashback no longer works. Requires mana payment but never + * allows target selection before resolving. + */ + @Test + public void testConflagrate() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 7); + + // Conflagrate deals X damage divided as you choose among any number of target creatures and/or players. + // Flashback-{R}{R}, Discard X cards. + addCard(Zone.HAND, playerA, "Conflagrate", 1); + + addCard(Zone.HAND, playerA, "Forest", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Conflagrate"); + setChoice(playerA, "X=2"); + + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flashback"); + setChoice(playerA, "X=4"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 14); + + assertExileCount("Conflagrate", 1); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HeroicTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HeroicTest.java index 9ba14bc6326..e1b4b6739d7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HeroicTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HeroicTest.java @@ -36,30 +36,29 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class HeroicTest extends CardTestPlayerBase { /** - * When casting Dromoka's Command targeting two of my own Heroic creatures, only one of them triggers. - * It appears to be the one targeted with mode 4 (fight) rather than the one targeted with mode 3 (+1/+1 counter). + * When casting Dromoka's Command targeting two of my own Heroic creatures, + * only one of them triggers. It appears to be the one targeted with mode 4 + * (fight) rather than the one targeted with mode 3 (+1/+1 counter). * Screenshot attached. Reproducible. */ - @Test public void testHeroicWithModal() { // Heroic - Whenever you cast a spell that targets Favored Hoplite, put a +1/+1 counter on Favored Hoplite and prevent all damage that would be dealt to it this turn. addCard(Zone.BATTLEFIELD, playerA, "Favored Hoplite", 1); // 1/2 // Heroic — Whenever you cast a spell that targets Lagonna-Band Trailblazer, put a +1/+1 counter on Lagonna-Band Trailblazer. addCard(Zone.BATTLEFIELD, playerA, "Lagonna-Band Trailblazer"); // 0/4 - + // Mode 3 = Put a +1/+1 counter on target creature // Mode 4 = Target creature you control fights target creature you don't control addCard(Zone.HAND, playerA, "Dromoka's Command", 1); // {G}{W} addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); - addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); - + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dromoka's Command", "mode=3Lagonna-Band Trailblazer^mode=4Favored Hoplite^Silvercoat Lion"); // Silvercoat lion will be set by AI as only possible target setModeChoice(playerA, "3"); @@ -69,11 +68,11 @@ public class HeroicTest extends CardTestPlayerBase { execute(); assertGraveyardCount(playerA, "Dromoka's Command", 1); - + assertPowerToughness(playerA, "Favored Hoplite", 2, 3); assertGraveyardCount(playerB, "Silvercoat Lion", 1); assertPowerToughness(playerA, "Lagonna-Band Trailblazer", 2, 6); - + } - + } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java index 0e045507f55..7b35f5ef6a2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java @@ -47,7 +47,7 @@ public class MorphTest extends CardTestPlayerBase { * */ @Test - public void testCastMoprhCreatureWithoutMorph() { + public void testCastMorphCreatureWithoutMorph() { /* Pine Walker Creature - Elemental 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 8e66883abc3..74779a13b96 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 (At the beginning of your upkeep, remove a time counter from that card. When the last is removed, cast it without paying its mana cost. If it's a creature, it has haste.)."); + 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/counterspell/CrypticCommandTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/CrypticCommandTest.java index 804af9f69de..5a8c29325c3 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/CrypticCommandTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/CrypticCommandTest.java @@ -1,31 +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. -*/ - + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation 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.counterspell; import mage.constants.PhaseStep; @@ -34,17 +33,17 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * Cryptic Command - * Instant, 1UUU - * Choose two — Counter target spell; or return target permanent to its owner's hand; or tap all creatures your opponents control; or draw a card. + * Cryptic Command Instant, 1UUU Choose two — Counter target spell; or return + * target permanent to its owner's hand; or tap all creatures your opponents + * control; or draw a card. * * @author LevelX2 */ public class CrypticCommandTest extends CardTestPlayerBase { /** - * Test that if command has only one target and that targets is not valid on resolution, Cryptic Command fizzeles - * The player does not draw a card + * Test that if command has only one target and that targets is not valid on + * resolution, Cryptic Command fizzeles The player does not draw a card */ @Test public void testCommand() { @@ -54,16 +53,16 @@ public class CrypticCommandTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Remand"); addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); addCard(Zone.BATTLEFIELD, playerA, "Island", 2); - + addCard(Zone.HAND, playerB, "Cryptic Command"); addCard(Zone.BATTLEFIELD, playerB, "Island", 4); - + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thoughtseize", playerB); - + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Cryptic Command", "Thoughtseize"); setModeChoice(playerB, "1"); // Counter target spell setModeChoice(playerB, "4"); // Draw a card - + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Remand", "Thoughtseize", "Cast Cryptic Command"); setStopAt(1, PhaseStep.CLEANUP); @@ -78,14 +77,16 @@ public class CrypticCommandTest extends CardTestPlayerBase { assertGraveyardCount(playerB, 1); assertHandCount(playerA, 2); // Thoughtsize + card drawn from Remand assertHandCount(playerB, 0); // Because Cryptic Command has no legal target playerB does not draw a card and has 0 cards in hand - + } - /** - * Game is not letting me play Ricochet Trap targetting oponent's Cryptic Command, - * modes 1 and 4. It only has one target and should be allowed + + /** + * Game is not letting me play Ricochet Trap targetting oponent's Cryptic + * Command, modes 1 and 4. It only has one target and should be allowed */ @Test public void testCommandChangeTarget() { + // Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life. addCard(Zone.HAND, playerA, "Thoughtseize"); // Counter target spell. If that spell is countered this way, put it into its owner's hand instead of into that player's graveyard. // Draw a card. @@ -93,19 +94,19 @@ public class CrypticCommandTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Lightning Bolt"); addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); - + addCard(Zone.HAND, playerB, "Cryptic Command"); addCard(Zone.BATTLEFIELD, playerB, "Island", 4); - + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thoughtseize", playerB); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Cryptic Command", "Thoughtseize"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Cryptic Command", "mode=1Thoughtseize", "Thoughtseize", StackClause.WHILE_ON_STACK); setModeChoice(playerB, "1"); // Counter target spell setModeChoice(playerB, "4"); // Draw a card - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ricochet Trap", "Cryptic Command"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ricochet Trap", "Cryptic Command", "Cryptic Command", StackClause.WHILE_ON_STACK); addTarget(playerA, "Lightning Bolt"); - + setStopAt(1, PhaseStep.CLEANUP); execute(); @@ -118,6 +119,6 @@ public class CrypticCommandTest extends CardTestPlayerBase { assertGraveyardCount(playerA, "Lightning Bolt", 1); assertHandCount(playerB, 1); // card drawn from Cryptic Command - + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/DesertionTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/DesertionTest.java new file mode 100644 index 00000000000..ce8872c313d --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/DesertionTest.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 org.mage.test.cards.abilities.oneshot.counterspell; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class DesertionTest extends CardTestPlayerBase { + + /** + * I cast Kozilek, Butcher of Truth from my hand and my opponent cast + * Desertion targeting Kozilek, Butcher of Truth. Desertion resolved but + * Kozilek, Butcher of Truth has disappeared (not in play for my opponent as + * expected and not in my command zone or hand or graveyard or library) + * + */ + @Test + public void testCounterKozilek() { + // When you cast Kozilek, Butcher of Truth, draw four cards. + // Annihilator 4 (Whenever this creature attacks, defending player sacrifices four permanents.) + // When Kozilek is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. + addCard(Zone.HAND, playerA, "Kozilek, Butcher of Truth"); // {10} + addCard(Zone.BATTLEFIELD, playerA, "Island", 10); + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); // {10} + + // Counter target spell. If an artifact or creature spell is countered this way, put that card onto the battlefield under your control instead of into its owner's graveyard. + addCard(Zone.HAND, playerB, "Desertion"); // {3}{U}{U} + addCard(Zone.BATTLEFIELD, playerB, "Island", 5); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kozilek, Butcher of Truth"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Desertion", "Kozilek, Butcher of Truth"); + + setStopAt(1, PhaseStep.CLEANUP); + execute(); + + assertGraveyardCount(playerB, "Desertion", 1); + + assertGraveyardCount(playerA, "Silvercoat Lion", 1); + assertGraveyardCount(playerA, "Kozilek, Butcher of Truth", 0); + assertHandCount(playerA, "Kozilek, Butcher of Truth", 0); + assertPermanentCount(playerB, "Kozilek, Butcher of Truth", 1); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java index 41d3992a219..dbd08d14129 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java @@ -63,6 +63,7 @@ public class NotOfThisWorldTest extends CardTestPlayerBase { setStopAt(2, PhaseStep.PRECOMBAT_MAIN); execute(); + assertHandCount(playerB, "Not of This World", 0); assertGraveyardCount(playerB, "Not of This World", 1); assertPermanentCount(playerB, "Ruhan of the Fomori", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/damage/JayaBallardTaskMageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/damage/JayaBallardTaskMageTest.java new file mode 100644 index 00000000000..809e42c861b --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/damage/JayaBallardTaskMageTest.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 org.mage.test.cards.abilities.oneshot.damage; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class JayaBallardTaskMageTest extends CardTestPlayerBase { + + @Test + public void testDamageNormal() { + // {R}, {tap}, Discard a card: Destroy target blue permanent. + // {1}{R}, {tap}, Discard a card: Jaya Ballard, Task Mage deals 3 damage to target creature or player. A creature dealt damage this way can't be regenerated this turn. + // {5}{R}{R}, {tap}, Discard a card: Jaya Ballard deals 6 damage to each creature and each player. + addCard(Zone.BATTLEFIELD, playerA, "Jaya Ballard, Task Mage"); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 7); + addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox"); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}{R}{R}"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Jaya Ballard, Task Mage", 1); + assertGraveyardCount(playerA, "Silvercoat Lion", 1); + + assertGraveyardCount(playerB, "Pillarfield Ox", 1); + + assertLife(playerA, 14); + assertLife(playerB, 14); + } + + @Test + public void testDamageWithDeathPitsOfRath() { + // {R}, {tap}, Discard a card: Destroy target blue permanent. + // {1}{R}, {tap}, Discard a card: Jaya Ballard, Task Mage deals 3 damage to target creature or player. A creature dealt damage this way can't be regenerated this turn. + // {5}{R}{R}, {tap}, Discard a card: Jaya Ballard deals 6 damage to each creature and each player. + addCard(Zone.BATTLEFIELD, playerA, "Jaya Ballard, Task Mage"); + // Whenever a creature is dealt damage, destroy it. It can't be regenerated. + addCard(Zone.BATTLEFIELD, playerA, "Death Pits of Rath"); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 7); + addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox"); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}{R}{R}"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Jaya Ballard, Task Mage", 1); + assertPermanentCount(playerA, "Death Pits of Rath", 1); + assertGraveyardCount(playerA, "Silvercoat Lion", 1); + + assertGraveyardCount(playerB, "Pillarfield Ox", 1); + + assertLife(playerA, 14); + assertLife(playerB, 14); + } + + @Test + public void testDamageWithRepercussion() { + // {R}, {tap}, Discard a card: Destroy target blue permanent. + // {1}{R}, {tap}, Discard a card: Jaya Ballard, Task Mage deals 3 damage to target creature or player. A creature dealt damage this way can't be regenerated this turn. + // {5}{R}{R}, {tap}, Discard a card: Jaya Ballard deals 6 damage to each creature and each player. + addCard(Zone.BATTLEFIELD, playerA, "Jaya Ballard, Task Mage"); + // Whenever a creature is dealt damage, Repercussion deals that much damage to that creature's controller. + addCard(Zone.BATTLEFIELD, playerA, "Repercussion"); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 7); + addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 2); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}{R}{R}"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Jaya Ballard, Task Mage", 1); + assertPermanentCount(playerA, "Repercussion", 1); + assertGraveyardCount(playerA, "Silvercoat Lion", 1); + + assertGraveyardCount(playerB, "Pillarfield Ox", 2); + + assertLife(playerA, 8); + assertLife(playerB, 2); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/FiendHunterTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/FiendHunterTest.java new file mode 100644 index 00000000000..81a98e7ce54 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/FiendHunterTest.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 org.mage.test.cards.abilities.oneshot.exile; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class FiendHunterTest extends CardTestPlayerBase { + + /** + * + * + * Hi i rencently play against an opponent that when i did the bounce + * ability with Restoration Angel to Fiend hunter to Exile Primeval Titan + * the first primeval titan that i exiled didnt came back into play. + * + * Just to be sure i exile primeval titan the first time that fiend hunter + * came into play and i resto angel fiend hunter to exile another primeval + * titan Fiend hunter was on the battlefield for 4-6 rounds. When Fiend + * hunter is remove from the battlefield the exile ability is suppose lose + * his effect and the first Titan is suppose to come back. + */ + @Test + public void testExileWorks() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 3); + // When Fiend Hunter enters the battlefield, you may exile another target creature. + // When Fiend Hunter leaves the battlefield, return the exiled card to the battlefield under its owner's control. + addCard(Zone.HAND, playerA, "Fiend Hunter"); // Creature - Human Cleric 1/3 {1}{W}{W} + + // At the beginning of your upkeep, you lose 1 life and put a 1/1 black Faerie Rogue creature token with flying onto the battlefield. + addCard(Zone.BATTLEFIELD, playerB, "Primeval Titan"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fiend Hunter"); + addTarget(playerA, "Primeval Titan"); + + setStopAt(2, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertExileCount("Primeval Titan", 1); + assertPermanentCount(playerA, "Fiend Hunter", 1); + + } + + @Test + public void testExileAndReturnWorks() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 4); + // When Fiend Hunter enters the battlefield, you may exile another target creature. + // When Fiend Hunter leaves the battlefield, return the exiled card to the battlefield under its owner's control. + addCard(Zone.HAND, playerA, "Fiend Hunter"); // Creature - Human Cleric 1/3 {1}{W}{W} + // When Restoration Angel enters the battlefield, you may exile target non-Angel creature you control, then return that card to the battlefield under your control + addCard(Zone.HAND, playerA, "Restoration Angel"); // Creature - Angel 3/4 {3}{W} + + // At the beginning of your upkeep, you lose 1 life and put a 1/1 black Faerie Rogue creature token with flying onto the battlefield. + addCard(Zone.BATTLEFIELD, playerB, "Primeval Titan"); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fiend Hunter"); + addTarget(playerA, "Primeval Titan"); + + // When Restoration Angel enters the battlefield, you may exile target non-Angel creature you control, then return that card to the battlefield under your control + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Restoration Angel"); + addTarget(playerA, "Fiend Hunter"); + + setStopAt(4, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertExileCount("Silvercoat Lion", 1); + assertPermanentCount(playerB, "Primeval Titan", 1); + + assertPermanentCount(playerA, "Fiend Hunter", 1); + assertPermanentCount(playerA, "Restoration Angel", 1); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/OblivionSowerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/OblivionSowerTest.java new file mode 100644 index 00000000000..ae9c4982beb --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/OblivionSowerTest.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 org.mage.test.cards.abilities.oneshot.exile; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class OblivionSowerTest extends CardTestPlayerBase { + + /** + * When putting lands into play from an opponent's exile zone using Oblivion + * Sower, the BFZ dual lands behave exactly the opposite way of how they + * should: if you control less than two basics, they enter the battlefield + * untapped, and if you control more, they enter tapped. + */ + @Test + public void testPlayLandsFromExile() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 6); + // When you cast Oblivion Sower, target opponent exiles the top four cards of his or her library, then you may put any number of land cards that player owns from exile onto the battlefield under your control. + addCard(Zone.HAND, playerA, "Oblivion Sower"); // Creature - 5/8 + + // Canopy Vista enters the battlefield tapped unless you control two or more basic lands. + addCard(Zone.LIBRARY, playerB, "Canopy Vista", 3); + addCard(Zone.LIBRARY, playerB, "Silvercoat Lion", 1); + skipInitShuffling(); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Sower"); + + addTarget(playerA, "Canopy Vista^Canopy Vista^Canopy Vista"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, "Oblivion Sower", 0); + assertPermanentCount(playerA, "Oblivion Sower", 1); + + assertExileCount("Silvercoat Lion", 1); + assertPermanentCount(playerA, "Canopy Vista", 3); + + assertTappedCount("Canopy Vista", false, 3); + + } +} 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 new file mode 100644 index 00000000000..242c0358eb7 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.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 org.mage.test.cards.abilities.oneshot.sacrifice; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class TradingPostTest extends CardTestPlayerBase { + + /** + * Trading Post doesn't let me sacrifice a creature owned by my opponent, + * but controlled by me. I get an error message saying You cannot sacrifice + * this creature. + */ + @Test + public void testSacrifice() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + // {1}, {T}, Discard a card: You gain 4 life. + // {1}, {T}, Pay 1 life: Put a 0/1 white Goat creature token onto the battlefield. + // {1}, {T}, Sacrifice a creature: Return target artifact card from your graveyard to your hand. + // {1}, {T}, Sacrifice an artifact: Draw a card. + addCard(Zone.BATTLEFIELD, playerA, "Trading Post", 1); + // Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. (It can attack and this turn.) + addCard(Zone.HAND, playerA, "Act of Treason"); // Sorcery {2}{R} + addCard(Zone.GRAVEYARD, playerA, "Helm of Possession"); + + addCard(Zone.BATTLEFIELD, playerB, "Savannah Lions"); + + 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); + setChoice(playerA, "Savannah Lions"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Act of Treason", 1); + + assertPermanentCount(playerB, "Savannah Lions", 0); + assertGraveyardCount(playerB, "Savannah Lions", 1); + + assertTapped("Trading Post", true); + assertHandCount(playerA, 1); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/ImpelledGiantTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/ImpelledGiantTest.java new file mode 100644 index 00000000000..907175c0693 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/ImpelledGiantTest.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 org.mage.test.cards.abilities.other; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class ImpelledGiantTest extends CardTestPlayerBase { + + @Test + public void testGainsPower() { + addCard(Zone.BATTLEFIELD, playerA, "Impelled Giant"); + addCard(Zone.BATTLEFIELD, playerA, "Hurloon Minotaur"); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tap an untapped red creature you control other than Impelled Giant"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertTapped("Hurloon Minotaur", true); + assertPowerToughness(playerA, "Impelled Giant", 5, 3); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/conditional/RazorvergeThicketTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/conditional/RazorvergeThicketTest.java new file mode 100644 index 00000000000..01705b7a0e1 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/conditional/RazorvergeThicketTest.java @@ -0,0 +1,39 @@ +package org.mage.test.cards.conditional; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * @author tobz + */ +public class RazorvergeThicketTest extends CardTestPlayerBase { + + @Test + public void testEntersTappedForThreeLands() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + addCard(Zone.HAND, playerA, "Razorverge Thicket"); + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Razorverge Thicket"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertTapped("Razorverge Thicket", true); + } + + @Test + public void testEntersUntappedForTwoLands() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 2); + addCard(Zone.HAND, playerA, "Razorverge Thicket"); + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Razorverge Thicket"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertTapped("Razorverge Thicket", false); + } + +} 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 new file mode 100644 index 00000000000..612be152634 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureTest.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 org.mage.test.cards.continuous; + +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Assert; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class BecomesCreatureTest extends CardTestPlayerBase { + + @Test + public void testChimericMass() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + + // Chimeric Mass enters the battlefield with X charge counters on it. + // {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it." + addCard(Zone.HAND, playerA, "Chimeric Mass", 1); // Artifiact - {X} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Chimeric Mass"); + setChoice(playerA, "X=3"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}:"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Chimeric Mass", 1); + assertPowerToughness(playerA, "Chimeric Mass", 3, 3); + assertType("Chimeric Mass", CardType.CREATURE, "Construct"); + + } + + @Test + public void testChimericMassAbilityRemoved() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + + // Chimeric Mass enters the battlefield with X charge counters on it. + // {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it." + addCard(Zone.HAND, playerA, "Chimeric Mass", 1); // Artifiact - {X} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Chimeric Mass"); + setChoice(playerA, "X=3"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}:"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Chimeric Mass", 1); + assertPowerToughness(playerA, "Chimeric Mass", 0, 0); + assertType("Chimeric Mass", CardType.CREATURE, false); + + Assert.assertTrue("All layered effect have to be removed", currentGame.getContinuousEffects().getLayeredEffects(currentGame).isEmpty()); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LandTypeChangingEffects.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LandTypeChangingEffects.java new file mode 100644 index 00000000000..3805325ccb2 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/LandTypeChangingEffects.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 org.mage.test.cards.continuous; + +import mage.abilities.mana.AnyColorManaAbility; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class LandTypeChangingEffects extends CardTestPlayerBase { + + /** + * + * Playing a commander game. Opponent had a Magus of the Moon, and I later + * dropped a Chromatic Lantern. + * + * I was not allowed to use the Chromatic Lantern's ability. Since layers + * are tricky I asked on the Judge's chat to confirm and the user "luma" + * said it should work on this scenario. + * + */ + @Test + public void testMagusOfTheMoonAndChromaticLantern() { + // Nonbasic lands are Mountains. + addCard(Zone.BATTLEFIELD, playerA, "Magus of the Moon"); + + addCard(Zone.BATTLEFIELD, playerB, "Canopy Vista", 1); + addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); + // Lands you control have "{T}: Add one mana of any color to your mana pool." + // {T}: Add one mana of any color to your mana pool. + addCard(Zone.HAND, playerB, "Chromatic Lantern"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Chromatic Lantern"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerB, "Chromatic Lantern", 1); + + assertType("Canopy Vista", CardType.LAND, "Mountain"); + assertAbility(playerB, "Canopy Vista", new AnyColorManaAbility(), true); + } + + @Test + public void testChromaticLanternBeforeMagusOfTheMoon() { + // Nonbasic lands are Mountains. + addCard(Zone.HAND, playerA, "Magus of the Moon");// {2}{R} + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); + + addCard(Zone.BATTLEFIELD, playerB, "Canopy Vista", 1); + addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); + // Lands you control have "{T}: Add one mana of any color to your mana pool." + // {T}: Add one mana of any color to your mana pool. + addCard(Zone.HAND, playerB, "Chromatic Lantern"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Chromatic Lantern"); + + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Magus of the Moon"); + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerB, "Chromatic Lantern", 1); + assertPermanentCount(playerA, "Magus of the Moon", 1); + + assertType("Canopy Vista", CardType.LAND, "Mountain"); + assertAbility(playerB, "Canopy Vista", new AnyColorManaAbility(), true); + } + +} 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 3b73418f9d8..ed2edd68978 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 @@ -22,6 +22,7 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { */ @Test public void testPermanentControlEffect() { + // When Smelt-Ward Gatekeepers enters the battlefield, if you control two or more Gates, gain control of target creature an opponent controls until end of turn. Untap that creature. That creature gains haste until end of turn. addCard(Zone.HAND, playerA, "Smelt-Ward Gatekeepers", 1); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); addCard(Zone.BATTLEFIELD, playerA, "Boros Guildgate", 2); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java index c045c0998af..06a37801110 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CleverImpersonatorTest.java @@ -29,6 +29,7 @@ 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; @@ -72,4 +73,109 @@ public class CleverImpersonatorTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Gilded Drake", 1); assertPermanentCount(playerB, "Pillarfield Ox", 1); } + + /** + * Copy a planeswalker on the battlefield + */ + @Test + public void testCopyPlaneswalker() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + + // You may have Clever Impersonator enter the battlefield as a copy of any nonland permanent on the battlefield. + addCard(Zone.HAND, playerA, "Clever Impersonator", 1); // {2}{U}{U} + + // +2: Each player discards a card. + // -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield. + // -8: You get an emblem with "Whenever a creature dies, return it to the battlefield under your control at the beginning of the next end step."; + addCard(Zone.BATTLEFIELD, playerB, "Liliana, Defiant Necromancer", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Clever Impersonator"); + setChoice(playerA, "Liliana, Defiant Necromancer"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: Each player discards a card"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, "Clever Impersonator", 0); + assertCounterCount(playerB, "Liliana, Defiant Necromancer", CounterType.LOYALTY, 3); // 3 + assertPermanentCount(playerB, "Liliana, Defiant Necromancer", 1); + assertPermanentCount(playerA, "Liliana, Defiant Necromancer", 1); + assertCounterCount(playerA, "Liliana, Defiant Necromancer", CounterType.LOYALTY, 5); // 3 + 2 + } + + /** + * I had an Alesha, Who Smiles at Death returning a Clever Impersonator who + * was supposed to copy a flipped Liliana, Defiant Necromancer, but it + * entered the battlefield with 0 loyalty and died immediately. If I am not + * mistaken it should have entered with 3 loyalty (see Gatherer entry). + */ + @Test + public void testCopyPlaneswalkerFromGraveyard() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + // First strike + // Whenever Alesha, Who Smiles at Death attacks, you may pay {W/B}{W/B}. If you do, return target creature card with power 2 or less from your graveyard to the battlefield tapped and attacking. + addCard(Zone.BATTLEFIELD, playerA, "Alesha, Who Smiles at Death", 1); // {2}{R} - 3/2 + + // You may have Clever Impersonator enter the battlefield as a copy of any nonland permanent on the battlefield. + addCard(Zone.GRAVEYARD, playerA, "Clever Impersonator", 1); // {2}{U}{U} + + // +2: Each player discards a card. + // -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield. + // -8: You get an emblem with "Whenever a creature dies, return it to the battlefield under your control at the beginning of the next end step."; + addCard(Zone.BATTLEFIELD, playerB, "Liliana, Defiant Necromancer", 1); + + attack(1, playerA, "Alesha, Who Smiles at Death"); + addTarget(playerA, "Clever Impersonator"); + setChoice(playerA, "Liliana, Defiant Necromancer"); + + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "+2: Each player discards a card"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertTapped("Alesha, Who Smiles at Death", true); + assertLife(playerB, 17); + assertGraveyardCount(playerA, "Clever Impersonator", 0); + + assertCounterCount(playerB, "Liliana, Defiant Necromancer", CounterType.LOYALTY, 3); // 3 + assertPermanentCount(playerB, "Liliana, Defiant Necromancer", 1); + assertPermanentCount(playerA, "Liliana, Defiant Necromancer", 1); + assertCounterCount(playerA, "Liliana, Defiant Necromancer", CounterType.LOYALTY, 5); // 3 + 2 + } + + /** + * So I copied Jace, Vryns Prodigy with Clever Impersonator (it was tapped + * and I needed a blocker for a token...), and Jace got to survive until the + * next turn. When I looted, he flipped, and I got an error message I + * couldn't get rid of, forcing me to concede. I'm not sure what the correct + * outcome is rules-wise. + */ + @Test + public void testCopyCreatureOfFlipPlaneswalker() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + + // {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. + addCard(Zone.BATTLEFIELD, playerA, "Jace, Vryn's Prodigy", 1); // {2}{R} - 3/2 + + // You may have Clever Impersonator enter the battlefield as a copy of any nonland permanent on the battlefield. + addCard(Zone.HAND, playerA, "Clever Impersonator", 1); // {2}{U}{U} + addCard(Zone.GRAVEYARD, playerA, "Mountain", 4); + + addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Clever Impersonator"); + setChoice(playerA, "Jace, Vryn's Prodigy"); + addTarget(playerA, "Jace, Vryn's Prodigy[only copy]"); // keep the copied Jace + + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Draw a card"); + setChoice(playerA, "Pillarfield Ox"); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Jace, Vryn's Prodigy", 1); + assertPermanentCount(playerA, "Pillarfield Ox", 1); + + } + } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CryptoplasmTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CryptoplasmTest.java index f57e5f93424..f2985fdfaac 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CryptoplasmTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CryptoplasmTest.java @@ -114,4 +114,25 @@ public class CryptoplasmTest extends CardTestPlayerBase { assertLife(playerB, 16); assertLife(playerA, 25); } + + @Test + public void testTransformMultipleTime() { + // At the beginning of your upkeep, you may have Cryptoplasm become a copy of another target creature. If you do, Cryptoplasm gains this ability. + addCard(Zone.BATTLEFIELD, playerA, "Cryptoplasm", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); // 6/4 + addCard(Zone.BATTLEFIELD, playerB, "Craw Wurm", 1); // 6/4 + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cryptoplasm"); + addTarget(playerA, "Silvercoat Lion"); + addTarget(playerA, "Craw Wurm"); + setStopAt(5, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + assertPermanentCount(playerA, "Silvercoat Lion", 0); + assertPermanentCount(playerA, "Craw Wurm", 1); + } } 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 71506a20563..2036f56dc25 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 @@ -25,7 +25,6 @@ * 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; @@ -39,16 +38,13 @@ import org.mage.test.serverside.base.CardTestPlayerBase; */ public class IsochronScepterTest extends CardTestPlayerBase { - /** - * Isochron Scepter - * Artifact, 2 (2) - * Imprint — When Isochron Scepter enters the battlefield, you may exile an - * instant card with converted mana cost 2 or less from your hand. - * {2}, {T}: You may copy the exiled card. If you do, you may cast the copy - * without paying its mana cost. - * - */ + * Isochron Scepter Artifact, 2 (2) Imprint — When Isochron Scepter enters + * the battlefield, you may exile an instant card with converted mana cost 2 + * or less from your hand. {2}, {T}: You may copy the exiled card. If you + * do, you may cast the copy without paying its mana cost. + * + */ @Test public void testImprint() { addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); @@ -64,9 +60,9 @@ public class IsochronScepterTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Isochron Scepter", 1); assertExileCount("Lightning Bolt", 1); assertLife(playerB, 20); - + } - + @Test public void testCopyCard() { addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); @@ -86,7 +82,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { assertExileCount("Lightning Bolt", 1); assertGraveyardCount(playerA, "Lightning Bolt", 0); assertLife(playerB, 17); - + } @Test @@ -108,20 +104,33 @@ public class IsochronScepterTest extends CardTestPlayerBase { assertExileCount("Lightning Bolt", 1); assertGraveyardCount(playerA, "Lightning Bolt", 0); assertLife(playerB, 20); - + } - + + /** + * Not sure if it's triggered by just casting Angel's Grace or by casting it + * from an Isochron Scepter, but when the bug happens neither player is able + * to play spells or activate abilities anymore for the rest of the game. + * + * Maybe something related to Split Second? + */ @Test public void testAngelsGrace() { addCard(Zone.BATTLEFIELD, playerA, "Plains", 4); addCard(Zone.HAND, playerA, "Isochron Scepter"); + // Split second (As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.) + // You can't lose the game this turn and your opponents can't win the game this turn. + // Until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead. + addCard(Zone.HAND, playerA, "Angel's Grace"); - addCard(Zone.BATTLEFIELD, playerB, "Dross Crocodile", 4); + addCard(Zone.BATTLEFIELD, playerB, "Dross Crocodile", 4);// 5/1 + addCard(Zone.HAND, playerB, "Lightning Bolt", 2); + addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Angel's Grace"); - + attack(2, playerB, "Dross Crocodile"); attack(2, playerB, "Dross Crocodile"); attack(2, playerB, "Dross Crocodile"); @@ -131,24 +140,34 @@ public class IsochronScepterTest extends CardTestPlayerBase { setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); - setStopAt(2, PhaseStep.END_COMBAT); + // Damage life loss is reduced to 0 because of Angel's Grace effect active + castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA); + + // Spells can be cast again + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Dross Crocodile"); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); execute(); - assertPermanentCount(playerA, "Isochron Scepter", 1); assertExileCount("Angel's Grace", 1); assertGraveyardCount(playerA, "Angel's Grace", 0); assertLife(playerA, 1); assertLife(playerB, 20); + assertGraveyardCount(playerB, "Lightning Bolt", 2); + assertGraveyardCount(playerB, "Dross Crocodile", 1); + assertPermanentCount(playerB, "Dross Crocodile", 3); + assertPermanentCount(playerA, "Isochron Scepter", 1); + } - + /** - * Resolving a Silence cast from exile via Isochron Scepter during my opponent's upkeep does - * not prevent that opponent from casting spells that turn. - * + * Resolving a Silence cast from exile via Isochron Scepter during my + * opponent's upkeep does not prevent that opponent from casting spells that + * turn. + * */ - @Test public void testSilence() { addCard(Zone.BATTLEFIELD, playerA, "Plains", 4); @@ -160,7 +179,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Silence"); - + activateAbility(2, PhaseStep.UPKEEP, playerA, "{2},{T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); @@ -175,6 +194,6 @@ public class IsochronScepterTest extends CardTestPlayerBase { assertHandCount(playerB, "Silvercoat Lion", 1); assertPermanentCount(playerB, "Silvercoat Lion", 0); - - } + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/SpelltwineTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/SpelltwineTest.java index dc1ed92799c..5c788c4d38d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/SpelltwineTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/SpelltwineTest.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 org.mage.test.cards.copy; import mage.constants.PhaseStep; @@ -39,15 +38,13 @@ import org.mage.test.serverside.base.CardTestPlayerBase; */ public class SpelltwineTest extends CardTestPlayerBase { - /** - * Spelltwine - * Sorcery, 5U (6) - * Exile target instant or sorcery card from your graveyard and target instant - * or sorcery card from an opponent's graveyard. Copy those cards. Cast the - * copies if able without paying their mana costs. Exile Spelltwine. - * - */ + * Spelltwine Sorcery, 5U (6) Exile target instant or sorcery card from your + * graveyard and target instant or sorcery card from an opponent's + * graveyard. Copy those cards. Cast the copies if able without paying their + * mana costs. Exile Spelltwine. + * + */ @Test public void testCopyCards() { addCard(Zone.BATTLEFIELD, playerA, "Island", 6); @@ -66,7 +63,55 @@ public class SpelltwineTest extends CardTestPlayerBase { assertExileCount("Lightning Bolt", 1); assertExileCount("Shock", 1); assertLife(playerB, 15); - + + } + + /** + * In a game of Commander, I cast Spelltwine, targeting Impulse and + * Blasphemous Act. This triggered my Mirari, which I paid the 3 and copied + * the Spelltwine. I chose new targets for the copy, naming Path to Exile + * and Shape Anew. Somehow, the original Spelltwine was completely lost + * after this, failing to be in the stack box or resolve all. + */ + @Test + public void testCopyCardsMirari() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 9); + // Exile target instant or sorcery card from your graveyard and target instant or sorcery card from an opponent's graveyard. + // Copy those cards. Cast the copies if able without paying their mana costs. Exile Spelltwine. + addCard(Zone.HAND, playerA, "Spelltwine"); // {5}{U} + // Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. + addCard(Zone.GRAVEYARD, playerA, "Impulse"); + // You draw two cards and you lose 2 life. + addCard(Zone.GRAVEYARD, playerA, "Night's Whisper"); + // Blasphemous Act costs {1} less to cast for each creature on the battlefield. + // Blasphemous Act deals 13 damage to each creature. + addCard(Zone.GRAVEYARD, playerB, "Blasphemous Act"); + // Draw two cards. + addCard(Zone.GRAVEYARD, playerB, "Divination"); + + // Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy. + addCard(Zone.BATTLEFIELD, playerA, "Mirari", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Spelltwine"); + addTarget(playerA, "Impulse"); + addTarget(playerA, "Blasphemous Act"); + setChoice(playerA, "Yes"); // pay {3} and copy spell + setChoice(playerA, "Yes"); // Change targets + addTarget(playerA, "Night's Whisper"); + addTarget(playerA, "Divination"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertExileCount("Impulse", 1); + assertExileCount("Blasphemous Act", 1); + assertExileCount("Spelltwine", 1); + assertExileCount("Night's Whisper", 1); + assertExileCount("Divination", 1); + + assertHandCount(playerA, 5); + + assertLife(playerA, 18); + assertLife(playerB, 20); + } - } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/kicker/GatekeeperOfMalakirTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/kicker/GatekeeperOfMalakirTest.java index 322cc8f4201..770f6265f6d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/kicker/GatekeeperOfMalakirTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/kicker/GatekeeperOfMalakirTest.java @@ -17,6 +17,8 @@ public class GatekeeperOfMalakirTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Gatekeeper of Malakir"); addCard(Zone.BATTLEFIELD, playerB, "Llanowar Elves"); + // Kicker {B} (You may pay an additional {B} as you cast this spell.) + // When Gatekeeper of Malakir enters the battlefield, if it was kicked, target player sacrifices a creature. castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gatekeeper of Malakir"); setStopAt(1, PhaseStep.BEGIN_COMBAT); @@ -29,5 +31,4 @@ public class GatekeeperOfMalakirTest extends CardTestPlayerBase { assertGraveyardCount(playerB, 1); } - } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/MizzixOfTheIzmagnusTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/MizzixOfTheIzmagnusTest.java new file mode 100644 index 00000000000..131b85a69b6 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/MizzixOfTheIzmagnusTest.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 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; + +/** + * + * @author LevelX2 + */ +public class MizzixOfTheIzmagnusTest extends CardTestPlayerBase { + + @Test + public void testSpellsFixedCost() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + // Whenever you cast an instant or sorcery spell with converted mana cost greater than the number of experience counters you have, you get an experience counter. + // Instant and sorcery spells you cast cost {1} less to cast for each experience counter you have. + addCard(Zone.BATTLEFIELD, playerA, "Mizzix of the Izmagnus"); + addCard(Zone.HAND, playerA, "Lightning Bolt"); // {R} + // Incinerate deals 3 damage to target creature or player. A creature dealt damage this way can't be regenerated this turn. + addCard(Zone.HAND, playerA, "Incinerate"); // {1}{R} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Incinerate", playerB); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Lightning Bolt", 1); + assertGraveyardCount(playerA, "Incinerate", 1); + + assertCounterCount(playerA, CounterType.EXPERIENCE, 2); + assertLife(playerA, 20); + assertLife(playerB, 14); + + } + + /** + * Does not reduce the cost of {X} spells + */ + @Test + public void testSpellsVariableCost() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + // Whenever you cast an instant or sorcery spell with converted mana cost greater than the number of experience counters you have, you get an experience counter. + // Instant and sorcery spells you cast cost {1} less to cast for each experience counter you have. + addCard(Zone.BATTLEFIELD, playerA, "Mizzix of the Izmagnus"); + // Blaze deals X damage to target creature or player. + addCard(Zone.HAND, playerA, "Blaze", 2); // Sorcery - {X}{R} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blaze", playerB); + setChoice(playerA, "X=1"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blaze", playerB); + setChoice(playerA, "X=2"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Blaze", 2); + + assertCounterCount(playerA, CounterType.EXPERIENCE, 2); + assertLife(playerA, 20); + assertLife(playerB, 17); + + } + + /** + * Test to reduce Buyback costs + */ + @Test + public void testSpellsBuybackCost() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + // Whenever you cast an instant or sorcery spell with converted mana cost greater than the number of experience counters you have, you get an experience counter. + // Instant and sorcery spells you cast cost {1} less to cast for each experience counter you have. + addCard(Zone.BATTLEFIELD, playerA, "Mizzix of the Izmagnus");// 2/2 + addCard(Zone.HAND, playerA, "Lightning Bolt"); // {R} + // Target creature gets +3/+0 until end of turn. + addCard(Zone.HAND, playerA, "Seething Anger"); // {R} Buyback {3} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Seething Anger", "Mizzix of the Izmagnus"); + setChoice(playerA, "Yes"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Lightning Bolt", 1); + assertHandCount(playerA, "Seething Anger", 1); + + assertPowerToughness(playerA, "Mizzix of the Izmagnus", 5, 2); + assertCounterCount(playerA, CounterType.EXPERIENCE, 1); + assertLife(playerA, 20); + assertLife(playerB, 17); + + } +} 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 792b0c9678e..256c4dfc7a6 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. (Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)."); + 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. (Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)."); + 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. (Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)."); + 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. (Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)."); + 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. (Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)."); + 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); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/HumilityTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/HumilityTest.java new file mode 100644 index 00000000000..e8fdbcb958a --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/HumilityTest.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 org.mage.test.cards.replacement; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class HumilityTest extends CardTestPlayerBase { + + /** + * During a commander game both were on the battlefield, and Masumaro's P/T + * was not displaying as 1/1. + */ + @Test + public void testHumilityAndMasumaro() { + + // Masumaro, First to Live's power and toughness are each equal to twice the number of cards in your hand. + addCard(Zone.BATTLEFIELD, playerB, "Masumaro, First to Live"); + + // Enchantment {2}{W}{W} + // All creatures lose all abilities and are 1/1. + addCard(Zone.BATTLEFIELD, playerA, "Humility"); + + addCard(Zone.HAND, playerB, "Plains", 3); + + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPowerToughness(playerB, "Masumaro, First to Live", 1, 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 20b7bdec98d..56e196a91f8 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 @@ -29,7 +29,6 @@ package org.mage.test.cards.replacement; import mage.constants.PhaseStep; import mage.constants.Zone; -import org.junit.Assert; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -37,7 +36,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class LeylineOfTheVoidTest extends CardTestPlayerBase { /** @@ -57,20 +55,51 @@ public class LeylineOfTheVoidTest extends CardTestPlayerBase { // If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield. // If a card would be put into an opponent's graveyard from anywhere, exile it instead. addCard(Zone.BATTLEFIELD, playerA, "Leyline of the Void"); - + // {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); setChoice(playerA, "X=1"); setStopAt(1, PhaseStep.END_TURN); execute(); - + assertExileCount(playerB, 71); // All cards go to exile replaced from Leyline of the void } - + + /** + * Today i casted Ill-gotten Gains in EDH (with a leyline of the veil in + * play) and the spell simply discarded both players hands not letting + * either of us choose cards to get back, this ended up with me losing the + * game as i was going to combo off some cards in yard. + */ + @Test + public void testIllgottenGains() { + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4); + + // If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield. + // If a card would be put into an opponent's graveyard from anywhere, exile it instead. + addCard(Zone.BATTLEFIELD, playerA, "Leyline of the Void"); + + // Exile Ill-Gotten Gains. + // Each player discards his or her hand, + // then returns up to three cards from his or her graveyard to his or her hand. + addCard(Zone.HAND, playerA, "Ill-Gotten Gains"); // Sorcery - {2}{B}{B} + addCard(Zone.HAND, playerA, "Silvercoat Lion", 4); + addCard(Zone.HAND, playerB, "Silvercoat Lion", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ill-Gotten Gains"); + setChoice(playerA, "Silvercoat Lion^Silvercoat Lion^Silvercoat Lion"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertExileCount(playerB, 4); + assertHandCount(playerB, 0); + + assertExileCount(playerA, 1); + assertHandCount(playerA, 3); + } + } - - diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/KjeldoranOutpostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/KjeldoranOutpostTest.java new file mode 100644 index 00000000000..01cbc154ab1 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/KjeldoranOutpostTest.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 org.mage.test.cards.replacement.entersBattlefield; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class KjeldoranOutpostTest extends CardTestPlayerBase { + + @Test + public void testNoPlainsAvailable() { + // If Kjeldoran Outpost would enter the battlefield, sacrifice a Plains instead. If you do, put Kjeldoran Outpost onto the battlefield. If you don't, put it into its owner's graveyard. + // {T}: Add {W} to your mana pool. + // {1}{W}, {tap}: Put a 1/1 white Soldier creature token onto the battlefield. + addCard(Zone.HAND, playerA, "Kjeldoran Outpost"); + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kjeldoran Outpost"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Kjeldoran Outpost", 0); + assertGraveyardCount(playerA, "Kjeldoran Outpost", 1); + } + + @Test + public void testPlainsAvailable() { + addCard(Zone.BATTLEFIELD, playerA, "Plains"); + // If Kjeldoran Outpost would enter the battlefield, sacrifice a Plains instead. If you do, put Kjeldoran Outpost onto the battlefield. If you don't, put it into its owner's graveyard. + // {T}: Add {W} to your mana pool. + // {1}{W}, {tap}: Put a 1/1 white Soldier creature token onto the battlefield. + addCard(Zone.HAND, playerA, "Kjeldoran Outpost"); + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kjeldoran Outpost"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Kjeldoran Outpost", 1); + assertGraveyardCount(playerA, "Kjeldoran Outpost", 0); + assertGraveyardCount(playerA, "Plains", 1); + } + + @Test + public void testOnlySnowcoveredPlainsAvailable() { + addCard(Zone.BATTLEFIELD, playerA, "Snow-Covered Plains"); + // If Kjeldoran Outpost would enter the battlefield, sacrifice a Plains instead. If you do, put Kjeldoran Outpost onto the battlefield. If you don't, put it into its owner's graveyard. + // {T}: Add {W} to your mana pool. + // {1}{W}, {tap}: Put a 1/1 white Soldier creature token onto the battlefield. + addCard(Zone.HAND, playerA, "Kjeldoran Outpost"); + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kjeldoran Outpost"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Kjeldoran Outpost", 1); + assertGraveyardCount(playerA, "Kjeldoran Outpost", 0); + assertGraveyardCount(playerA, "Snow-Covered Plains", 1); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/LivingLoreTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/LivingLoreTest.java new file mode 100644 index 00000000000..217636f7e2a --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/LivingLoreTest.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 org.mage.test.cards.replacement.entersBattlefield; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class LivingLoreTest extends CardTestPlayerBase { + + /** + * That the +1/+1 counters are added to Living Lore before state based + * actions take place + */ + @Test + public void testCountersAdded() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + addCard(Zone.HAND, playerA, "Living Lore"); //{3}{U} + addCard(Zone.GRAVEYARD, playerA, "Natural Connection", 1); // {2}{G} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Living Lore"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Living Lore", 1); + assertPowerToughness(playerA, "Living Lore", 3, 3); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/rules/CantCastTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/rules/CantCastTest.java new file mode 100644 index 00000000000..1e55f7efd58 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/rules/CantCastTest.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 org.mage.test.cards.rules; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class CantCastTest extends CardTestPlayerBase { + + /** + * I control Void Winnower. But my opponent can cast Jayemdae Tome (that's + * converted mana cost is even) He can cast other even spell. + * + */ + @Test + public void testVoidWinnower() { + // Your opponent can't cast spells with even converted mana costs. (Zero is even.) + // Your opponents can't block with creatures with even converted mana costs. + addCard(Zone.BATTLEFIELD, playerB, "Void Winnower"); + + addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); + + addCard(Zone.HAND, playerA, "Jayemdae Tome", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Jayemdae Tome"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, "Jayemdae Tome", 1); + + assertPermanentCount(playerA, "Jayemdae Tome", 0); + + } + + @Test + public void testVoidWinnower2() { + // Your opponent can't cast spells with even converted mana costs. (Zero is even.) + // Your opponents can't block with creatures with even converted mana costs. + addCard(Zone.BATTLEFIELD, playerB, "Void Winnower"); + + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + + // Blaze deals X damage to target creature or player. + addCard(Zone.HAND, playerA, "Blaze", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blaze", playerA); + setChoice(playerA, "X=3"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, "Blaze", 1); + + assertLife(playerB, 20); + + } + + @Test + public void testVoidWinnower3() { + // Your opponent can't cast spells with even converted mana costs. (Zero is even.) + // Your opponents can't block with creatures with even converted mana costs. + addCard(Zone.BATTLEFIELD, playerB, "Void Winnower"); + + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); + + // Blaze deals X damage to target creature or player. + addCard(Zone.HAND, playerA, "Blaze", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blaze", playerB); + setChoice(playerA, "X=4"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, "Blaze", 0); + assertGraveyardCount(playerA, "Blaze", 1); + + assertLife(playerB, 16); + + } + + @Test + public void testVoidWinnowerWithMorph() { + // Your opponent can't cast spells with even converted mana costs. (Zero is even.) + // Your opponents can't block with creatures with even converted mana costs. + addCard(Zone.BATTLEFIELD, playerB, "Void Winnower"); + /* + Pine Walker + Creature - Elemental + 5/5 + Morph {4}{G} (You may cast this card face down as a 2/2 creature for . Turn it face up any time for its morph cost.) + Whenever Pine Walker or another creature you control is turned face up, untap that creature. + */ + addCard(Zone.HAND, playerA, "Pine Walker"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 3); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pine Walker"); + setChoice(playerA, "Yes"); // cast it face down as 2/2 creature + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "", 0); + assertHandCount(playerA, "Pine Walker", 1); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/lrw/HostilityTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/lrw/HostilityTest.java new file mode 100644 index 00000000000..6e57f51737e --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/lrw/HostilityTest.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 org.mage.test.cards.single.lrw; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author Kranken, LevelX2 + */ + +public class HostilityTest extends CardTestPlayerBase { + + @Test + public void testCombatDamage() { + addCard(Zone.BATTLEFIELD, playerA, "Hostility"); + attack(1, playerA, "Hostility"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 14); + } + + @Test + public void testSpellDamage() { + addCard(Zone.BATTLEFIELD, playerA, "Hostility"); + + addCard(Zone.HAND, playerA, "Lightning Bolt"); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertPermanentCount(playerA, 5); // hostility, mountain, and 3 tokens + } + + @Test + public void testOpponentSpellDamage() { + addCard(Zone.BATTLEFIELD, playerA, "Hostility"); + + addCard(Zone.HAND, playerB, "Lightning Bolt"); + addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerB); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 17); + } + +} \ No newline at end of file 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 new file mode 100644 index 00000000000..0484faccaa5 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java @@ -0,0 +1,41 @@ +package org.mage.test.cards.single.mir; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class GrinningTotemTest extends CardTestPlayerBase { + + @Test + public void testCardsGoToGraveyard() { + 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); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, 1); // Grinning Totem + assertGraveyardCount(playerB, 1); // the exiled Mountain + } + + @Test + public void testCardsGoToGraveyard2() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + addCard(Zone.BATTLEFIELD, playerA, "Grinning Totem"); + + 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.POSTCOMBAT_MAIN, playerB, "{T}, Sacrifice {this}: Exile all cards", playerA); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, 0); + assertGraveyardCount(playerB, 2); // the exiled Mountain and Tormod's Crypt + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/AbattoirGhoulTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/AbattoirGhoulTest.java index fc9b33bc592..03c88dc4749 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/AbattoirGhoulTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/AbattoirGhoulTest.java @@ -13,25 +13,25 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author jeffwadsworth */ -public class AbattoirGhoulTest extends CardTestPlayerBase{ - +public class AbattoirGhoulTest extends CardTestPlayerBase { + @Test public void testAbattoirGhoulEffect() { - + // Whenever a creature dealt damage by Abattoir Ghoul this turn dies, you gain life equal to that creature's toughness. addCard(Zone.BATTLEFIELD, playerA, "Abattoir Ghoul", 1); addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1); addCard(Zone.BATTLEFIELD, playerB, "Shivan Dragon", 1); - + attack(1, playerA, "Abattoir Ghoul"); block(1, playerB, "Memnite", "Abattoir Ghoul"); block(1, playerB, "Shivan Dragon", "Abattoir Ghoul"); - + setStopAt(1, PhaseStep.END_TURN); execute(); - + assertLife(playerA, 21); assertLife(playerB, 20); - + } - + } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DayOfTheDragonsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DayOfTheDragonsTest.java new file mode 100644 index 00000000000..467f540a782 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DayOfTheDragonsTest.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 org.mage.test.cards.triggers; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class DayOfTheDragonsTest extends CardTestPlayerBase { + + @Test + public void TestTokensAreCreated() { + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 7); + // When Day of the Dragons enters the battlefield, exile all creatures you control. Then put that many 5/5 red Dragon creature tokens with flying onto the battlefield. + // When Day of the Dragons leaves the battlefield, sacrifice all Dragons you control. Then return the exiled cards to the battlefield under your control. + addCard(Zone.HAND, playerA, "Day of the Dragons"); // Enchantment - {4}{U}{U}{U} + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerB, "Shivan Dragon"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Day of the Dragons"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertExileCount("Silvercoat Lion", 1); + assertExileCount("Pillarfield Ox", 1); + assertPermanentCount(playerA, "Dragon", 2); + + assertPermanentCount(playerB, "Silvercoat Lion", 1); + assertPermanentCount(playerB, "Shivan Dragon", 1); + } + + @Test + public void TestTokensAreCreatedAndExiled() { + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 7); + // When Day of the Dragons enters the battlefield, exile all creatures you control. Then put that many 5/5 red Dragon creature tokens with flying onto the battlefield. + // When Day of the Dragons leaves the battlefield, sacrifice all Dragons you control. Then return the exiled cards to the battlefield under your control. + addCard(Zone.HAND, playerA, "Day of the Dragons"); // Enchantment - {4}{U}{U}{U} + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerB, "Shivan Dragon"); + addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); + addCard(Zone.HAND, playerB, "Disenchant"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Day of the Dragons"); + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Disenchant", "Day of the Dragons"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertGraveyardCount(playerA, "Day of the Dragons", 1); + assertGraveyardCount(playerB, "Disenchant", 1); + + assertPermanentCount(playerA, "Silvercoat Lion", 1); + assertPermanentCount(playerA, "Pillarfield Ox", 1); + assertPermanentCount(playerA, "Dragon", 0); + + assertPermanentCount(playerB, "Silvercoat Lion", 1); + assertPermanentCount(playerB, "Shivan Dragon", 1); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/GoldnightCommanderTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/GoldnightCommanderTest.java index 6da6f33709e..acdced5c75f 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/GoldnightCommanderTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/GoldnightCommanderTest.java @@ -37,20 +37,16 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class GoldnightCommanderTest extends CardTestPlayerBase { - /** - * Goldnight Commander {3}{W} - * Human Cleric Soldier - * Whenever another creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn. - * - + /* + * Goldnight Commander {3}{W} Human Cleric Soldier + * Whenever another creature enters the battlefield under your control, creatures you control get + * +1/+1 until end of turn. */ @Test public void testThreeCreaturesEnterAtTheSameTime() { // The ability of the Commander triggers three times and each trigger sees all three creatures - addCard(Zone.HAND, playerA, "Thatcher Revolt"); addCard(Zone.BATTLEFIELD, playerA, "Goldnight Commander", 1); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/JourneyToNowhereTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/JourneyToNowhereTest.java index 8cef82f8998..c6590662513 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/JourneyToNowhereTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/JourneyToNowhereTest.java @@ -36,23 +36,21 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LeveX2 */ - public class JourneyToNowhereTest extends CardTestPlayerBase { /* Journey to Nowhere Enchantment {1}{W} - When Journey to Nowhere enters the battlefield, exile target creature. - When Journey to Nowhere leaves the battlefield, return the exiled card to the battlefield under its owner's control. - - 10/1/2009: If Journey to Nowhere leaves the battlefield before its first ability has resolved, its second ability will - trigger and do nothing. Then its first ability will resolve and exile the targeted creature forever. - */ + When Journey to Nowhere enters the battlefield, exile target creature. + When Journey to Nowhere leaves the battlefield, return the exiled card to the battlefield under its owner's control. + 10/1/2009: If Journey to Nowhere leaves the battlefield before its first ability has resolved, its second ability will + trigger and do nothing. Then its first ability will resolve and exile the targeted creature forever. + */ @Test public void testTargetGetsExiled() { addCard(Zone.HAND, playerA, "Journey to Nowhere"); addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); - + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere"); @@ -63,13 +61,12 @@ public class JourneyToNowhereTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Journey to Nowhere", 1); assertExileCount("Silvercoat Lion", 1); } - - + @Test public void testTargetGetsExiledAndReturns() { addCard(Zone.HAND, playerA, "Journey to Nowhere"); addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); - + addCard(Zone.HAND, playerB, "Disenchant", 1); addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); @@ -78,7 +75,7 @@ public class JourneyToNowhereTest extends CardTestPlayerBase { addTarget(playerA, "Silvercoat Lion"); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere"); - + setStopAt(1, PhaseStep.END_TURN); execute(); @@ -88,14 +85,14 @@ public class JourneyToNowhereTest extends CardTestPlayerBase { } /* - 10/1/2009: If Journey to Nowhere leaves the battlefield before its first ability has resolved, its second ability will - trigger and do nothing. Then its first ability will resolve and exile the targeted creature forever. - */ + 10/1/2009: If Journey to Nowhere leaves the battlefield before its first ability has resolved, its second ability will + trigger and do nothing. Then its first ability will resolve and exile the targeted creature forever. + */ @Test public void testTargetGetsExiledAndDoesNeverReturn() { addCard(Zone.HAND, playerA, "Journey to Nowhere"); addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); - + addCard(Zone.HAND, playerB, "Disenchant", 1); addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); @@ -103,29 +100,29 @@ public class JourneyToNowhereTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere"); addTarget(playerA, "Silvercoat Lion"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere"); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertGraveyardCount(playerA, "Journey to Nowhere", 1); assertGraveyardCount(playerB, "Disenchant", 1); assertExileCount("Silvercoat Lion", 1); - } + } /* - Journey is played and targets the creature as it enters the battlefield. - The Journey will be returned to hand before the ability resolves. - The Journey will be played again targeting another creature. - The Journey will be disenchanted later, so only the second creature has to return to battlefield. - - */ + Journey is played and targets the creature as it enters the battlefield. + The Journey will be returned to hand before the ability resolves. + The Journey will be played again targeting another creature. + The Journey will be disenchanted later, so only the second creature has to return to battlefield. + + */ @Test public void testTargetGetsExiledAndDoesNeverReturnAndJourneyPlayedAgain() { addCard(Zone.HAND, playerA, "Journey to Nowhere"); addCard(Zone.HAND, playerA, "Boomerang"); addCard(Zone.BATTLEFIELD, playerA, "Plains", 4); addCard(Zone.BATTLEFIELD, playerA, "Island", 4); - + addCard(Zone.HAND, playerB, "Disenchant", 1); addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 1); @@ -133,11 +130,11 @@ public class JourneyToNowhereTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Journey to Nowhere"); addTarget(playerA, "Silvercoat Lion"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Boomerang", "Journey to Nowhere"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Boomerang", "Journey to Nowhere", "Journey to Nowhere", StackClause.WHILE_NOT_ON_STACK); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Journey to Nowhere"); addTarget(playerA, "Pillarfield Ox"); - + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Disenchant", "Journey to Nowhere"); setStopAt(2, PhaseStep.BEGIN_COMBAT); @@ -145,11 +142,11 @@ public class JourneyToNowhereTest extends CardTestPlayerBase { assertGraveyardCount(playerA, "Boomerang", 1); assertGraveyardCount(playerA, "Journey to Nowhere", 1); - assertGraveyardCount(playerB, "Disenchant", 1); + assertGraveyardCount(playerB, "Disenchant", 1); assertPermanentCount(playerB, "Pillarfield Ox", 1); - + assertPermanentCount(playerB, "Silvercoat Lion", 0); assertExileCount("Silvercoat Lion", 1); - - } + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java index 63fff00ea54..16dc31153e2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java @@ -94,12 +94,12 @@ public class ReturnToHandEffectsTest extends CardTestPlayerBase { execute(); assertPermanentCount(playerA, "Stormfront Riders", 1); - assertPermanentCount(playerA, "Rat", 0); assertHandCount(playerA, "Silvercoat Lion", 2); assertGraveyardCount(playerA, "Lab Rats", 1); assertGraveyardCount(playerB, "Boomerang", 1); assertPermanentCount(playerA, "Soldier", 3); + assertPermanentCount(playerA, "Rat", 0); } 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 f59cd5cd9d1..5c2a7cdd982 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 @@ -123,10 +123,10 @@ public class SpellskiteTest extends CardTestPlayerBase { public void testSpellskite() { addCard(Zone.BATTLEFIELD, playerA, "Island", 4); // Choose two - - // Counter target spell; - // or return target permanent to its owner's hand; - // or tap all creatures your opponents control; - // or draw a card. + // - Counter target spell; + // - return target permanent to its owner's hand; + // - tap all creatures your opponents control; + // - draw a card. addCard(Zone.HAND, playerA, "Cryptic Command"); addCard(Zone.BATTLEFIELD, playerB, "Spellskite", 1); @@ -141,7 +141,7 @@ public class SpellskiteTest extends CardTestPlayerBase { setModeChoice(playerA, "1"); // Counter target spell setModeChoice(playerA, "2"); // return target permanent to its owner's hand - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{UP}: Change a target of target spell or ability to {this}.", "Cryptic Command"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{UP}: Change a target of target spell or ability to {this}.", "Cryptic Command", "Cryptic Command"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ZadaHedronGrinderTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ZadaHedronGrinderTest.java new file mode 100644 index 00000000000..13a0c25179e --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ZadaHedronGrinderTest.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 org.mage.test.cards.triggers; + +import mage.abilities.keyword.TrampleAbility; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class ZadaHedronGrinderTest extends CardTestPlayerBase { + + /** + * Playing Zada edh, strive cards such as Rouse the Mob do not copy when + * targeting only Zada. + */ + @Test + public void testWithStriveSpell() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + + // Whenever you cast an instant or sorcery spell that targets only Zada, Hedron Grinder, copy that spell for each other creature you control that the spell could target. Each copy targets a different one of those creatures. + addCard(Zone.BATTLEFIELD, playerA, "Zada, Hedron Grinder", 1); // 3/3 + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + + // Strive — Rouse the Mob costs {2}{R} more to cast for each target beyond the first. + // Any number of target creatures each get +2/+0 and gain trample until end of turn. + addCard(Zone.HAND, playerA, "Rouse the Mob", 1); // Instant - {R} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rouse the Mob", "Zada, Hedron Grinder"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertGraveyardCount(playerA, "Rouse the Mob", 1); + + assertPowerToughness(playerA, "Zada, Hedron Grinder", 5, 3); + assertAbility(playerA, "Zada, Hedron Grinder", TrampleAbility.getInstance(), true); + assertPowerToughness(playerA, "Silvercoat Lion", 4, 2); + assertAbility(playerA, "Silvercoat Lion", TrampleAbility.getInstance(), true); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/OmnathLocusOfRageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/OmnathLocusOfRageTest.java new file mode 100644 index 00000000000..4e95b114847 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/OmnathLocusOfRageTest.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 org.mage.test.cards.triggers.dies; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class OmnathLocusOfRageTest extends CardTestPlayerBase { + + /** + * The new Omnath's ability doesn't trigger when he dies, although it + * explicitely states in the card's text that it should. + */ + @Test + public void testDiesTriggeredAbility() { + // Landfall - Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield. + // Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. + addCard(Zone.BATTLEFIELD, playerA, "Omnath, Locus of Rage", 1); + + // Target player sacrifices a creature. + addCard(Zone.HAND, playerB, "Diabolic Edict", 1); // {1}{B} + addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Diabolic Edict", playerA); + addTarget(playerA, playerB); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerB, "Diabolic Edict", 1); + assertGraveyardCount(playerA, "Omnath, Locus of Rage", 1); + + assertLife(playerA, 20); + assertLife(playerB, 17); + + } + + @Test + public void testDiesTriggeredAbilityOnlyIfPresent() { + // Landfall - Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield. + // Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. + addCard(Zone.BATTLEFIELD, playerA, "Omnath, Locus of Rage", 1); + addCard(Zone.BATTLEFIELD, playerA, "Lightning Elemental", 1); // 4/1 Elemental - Haste + + // Blastfire Bolt deals 5 damage to target creature. Destroy all Equipment attached to that creature. + addCard(Zone.HAND, playerB, "Blastfire Bolt", 1); // {5}{R} + addCard(Zone.HAND, playerB, "Lightning Bolt", 1); // {R} + addCard(Zone.BATTLEFIELD, playerB, "Mountain", 7); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Lightning Elemental"); // Dying Lightning Elemental does no longer trigger ability of Omnath + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Blastfire Bolt", "Omnath, Locus of Rage", "Lightning Bolt"); + addTarget(playerA, playerB); + addTarget(playerA, playerB); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerB, "Lightning Bolt", 1); + assertGraveyardCount(playerB, "Blastfire Bolt", 1); + assertGraveyardCount(playerA, "Omnath, Locus of Rage", 1); + assertGraveyardCount(playerA, "Lightning Elemental", 1); + + assertLife(playerA, 20); + assertLife(playerB, 17); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java b/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java index e515286e02e..191d4f0c89b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java @@ -298,4 +298,38 @@ public class AttackBlockRestrictionsTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Walking Corpse", 1); assertPermanentCount(playerB, "Llanowar Elves", 1); } + + /** + * Reproduces a bug when a creature that must be blocked is not attacking + */ + @Test + public void testTurntimberBasilisk() { + // Landfall - Whenever a land enters the battlefield under your control, you may + // have target creature block Turntimber Basilisk this turn if able. + addCard(Zone.BATTLEFIELD, playerA, "Turntimber Basilisk"); + addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears"); + addCard(Zone.HAND, playerA, "Forest"); + + addCard(Zone.BATTLEFIELD, playerB, "Storm Crow"); + + // Turntimber Basilisk's Landfall ability targets Storm Crow, + // so Storm Crow must block Turntimber Basilisk if able + playLand(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Forest"); + addTarget(playerA, "Storm Crow"); + + // Turntimber Basilisk doesn't attack and Storm Crow can block Grizzly Bears + attack(3, playerA, "Grizzly Bears"); + block(3, playerB, "Storm Crow", "Grizzly Bears"); + + setStopAt(3, PhaseStep.END_TURN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertPermanentCount(playerA, "Turntimber Basilisk", 1); + assertPermanentCount(playerA, "Grizzly Bears", 1); + assertPermanentCount(playerB, "Storm Crow", 0); + } + } diff --git a/Mage.Tests/src/test/java/org/mage/test/commander/duel/CastBRGCommanderTest.java b/Mage.Tests/src/test/java/org/mage/test/commander/duel/CastBRGCommanderTest.java index b7732e593b4..12dc632f2f3 100644 --- a/Mage.Tests/src/test/java/org/mage/test/commander/duel/CastBRGCommanderTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/commander/duel/CastBRGCommanderTest.java @@ -69,4 +69,31 @@ public class CastBRGCommanderTest extends CardTestCommanderDuelBase { } + /** + * Activating Karn Liberated 's ultimate in an edh game (human OR ai) causes + * all the command zones to lose their generals upon the new game restart + */ + @Test + public void castCommanderAfterKarnUltimate() { + // +4: Target player exiles a card from his or her hand. + // -3: Exile target permanent. + // -14: Restart the game, leaving in exile all non-Aura permanent cards exiled with Karn Liberated. Then put those cards onto the battlefield under your control. + addCard(Zone.BATTLEFIELD, playerA, "Karn Liberated", 1); + addCard(Zone.HAND, playerA, "Silvercoat Lion", 2); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+4: Target player", playerA); + addTarget(playerA, "Silvercoat Lion"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "+4: Target player", playerA); + addTarget(playerA, "Silvercoat Lion"); + activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "-14: Restart"); + + setStopAt(5, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Karn Liberated", 0); + assertPermanentCount(playerA, "Silvercoat Lion", 2); + assertCommandZoneCount(playerA, "Prossh, Skyraider of Kher", 1); + assertCommandZoneCount(playerB, "Ob Nixilis of the Black Oath", 1); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/lki/LastKnownInformationTest.java b/Mage.Tests/src/test/java/org/mage/test/lki/LastKnownInformationTest.java index 5449da60a6b..64d79632015 100644 --- a/Mage.Tests/src/test/java/org/mage/test/lki/LastKnownInformationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/lki/LastKnownInformationTest.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package org.mage.test.lki; import mage.constants.PhaseStep; @@ -20,10 +19,10 @@ public class LastKnownInformationTest extends CardTestPlayerBase { /** * see here for more information * http://www.slightlymagic.net/forum/viewtopic.php?f=116&t=14516 - * - * Tests Safehold Elite with persist returns to battlefield with -1/-1 counter - * Murder Investigation has to put 2 tokens onto battlefield because enchanted Safehold Elite - * was 2/2 + * + * Tests Safehold Elite with persist returns to battlefield with -1/-1 + * counter Murder Investigation has to put 2 tokens onto battlefield because + * enchanted Safehold Elite was 2/2 * * @author LevelX */ @@ -38,9 +37,9 @@ public class LastKnownInformationTest extends CardTestPlayerBase { // {1}{W} // Enchant creature you control // When enchanted creature dies, put X 1/1 white Soldier creature tokens onto the battlefield, where X is its power. - addCard(Zone.HAND, playerA, "Murder Investigation",1); + addCard(Zone.HAND, playerA, "Murder Investigation", 1); - addCard(Zone.HAND, playerB, "Lightning Bolt",2); + addCard(Zone.HAND, playerB, "Lightning Bolt", 2); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Murder Investigation", "Safehold Elite"); @@ -58,17 +57,20 @@ public class LastKnownInformationTest extends CardTestPlayerBase { // because enchanted Safehold Elite's P/T was 2/2, Murder Investigation has to put 2 Soldier onto the battlefield assertPermanentCount(playerA, "Soldier", 2); assertGraveyardCount(playerB, "Lightning Bolt", 2); - - assertActionCount(playerB, 0); + + assertActionCount(playerB, 0); } - + /** - * Here we test that Trostani's first ability checks the toughness on resolve. + * Here we test that Trostani's first ability checks the toughness on + * resolve. * */ @Test public void testTrostaniSelesnyasVoice1() { + // Whenever another creature enters the battlefield under your control, you gain life equal to that creature's toughness. + // {1}{G}{W}, {T}: Populate. (Put a token onto the battlefield that's a copy of a creature token you control.) addCard(Zone.BATTLEFIELD, playerA, "Trostani, Selesnya's Voice"); addCard(Zone.BATTLEFIELD, playerA, "Forest", 3); @@ -76,20 +78,21 @@ public class LastKnownInformationTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Grizzly Bears", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Grizzly Bears"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Giant Growth", "Grizzly Bears"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Giant Growth", "Grizzly Bears", "Grizzly Bears", StackClause.WHILE_NOT_ON_STACK); setStopAt(1, PhaseStep.END_TURN); execute(); + assertGraveyardCount(playerA, "Giant Growth", 1); assertPermanentCount(playerA, "Grizzly Bears", 1); assertLife(playerA, 25); } /** - * Here we test correct spell interaction by playing Cloudshift BEFORE Giant Growth resolves. - * Cloudshift will remove 2/2 creature and it will return as 2/2. - * Giant Growth will be fizzled. - * That means that player should gain 2 + 2 life. + * Here we test correct spell interaction by playing Cloudshift BEFORE Giant + * Growth resolves. Cloudshift will remove 2/2 creature and it will return + * as 2/2. Giant Growth will be fizzled. That means that player should gain + * 2 + 2 life. */ @Test public void testTrostaniSelesnyasVoice2() { @@ -102,7 +105,7 @@ public class LastKnownInformationTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Grizzly Bears", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Grizzly Bears"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Giant Growth", "Grizzly Bears"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Giant Growth", "Grizzly Bears", "Grizzly Bears", StackClause.WHILE_NOT_ON_STACK); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cloudshift", "Grizzly Bears", "Giant Growth", StackClause.WHILE_ON_STACK); @@ -114,8 +117,8 @@ public class LastKnownInformationTest extends CardTestPlayerBase { } /** - * Here we test actual use of LKI by playing Cloudshift AFTER Giant Growth resolves. - * Cloudshift will remove 5/5 creature and it will return as 2/2. + * Here we test actual use of LKI by playing Cloudshift AFTER Giant Growth + * resolves. Cloudshift will remove 5/5 creature and it will return as 2/2. * That means that player should gain 5 + 2 life. * */ @@ -130,7 +133,7 @@ public class LastKnownInformationTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Grizzly Bears", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Grizzly Bears"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Giant Growth", "Grizzly Bears"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Giant Growth", "Grizzly Bears", "Grizzly Bears", StackClause.WHILE_NOT_ON_STACK); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cloudshift", "Grizzly Bears", "Giant Growth", StackClause.WHILE_NOT_ON_STACK); @@ -142,5 +145,4 @@ public class LastKnownInformationTest extends CardTestPlayerBase { } - } diff --git a/Mage.Tests/src/test/java/org/mage/test/load/LoadCallbackClient.java b/Mage.Tests/src/test/java/org/mage/test/load/LoadCallbackClient.java index 7a4e7cfa9ee..8f6943bd0d5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/load/LoadCallbackClient.java +++ b/Mage.Tests/src/test/java/org/mage/test/load/LoadCallbackClient.java @@ -17,7 +17,7 @@ import java.util.UUID; */ public class LoadCallbackClient implements CallbackClient { - private static final transient Logger log = Logger.getLogger(LoadCallbackClient.class); + private static final Logger log = Logger.getLogger(LoadCallbackClient.class); private Session session; private UUID gameId; diff --git a/Mage.Tests/src/test/java/org/mage/test/load/SimpleMageClient.java b/Mage.Tests/src/test/java/org/mage/test/load/SimpleMageClient.java index 88f0532070a..deb80b873c1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/load/SimpleMageClient.java +++ b/Mage.Tests/src/test/java/org/mage/test/load/SimpleMageClient.java @@ -18,7 +18,7 @@ public class SimpleMageClient implements MageClient { private final UUID clientId; private static final MageVersion version = new MageVersion(MageVersion.MAGE_VERSION_MAJOR, MageVersion.MAGE_VERSION_MINOR, MageVersion.MAGE_VERSION_PATCH, MageVersion.MAGE_VERSION_MINOR_PATCH, MageVersion.MAGE_VERSION_INFO); - private static final transient Logger log = Logger.getLogger(SimpleMageClient.class); + private static final Logger log = Logger.getLogger(SimpleMageClient.class); private final CallbackClient callbackClient; diff --git a/Mage.Tests/src/test/java/org/mage/test/multiplayer/MyriadTest.java b/Mage.Tests/src/test/java/org/mage/test/multiplayer/MyriadTest.java new file mode 100644 index 00000000000..eb0c3c4477c --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/multiplayer/MyriadTest.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 org.mage.test.multiplayer; + +import java.io.FileNotFoundException; +import mage.constants.MultiplayerAttackOption; +import mage.constants.PhaseStep; +import mage.constants.RangeOfInfluence; +import mage.constants.Zone; +import mage.game.FreeForAll; +import mage.game.Game; +import mage.game.GameException; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestMultiPlayerBase; + +/** + * + * @author LevelX2 + */ +public class MyriadTest extends CardTestMultiPlayerBase { + + @Override + protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException { + Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, 0, 40); + // Player order: A -> D -> C -> B + playerA = createPlayer(game, playerA, "PlayerA"); + playerB = createPlayer(game, playerB, "PlayerB"); + playerC = createPlayer(game, playerC, "PlayerC"); + playerD = createPlayer(game, playerD, "PlayerD"); + return game; + } + + /** + * Tests Myriad multiplayer effects Player order: A -> D -> C -> B + */ + @Test + public void CallerOfThePackTest() { + // Trample + // Myriad (Whenever this creature attacks, for each opponent other than the defending player, put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile those tokens at the end of combat.) + addCard(Zone.BATTLEFIELD, playerD, "Caller of the Pack"); // 8/6 + + attack(2, playerD, "Caller of the Pack", playerA); + + setStopAt(2, PhaseStep.DECLARE_BLOCKERS); + execute(); + + assertPermanentCount(playerD, "Caller of the Pack", 3); + } + + @Test + public void CallerOfThePackTestExile() { + // Trample + // Myriad (Whenever this creature attacks, for each opponent other than the defending player, put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile those tokens at the end of combat.) + addCard(Zone.BATTLEFIELD, playerD, "Caller of the Pack"); // 8/6 + + attack(2, playerD, "Caller of the Pack", playerA); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPermanentCount(playerD, "Caller of the Pack", 1); + + assertLife(playerA, 32); + assertLife(playerB, 32); + assertLife(playerC, 32); + assertLife(playerD, 40); + + } + + @Test + public void CallerOfThePackTestExilePlaneswalker() { + // Trample + // Myriad (Whenever this creature attacks, for each opponent other than the defending player, put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile those tokens at the end of combat.) + addCard(Zone.BATTLEFIELD, playerD, "Caller of the Pack"); // 8/6 + + // +1: You gain 2 life. + // -1: Put a +1/+1 counter on each creature you control. Those creatures gain vigilance until end of turn. + // -6: Put a white Avatar creature token onto the battlefield. It has "This creature's power and toughness are each equal to your life total." + addCard(Zone.BATTLEFIELD, playerA, "Ajani Goldmane"); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1:"); + + attack(2, playerD, "Caller of the Pack", playerC); + addTarget(playerD, "Ajani Goldmane"); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPermanentCount(playerD, "Caller of the Pack", 1); + assertGraveyardCount(playerA, "Ajani Goldmane", 1); + + assertLife(playerA, 42); + assertLife(playerB, 32); + assertLife(playerC, 32); + assertLife(playerD, 40); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index 2f80da8fa0d..2d070c4fa7f 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -29,7 +29,6 @@ package org.mage.test.player; import java.io.Serializable; import java.util.ArrayList; -import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -44,6 +43,8 @@ import mage.abilities.Modes; import mage.abilities.SpellAbility; import mage.abilities.TriggeredAbility; import mage.abilities.costs.AlternativeSourceCosts; +import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; import mage.abilities.costs.VariableCost; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; @@ -94,9 +95,10 @@ import mage.target.TargetPermanent; import mage.target.TargetPlayer; import mage.target.TargetSource; import mage.target.TargetSpell; -import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetCardInOpponentsGraveyard; +import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCreaturePermanentAmount; import mage.target.common.TargetPermanentOrPlayer; import mage.util.MessageToClient; @@ -120,6 +122,8 @@ public class TestPlayer implements Player { private final ComputerPlayer computerPlayer; + private String[] groupsForTargetHandling = null; + public TestPlayer(ComputerPlayer computerPlayer) { this.computerPlayer = computerPlayer; AIPlayer = false; @@ -206,23 +210,14 @@ public class TestPlayer implements Player { return true; } -// private boolean checkSpellOnTopOfStackCondition(String[] groups, Game game) { -// if (groups.length > 2 && groups[2].startsWith("spellOnTopOfStack=")) { -// String spellOnTopOFStack = groups[2].substring(18); -// if (game.getStack().size() > 0) { -// StackObject stackObject = game.getStack().getFirst(); -// if (stackObject != null && stackObject.getStackAbility().toString().contains(spellOnTopOFStack)) { -// return true; -// } -// } -// return false; -// } -// return true; -// } - private boolean addTargets(Ability ability, String[] groups, Game game) { + @Override + public boolean addTargets(Ability ability, Game game) { + if (groupsForTargetHandling == null) { + return true; + } boolean result = true; - for (int i = 1; i < groups.length; i++) { - String group = groups[i]; + for (int i = 1; i < groupsForTargetHandling.length; i++) { + String group = groupsForTargetHandling[i]; if (group.startsWith("spellOnStack") || group.startsWith("spellOnTopOfStack") || group.startsWith("!spellOnStack") || group.startsWith("target=null") || group.startsWith("manaInPool=")) { break; } @@ -279,29 +274,36 @@ public class TestPlayer implements Player { int index = 0; int targetsSet = 0; for (String targetName : targetList) { + Mode selectedMode = null; if (targetName.startsWith("mode=")) { int modeNr = Integer.parseInt(targetName.substring(5, 6)); if (modeNr == 0 || modeNr > ability.getModes().size()) { throw new UnsupportedOperationException("Given mode number (" + modeNr + ") not available for " + ability.toString()); } - int modeCounter = 1; - for (Mode mode : ability.getModes().values()) { - if (modeCounter == modeNr) { - ability.getModes().setMode(mode); + UUID modeId = ability.getModes().getModeId(modeNr); + + for (Mode mode : ability.getModes().getSelectedModes()) { + if (mode.getId().equals(modeId)) { + selectedMode = mode; + ability.getModes().setActiveMode(mode); index = 0; // reset target index if mode changes break; } - modeCounter++; } targetName = targetName.substring(6); + } else { + selectedMode = ability.getModes().getMode(); } - if (ability.getTargets().size() == 0) { + if (selectedMode == null) { + throw new UnsupportedOperationException("Mode not available for " + ability.toString()); + } + if (selectedMode.getTargets().size() == 0) { throw new AssertionError("Ability has no targets. " + ability.toString()); } - if (index >= ability.getTargets().size()) { + if (index >= selectedMode.getTargets().size()) { break; // this can happen if targets should be set but can't be used because of hexproof e.g. } - Target currentTarget = ability.getTargets().get(index); + Target currentTarget = selectedMode.getTargets().get(index); if (targetName.startsWith("targetPlayer=")) { target = targetName.substring(targetName.indexOf("targetPlayer=") + 13); for (Player player : game.getPlayers().values()) { @@ -364,6 +366,7 @@ public class TestPlayer implements Player { if (action.getAction().startsWith("activate:")) { String command = action.getAction(); command = command.substring(command.indexOf("activate:") + 9); + groupsForTargetHandling = null; String[] groups = command.split("\\$"); if (groups.length > 2 && !checkExecuteCondition(groups, game)) { break; @@ -373,13 +376,11 @@ public class TestPlayer implements Player { int bookmark = game.bookmarkState(); Ability newAbility = ability.copy(); if (groups.length > 1 && !groups[1].equals("target=NO_TARGET")) { - if (!addTargets(newAbility, groups, game)) { - // targets could not be set -> try next priority - break; - } + groupsForTargetHandling = groups; } if (computerPlayer.activateAbility((ActivatedAbility) newAbility, game)) { actions.remove(action); + groupsForTargetHandling = null; return true; } else { game.restoreState(bookmark, ability.getRule()); @@ -638,40 +639,38 @@ public class TestPlayer implements Player { } } } - if (target instanceof TargetCardInGraveyard) { - TargetCardInGraveyard targetCardInGraveyard = ((TargetCardInGraveyard) target); - Set possibleTargets = new HashSet<>(); - for (UUID playerId : this.getInRange()) { - Player player = game.getPlayer(playerId); - if (player != null) { - possibleTargets.addAll(player.getGraveyard()); - } - } - + if (target instanceof TargetCard) { + TargetCard targetCard = ((TargetCard) target); + Set possibleTargets = targetCard.possibleTargets(sourceId, target.getTargetController() == null ? getId() : target.getTargetController(), game); for (String choose2 : choices) { String[] targetList = choose2.split("\\^"); boolean targetFound = false; - for (UUID targetId : possibleTargets) { - MageObject targetObject = game.getObject(targetId); - if (targetObject != null) { - for (String targetName : targetList) { + Choice: + for (String targetName : targetList) { + for (UUID targetId : possibleTargets) { + MageObject targetObject = game.getObject(targetId); + if (targetObject != null) { if (targetObject.getName().equals(targetName)) { - List alreadyTargetted = targetCardInGraveyard.getTargets(); - if (targetCardInGraveyard.canTarget(targetObject.getId(), game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(targetObject.getId())) { - targetCardInGraveyard.add(targetObject.getId(), game); + if (targetCard.canTarget(targetObject.getId(), game)) { + if (targetCard.getTargets() != null && !targetCard.getTargets().contains(targetObject.getId())) { + targetCard.add(targetObject.getId(), game); targetFound = true; if (target.getTargets().size() >= target.getMaxNumberOfTargets()) { - break; + break Choice; } } } } } - if (targetFound && targetCardInGraveyard.isChosen()) { - choices.remove(choose2); - return true; - } + + } + } + if (targetFound) { + if (targetCard.isChosen()) { + choices.remove(choose2); + return true; + } else { + target.clearChosen(); } } } @@ -788,6 +787,57 @@ public class TestPlayer implements Player { } } + } + if (target instanceof TargetCardInYourGraveyard) { + for (String targetDefinition : targets) { + String[] targetList = targetDefinition.split("\\^"); + boolean targetFound = false; + for (String targetName : targetList) { + for (Card card : computerPlayer.getGraveyard().getCards(((TargetCardInYourGraveyard) target).getFilter(), game)) { + if (card.getName().equals(targetName) || (card.getName() + "-" + card.getExpansionSetCode()).equals(targetName)) { + if (((TargetCardInYourGraveyard) target).canTarget(abilityControllerId, card.getId(), source, game) && !target.getTargets().contains(card.getId())) { + target.add(card.getId(), game); + targetFound = true; + break; + } + } + } + } + if (targetFound) { + targets.remove(targetDefinition); + return true; + } + } + + } + if (target instanceof TargetCardInOpponentsGraveyard) { + for (String targetDefinition : targets) { + String[] targetList = targetDefinition.split("\\^"); + boolean targetFound = false; + + for (String targetName : targetList) { + IterateOpponentsGraveyards: + for (UUID opponentId : game.getState().getPlayersInRange(getId(), game)) { + if (computerPlayer.hasOpponent(opponentId, game)) { + Player opponent = game.getPlayer(opponentId); + for (Card card : opponent.getGraveyard().getCards(((TargetCardInOpponentsGraveyard) target).getFilter(), game)) { + if (card.getName().equals(targetName) || (card.getName() + "-" + card.getExpansionSetCode()).equals(targetName)) { + if (((TargetCardInOpponentsGraveyard) target).canTarget(abilityControllerId, card.getId(), source, game) && !target.getTargets().contains(card.getId())) { + target.add(card.getId(), game); + targetFound = true; + break IterateOpponentsGraveyards; + } + } + } + } + } + } + if (targetFound) { + targets.remove(targetDefinition); + return true; + } + } + } if (target instanceof TargetSpell) { for (String targetDefinition : targets) { @@ -821,7 +871,7 @@ public class TestPlayer implements Player { boolean targetFound = false; for (String targetName : targetList) { for (Card card : cards.getCards(game)) { - if (card.getName().equals(targetName)) { + if (card.getName().equals(targetName) && !target.getTargets().contains(card.getId())) { target.add(card.getId(), game); targetFound = true; break; @@ -1127,8 +1177,8 @@ public class TestPlayer implements Player { } @Override - public void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts) { - computerPlayer.setCastSourceIdWithAlternateMana(sourceId, manaCosts); + public void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts, Costs costs) { + computerPlayer.setCastSourceIdWithAlternateMana(sourceId, manaCosts, costs); } @Override @@ -1141,6 +1191,11 @@ public class TestPlayer implements Player { return computerPlayer.getCastSourceIdManaCosts(); } + @Override + public Costs getCastSourceIdCosts() { + return computerPlayer.getCastSourceIdCosts(); + } + @Override public boolean isInPayManaMode() { return computerPlayer.isInPayManaMode(); @@ -1152,8 +1207,13 @@ public class TestPlayer implements Player { } @Override - public boolean playLand(Card card, Game game) { - return computerPlayer.playLand(card, game); + public boolean playCard(Card card, Game game, boolean noMana, boolean ignoreTiming) { + return computerPlayer.playCard(card, game, noMana, ignoreTiming); + } + + @Override + public boolean playLand(Card card, Game game, boolean ignoreTiming) { + return computerPlayer.playLand(card, game, ignoreTiming); } @Override @@ -1731,34 +1791,23 @@ public class TestPlayer implements Player { } @Override + @Deprecated public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) { return computerPlayer.moveCards(cards, fromZone, toZone, source, game); } @Override + @Deprecated public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game) { return computerPlayer.moveCards(card, fromZone, toZone, source, game); } @Override + @Deprecated public boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game) { return computerPlayer.moveCards(cards, fromZone, toZone, source, game); } -// @Override -// public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { -// return computerPlayer.moveCards(cards, fromZone, toZone, source, game); -// } -// -// @Override -// public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { -// return computerPlayer.moveCards(card, fromZone, toZone, source, game); -// } -// -// @Override -// public boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { -// return computerPlayer.moveCards(cards, fromZone, toZone, source, game); -// } @Override public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game) { return computerPlayer.moveCardToHandWithInfo(card, sourceId, game); @@ -1917,6 +1966,7 @@ public class TestPlayer implements Player { @Override public boolean playMana(Ability ability, ManaCost unpaid, String promptText, Game game) { + groupsForTargetHandling = null; return computerPlayer.playMana(ability, unpaid, promptText, game); } diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestMultiPlayerBase.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestMultiPlayerBase.java index 36ededfe4a3..863ac2b2565 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestMultiPlayerBase.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestMultiPlayerBase.java @@ -1,22 +1,18 @@ package org.mage.test.serverside.base; -import mage.cards.Card; -import mage.cards.decks.Deck; -import mage.cards.decks.importer.DeckImporterUtil; +import java.io.FileNotFoundException; import mage.constants.MultiplayerAttackOption; import mage.constants.RangeOfInfluence; -import mage.game.*; -import mage.game.permanent.Permanent; -import mage.players.Player; -import org.junit.Assert; +import mage.game.FreeForAll; +import mage.game.Game; +import mage.game.GameException; import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl; -import java.io.File; -import java.io.FileNotFoundException; - /** - * Base class for testing single cards and effects in multiplayer game. - * For PvP games {@see CardTestPlayerBase} + * Base class for testing single cards and effects in multiplayer game. For PvP + * games { + * + * @see CardTestPlayerBase} * * @author magenoxx_at_gmail.com */ @@ -25,12 +21,12 @@ public abstract class CardTestMultiPlayerBase extends CardTestPlayerAPIImpl { @Override protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException { Game game = new FreeForAll(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, 0, 20); - + // Player order: A -> D -> C -> B playerA = createPlayer(game, playerA, "PlayerA"); playerB = createPlayer(game, playerB, "PlayerB"); playerC = createPlayer(game, playerC, "PlayerC"); playerD = createPlayer(game, playerD, "PlayerD"); return game; } - + } diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestPlayerBaseAI.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestPlayerBaseAI.java index 910f3de6ec4..94e0699a280 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestPlayerBaseAI.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/CardTestPlayerBaseAI.java @@ -55,13 +55,13 @@ public abstract class CardTestPlayerBaseAI extends CardTestPlayerAPIImpl { } @Override - protected TestPlayer createPlayer(String name) { + protected TestPlayer createPlayer(String name, RangeOfInfluence rangeOfInfluence) { if (name.equals("PlayerA")) { TestPlayer testPlayer = new TestPlayer(new ComputerPlayer7("PlayerA", RangeOfInfluence.ONE, skill)); testPlayer.setAIPlayer(true); return testPlayer; } - return super.createPlayer(name); + return super.createPlayer(name, rangeOfInfluence); } public void setAISkill(int skill) { diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java index 32805289ed6..6568f377b3f 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java @@ -1,15 +1,26 @@ package org.mage.test.serverside.base; -import mage.constants.PhaseStep; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Scanner; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import mage.cards.Card; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; +import mage.constants.PhaseStep; import mage.constants.RangeOfInfluence; import mage.constants.Zone; import mage.game.Game; import mage.game.match.MatchType; import mage.game.permanent.PermanentCard; import mage.game.tournament.TournamentType; +import mage.player.ai.ComputerPlayer; import mage.players.Player; import mage.server.game.GameFactory; import mage.server.util.ConfigSettings; @@ -22,20 +33,13 @@ import org.apache.log4j.Logger; import org.junit.BeforeClass; import org.mage.test.player.TestPlayer; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FilenameFilter; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import mage.player.ai.ComputerPlayer; - /** * Base class for all tests. * * @author ayratn */ public abstract class MageTestPlayerBase { + protected static Logger logger = Logger.getLogger(MageTestPlayerBase.class); public static PluginClassLoader classLoader = new PluginClassLoader(); @@ -62,8 +66,7 @@ public abstract class MageTestPlayerBase { protected static Game currentGame = null; /** - * Player thats starts the game first. - * By default, it is ComputerA. + * Player thats starts the game first. By default, it is ComputerA. */ protected static Player activePlayer = null; @@ -72,6 +75,7 @@ public abstract class MageTestPlayerBase { protected PhaseStep stopAtStep = PhaseStep.UNTAP; protected enum ParserState { + INIT, OPTIONS, EXPECTED @@ -80,16 +84,11 @@ public abstract class MageTestPlayerBase { protected ParserState parserState; /** - * Expected results of the test. - * Read from test case in {@link String} based format: + * Expected results of the test. Read from test case in {@link String} based + * format: *

- * Example: - * turn:1 - * result:won:ComputerA - * life:ComputerA:20 - * life:ComputerB:0 - * battlefield:ComputerB:Tine Shrike:0 - * graveyard:ComputerB:Tine Shrike:1 + * Example: turn:1 result:won:ComputerA life:ComputerA:20 life:ComputerB:0 + * battlefield:ComputerB:Tine Shrike:0 graveyard:ComputerB:Tine Shrike:1 */ protected List expectedResults = new ArrayList<>(); @@ -259,7 +258,7 @@ public abstract class MageTestPlayerBase { logger.warn("Init string wasn't parsed: " + line); } } - + private TestPlayer getPlayer(String name) { switch (name) { case "ComputerA": @@ -282,7 +281,7 @@ public abstract class MageTestPlayerBase { handCards.put(player, hand); return hand; } - + protected List getGraveCards(TestPlayer player) { if (graveyardCards.containsKey(player)) { return graveyardCards.get(player); @@ -319,7 +318,6 @@ public abstract class MageTestPlayerBase { return command; } - private void includeFrom(String line) throws FileNotFoundException { String[] params = line.split(" "); if (params.length == 2) { @@ -340,8 +338,8 @@ public abstract class MageTestPlayerBase { } } - protected TestPlayer createPlayer(String name) { - return new TestPlayer(new ComputerPlayer(name, RangeOfInfluence.ONE)); + protected TestPlayer createPlayer(String name, RangeOfInfluence rangeOfInfluence) { + return new TestPlayer(new ComputerPlayer(name, rangeOfInfluence)); } - + } 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 8611baa943c..9a02e9bcf80 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 @@ -12,6 +12,7 @@ import mage.cards.repository.CardRepository; import mage.cards.repository.CardScanner; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.RangeOfInfluence; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.Filter; @@ -141,7 +142,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement } protected TestPlayer createPlayer(Game game, TestPlayer player, String name, String deckName) throws GameException { - player = createNewPlayer(name); + player = createNewPlayer(name, game.getRangeOfInfluence()); player.setTestMode(true); logger.debug("Loading deck..."); Deck deck = Deck.load(DeckImporterUtil.importDeck(deckName), false, false); @@ -187,8 +188,8 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement } - protected TestPlayer createNewPlayer(String playerName) { - return createPlayer(playerName); + protected TestPlayer createNewPlayer(String playerName, RangeOfInfluence rangeOfInfluence) { + return createPlayer(playerName, rangeOfInfluence); } protected Player getPlayerFromName(String playerName, String line) { @@ -614,14 +615,18 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement * @param count Expected count. */ public void assertCounterCount(String cardName, CounterType type, int count) throws AssertionError { + this.assertCounterCount(null, cardName, type, count); + } + + public void assertCounterCount(Player player, String cardName, CounterType type, int count) throws AssertionError { Permanent found = null; for (Permanent permanent : currentGame.getBattlefield().getAllActivePermanents()) { - if (permanent.getName().equals(cardName)) { + if (permanent.getName().equals(cardName) && (player == null || permanent.getControllerId().equals(player.getId()))) { found = permanent; break; } } - Assert.assertNotNull("There is no such permanent on the battlefield, cardName=" + cardName, found); + Assert.assertNotNull("There is no such permanent " + (player == null ? "" : "for player " + player.getName()) + " on the battlefield, cardName=" + cardName, found); Assert.assertEquals("(Battlefield) Counter counts are not equal (" + cardName + ":" + type + ")", count, found.getCounters().getCount(type)); } @@ -861,6 +866,24 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement Assert.assertEquals("(Graveyard " + player.getName() + ") Card counts are not equal (" + cardName + ")", count, actualCount); } + /** + * Assert card count in player's library. + * + * @param player {@link Player} who's library should be counted. + * @param cardName Name of the cards that should be counted. + * @param count Expected count. + */ + public void assertLibraryCount(Player player, String cardName, int count) throws AssertionError { + int actualCount = 0; + for (Card card : player.getLibrary().getCards(currentGame)) { + if (card.getName().equals(cardName)) { + actualCount++; + } + } + + Assert.assertEquals("(Library " + player.getName() + ") Card counts are not equal (" + cardName + ")", count, actualCount); + } + /** * Asserts added actions count. Usefull to make sure that all actions were * executed. @@ -990,6 +1013,10 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement player.addAction(turnNum, step, "activate:" + ability + "$target=" + targetName); } + public void activateAbility(int turnNum, PhaseStep step, TestPlayer player, String ability, String targetName, String spellOnStack) { + this.activateAbility(turnNum, step, player, ability, targetName, spellOnStack, StackClause.WHILE_ON_STACK); + } + /** * * @param turnNum @@ -1000,13 +1027,13 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement * NO_TARGET * @param spellOnStack */ - public void activateAbility(int turnNum, PhaseStep step, TestPlayer player, String ability, String targetName, String spellOnStack) { + public void activateAbility(int turnNum, PhaseStep step, TestPlayer player, String ability, String targetName, String spellOnStack, StackClause clause) { StringBuilder sb = new StringBuilder("activate:").append(ability); if (targetName != null && !targetName.isEmpty()) { sb.append("$target=").append(targetName); } if (spellOnStack != null && !spellOnStack.isEmpty()) { - sb.append("$spellOnStack=").append(spellOnStack); + sb.append("$").append(StackClause.WHILE_ON_STACK.equals(clause) ? "" : "!").append("spellOnStack=").append(spellOnStack); } player.addAction(turnNum, step, sb.toString()); } diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/tournament/SwissPairingMinimalWeightMatchingTest.java b/Mage.Tests/src/test/java/org/mage/test/serverside/tournament/SwissPairingMinimalWeightMatchingTest.java new file mode 100644 index 00000000000..c132059c797 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/tournament/SwissPairingMinimalWeightMatchingTest.java @@ -0,0 +1,360 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation 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.serverside.tournament; + + +import java.util.*; + +import mage.game.tournament.*; +import mage.game.tournament.pairing.RoundPairings; +import mage.game.tournament.pairing.SwissPairingMinimalWeightMatching; +import org.junit.Assert; +import org.junit.Test; +import org.mage.test.stub.PlayerStub; +import org.mage.test.stub.TournamentStub; + + +/** + * + * @author Quercitron + */ +public class SwissPairingMinimalWeightMatchingTest { + + @Test + public void FourPlayersSecondRoundTest() { + // 1 > 3 + // 2 > 4 + + TournamentPlayer player1 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player2 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player3 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player4 = new TournamentPlayer(new PlayerStub(), null); + List players = new ArrayList<>(); + players.add(player4); + players.add(player2); + players.add(player3); + players.add(player1); + + player1.setPoints(3); + player2.setPoints(3); + player3.setPoints(0); + player4.setPoints(0); + + List rounds = new ArrayList<>(); + Round round = new Round(1, new TournamentStub()); + TournamentPairing pair1 = new TournamentPairing(player1, player3); + round.addPairing(pair1); + TournamentPairing pair2 = new TournamentPairing(player4, player2); + round.addPairing(pair2); + rounds.add(round); + + SwissPairingMinimalWeightMatching swissPairing = new SwissPairingMinimalWeightMatching(players, rounds, false); + RoundPairings roundPairings = swissPairing.getRoundPairings(); + + Assert.assertEquals(2, roundPairings.getPairings().size()); + Assert.assertEquals(0, roundPairings.getPlayerByes().size()); + + CheckPair(roundPairings.getPairings(), player1, player2); + CheckPair(roundPairings.getPairings(), player3, player4); + Assert.assertEquals(0, roundPairings.getPlayerByes().size()); + } + + @Test + public void FourPlayersSecondThirdTest() { + // 1 > 3 + // 2 > 4 + // + // 1 > 2 + // 3 > 4 + + TournamentPlayer player3 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player2 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player4 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player1 = new TournamentPlayer(new PlayerStub(), null); + List players = new ArrayList<>(); + players.add(player4); + players.add(player2); + players.add(player3); + players.add(player1); + + player1.setPoints(6); + player2.setPoints(3); + player3.setPoints(3); + player4.setPoints(0); + + List rounds = new ArrayList<>(); + // round 1 + Round round = new Round(1, new TournamentStub()); + TournamentPairing pair1 = new TournamentPairing(player1, player3); + round.addPairing(pair1); + TournamentPairing pair2 = new TournamentPairing(player4, player2); + round.addPairing(pair2); + rounds.add(round); + // round 2 + round = new Round(2, new TournamentStub()); + pair1 = new TournamentPairing(player2, player1); + round.addPairing(pair1); + pair2 = new TournamentPairing(player4, player3); + round.addPairing(pair2); + rounds.add(round); + + SwissPairingMinimalWeightMatching swissPairing = new SwissPairingMinimalWeightMatching(players, rounds, true); + RoundPairings roundPairings = swissPairing.getRoundPairings(); + + Assert.assertEquals(2, roundPairings.getPairings().size()); + Assert.assertEquals(0, roundPairings.getPlayerByes().size()); + + CheckPair(roundPairings.getPairings(), player1, player4); + CheckPair(roundPairings.getPairings(), player2, player3); + Assert.assertEquals(0, roundPairings.getPlayerByes().size()); + } + + @Test + public void PlayerLeftTournamentAfterFirstRound() { + // 1 > 3 + // 2 > 4 + // 4 left the tournament + + TournamentPlayer player1 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player2 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player3 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player4 = new TournamentPlayer(new PlayerStub(), null); + List players = new ArrayList<>(); + //players.add(player4); -- player 4 is not active + players.add(player2); + players.add(player3); + players.add(player1); + + player1.setPoints(3); + player2.setPoints(3); + player3.setPoints(0); + player4.setPoints(0); + + List rounds = new ArrayList<>(); + Round round = new Round(1, new TournamentStub()); + TournamentPairing pair1 = new TournamentPairing(player1, player3); + round.addPairing(pair1); + TournamentPairing pair2 = new TournamentPairing(player4, player2); + round.addPairing(pair2); + rounds.add(round); + + SwissPairingMinimalWeightMatching swissPairing = new SwissPairingMinimalWeightMatching(players, rounds, false); + RoundPairings roundPairings = swissPairing.getRoundPairings(); + + Assert.assertEquals(1, roundPairings.getPairings().size()); + Assert.assertEquals(1, roundPairings.getPlayerByes().size()); + + CheckPair(roundPairings.getPairings(), player1, player2); + Assert.assertTrue(roundPairings.getPlayerByes().contains(player3)); + } + + @Test + public void FivePlayersThirdRoundTest() { + // 1 > 2 + // 3 > 4 + // 5 + // + // 1 > 5 + // 2 > 3 + // 4 + + TournamentPlayer player1 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player2 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player3 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player4 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player5 = new TournamentPlayer(new PlayerStub(), null); + List players = new ArrayList<>(); + players.add(player4); + players.add(player2); + players.add(player5); + players.add(player3); + players.add(player1); + + player1.setPoints(6); + player2.setPoints(3); + player3.setPoints(3); + player4.setPoints(3); + player5.setPoints(3); + + List rounds = new ArrayList<>(); + // first round + Round round = new Round(1, new TournamentStub()); + TournamentPairing pair1 = new TournamentPairing(player1, player2); + round.addPairing(pair1); + TournamentPairing pair2 = new TournamentPairing(player3, player4); + round.addPairing(pair2); + round.getPlayerByes().add(player5); + rounds.add(round); + // second round + round = new Round(1, new TournamentStub()); + pair1 = new TournamentPairing(player1, player5); + round.addPairing(pair1); + pair2 = new TournamentPairing(player2, player3); + round.addPairing(pair2); + round.getPlayerByes().add(player4); + rounds.add(round); + + SwissPairingMinimalWeightMatching swissPairing = new SwissPairingMinimalWeightMatching(players, rounds, false); + RoundPairings roundPairings = swissPairing.getRoundPairings(); + + Assert.assertEquals(2, roundPairings.getPairings().size()); + Assert.assertEquals(1, roundPairings.getPlayerByes().size()); + + CheckPair(roundPairings.getPairings(), player1, player4); + CheckPair(roundPairings.getPairings(), player2, player5); + Assert.assertTrue(roundPairings.getPlayerByes().contains(player3)); + } + + @Test + public void PlayerWithByeLeftTournament() { + // 1 > 2 + // 3 > 4 + // 5 + // 5 left the tournament + + + TournamentPlayer player1 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player2 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player3 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player4 = new TournamentPlayer(new PlayerStub(), null); + TournamentPlayer player5 = new TournamentPlayer(new PlayerStub(), null); + List players = new ArrayList<>(); + //players.add(player5); -- player 5 is not active + players.add(player4); + players.add(player2); + players.add(player3); + players.add(player1); + + player1.setPoints(3); + player2.setPoints(0); + player3.setPoints(3); + player4.setPoints(0); + player5.setPoints(3); + + List rounds = new ArrayList<>(); + // first round + Round round = new Round(1, new TournamentStub()); + TournamentPairing pair1 = new TournamentPairing(player1, player2); + round.addPairing(pair1); + TournamentPairing pair2 = new TournamentPairing(player3, player4); + round.addPairing(pair2); + round.getPlayerByes().add(player5); + rounds.add(round); + + SwissPairingMinimalWeightMatching swissPairing = new SwissPairingMinimalWeightMatching(players, rounds, false); + RoundPairings roundPairings = swissPairing.getRoundPairings(); + + Assert.assertEquals(2, roundPairings.getPairings().size()); + Assert.assertEquals(0, roundPairings.getPlayerByes().size()); + + CheckPair(roundPairings.getPairings(), player1, player3); + CheckPair(roundPairings.getPairings(), player2, player4); + Assert.assertEquals(0, roundPairings.getPlayerByes().size()); + } + + @Test + public void SimulateDifferentTournaments() { + int playersCount = 12; + for (int i = 0; i <= playersCount; i++) { + int roundsCount = ((i + 1) / 2) * 2 - 1; + for (int j = 1; j <= roundsCount; j++) { + SimulateTournament(i, j); + } + } + } + + private void SimulateTournament(int playersCount, int roundsCount) { + Random rnd = new Random(); + + List players = new ArrayList<>(); + for (int i = 0; i < playersCount; i++) { + players.add(new TournamentPlayer(new PlayerStub(), null)); + } + + List playedPairs = new ArrayList<>(); + Set playersByes = new HashSet<>(); + + List rounds = new ArrayList<>(); + for (int i = 0; i < roundsCount; i++) { + SwissPairingMinimalWeightMatching swissPairing = + new SwissPairingMinimalWeightMatching(new ArrayList<>(players), rounds, i + 1 == roundsCount); + RoundPairings roundPairings = swissPairing.getRoundPairings(); + + Assert.assertEquals(playersCount / 2, roundPairings.getPairings().size()); + Assert.assertEquals(playersCount % 2, roundPairings.getPlayerByes().size()); + + Round round = new Round(1, new TournamentStub()); + rounds.add(round); + for (TournamentPairing pairing : roundPairings.getPairings()) { + if (ContainsPair(playedPairs, pairing.getPlayer1(), pairing.getPlayer2())) { + if (i < (playersCount + 1) / 2) { + throw new AssertionError("Match between players has been played already."); + } + } + playedPairs.add(pairing); + + round.addPairing(pairing); + if (rnd.nextBoolean()) { + pairing.getPlayer1().setPoints(pairing.getPlayer1().getPoints() + 3); + } else { + pairing.getPlayer2().setPoints(pairing.getPlayer2().getPoints() + 3); + } + } + for (TournamentPlayer playerBye : roundPairings.getPlayerByes()) { + if (playersByes.contains(playerBye)) { + throw new AssertionError("Player already had bye."); + } + playersByes.add(playerBye); + + round.getPlayerByes().add(playerBye); + playerBye.setPoints(playerBye.getPoints() + 3); + } + } + } + + private void CheckPair(List pairs, TournamentPlayer player1, TournamentPlayer player2) { + if (!ContainsPair(pairs, player1, player2)) { + throw new AssertionError("Pairing doesn't contain expected pair of players."); + } + } + + private boolean ContainsPair(List pairs, TournamentPlayer player1, TournamentPlayer player2) { + for (TournamentPairing pair : pairs) { + if (pair.getPlayer1().equals(player1) && pair.getPlayer2().equals(player2)) { + return true; + } + if (pair.getPlayer1().equals(player2) && pair.getPlayer2().equals(player1)) { + return true; + } + } + return false; + } +} + + diff --git a/Mage.Tests/src/test/java/org/mage/test/sets/BoosterGenerationTest.java b/Mage.Tests/src/test/java/org/mage/test/sets/BoosterGenerationTest.java new file mode 100644 index 00000000000..4142d713ba3 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/sets/BoosterGenerationTest.java @@ -0,0 +1,103 @@ +package org.mage.test.sets; + +import mage.cards.Card; +import mage.cards.repository.CardScanner; +import mage.sets.FateReforged; +import mage.sets.MastersEditionII; +import mage.sets.MastersEditionIV; +import org.junit.Before; +import org.junit.Test; +import org.mage.test.serverside.base.MageTestBase; + +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +/** + * + * @author nigelzor + */ +public class BoosterGenerationTest extends MageTestBase { + + @Before + public void setUp() { + CardScanner.scan(); + } + + private static final List basics = Arrays.asList("Plains", "Island", "Swamp", "Mountain", "Forest"); + + @Test + public void testFateReforged() { + List tapland = Arrays.asList( + "Bloodfell Caves", "Blossoming Sands", "Dismal Backwater", "Jungle Hollow", "Rugged Highlands", + "Scoured Barrens", "Swiftwater Cliffs", "Thornwood Falls", "Tranquil Cove", "Wind-Scarred Crag"); + List fetchland = Arrays.asList( + "Bloodstained Mire", "Flooded Strand", "Polluted Delta", "Windswept Heath", "Wooded Foothills"); + + List booster = FateReforged.getInstance().createBooster(); + assertTrue(str(booster), contains(booster, tapland, "FRF") || contains(booster, fetchland, "KTK")); + assertFalse(str(booster), contains(booster, basics, null)); + } + + @Test + public void testMastersEditionII() { + List snowCoveredLand = Arrays.asList( + "Snow-Covered Plains", + "Snow-Covered Island", + "Snow-Covered Swamp", + "Snow-Covered Mountain", + "Snow-Covered Forest" + ); + List booster = MastersEditionII.getInstance().createBooster(); + assertTrue(str(booster), contains(booster, snowCoveredLand, "ME2")); + assertFalse(str(booster), contains(booster, basics, null)); + } + + @Test + public void testMastersEditionIV() { + List urzaLand = Arrays.asList( + "Urza's Mine", + "Urza's Power Plant", + "Urza's Tower" + ); + List booster = MastersEditionIV.getInstance().createBooster(); + assertTrue(str(booster), contains(booster, urzaLand, "ME4")); + assertFalse(str(booster), contains(booster, basics, null)); + } + + private static String str(List cards) { + StringBuilder sb = new StringBuilder("["); + Iterator iterator = cards.iterator(); + while (iterator.hasNext()) { + Card next = iterator.next(); + sb.append(next.getName()); + if (iterator.hasNext()) { + sb.append(", "); + } + } + sb.append("] (").append(cards.size()).append(")"); + return sb.toString(); + } + + private static boolean contains(List cards, List names, String code) { + for (String name : names) { + if (contains(cards, name, code)) { + return true; + } + } + return false; + } + + private static boolean contains(List cards, String name, String code) { + for (Card card : cards) { + if (card.getName().equals(name) && (code == null || card.getExpansionSetCode().equals(code))) { + return true; + } + } + return false; + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java new file mode 100644 index 00000000000..d076ed3265c --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java @@ -0,0 +1,1240 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation 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.stub; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Abilities; +import mage.abilities.Ability; +import mage.abilities.ActivatedAbility; +import mage.abilities.Mode; +import mage.abilities.Modes; +import mage.abilities.SpellAbility; +import mage.abilities.TriggeredAbility; +import mage.abilities.costs.AlternativeSourceCosts; +import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; +import mage.abilities.costs.VariableCost; +import mage.abilities.costs.mana.ManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.mana.ManaOptions; +import mage.cards.Card; +import mage.cards.Cards; +import mage.cards.decks.Deck; +import mage.choices.Choice; +import mage.constants.AbilityType; +import mage.constants.ManaType; +import mage.constants.Outcome; +import mage.constants.PlayerAction; +import mage.constants.RangeOfInfluence; +import mage.constants.Zone; +import mage.counters.Counter; +import mage.counters.Counters; +import mage.game.Game; +import mage.game.Graveyard; +import mage.game.Table; +import mage.game.combat.CombatGroup; +import mage.game.draft.Draft; +import mage.game.match.Match; +import mage.game.match.MatchPlayer; +import mage.game.permanent.Permanent; +import mage.game.tournament.Tournament; +import mage.players.Library; +import mage.players.ManaPool; +import mage.players.Player; +import mage.players.net.UserData; +import mage.target.Target; +import mage.target.TargetAmount; +import mage.target.TargetCard; +import mage.target.common.TargetCardInLibrary; +import mage.util.MessageToClient; + +/** + * + * @author Quercitron + */ +public class PlayerStub implements Player { + + private final UUID id = UUID.randomUUID(); + + @Override + public UUID getId() { + return id; + } + + @Override + public boolean isHuman() { + return false; + } + + @Override + public String getName() { + return null; + } + + @Override + public String getLogName() { + return null; + } + + @Override + public RangeOfInfluence getRange() { + return null; + } + + @Override + public Library getLibrary() { + return null; + } + + @Override + public Cards getSideboard() { + return null; + } + + @Override + public Graveyard getGraveyard() { + return null; + } + + @Override + public Abilities getAbilities() { + return null; + } + + @Override + public void addAbility(Ability ability) { + + } + + @Override + public Counters getCounters() { + return null; + } + + @Override + public int getLife() { + return 0; + } + + @Override + public void initLife(int life) { + + } + + @Override + public void setLife(int life, Game game) { + + } + + @Override + public int loseLife(int amount, Game game) { + return 0; + } + + @Override + public int gainLife(int amount, Game game) { + return 0; + } + + @Override + public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable) { + return 0; + } + + @Override + public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, ArrayList appliedEffects) { + return 0; + } + + @Override + public boolean isCanLoseLife() { + return false; + } + + @Override + public void setCanLoseLife(boolean canLoseLife) { + + } + + @Override + public void setCanGainLife(boolean canGainLife) { + + } + + @Override + public boolean isCanGainLife() { + return false; + } + + @Override + public void setCanPayLifeCost(boolean canPayLifeCost) { + + } + + @Override + public boolean canPayLifeCost() { + return false; + } + + @Override + public void setCanPaySacrificeCost(boolean canPaySacrificeCost) { + + } + + @Override + public boolean canPaySacrificeCost() { + return false; + } + + @Override + public void setLifeTotalCanChange(boolean lifeTotalCanChange) { + + } + + @Override + public boolean isLifeTotalCanChange() { + return false; + } + + @Override + public void setLoseByZeroOrLessLife(boolean loseByZeroOrLessLife) { + + } + + @Override + public boolean canLoseByZeroOrLessLife() { + return false; + } + + @Override + public void setPlayCardsFromGraveyard(boolean playCardsFromGraveyard) { + + } + + @Override + public boolean canPlayCardsFromGraveyard() { + return false; + } + + @Override + public List getAlternativeSourceCosts() { + return null; + } + + @Override + public Cards getHand() { + return null; + } + + @Override + public int getLandsPlayed() { + return 0; + } + + @Override + public int getLandsPerTurn() { + return 0; + } + + @Override + public void setLandsPerTurn(int landsPerTurn) { + + } + + @Override + public int getLoyaltyUsePerTurn() { + return 0; + } + + @Override + public void setLoyaltyUsePerTurn(int loyaltyUsePerTurn) { + + } + + @Override + public int getMaxHandSize() { + return 0; + } + + @Override + public void setMaxHandSize(int maxHandSize) { + + } + + @Override + public int getMaxAttackedBy() { + return 0; + } + + @Override + public void setMaxAttackedBy(int maxAttackedBy) { + + } + + @Override + public boolean isPassed() { + return false; + } + + @Override + public boolean isEmptyDraw() { + return false; + } + + @Override + public void pass(Game game) { + + } + + @Override + public void resetPassed() { + + } + + @Override + public void resetPlayerPassedActions() { + + } + + @Override + public boolean getPassedTurn() { + return false; + } + + @Override + public boolean getPassedUntilEndOfTurn() { + return false; + } + + @Override + public boolean getPassedUntilNextMain() { + return false; + } + + @Override + public boolean getPassedUntilStackResolved() { + return false; + } + + @Override + public boolean getPassedAllTurns() { + return false; + } + + @Override + public AbilityType getJustActivatedType() { + return null; + } + + @Override + public void setJustActivatedType(AbilityType abilityType) { + + } + + @Override + public boolean hasLost() { + return false; + } + + @Override + public boolean hasWon() { + return false; + } + + @Override + public boolean hasQuit() { + return false; + } + + @Override + public void quit(Game game) { + + } + + @Override + public boolean hasTimerTimeout() { + return false; + } + + @Override + public void timerTimeout(Game game) { + + } + + @Override + public boolean hasIdleTimeout() { + return false; + } + + @Override + public void idleTimeout(Game game) { + + } + + @Override + public boolean hasLeft() { + return false; + } + + @Override + public boolean isInGame() { + return false; + } + + @Override + public boolean canRespond() { + return false; + } + + @Override + public void otherPlayerLeftGame(Game game) { + + } + + @Override + public ManaPool getManaPool() { + return null; + } + + @Override + public Set getInRange() { + return null; + } + + @Override + public boolean isTopCardRevealed() { + return false; + } + + @Override + public void setTopCardRevealed(boolean topCardRevealed) { + + } + + @Override + public UserData getUserData() { + return null; + } + + @Override + public void setUserData(UserData userData) { + + } + + @Override + public boolean canLose(Game game) { + return false; + } + + @Override + public boolean autoLoseGame() { + return false; + } + + @Override + public Set getPlayersUnderYourControl() { + return null; + } + + @Override + public void controlPlayersTurn(Game game, UUID playerId) { + + } + + @Override + public void setTurnControlledBy(UUID playerId) { + + } + + @Override + public UUID getTurnControlledBy() { + return null; + } + + @Override + public void resetOtherTurnsControlled() { + + } + + @Override + public boolean isGameUnderControl() { + return false; + } + + @Override + public void setGameUnderYourControl(boolean value) { + + } + + @Override + public boolean isTestMode() { + return false; + } + + @Override + public void setTestMode(boolean value) { + + } + + @Override + public void addAction(String action) { + + } + + @Override + public int getActionCount() { + return 0; + } + + @Override + public void setAllowBadMoves(boolean allowBadMoves) { + + } + + @Override + public void init(Game game) { + + } + + @Override + public void init(Game game, boolean testMode) { + + } + + @Override + public void useDeck(Deck deck, Game game) { + + } + + @Override + public void reset() { + + } + + @Override + public void shuffleLibrary(Game game) { + + } + + @Override + public int drawCards(int num, Game game) { + return 0; + } + + @Override + public int drawCards(int num, Game game, ArrayList appliedEffects) { + return 0; + } + + @Override + public boolean cast(SpellAbility ability, Game game, boolean noMana) { + return false; + } + + @Override + public SpellAbility chooseSpellAbilityForCast(SpellAbility ability, Game game, boolean noMana) { + return null; + } + + @Override + public boolean putInHand(Card card, Game game) { + return false; + } + + @Override + public boolean removeFromHand(Card card, Game game) { + return false; + } + + @Override + public boolean removeFromBattlefield(Permanent permanent, Game game) { + return false; + } + + @Override + public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield) { + return false; + } + + @Override + public boolean removeFromGraveyard(Card card, Game game) { + return false; + } + + @Override + public boolean removeFromLibrary(Card card, Game game) { + return false; + } + + @Override + public boolean searchLibrary(TargetCardInLibrary target, Game game) { + return false; + } + + @Override + public boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId) { + return false; + } + + @Override + public boolean canPlayLand() { + return false; + } + + @Override + public boolean playCard(Card card, Game game, boolean noMana, boolean checkTiming) { + return false; + } + + @Override + public boolean playLand(Card card, Game game, boolean ignoreTiming) { + return false; + } + + @Override + public boolean activateAbility(ActivatedAbility ability, Game game) { + return false; + } + + @Override + public boolean triggerAbility(TriggeredAbility ability, Game game) { + return false; + } + + @Override + public boolean canBeTargetedBy(MageObject source, UUID sourceControllerId, Game game) { + return false; + } + + @Override + public boolean hasProtectionFrom(MageObject source, Game game) { + return false; + } + + @Override + public boolean flipCoin(Game game) { + return false; + } + + @Override + public boolean flipCoin(Game game, ArrayList appliedEffects) { + return false; + } + + @Override + public void discard(int amount, Ability source, Game game) { + + } + + @Override + public Card discardOne(boolean random, Ability source, Game game) { + return null; + } + + @Override + public Cards discard(int amount, boolean random, Ability source, Game game) { + return null; + } + + @Override + public void discardToMax(Game game) { + + } + + @Override + public boolean discard(Card card, Ability source, Game game) { + return false; + } + + @Override + public void lost(Game game) { + + } + + @Override + public void lostForced(Game game) { + + } + + @Override + public void won(Game game) { + + } + + @Override + public void leave() { + + } + + @Override + public void concede(Game game) { + + } + + @Override + public void abort() { + + } + + @Override + public void abortReset() { + + } + + @Override + public void skip() { + + } + + @Override + public void sendPlayerAction(PlayerAction passPriorityAction, Game game, Object data) { + + } + + @Override + public int getStoredBookmark() { + return 0; + } + + @Override + public void setStoredBookmark(int bookmark) { + + } + + @Override + public void resetStoredBookmark(Game game) { + + } + + @Override + public void revealCards(String name, Cards cards, Game game) { + + } + + @Override + public void revealCards(String name, Cards cards, Game game, boolean postToLog) { + + } + + @Override + public void lookAtCards(String name, Card card, Game game) { + + } + + @Override + public void lookAtCards(String name, Cards cards, Game game) { + + } + + @Override + public Player copy() { + return null; + } + + @Override + public void restore(Player player) { + + } + + @Override + public void setResponseString(String responseString) { + + } + + @Override + public void setResponseUUID(UUID responseUUID) { + + } + + @Override + public void setResponseBoolean(Boolean responseBoolean) { + + } + + @Override + public void setResponseInteger(Integer data) { + + } + + @Override + public void setResponseManaType(UUID manaTypePlayerId, ManaType responseManaType) { + + } + + @Override + public boolean priority(Game game) { + return false; + } + + @Override + public boolean choose(Outcome outcome, Target target, UUID sourceId, Game game) { + return false; + } + + @Override + public boolean choose(Outcome outcome, Target target, UUID sourceId, Game game, Map options) { + return false; + } + + @Override + public boolean choose(Outcome outcome, Cards cards, TargetCard target, Game game) { + return false; + } + + @Override + public boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game) { + return false; + } + + @Override + public boolean chooseTarget(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game) { + return false; + } + + @Override + public boolean chooseTargetAmount(Outcome outcome, TargetAmount target, Ability source, Game game) { + return false; + } + + @Override + public boolean chooseMulligan(Game game) { + return false; + } + + @Override + public boolean chooseUse(Outcome outcome, String message, Ability source, Game game) { + return false; + } + + @Override + public boolean chooseUse(Outcome outcome, MessageToClient message, Ability source, Game game) { + return false; + } + + @Override + public boolean choose(Outcome outcome, Choice choice, Game game) { + return false; + } + + @Override + public boolean choosePile(Outcome outcome, String message, List pile1, List pile2, Game game) { + return false; + } + + @Override + public boolean playMana(Ability ability, ManaCost unpaid, String promptText, Game game) { + return false; + } + + @Override + public boolean putCardsOnBottomOfLibrary(Cards cards, Game game, Ability source, boolean anyOrder) { + return false; + } + + @Override + public boolean putCardsOnTopOfLibrary(Cards cards, Game game, Ability source, boolean anyOrder) { + return false; + } + + @Override + public int announceXMana(int min, int max, String message, Game game, Ability ability) { + return 0; + } + + @Override + public int announceXCost(int min, int max, String message, Game game, Ability ability, VariableCost variableCost) { + return 0; + } + + @Override + public int chooseReplacementEffect(Map abilityMap, Game game) { + return 0; + } + + @Override + public TriggeredAbility chooseTriggeredAbility(List abilities, Game game) { + return null; + } + + @Override + public Mode chooseMode(Modes modes, Ability source, Game game) { + return null; + } + + @Override + public void selectAttackers(Game game, UUID attackingPlayerId) { + + } + + @Override + public void selectBlockers(Game game, UUID defendingPlayerId) { + + } + + @Override + public UUID chooseAttackerOrder(List attacker, Game game) { + return null; + } + + @Override + public UUID chooseBlockerOrder(List blockers, CombatGroup combatGroup, List blockerOrder, Game game) { + return null; + } + + @Override + public void assignDamage(int damage, List targets, String singleTargetName, UUID sourceId, Game game) { + + } + + @Override + public int getAmount(int min, int max, String message, Game game) { + return 0; + } + + @Override + public void sideboard(Match match, Deck deck) { + + } + + @Override + public void construct(Tournament tournament, Deck deck) { + + } + + @Override + public void pickCard(List cards, Deck deck, Draft draft) { + + } + + @Override + public void declareAttacker(UUID attackerId, UUID defenderId, Game game, boolean allowUndo) { + + } + + @Override + public void declareBlocker(UUID defenderId, UUID blockerId, UUID attackerId, Game game) { + + } + + @Override + public List getAvailableAttackers(Game game) { + return null; + } + + @Override + public List getAvailableAttackers(UUID defenderId, Game game) { + return null; + } + + @Override + public List getAvailableBlockers(Game game) { + return null; + } + + @Override + public void beginTurn(Game game) { + + } + + @Override + public void endOfTurn(Game game) { + + } + + @Override + public void phasing(Game game) { + + } + + @Override + public void untap(Game game) { + + } + + @Override + public ManaOptions getManaAvailable(Game game) { + return null; + } + + @Override + public List getPlayable(Game game, boolean hidden) { + return null; + } + + @Override + public List getPlayableOptions(Ability ability, Game game) { + return null; + } + + @Override + public Set getPlayableInHand(Game game) { + return null; + } + + @Override + public LinkedHashMap getUseableActivatedAbilities(MageObject object, Zone zone, Game game) { + return null; + } + + @Override + public void addCounters(Counter counter, Game game) { + + } + + @Override + public List getAttachments() { + return null; + } + + @Override + public boolean addAttachment(UUID permanentId, Game game) { + return false; + } + + @Override + public boolean removeAttachment(Permanent permanent, Game game) { + return false; + } + + @Override + public void becomesActivePlayer() { + + } + + @Override + public int getTurns() { + return 0; + } + + @Override + public boolean lookAtFaceDownCard(Card card, Game game) { + return false; + } + + @Override + public void setPriorityTimeLeft(int timeLeft) { + + } + + @Override + public int getPriorityTimeLeft() { + return 0; + } + + @Override + public void setReachedNextTurnAfterLeaving(boolean reachedNextTurnAfterLeaving) { + + } + + @Override + public boolean hasReachedNextTurnAfterLeaving() { + return false; + } + + @Override + public boolean canJoinTable(Table table) { + return false; + } + + @Override + public void setCommanderId(UUID commanderId) { + + } + + @Override + public UUID getCommanderId() { + return null; + } + + @Override + public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) { + return false; + } + + @Override + public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game) { + return false; + } + + @Override + public boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game) { + return false; + } + + @Override + public boolean moveCards(Card card, Zone toZone, Ability source, Game game) { + return false; + } + + @Override + public boolean moveCards(Card card, Zone toZone, Ability source, Game game, boolean tapped, boolean faceDown, boolean byOwner, ArrayList appliedEffects) { + return false; + } + + @Override + public boolean moveCards(Cards cards, Zone toZone, Ability source, Game game) { + return false; + } + + @Override + public boolean moveCards(Set cards, Zone toZone, Ability source, Game game) { + return false; + } + + @Override + public boolean moveCards(Set cards, Zone toZone, Ability source, Game game, boolean tapped, boolean faceDown, boolean byOwner, ArrayList appliedEffects) { + return false; + } + + @Override + public boolean moveCardsToExile(Card card, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName) { + return false; + } + + @Override + public boolean moveCardsToExile(Set cards, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName) { + return false; + } + + @Override + public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game) { + return false; + } + + @Override + public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game, boolean withName) { + return false; + } + + @Override + public boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone, boolean withName) { + return false; + } + + @Override + public boolean moveCardToGraveyardWithInfo(Card card, UUID sourceId, Game game, Zone fromZone) { + return false; + } + + @Override + public Set moveCardsToGraveyardWithInfo(Set cards, Ability source, Game game, Zone fromZone) { + return null; + } + + @Override + public boolean moveCardToLibraryWithInfo(Card card, UUID sourceId, Game game, Zone fromZone, boolean toTop, boolean withName) { + return false; + } + + @Override + public boolean hasOpponent(UUID playerToCheckId, Game game) { + return false; + } + + @Override + public void cleanUpOnMatchEnd() { + + } + + @Override + public void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts, Costs costs) { + + } + + @Override + public UUID getCastSourceIdWithAlternateMana() { + return null; + } + + @Override + public ManaCosts getCastSourceIdManaCosts() { + return null; + } + + @Override + public Costs getCastSourceIdCosts() { + return null; + } + + @Override + public void addPermissionToShowHandCards(UUID watcherUserId) { + + } + + @Override + public boolean hasUserPermissionToSeeHand(UUID userId) { + return false; + } + + @Override + public void revokePermissionToSeeHandCards() { + + } + + @Override + public boolean isRequestToShowHandCardsAllowed() { + return false; + } + + @Override + public Set getUsersAllowedToSeeHandCards() { + return null; + } + + @Override + public boolean isInPayManaMode() { + return false; + } + + @Override + public void setMatchPlayer(MatchPlayer matchPlayer) { + + } + + @Override + public MatchPlayer getMatchPlayer() { + return null; + } + + @Override + public boolean scry(int value, Ability source, Game game) { + return false; + } + + @Override + public boolean addTargets(Ability ability, Game game) { + return false; + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/TournamentStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/TournamentStub.java new file mode 100644 index 00000000000..acdc6c43e74 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/stub/TournamentStub.java @@ -0,0 +1,237 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation 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.stub; + +import mage.cards.ExpansionSet; +import mage.cards.decks.Deck; +import mage.game.draft.Draft; +import mage.game.events.Listener; +import mage.game.events.PlayerQueryEvent; +import mage.game.events.TableEvent; +import mage.game.tournament.*; +import mage.players.Player; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class TournamentStub implements Tournament { + + private final UUID id = UUID.randomUUID(); + + @Override + public UUID getId() { + return id; + } + + @Override + public void addPlayer(Player player, String playerType) { + + } + + @Override + public void removePlayer(UUID playerId) { + + } + + @Override + public TournamentPlayer getPlayer(UUID playerId) { + return null; + } + + @Override + public Collection getPlayers() { + return null; + } + + @Override + public Collection getRounds() { + return null; + } + + @Override + public List getSets() { + return null; + } + + @Override + public void updateResults() { + + } + + @Override + public void setBoosterInfo(String setInfo) { + + } + + @Override + public String getBoosterInfo() { + return null; + } + + @Override + public void submitDeck(UUID playerId, Deck deck) { + + } + + @Override + public void updateDeck(UUID playerId, Deck deck) { + + } + + @Override + public void autoSubmit(UUID playerId, Deck deck) { + + } + + @Override + public boolean allJoined() { + return false; + } + + @Override + public boolean isDoneConstructing() { + return false; + } + + @Override + public void quit(UUID playerId) { + + } + + @Override + public void leave(UUID playerId) { + + } + + @Override + public void nextStep() { + + } + + @Override + public void addTableEventListener(Listener listener) { + + } + + @Override + public void addPlayerQueryEventListener(Listener listener) { + + } + + @Override + public void fireConstructEvent(UUID playerId) { + + } + + @Override + public TournamentOptions getOptions() { + return null; + } + + @Override + public void setStartTime() { + + } + + @Override + public Date getStartTime() { + return null; + } + + @Override + public Date getEndTime() { + return null; + } + + @Override + public Date getStepStartTime() { + return null; + } + + @Override + public void setStepStartTime(Date date) { + + } + + @Override + public TournamentType getTournamentType() { + return null; + } + + @Override + public void setTournamentType(TournamentType tournamentType) { + + } + + @Override + public String getTournamentState() { + return null; + } + + @Override + public void setTournamentState(String tournamentState) { + + } + + @Override + public int getNumberRounds() { + return 0; + } + + @Override + public void cleanUpOnTournamentEnd() { + + } + + @Override + public boolean isAbort() { + return false; + } + + @Override + public void setAbort(boolean abort) { + + } + + @Override + public void clearDraft() { + + } + + @Override + public Draft getDraft() { + return null; + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/utils/ManaUtilTest.java b/Mage.Tests/src/test/java/org/mage/test/utils/ManaUtilTest.java index 3534b4a6acf..fbc1cd7518b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/utils/ManaUtilTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/utils/ManaUtilTest.java @@ -3,6 +3,7 @@ package org.mage.test.utils; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.UUID; +import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -88,6 +89,42 @@ public class ManaUtilTest extends CardTestPlayerBase { Assert.assertEquals("", ManaUtil.condenseManaCostString("{}")); } + /** + * Mana.enough is used to check if a spell can be cast with an given amount + * of avalable mana + */ + @Test + public void testManaEnough() { + testManaAvailEnough("{G}", 1, "", true); + testManaAvailEnough("{G}", 0, "{G}", true); + testManaAvailEnough("{R}", 0, "{G}", false); + testManaAvailEnough("{B}", 0, "{G}", false); + testManaAvailEnough("{U}", 0, "{G}", false); + testManaAvailEnough("{W}", 0, "{G}", false); + + testManaAvailEnough("{R}", 1, "", true); + testManaAvailEnough("{R}", 0, "{R}", true); + testManaAvailEnough("{G}", 0, "{R}", false); + testManaAvailEnough("{B}", 0, "{R}", false); + testManaAvailEnough("{U}", 0, "{R}", false); + testManaAvailEnough("{W}", 0, "{R}", false); + + testManaAvailEnough("{U}{B}{W}{G}{R}", 4, "{R}", true); + testManaAvailEnough("{U}{B}{W}{G}{R}", 3, "{R}{B}", true); + + testManaAvailEnough("{U}{U}{U}{G}{G}{2}", 2, "{U}{U}{G}{R}{B}", true); + + testManaAvailEnough("{2}{U}{U}", 0, "{U}{U}{U}{U}", true); + testManaAvailEnough("{2}{U}{U}", 0, "{4}", false); + testManaAvailEnough("{2}{U}{U}", 0, "{B}{B}{4}", false); + + testManaAvailEnough("{G}", 0, "{G/W}", true); + testManaAvailEnough("{G}{W}", 0, "{G/W}{G/W}", true); + testManaAvailEnough("{W}{W}", 0, "{G/W}{G/W}", true); + testManaAvailEnough("{G}{G}", 0, "{G/W}{G/W}", true); + + } + /** * Common way to test ManaUtil.tryToAutoPay * @@ -142,6 +179,26 @@ public class ManaUtilTest extends CardTestPlayerBase { Assert.assertTrue("Wrong mana ability has been chosen", expectedChosen.isInstance(ability)); } + /** + * Checks if the given available Mana is enough to pay a given mana cost + * + * @param manaCostsToPay + * @param availablyAny + * @param available + * @param expected + */ + private void testManaAvailEnough(String manaCostsToPay, int availablyAny, String available, boolean expected) { + ManaCost unpaid = new ManaCostsImpl(manaCostsToPay); + ManaCost costAvailable = new ManaCostsImpl(available); + Mana manaAvailable = costAvailable.getMana(); + manaAvailable.setAny(availablyAny); + if (expected) { + Assert.assertTrue("The available Mana " + costAvailable.getText() + " should be enough to pay the costs " + unpaid.getText(), unpaid.getMana().enough(manaAvailable)); + } else { + Assert.assertFalse("The available Mana " + costAvailable.getText() + " shouldn't be enough to pay the costs " + unpaid.getText(), unpaid.getMana().enough(manaAvailable)); + } + } + /** * Extracts mana abilities from the card. * diff --git a/Mage.Updater/pom.xml b/Mage.Updater/pom.xml index 97c617af46e..20e013ae56c 100644 --- a/Mage.Updater/pom.xml +++ b/Mage.Updater/pom.xml @@ -5,7 +5,7 @@ mage-root org.mage - 1.4.4 + 1.4.5 4.0.0 diff --git a/Mage/pom.xml b/Mage/pom.xml index bd275a8c4b7..b164c1d678e 100644 --- a/Mage/pom.xml +++ b/Mage/pom.xml @@ -1,4 +1,3 @@ - @@ -7,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 mage @@ -32,12 +31,14 @@ ormlite-jdbc 4.48 + + junit + junit + 4.12 + - - src - org.apache.maven.plugins diff --git a/Mage/src/mage/Mana.java b/Mage/src/mage/Mana.java deleted file mode 100644 index b9b3e04c8fa..00000000000 --- a/Mage/src/mage/Mana.java +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage; - -import java.io.Serializable; -import mage.constants.ColoredManaSymbol; -import mage.constants.ManaType; -import static mage.constants.ManaType.COLORLESS; -import mage.filter.FilterMana; -import mage.util.Copyable; -import mage.util.ThreadLocalStringBuilder; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class Mana implements Comparable, Serializable, Copyable { - - protected int red; - protected int green; - protected int blue; - protected int white; - protected int black; - protected int colorless; - protected int any; - protected boolean flag = false; - - public static final Mana RedMana = RedMana(1); - public static final Mana GreenMana = GreenMana(1); - public static final Mana BlueMana = BlueMana(1); - public static final Mana WhiteMana = WhiteMana(1); - public static final Mana BlackMana = BlackMana(1); - public static final Mana ColorlessMana = ColorlessMana(1); - - public Mana() { - } - - public Mana(final Mana mana) { - this.red = mana.red; - this.green = mana.green; - this.blue = mana.blue; - this.white = mana.white; - this.black = mana.black; - this.colorless = mana.colorless; - this.any = mana.any; - this.flag = mana.flag; - } - - public Mana(ColoredManaSymbol color) { - switch (color) { - case G: - green = 1; - break; - case R: - red = 1; - break; - case B: - black = 1; - break; - case U: - blue = 1; - break; - case W: - white = 1; - break; - } - } - - public static Mana RedMana(int num) { - return new Mana(num, 0, 0, 0, 0, 0, 0); - } - - public static Mana GreenMana(int num) { - return new Mana(0, num, 0, 0, 0, 0, 0); - } - - public static Mana BlueMana(int num) { - return new Mana(0, 0, num, 0, 0, 0, 0); - } - - public static Mana WhiteMana(int num) { - return new Mana(0, 0, 0, num, 0, 0, 0); - } - - public static Mana BlackMana(int num) { - return new Mana(0, 0, 0, 0, num, 0, 0); - } - - public static Mana ColorlessMana(int num) { - return new Mana(0, 0, 0, 0, 0, num, 0); - } - - public Mana(int red, int green, int blue, int white, int black, int colorless, int any) { - this.red = red; - this.green = green; - this.blue = blue; - this.white = white; - this.black = black; - this.colorless = colorless; - this.any = any; - } - - public void add(Mana mana) { - red += mana.getRed(); - green += mana.getGreen(); - blue += mana.getBlue(); - white += mana.getWhite(); - black += mana.getBlack(); - colorless += mana.getColorless(); - any += mana.getAny(); - } - - public void addRed() { - red++; - } - - public void addGreen() { - green++; - } - - public void addBlue() { - blue++; - } - - public void addWhite() { - white++; - } - - public void addBlack() { - black++; - } - - public void addColorless() { - colorless++; - } - - public void subtract(Mana mana) { - red -= mana.getRed(); - green -= mana.getGreen(); - blue -= mana.getBlue(); - white -= mana.getWhite(); - black -= mana.getBlack(); - colorless -= mana.getColorless(); - any -= mana.getAny(); - } - - public void subtractCost(Mana cost) { - red -= cost.getRed(); - green -= cost.getGreen(); - blue -= cost.getBlue(); - white -= cost.getWhite(); - black -= cost.getBlack(); - any -= cost.getAny(); - colorless -= cost.getColorless(); - while (colorless < 0) { - int oldColorless = colorless; - if (red > 0) { - red--; - colorless++; - continue; - } - if (green > 0) { - green--; - colorless++; - continue; - } - if (blue > 0) { - blue--; - colorless++; - continue; - } - if (white > 0) { - white--; - colorless++; - continue; - } - if (black > 0) { - black--; - colorless++; - } - if (any > 0) { - any--; - colorless++; - } - if (oldColorless == colorless) { - break; // to prevent endless loop -> should not be possible, but who knows - } - } - } - - public int count() { - return red + green + blue + white + black + colorless + any; - } - - public int countColored() { - return red + green + blue + white + black + any; - } - - public int count(FilterMana filter) { - if (filter == null) { - return count(); - } - int count = 0; - if (filter.isBlack()) { - count += black; - } - if (filter.isBlue()) { - count += blue; - } - if (filter.isWhite()) { - count += white; - } - if (filter.isGreen()) { - count += green; - } - if (filter.isRed()) { - count += red; - } - if (filter.isColorless()) { - count += colorless; - } - return count; - } - - public void clear() { - red = 0; - green = 0; - blue = 0; - white = 0; - black = 0; - colorless = 0; - any = 0; - } - - @Override - public String toString() { - StringBuilder sbMana = threadLocalBuilder.get(); - if (colorless > 0) { - sbMana.append("{").append(Integer.toString(colorless)).append("}"); - } - 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}"); - } - return sbMana.toString(); - } - - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(10); - - @Override - public Mana copy() { - return new Mana(this); - } - - public boolean enough(Mana avail) { - Mana compare = avail.copy(); - compare.subtract(this); - if (compare.getRed() < 0) { - compare.setAny(compare.getAny() + compare.getRed()); - if (compare.getAny() < 0) { - return false; - } - compare.setRed(0); - } - if (compare.getGreen() < 0) { - compare.setAny(compare.getAny() + compare.getGreen()); - if (compare.getAny() < 0) { - return false; - } - compare.setGreen(0); - } - if (compare.getBlue() < 0) { - compare.setAny(compare.getAny() + compare.getBlue()); - if (compare.getAny() < 0) { - return false; - } - compare.setBlue(0); - } - if (compare.getBlack() < 0) { - compare.setAny(compare.getAny() + compare.getBlack()); - if (compare.getAny() < 0) { - return false; - } - compare.setBlack(0); - } - if (compare.getWhite() < 0) { - compare.setAny(compare.getAny() + compare.getWhite()); - if (compare.getAny() < 0) { - return false; - } - compare.setWhite(0); - } - if (compare.getColorless() < 0) { - int remaining = compare.getRed() + compare.getGreen() + compare.getBlack() + compare.getBlue() + compare.getWhite() + compare.getAny(); - if (compare.getColorless() + remaining < 0) { - return false; - } - } - return true; - } - - public Mana needed(Mana avail) { - Mana compare = avail.copy(); - compare.subtract(this); - if (compare.getRed() < 0 && compare.getAny() > 0) { - int diff = Math.min(compare.getAny(), Math.abs(compare.getRed())); - compare.setAny(compare.getAny() - diff); - compare.setRed(compare.getRed() + diff); - } - if (compare.getGreen() < 0 && compare.getAny() > 0) { - int diff = Math.min(compare.getAny(), Math.abs(compare.getGreen())); - compare.setAny(compare.getAny() - diff); - compare.setGreen(compare.getGreen() + diff); - } - if (compare.getBlue() < 0 && compare.getAny() > 0) { - int diff = Math.min(compare.getAny(), Math.abs(compare.getBlue())); - compare.setAny(compare.getAny() - diff); - compare.setBlue(compare.getBlue() + diff); - } - if (compare.getBlack() < 0 && compare.getAny() > 0) { - int diff = Math.min(compare.getAny(), Math.abs(compare.getBlack())); - compare.setAny(compare.getAny() - diff); - compare.setBlack(compare.getBlack() + diff); - } - if (compare.getWhite() < 0 && compare.getAny() > 0) { - int diff = Math.min(compare.getAny(), Math.abs(compare.getWhite())); - compare.setAny(compare.getAny() - diff); - compare.setWhite(compare.getWhite() + diff); - } - if (compare.getColorless() < 0) { - int remaining = 0; - remaining += Math.min(0, compare.getRed()); - remaining += Math.min(0, compare.getWhite()); - remaining += Math.min(0, compare.getGreen()); - remaining += Math.min(0, compare.getBlack()); - remaining += Math.min(0, compare.getBlue()); - remaining += Math.min(0, compare.getAny()); - if (remaining > 0) { - int diff = Math.min(remaining, Math.abs(compare.getColorless())); - compare.setColorless(compare.getColorless() + diff); - } - } - Mana needed = new Mana(); - if (compare.getRed() < 0) { - needed.setRed(Math.abs(compare.getRed())); - } - if (compare.getWhite() < 0) { - needed.setWhite(Math.abs(compare.getWhite())); - } - if (compare.getGreen() < 0) { - needed.setGreen(Math.abs(compare.getGreen())); - } - if (compare.getBlack() < 0) { - needed.setBlack(Math.abs(compare.getBlack())); - } - if (compare.getBlue() < 0) { - needed.setBlue(Math.abs(compare.getBlue())); - } - if (compare.getColorless() < 0) { - needed.setColorless(Math.abs(compare.getColorless())); - } - return needed; - } - - public int getRed() { - return red; - } - - public void setRed(int red) { - this.red = red; - } - - public int getGreen() { - return green; - } - - public void setGreen(int green) { - this.green = green; - } - - public int getBlue() { - return blue; - } - - public void setBlue(int blue) { - this.blue = blue; - } - - public int getWhite() { - return white; - } - - public void setWhite(int white) { - this.white = white; - } - - public int getBlack() { - return black; - } - - public void setBlack(int black) { - this.black = black; - } - - public int getColorless() { - return colorless; - } - - public void setColorless(int colorless) { - this.colorless = colorless; - } - - public int getAny() { - return any; - } - - public void setAny(int any) { - this.any = any; - } - - @Override - public int compareTo(Mana o) { - return this.count() - o.count(); - } - - /** - * - * @param mana - * @return true if this contains any values that mana has - */ - public boolean contains(Mana mana) { - if (mana.black > 0 && this.black > 0) { - return true; - } - if (mana.blue > 0 && this.blue > 0) { - return true; - } - if (mana.red > 0 && this.red > 0) { - return true; - } - if (mana.white > 0 && this.white > 0) { - return true; - } - if (mana.green > 0 && this.green > 0) { - return true; - } - if (mana.colorless > 0 && this.count() > 0) { - return true; - } - - return false; - } - - public int getColor(ColoredManaSymbol color) { - if (color.equals(ColoredManaSymbol.G)) { - return getGreen(); - } - if (color.equals(ColoredManaSymbol.R)) { - return getRed(); - } - if (color.equals(ColoredManaSymbol.B)) { - return getBlack(); - } - if (color.equals(ColoredManaSymbol.U)) { - return getBlue(); - } - if (color.equals(ColoredManaSymbol.W)) { - return getWhite(); - } - return 0; - } - - public int get(ManaType manaType) { - switch (manaType) { - case BLACK: - return black; - case BLUE: - return blue; - case GREEN: - return green; - case RED: - return red; - case WHITE: - return white; - case COLORLESS: - return colorless; - } - return 0; - } - - public void set(ManaType manaType, int amount) { - switch (manaType) { - case BLACK: - black = amount; - break; - case BLUE: - blue = amount; - break; - case GREEN: - green = amount; - break; - case RED: - red = amount; - break; - case WHITE: - white = amount; - break; - case COLORLESS: - colorless = amount; - break; - } - } - - public void setFlag(boolean flag) { - this.flag = flag; - } - - public boolean getFlag() { - return flag; - } - - public void setToMana(Mana mana) { - this.any = mana.any; - this.red = mana.red; - this.green = mana.green; - this.white = mana.white; - this.blue = mana.blue; - this.black = mana.black; - this.colorless = mana.colorless; - } - - public boolean equalManaValue(Mana mana) { - return this.any == mana.any - && this.red == mana.red - && this.green == mana.green - && this.white == mana.white - && this.blue == mana.blue - && this.black == mana.black - && this.colorless == mana.colorless; - } - - /** - * Don't takes any mana into account to be usable in calculating available - * mana - * - * @param mana - * @return - */ - public boolean includesMana(Mana mana) { - return this.green >= mana.green - && this.blue >= mana.blue - && this.white >= mana.white - && this.black >= mana.black - && this.red >= mana.red - && (this.colorless >= mana.colorless - || this.countColored() >= mana.countColored() + mana.colorless); - - } - - /** - * Returns the mana that is more colored or has a greater amount but does - * not contain one less mana in any color but colorless if you call with - * {1}{W}{R} and {G}{W}{R} you get back {G}{W}{R} if you call with {G}{W}{R} - * and {G}{W}{R} you get back {G}{W}{R} if you call with {G}{W}{B} and - * {G}{W}{R} you get back null - * - * @param mana1 - * @param mana2 - * @return - */ - public static Mana getMoreValuableMana(Mana mana1, Mana mana2) { - Mana moreMana; - Mana lessMana; - if (mana2.countColored() > mana1.countColored() || mana2.getAny() > mana1.getAny() || mana2.count() > mana1.count()) { - moreMana = mana2; - lessMana = mana1; - } else { - moreMana = mana1; - lessMana = mana2; - } - if (lessMana.getWhite() > moreMana.getWhite() - || lessMana.getRed() > moreMana.getRed() - || lessMana.getGreen() > moreMana.getGreen() - || lessMana.getBlue() > moreMana.getBlue() - || lessMana.getBlack() > moreMana.getBlack() - || lessMana.getAny() > moreMana.getAny()) { - return null; - } - return moreMana; - } - - public int getDifferentColors() { - int count = 0; - if (blue > 0) { - count++; - } - if (black > 0) { - count++; - } - if (green > 0) { - count++; - } - if (white > 0) { - count++; - } - if (red > 0) { - count++; - } - return count; - } -} diff --git a/Mage/src/mage/abilities/PlayLandAbility.java b/Mage/src/mage/abilities/PlayLandAbility.java deleted file mode 100644 index 60a60797ccf..00000000000 --- a/Mage/src/mage/abilities/PlayLandAbility.java +++ /dev/null @@ -1,83 +0,0 @@ -/* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are 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; - -import java.util.UUID; -import mage.constants.AbilityType; -import mage.constants.AsThoughEffectType; -import mage.constants.Zone; -import mage.game.Game; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class PlayLandAbility extends ActivatedAbilityImpl { - - public PlayLandAbility(String cardName) { - super(AbilityType.PLAY_LAND, Zone.HAND); - this.usesStack = false; - this.name = "Play " + cardName; - } - - public PlayLandAbility(PlayLandAbility ability) { - super(ability); - } - - @Override - public boolean canActivate(UUID playerId, Game game) { - if (!controlsAbility(playerId, game) && - !game.getContinuousEffects().asThough(getSourceId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, playerId, game)) { - return false; - } - //20091005 - 114.2a - return game.canPlaySorcery(playerId) && game.getPlayer(playerId).canPlayLand(); - } - - @Override - public String getGameLogMessage(Game game) { - return new StringBuilder(" plays ").append(getMessageText(game)).toString(); - } - - @Override - public String toString() { - return this.name; - } - - @Override - public String getRule() { - return this.name; - } - - @Override - public PlayLandAbility copy() { - return new PlayLandAbility(this); - } - -} diff --git a/Mage/src/mage/abilities/common/LeavesBattlefieldTriggeredAbility.java b/Mage/src/mage/abilities/common/LeavesBattlefieldTriggeredAbility.java deleted file mode 100644 index 48ba332c550..00000000000 --- a/Mage/src/mage/abilities/common/LeavesBattlefieldTriggeredAbility.java +++ /dev/null @@ -1,54 +0,0 @@ -/* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are 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.effects.Effect; -import mage.constants.Zone; - - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class LeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility { - - public LeavesBattlefieldTriggeredAbility(Effect effect, boolean optional) { - super(Zone.BATTLEFIELD, null, effect, "When {this} leaves the battlefield, ", optional); - } - - public LeavesBattlefieldTriggeredAbility(LeavesBattlefieldTriggeredAbility ability) { - super(ability); - } - - @Override - public LeavesBattlefieldTriggeredAbility copy() { - return new LeavesBattlefieldTriggeredAbility(this); - } - -} diff --git a/Mage/src/mage/abilities/costs/common/UntapSourceCost.java b/Mage/src/mage/abilities/costs/common/UntapSourceCost.java deleted file mode 100644 index ad86161595d..00000000000 --- a/Mage/src/mage/abilities/costs/common/UntapSourceCost.java +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are 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.CostImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author Plopman - */ -public class UntapSourceCost extends CostImpl { - - public UntapSourceCost() { - this.text = "{Q}"; - } - - public UntapSourceCost(UntapSourceCost cost) { - super(cost); - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { - Permanent permanent = game.getPermanent(sourceId); - if (permanent != null) { - paid = permanent.untap(game); - } - return paid; - } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - Permanent permanent = game.getPermanent(sourceId); - if (permanent != null) { - return permanent.isTapped(); - } - return false; - } - - @Override - public UntapSourceCost copy() { - return new UntapSourceCost(this); - } -} diff --git a/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java b/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java deleted file mode 100644 index f909d0828ea..00000000000 --- a/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java +++ /dev/null @@ -1,97 +0,0 @@ -/* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are 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.MageObject; -import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.constants.AbilityType; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.util.CardUtil; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class ExileTargetForSourceEffect extends OneShotEffect { - - - public ExileTargetForSourceEffect() { - super(Outcome.Exile); - } - - public ExileTargetForSourceEffect(final ExileTargetForSourceEffect effect) { - super(effect); - } - - @Override - public ExileTargetForSourceEffect copy() { - return new ExileTargetForSourceEffect(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) { - Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); - UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); - if (permanent != null) { - return controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true); - } else { - Card card = game.getCard(getTargetPointer().getFirst(game, source)); - if (card != null) { - return controller.moveCardToExileWithInfo(card, exileId, sourceObject.getIdName(), source.getSourceId(), game, game.getState().getZone(card.getId()), true); - } - } - } - return false; - } - - @Override - public String getText(Mode mode) { - if(staticText != null && !staticText.isEmpty()) { - return staticText; - } - - if (mode.getTargets().isEmpty()) { - return "Exile it"; - } else { - return "Exile target " + mode.getTargets().get(0).getTargetName(); - } - } -} diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java deleted file mode 100644 index 80e7bcdb69b..00000000000 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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.effects.common.continuous; - -import java.util.ArrayList; -import java.util.Iterator; - -import mage.MageObjectReference; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author LevelX2 - */ -public class BecomesSubtypeAllEffect extends ContinuousEffectImpl { - - protected ArrayList subtypes = new ArrayList(); - protected boolean loseOther; // loses other subtypes - protected FilterCreaturePermanent filter; - - public BecomesSubtypeAllEffect(Duration duration, String subtype) { - this(duration, createArrayList(subtype)); - } - - public BecomesSubtypeAllEffect(Duration duration, ArrayList subtypes) { - this(duration, subtypes, new FilterCreaturePermanent("All creatures"), true); - } - - public BecomesSubtypeAllEffect(Duration duration, - ArrayList subtypes, FilterCreaturePermanent filter, boolean loseOther) { - super(duration, Outcome.Detriment); - this.subtypes = subtypes; - this.staticText = setText(); - this.loseOther = loseOther; - this.filter = filter; - } - - private static ArrayList createArrayList(String subtype) { - ArrayList subtypes = new ArrayList<>(); - subtypes.add(subtype); - return subtypes; - } - - public BecomesSubtypeAllEffect(final BecomesSubtypeAllEffect effect) { - super(effect); - this.subtypes.addAll(effect.subtypes); - this.loseOther = effect.loseOther; - this.filter = effect.filter; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public BecomesSubtypeAllEffect copy() { - return new BecomesSubtypeAllEffect(this); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, - Game game) { - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) { - if (permanent != null) { - switch (layer) { - case TypeChangingEffects_4: - if (loseOther) { - permanent.getSubtype().clear(); - permanent.getSubtype().addAll(subtypes); - } else { - for (String subtype : subtypes) { - if (!permanent.getSubtype().contains(subtype)) { - permanent.getSubtype().add(subtype); - } - } - } - break; - } - } else { - if (duration.equals(Duration.Custom)) { - discard(); - } - } - } - return true; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.TypeChangingEffects_4; - } - - private String setText() { - StringBuilder sb = new StringBuilder(); - sb.append("Target creature becomes that type"); - if (!duration.toString().isEmpty() - && !duration.equals(Duration.EndOfGame)) { - sb.append(" ").append(duration.toString()); - } - return sb.toString(); - } -} diff --git a/Mage/src/mage/counters/Counter.java b/Mage/src/mage/counters/Counter.java deleted file mode 100644 index f3a125ec283..00000000000 --- a/Mage/src/mage/counters/Counter.java +++ /dev/null @@ -1,91 +0,0 @@ -/* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are those of the -* authors and should not be interpreted as representing official policies, either expressed -* or implied, of BetaSteward_at_googlemail.com. -*/ - -package mage.counters; - -import java.io.Serializable; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class Counter implements Serializable { - - protected String name; - protected int count; - - public Counter(String name) { - this.name = name; - this.count = 1; - } - - public Counter(String name, int count) { - this.name = name; - this.count = count; - } - - public Counter(final Counter counter) { - this.name = counter.name; - this.count = counter.count; - } - - public void add() { - count++; - } - - public void add(int amount) { - count += amount; - } - - public void remove() { - if (count > 0) { - count--; - } - } - - public void remove(int amount) { - if (count > amount) { - count -= amount; - } - else { - count = 0; - } - } - - public String getName() { - return name; - } - - public int getCount() { - return count; - } - - public Counter copy() { - return new Counter(this); - } -} diff --git a/Mage/src/mage/game/stack/StackObject.java b/Mage/src/mage/game/stack/StackObject.java deleted file mode 100644 index ce408387aa5..00000000000 --- a/Mage/src/mage/game/stack/StackObject.java +++ /dev/null @@ -1,48 +0,0 @@ -/* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are 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.stack; - -import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.filter.FilterPermanent; -import mage.game.Controllable; -import mage.game.Game; - -public interface StackObject extends MageObject, Controllable { - - boolean resolve(Game game); - UUID getSourceId(); - void counter(UUID sourceId, Game game); - Ability getStackAbility(); - int getConvertedManaCost(); - boolean chooseNewTargets(Game game, UUID playerId, boolean forceChange, boolean onlyOneTarget, FilterPermanent filterNewTarget); - @Override - StackObject copy(); -} diff --git a/Mage/src/mage/util/Logging.java b/Mage/src/mage/util/Logging.java deleted file mode 100644 index 96441fce6e9..00000000000 --- a/Mage/src/mage/util/Logging.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ - -package mage.util; - -import java.io.PrintWriter; -import java.io.StringWriter; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.logging.ConsoleHandler; -import java.util.logging.Formatter; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.LogRecord; -import java.util.logging.Logger; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class Logging { - - public static Logger getLogger(String name) { - Logger logger = Logger.getLogger(name); - ConsoleHandler handler = new ConsoleHandler(); - handler.setFormatter(new LogFormatter()); - logger.addHandler(handler); - logger.setUseParentHandlers(false); - return logger; - } - - public static Level getLevel(Logger logger) { - Level level = logger.getLevel(); - while (level == null && logger.getParent() != null) { - logger = logger.getParent(); - level = logger.getLevel(); - } - return level; - } -} - -class LogFormatter extends Formatter { - - private static final DateFormat df = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss.SSS"); - - @Override - public String format(LogRecord record) { - StringBuilder builder = new StringBuilder(1000); - builder.append(df.format(new Date(record.getMillis()))).append(" - "); - builder.append("[").append(record.getSourceClassName()).append("."); - builder.append(record.getSourceMethodName()).append("] - "); - builder.append("[").append(record.getLevel()).append("] - "); - builder.append(formatMessage(record)); - if (record.getThrown() != null) { - try { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - record.getThrown().printStackTrace(pw); - pw.close(); - builder.append(sw.toString()); - } catch (Exception ex) { - } - } - builder.append("\n"); - return builder.toString(); - } - - @Override - public String getHead(Handler h) { - return super.getHead(h); - } - - @Override - public String getTail(Handler h) { - return super.getTail(h); - } - -} \ No newline at end of file diff --git a/Mage/src/mage/ConditionalMana.java b/Mage/src/main/java/mage/ConditionalMana.java similarity index 100% rename from Mage/src/mage/ConditionalMana.java rename to Mage/src/main/java/mage/ConditionalMana.java diff --git a/Mage/src/mage/MageException.java b/Mage/src/main/java/mage/MageException.java similarity index 100% rename from Mage/src/mage/MageException.java rename to Mage/src/main/java/mage/MageException.java diff --git a/Mage/src/mage/MageInt.java b/Mage/src/main/java/mage/MageInt.java similarity index 100% rename from Mage/src/mage/MageInt.java rename to Mage/src/main/java/mage/MageInt.java diff --git a/Mage/src/mage/MageItem.java b/Mage/src/main/java/mage/MageItem.java similarity index 100% rename from Mage/src/mage/MageItem.java rename to Mage/src/main/java/mage/MageItem.java diff --git a/Mage/src/mage/MageObject.java b/Mage/src/main/java/mage/MageObject.java similarity index 100% rename from Mage/src/mage/MageObject.java rename to Mage/src/main/java/mage/MageObject.java diff --git a/Mage/src/mage/MageObjectImpl.java b/Mage/src/main/java/mage/MageObjectImpl.java similarity index 100% rename from Mage/src/mage/MageObjectImpl.java rename to Mage/src/main/java/mage/MageObjectImpl.java diff --git a/Mage/src/mage/MageObjectReference.java b/Mage/src/main/java/mage/MageObjectReference.java similarity index 95% rename from Mage/src/mage/MageObjectReference.java rename to Mage/src/main/java/mage/MageObjectReference.java index 85edcc3c625..b2516798d20 100644 --- a/Mage/src/mage/MageObjectReference.java +++ b/Mage/src/main/java/mage/MageObjectReference.java @@ -44,7 +44,7 @@ import org.apache.log4j.Logger; */ public class MageObjectReference implements Comparable, Serializable { - private static final transient Logger logger = Logger.getLogger(MageObjectReference.class); + private static final Logger logger = Logger.getLogger(MageObjectReference.class); private final UUID sourceId; private final int zoneChangeCounter; diff --git a/Mage/src/main/java/mage/Mana.java b/Mage/src/main/java/mage/Mana.java new file mode 100644 index 00000000000..2128fdd14cb --- /dev/null +++ b/Mage/src/main/java/mage/Mana.java @@ -0,0 +1,1029 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage; + +import java.io.Serializable; +import java.util.Objects; + +import mage.constants.ColoredManaSymbol; +import mage.constants.ManaType; + +import static mage.constants.ManaType.COLORLESS; + +import mage.filter.FilterMana; +import mage.util.Copyable; +import mage.util.ThreadLocalStringBuilder; +import org.apache.log4j.Logger; + +/** + * @author BetaSteward_at_googlemail.com + */ +public class Mana implements Comparable, Serializable, Copyable { + + private static final transient Logger logger = Logger.getLogger(Mana.class); + + protected int red; + protected int green; + protected int blue; + protected int white; + protected int black; + protected int colorless; + protected int any; + protected boolean flag; + + + + /** + * Default constructor. Creates a {@link Mana} object with 0 values. + */ + public Mana() { + } + + + /** + * Creates a {@link Mana} object with the passed in values. Values can + * not be less than 0. Any values less than 0 will be logged and set to 0. + * + * @param red total Red mana to have. + * @param green total Green mana to have. + * @param blue total Blue mana to have. + * @param white total White mana to have. + * @param black total Black mana to have. + * @param colorless total Colorless mana to have. + * @param any total Any mana to have. + */ + public Mana(final int red, final int green, final int blue, final int white, + final int black, final int colorless, final int any) { + this.red = notNegative(red, "Red"); + this.green = notNegative(green, "Green"); + this.blue = notNegative(blue, "Blue"); + this.white = notNegative(white, "White"); + this.black = notNegative(black, "Black"); + this.colorless = notNegative(colorless, "Colorless"); + this.any = notNegative(any, "Any"); + } + + + /** + * Copy constructor. Creates a {@link Mana} object from existing {@link Mana} + * + * @param mana object to create copy from + */ + public Mana(final Mana mana) { + Objects.requireNonNull(mana, "The passed in mana can not be null"); + this.red = mana.red; + this.green = mana.green; + this.blue = mana.blue; + this.white = mana.white; + this.black = mana.black; + this.colorless = mana.colorless; + this.any = mana.any; + this.flag = mana.flag; + } + + + /** + * Creates {@link Mana} object from {@link ColoredManaSymbol}. + * Created {@link Mana} will have a single mana of the passed in {@link ColoredManaSymbol} color. + * + * @param color The color to create the {@link Mana} object with. + */ + public Mana(final ColoredManaSymbol color) { + Objects.requireNonNull(color, "The passed in ColoredManaSymbol can not be null"); + switch (color) { + case G: + green = 1; + break; + case R: + red = 1; + break; + case B: + black = 1; + break; + case U: + blue = 1; + break; + case W: + white = 1; + break; + default: + throw new IllegalArgumentException("Unknown mana color: " + color); + } + } + + + /** + * Creates a {@link Mana} object with the passed in {@code num} of Red mana. + * {@code num} can not be a negative value. Negative values will be logged + * and set to 0. + * + * @param num value of Red mana to create. + * @return a {@link Mana} object with the passed in {@code num} of Red mana. + */ + public static Mana RedMana(int num) { + return new Mana(notNegative(num, "Red"), 0, 0, 0, 0, 0, 0); + } + + + /** + * Creates a {@link Mana} object with the passed in {@code num} of Green mana. + * {@code num} can not be a negative value. Negative values will be logged + * and set to 0. + * + * @param num value of Green mana to create. + * @return a {@link Mana} object with the passed in {@code num} of Green mana. + */ + public static Mana GreenMana(int num) { + return new Mana(0, notNegative(num, "Green"), 0, 0, 0, 0, 0); + } + + + /** + * Creates a {@link Mana} object with the passed in {@code num} of Blue mana. + * {@code num} can not be a negative value. Negative values will be logged + * and set to 0. + * + * @param num value of Blue mana to create. + * @return a {@link Mana} object with the passed in {@code num} of Blue mana. + */ + public static Mana BlueMana(int num) { + return new Mana(0, 0, notNegative(num, "Blue"), 0, 0, 0, 0); + } + + + /** + * Creates a {@link Mana} object with the passed in {@code num} of White mana. + * {@code num} can not be a negative value. Negative values will be logged + * and set to 0. + * + * @param num value of White mana to create. + * @return a {@link Mana} object with the passed in {@code num} of White mana. + */ + public static Mana WhiteMana(int num) { + return new Mana(0, 0, 0, notNegative(num, "White"), 0, 0, 0); + } + + + /** + * Creates a {@link Mana} object with the passed in {@code num} of Black mana. + * {@code num} can not be a negative value. Negative values will be logged + * and set to 0. + * + * @param num value of Black mana to create. + * @return a {@link Mana} object with the passed in {@code num} of Black mana. + */ + public static Mana BlackMana(int num) { + return new Mana(0, 0, 0, 0, notNegative(num, "Black"), 0, 0); + } + + + /** + * Creates a {@link Mana} object with the passed in {@code num} of Colorless mana. + * {@code num} can not be a negative value. Negative values will be logged + * and set to 0. + * + * @param num value of Colorless mana to create. + * @return a {@link Mana} object with the passed in {@code num} of Colorless mana. + */ + public static Mana ColorlessMana(int num) { + return new Mana(0, 0, 0, 0, 0, notNegative(num, "Colorless"), 0); + } + + + /** + * Adds mana from the passed in {@link Mana} object to this object. + * + * @param mana mana to add to this object. + */ + public void add(final Mana mana) { + red += mana.getRed(); + green += mana.getGreen(); + blue += mana.getBlue(); + white += mana.getWhite(); + black += mana.getBlack(); + colorless += mana.getColorless(); + any += mana.getAny(); + } + + + /** + * Increases the Red mana by one. + */ + public void increaseRed() { + red++; + } + + + /** + * Increases the Green mana by one. + */ + public void increaseGreen() { + green++; + } + + + /** + * Increases the Blue mana by one. + */ + public void increaseBlue() { + blue++; + } + + + /** + * Increases the White mana by one. + */ + public void increaseWhite() { + white++; + } + + + /** + * Increases the Black mana by one. + */ + public void increaseBlack() { + black++; + } + + + /** + * Increases the Colorless mana by one. + */ + public void increaseColorless() { + colorless++; + } + + + /** + * Subtracts the passed in mana values from this instance. + * + * @param mana mana values to subtract + */ + public void subtract(final Mana mana) { + red -= mana.red; + green -= mana.green; + blue -= mana.blue; + white -= mana.white; + black -= mana.black; + colorless -= mana.colorless; + any -= mana.any; + } + + + /** + * Subtracts the passed in mana values from this instance. The difference between this and + * {@code subtract()} is that if we do not have the available colorless + * mana to pay, we take mana from our colored mana pools. + * + * @param mana mana values to subtract + * @throws ArithmeticException thrown if there is not enough available + * colored mana to pay the colorless cost + */ + public void subtractCost(final Mana mana) throws ArithmeticException { + red -= mana.red; + green -= mana.green; + blue -= mana.blue; + white -= mana.white; + black -= mana.black; + any -= mana.any; + colorless -= mana.colorless; + + while (colorless < 0) { + int oldColorless = colorless; + if (red > 0) { + red--; + colorless++; + continue; + } + if (green > 0) { + green--; + colorless++; + continue; + } + if (blue > 0) { + blue--; + colorless++; + continue; + } + if (white > 0) { + white--; + colorless++; + continue; + } + if (black > 0) { + black--; + colorless++; + } + if (any > 0) { + any--; + colorless++; + } + if (oldColorless == colorless) { + throw new ArithmeticException("Not enough mana to pay colorless"); + } + } + } + + + /** + * Returns the total count of all combined mana. + * + * @return the total count of all combined mana. + */ + public int count() { + return red + green + blue + white + black + colorless + any; + } + + + /** + * Returns the total count of all colored mana. + * + * @return the total count of all colored mana. + */ + public int countColored() { + return red + green + blue + white + black + any; + } + + + /** + * Returns the count of filtered mana provided by the passed in {@link FilterMana}. + * If {@link FilterMana} is null, the total mana count is returned via {@link #count() count}. + * + * @param filter the colors of mana to return the count for. + * @return the count of filtered mana provided by the passed in {@link FilterMana}. + */ + public int count(final FilterMana filter) { + if (filter == null) { + return count(); + } + int count = 0; + if (filter.isBlack()) { + count += black; + } + if (filter.isBlue()) { + count += blue; + } + if (filter.isWhite()) { + count += white; + } + if (filter.isGreen()) { + count += green; + } + if (filter.isRed()) { + count += red; + } + if (filter.isColorless()) { + count += colorless; + } + return count; + } + + + /** + * Sets all mana to 0. + */ + public void clear() { + red = 0; + green = 0; + blue = 0; + white = 0; + black = 0; + colorless = 0; + any = 0; + } + + + /** + * Returns this objects values as a {@link String}. + * + * @return this objects values as a {@link String}. + */ + @Override + public String toString() { + StringBuilder sbMana = new StringBuilder(); + if (colorless > 0) { + sbMana.append("{").append(Integer.toString(colorless)).append("}"); + } + 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}"); + } + return sbMana.toString(); + } + + + /** + * Returns a deep copy of this object. + * + * @return a deep copy of this object. + */ + @Override + public Mana copy() { + return new Mana(this); + } + + + /** + * Returns if there is enough available mana to pay the mana provided by the + * passed in {@link Mana} object. + * + * @param cost the cost to compare too. + * @return if there is enough available mana to pay. + */ + public boolean enough(final Mana cost) { + Mana compare = cost.copy(); + compare.subtract(this); + if (compare.red < 0) { + compare.any = compare.getAny() + compare.getRed(); + if (compare.any < 0) { + return false; + } + compare.red = 0; + } + if (compare.green < 0) { + compare.any = compare.getAny() + compare.getGreen(); + if (compare.any < 0) { + return false; + } + compare.green = 0; + } + if (compare.blue < 0) { + compare.any = compare.getAny() + compare.getBlue(); + if (compare.any < 0) { + return false; + } + compare.blue = 0; + } + if (compare.black < 0) { + compare.any = compare.getAny() + compare.getBlack(); + if (compare.any < 0) { + return false; + } + compare.black = 0; + } + if (compare.white < 0) { + compare.any = compare.getAny() + compare.getWhite(); + if (compare.any < 0) { + return false; + } + compare.white = 0; + } + if (compare.colorless < 0) { + int remaining = compare.red + compare.green + compare.black + compare.blue + compare.white + compare.any; + if (compare.colorless + remaining < 0) { + return false; + } + } + return true; + } + + + /** + * Returns the total mana needed to meet the passed in {@link Mana} object. + * + * @param cost the mana cost + * @return the total mana needed to meet the passes in {@link Mana} object. + */ + public Mana needed(final Mana cost) { + Mana compare = cost.copy(); + compare.subtract(this); + if (compare.red < 0 && compare.any > 0) { + int diff = Math.min(compare.any, Math.abs(compare.red)); + compare.any = compare.getAny() - diff; + compare.red = compare.getRed() + diff; + } + if (compare.green < 0 && compare.any > 0) { + int diff = Math.min(compare.any, Math.abs(compare.green)); + compare.any = compare.any - diff; + compare.green = compare.green + diff; + } + if (compare.blue < 0 && compare.any > 0) { + int diff = Math.min(compare.any, Math.abs(compare.blue)); + compare.any = compare.any - diff; + compare.blue = compare.blue + diff; + } + if (compare.black < 0 && compare.any > 0) { + int diff = Math.min(compare.any, Math.abs(compare.black)); + compare.any = compare.any - diff; + compare.black = compare.getBlack() + diff; + } + if (compare.white < 0 && compare.any > 0) { + int diff = Math.min(compare.any, Math.abs(compare.white)); + compare.any = compare.any - diff; + compare.white = compare.white + diff; + } + if (compare.colorless < 0) { + int remaining = 0; + remaining += Math.min(0, compare.red); + remaining += Math.min(0, compare.white); + remaining += Math.min(0, compare.green); + remaining += Math.min(0, compare.black); + remaining += Math.min(0, compare.blue); + remaining += Math.min(0, compare.any); + if (remaining > 0) { + int diff = Math.min(remaining, Math.abs(compare.colorless)); + compare.colorless = compare.colorless + diff; + } + } + Mana needed = new Mana(); + if (compare.red < 0) { + needed.red = Math.abs(compare.red); + } + if (compare.white < 0) { + needed.white = Math.abs(compare.white); + } + if (compare.green < 0) { + needed.green = Math.abs(compare.green); + } + if (compare.black < 0) { + needed.black = Math.abs(compare.black); + } + if (compare.blue < 0) { + needed.blue = Math.abs(compare.blue); + } + if (compare.colorless < 0) { + needed.colorless = Math.abs(compare.colorless); + } + return needed; + } + + + /** + * Returns total Red mana. + * + * @return total Red mana. + */ + public int getRed() { + return red; + } + + + /** + * Sets the total Red mana. Can not be negative. + * Negative values will be logged and set to 0. + * + * @param red total Red mana. + */ + public void setRed(int red) { + this.red = notNegative(red, "Red"); + } + + + /** + * Returns total Green mana. + * + * @return total Green mana. + */ + public int getGreen() { + return green; + } + + + /** + * Sets the total Green mana. Can not be negative. + * Negative values will be logged and set to 0. + * + * @param green total Green mana. + */ + public void setGreen(int green) { + this.green = notNegative(green, "Green"); + } + + + /** + * Returns total Blue mana. + * + * @return total Blue mana. + */ + public int getBlue() { + return blue; + } + + + /** + * Sets the total Blue mana. Can not be negative. + * Negative values will be logged and set to 0. + * + * @param blue total Blue mana. + */ + public void setBlue(int blue) { + this.blue = notNegative(blue, "Blue"); + } + + + /** + * Returns total White mana. + * + * @return total White mana. + */ + public int getWhite() { + return white; + } + + + /** + * Sets the total White mana. Can not be negative. + * Negative values will be logged and set to 0. + * + * @param white total White mana. + */ + public void setWhite(int white) { + this.white = notNegative(white, "White"); + } + + + /** + * Returns total Black mana. + * + * @return total Black mana. + */ + public int getBlack() { + return black; + } + + + /** + * Sets the total Black mana. Can not be negative. + * Negative values will be logged and set to 0. + * + * @param black total Black mana. + */ + public void setBlack(int black) { + this.black = notNegative(black, "Black"); + } + + + /** + * Returns total Colorless mana. + * + * @return total Colorless mana. + */ + public int getColorless() { + return colorless; + } + + + /** + * Sets the total Colorless mana. Can not be negative. + * Negative values will be logged and set to 0. + * + * @param colorless total Colorless mana. + */ + public void setColorless(int colorless) { + this.colorless = notNegative(colorless, "Colorless"); + } + + + /** + * Returns total Any mana. + * + * @return total Any mana. + */ + public int getAny() { + return any; + } + + + /** + * Sets the total Any mana. Can not be negative. + * Negative values will be logged and set to 0. + * + * @param any total Any mana. + */ + public void setAny(int any) { + this.any = notNegative(any, "Any"); + } + + + /** + * Returns this objects total mana minus the passed in {@link Mana}'s mana. + * + * @param o the object to compare to. + * @return this objects total mana minus the passed in {@link Mana}'s mana. + */ + @Override + public int compareTo(final Mana o) { + return this.count() - o.count(); + } + + + /** + * Returns if this objects mana contains any number of the passed in {@link Mana}'s mana. + * + * @param mana the mana to check for + * @return true if this contains any values that mana has + */ + public boolean contains(final Mana mana) { + if (mana.black > 0 && this.black > 0) { + return true; + } + if (mana.blue > 0 && this.blue > 0) { + return true; + } + if (mana.red > 0 && this.red > 0) { + return true; + } + if (mana.white > 0 && this.white > 0) { + return true; + } + if (mana.green > 0 && this.green > 0) { + return true; + } + if (mana.colorless > 0 && this.count() > 0) { + return true; + } + + return false; + } + + + /** + * Returns the total count of mana in this object as specified by the passed in {@link ColoredManaSymbol}. + * + * @param color the color to return the count for. + * @return the total count of mana in this object as specified by the passed in {@link ColoredManaSymbol}. + */ + public int getColor(final ColoredManaSymbol color) { + if (color.equals(ColoredManaSymbol.G)) { + return green; + } + if (color.equals(ColoredManaSymbol.R)) { + return red; + } + if (color.equals(ColoredManaSymbol.B)) { + return black; + } + if (color.equals(ColoredManaSymbol.U)) { + return blue; + } + if (color.equals(ColoredManaSymbol.W)) { + return white; + } + return 0; + } + + + /** + * Returns the total count of mana in this object as specified by the passed in {@link ManaType}. + * + * @param manaType the type to return the count for. + * @return the total count of mana in this object as specified by the passed in {@link ManaType}. + */ + public int get(final ManaType manaType) { + switch (manaType) { + case BLACK: + return black; + case BLUE: + return blue; + case GREEN: + return green; + case RED: + return red; + case WHITE: + return white; + case COLORLESS: + return colorless; + } + return 0; + } + + + /** + * Set the color of mana specified by the passed in {@link ManaType} to {@code amount} . + * + * @param manaType the color of the mana to set + * @param amount the value to set the mana too + */ + public void set(final ManaType manaType, final int amount) { + switch (manaType) { + case BLACK: + black = amount; + break; + case BLUE: + blue = amount; + break; + case GREEN: + green = amount; + break; + case RED: + red = amount; + break; + case WHITE: + white = amount; + break; + case COLORLESS: + colorless = amount; + break; + default: + throw new IllegalArgumentException("Unknown color: " + manaType); + } + } + + + public void setFlag(boolean flag) { + this.flag = flag; + } + + public boolean getFlag() { + return flag; + } + + + /** + * Sets this objects mana to that of the passed in {@link Mana} + * + * @param mana the mana to set this object to. + */ + public void setToMana(final Mana mana) { + this.any = mana.any; + this.red = mana.red; + this.green = mana.green; + this.white = mana.white; + this.blue = mana.blue; + this.black = mana.black; + this.colorless = mana.colorless; + } + + + /** + * Returns if the passed in {@link Mana} values are equal to this objects. + * + * @param mana the {@link Mana} to compare to. + * @return if the passed in {@link Mana} values are equal to this object. + */ + public boolean equalManaValue(final Mana mana) { + return this.any == mana.any + && this.red == mana.red + && this.green == mana.green + && this.white == mana.white + && this.blue == mana.blue + && this.black == mana.black + && this.colorless == mana.colorless; + } + + + /** + * Returns if this {@link Mana} object has more than or equal values of mana + * as the passed in {@link Mana} object. + * + * @param mana the mana to compare with + * @return if this object has more than or equal mana to the passed in {@link Mana}. + */ + public boolean includesMana(Mana mana) { + return this.green >= mana.green + && this.blue >= mana.blue + && this.white >= mana.white + && this.black >= mana.black + && this.red >= mana.red + && (this.colorless >= mana.colorless + || this.countColored() >= mana.countColored() + mana.colorless); + + } + + + /** + * Returns the mana that is more colored or has a greater amount but does + * not contain one less mana in any color but colorless if you call with + * {1}{W}{R} and {G}{W}{R} you get back {G}{W}{R} if you call with {G}{W}{R} + * and {G}{W}{R} you get back {G}{W}{R} if you call with {G}{W}{B} and + * {G}{W}{R} you get back null + * + * @param mana1 + * @param mana2 + * @return + */ + public static Mana getMoreValuableMana(final Mana mana1, final Mana mana2) { + Mana moreMana; + Mana lessMana; + if (mana2.countColored() > mana1.countColored() || mana2.getAny() > mana1.getAny() || mana2.count() > mana1.count()) { + moreMana = mana2; + lessMana = mana1; + } else { + moreMana = mana1; + lessMana = mana2; + } + if (lessMana.getWhite() > moreMana.getWhite() + || lessMana.getRed() > moreMana.getRed() + || lessMana.getGreen() > moreMana.getGreen() + || lessMana.getBlue() > moreMana.getBlue() + || lessMana.getBlack() > moreMana.getBlack() + || lessMana.getAny() > moreMana.getAny()) { + return null; + } + return moreMana; + } + + + /** + * Returns the total count of mana colors that have at least one. + * + * @return the total count of mana colors that have at least one. + */ + public int getDifferentColors() { + int count = 0; + if (blue > 0) { + count++; + } + if (black > 0) { + count++; + } + if (green > 0) { + count++; + } + if (white > 0) { + count++; + } + if (red > 0) { + count++; + } + return count; + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Mana mana = (Mana) o; + + if (red != mana.red) return false; + if (green != mana.green) return false; + if (blue != mana.blue) return false; + if (white != mana.white) return false; + if (black != mana.black) return false; + if (colorless != mana.colorless) return false; + if (any != mana.any) return false; + return flag == mana.flag; + + } + + @Override + public int hashCode() { + int result = red; + result = 31 * result + green; + result = 31 * result + blue; + result = 31 * result + white; + result = 31 * result + black; + result = 31 * result + colorless; + result = 31 * result + any; + result = 31 * result + (flag ? 1 : 0); + return result; + } + + /** + * Checks that the {@code value} passed in is not less than 0. + * If the value is negative, it is logged and 0 is returned. + * + * @param value the value to check. + * @param name the name of the value to check. Used to make logging of + * the {@code value} easier + * @return the {@code value} passed in, unless it is minus, in which case 0 is returned. + */ + private static int notNegative(int value, final String name) { + if (value < 0) { + logger.info(name + " can not be less than 0. Passed in: " + value + " Defaulting to 0."); + value = 0; + } + return value; + } +} diff --git a/Mage/src/mage/ManaSymbol.java b/Mage/src/main/java/mage/ManaSymbol.java similarity index 55% rename from Mage/src/mage/ManaSymbol.java rename to Mage/src/main/java/mage/ManaSymbol.java index befde22923a..4e0c0fe32bc 100644 --- a/Mage/src/mage/ManaSymbol.java +++ b/Mage/src/main/java/mage/ManaSymbol.java @@ -1,65 +1,66 @@ package mage; + + /** * Enum representing the mana symbols. - * + *

* 107.4. The mana symbols are {W}, {U}, {B}, {R}, {G}, and {X}; the numerals - * {0}, {1}, {2}, {3}, {4}, and so on; the hybrid symbols {W/U}, {W/B}, {U/B}, - * {U/R}, {B/R}, {B/G}, {R/G}, {R/W}, {G/W}, and {G/U}; the monocolored hybrid - * symbols {2/W}, {2/U}, {2/B}, {2/R}, and {2/G}; the Phyrexian mana symbols - * {W/P}, {U/P}, {B/P}, {R/P}, and {G/P}; and the snow symbol {S}. - * + * {0}, {1}, {2}, {3}, {4}, and so on; the hybrid symbols {W/U}, {W/B}, {U/B}, + * {U/R}, {B/R}, {B/G}, {R/G}, {R/W}, {G/W}, and {G/U}; the monocolored hybrid + * symbols {2/W}, {2/U}, {2/B}, {2/R}, and {2/G}; the Phyrexian mana symbols + * {W/P}, {U/P}, {B/P}, {R/P}, and {G/P}; and the snow symbol {S}. + *

* 107.4a. There are five primary colored mana symbols: {W} is white, {U} blue, - * {B} black, {R} red, and {G} green. These symbols are used to represent colored - * mana, and also to represent colored mana in costs. Colored mana in costs can - * be paid only with the appropriate color of mana. See rule 202, "Mana Cost and - * Color." - * + * {B} black, {R} red, and {G} green. These symbols are used to represent colored + * mana, and also to represent colored mana in costs. Colored mana in costs can + * be paid only with the appropriate color of mana. See rule 202, "Mana Cost and + * Color." + *

* 107.4b. Numeral symbols (such as {1}) and variable symbols (such as {X}) - * represent generic mana in costs. Generic mana in costs can be paid with any - * type of mana. For more information about {X}, see rule 107.3. - * + * represent generic mana in costs. Generic mana in costs can be paid with any + * type of mana. For more information about {X}, see rule 107.3. + *

* 107.4c. Numeral symbols (such as {1}) and variable symbols (such as {X}) can - * also represent colorless mana if they appear in the effect of a spell or - * ability that reads "add [mana symbol] to your mana pool" or something similar. - * (See rule 107.3e.) - * + * also represent colorless mana if they appear in the effect of a spell or + * ability that reads "add [mana symbol] to your mana pool" or something similar. + * (See rule 107.3e.) + *

* 107.4d. The symbol {0} represents zero mana and is used as a placeholder for a - * cost that can be paid with no resources. (See rule 117.5.) - * + * cost that can be paid with no resources. (See rule 117.5.) + *

* 107.4e. Hybrid mana symbols are also colored mana symbols. Each one represents - * a cost that can be paid in one of two ways, as represented by the two halves - * of the symbol. A hybrid symbol such as {W/U} can be paid with either white or - * blue mana, and a monocolored hybrid symbol such as {2/B} can be paid with - * either one black mana or two mana of any type. A hybrid mana symbol is all of - * its component colors. Example: {G/W}{G/W} can be paid by spending {G}{G}, - * {G}{W}, or {W}{W}. - * + * a cost that can be paid in one of two ways, as represented by the two halves + * of the symbol. A hybrid symbol such as {W/U} can be paid with either white or + * blue mana, and a monocolored hybrid symbol such as {2/B} can be paid with + * either one black mana or two mana of any type. A hybrid mana symbol is all of + * its component colors. Example: {G/W}{G/W} can be paid by spending {G}{G}, + * {G}{W}, or {W}{W}. + *

* 107.4f. Phyrexian mana symbols are colored mana symbols: {W/P} is white, {U/P} - * is blue, {B/P} is black, {R/P} is red, and {G/P} is green. A Phyrexian mana - * symbol represents a cost that can be paid either with one mana of its color or - * by paying 2 life. Example: {W/P}{W/P} can be paid by spending {W}{W}, by - * spending {W} and paying 2 life, or by paying 4 life. - * + * is blue, {B/P} is black, {R/P} is red, and {G/P} is green. A Phyrexian mana + * symbol represents a cost that can be paid either with one mana of its color or + * by paying 2 life. Example: {W/P}{W/P} can be paid by spending {W}{W}, by + * spending {W} and paying 2 life, or by paying 4 life. + *

* 107.4g. In rules text, the Phyrexian symbol {P} with no colored background - * means any of the five Phyrexian mana symbols. - * + * means any of the five Phyrexian mana symbols. + *

* 107.4h. The snow mana symbol {S} represents one generic mana in a cost. This - * generic mana can be paid with one mana of any type produced by a snow - * permanent (see rule 205.4f). Effects that reduce the amount of generic mana - * you pay don't affect {S} costs. (There is no such thing as "snow mana"; "snow" - * is not a type of mana.) - * + * generic mana can be paid with one mana of any type produced by a snow + * permanent (see rule 205.4f). Effects that reduce the amount of generic mana + * you pay don't affect {S} costs. (There is no such thing as "snow mana"; "snow" + * is not a type of mana.) * * @author noxx */ public enum ManaSymbol { - W("{W}", Type.PRIMARY, Type.COLORED), - U("{U}", Type.PRIMARY, Type.COLORED), - B("{B}", Type.PRIMARY, Type.COLORED), - R("{R}", Type.PRIMARY, Type.COLORED), - G("{G}", Type.PRIMARY, Type.COLORED), + W("{W}", Type.PRIMARY, Type.COLORED, Type.MONOCOLORED), + U("{U}", Type.PRIMARY, Type.COLORED, Type.MONOCOLORED), + B("{B}", Type.PRIMARY, Type.COLORED, Type.MONOCOLORED), + R("{R}", Type.PRIMARY, Type.COLORED, Type.MONOCOLORED), + G("{G}", Type.PRIMARY, Type.COLORED, Type.MONOCOLORED), X("{X}", Type.GENERIC, Type.COLORLESS), NUMERIC("{N/A}", Type.GENERIC, Type.COLORLESS), HYBRID_WU("{W/U}", W, U, Type.HYBRID, Type.COLORED), @@ -72,16 +73,16 @@ public enum ManaSymbol { HYBRID_RW("{R/W}", R, W, Type.HYBRID, Type.COLORED), HYBRID_GW("{G/W}", G, W, Type.HYBRID, Type.COLORED), HYBRID_GU("{G/U}", G, U, Type.HYBRID, Type.COLORED), - MONOCOLORED_HYBRID_W("{2/W}", W, Type.HYBRID, Type.MONOCOLORED), - MONOCOLORED_HYBRID_U("{2/U}", U, Type.HYBRID, Type.MONOCOLORED), - MONOCOLORED_HYBRID_B("{2/B}", B, Type.HYBRID, Type.MONOCOLORED), - MONOCOLORED_HYBRID_R("{2/R}", R, Type.HYBRID, Type.MONOCOLORED), - MONOCOLORED_HYBRID_G("{2/G}", G, Type.HYBRID, Type.MONOCOLORED), - PHYREXIAN_W("{W/P}", W, Type.PHYREXIAN, Type.COLORED), - PHYREXIAN_G("{G/P}", G, Type.PHYREXIAN, Type.COLORED), - PHYREXIAN_R("{R/P}", R, Type.PHYREXIAN, Type.COLORED), - PHYREXIAN_B("{B/P}", B, Type.PHYREXIAN, Type.COLORED), - PHYREXIAN_U("{U/P}", U, Type.PHYREXIAN, Type.COLORED), + MONOCOLORED_HYBRID_W("{2/W}", W, Type.HYBRID, Type.MONOCOLORED, Type.COLORED), + MONOCOLORED_HYBRID_U("{2/U}", U, Type.HYBRID, Type.MONOCOLORED, Type.COLORED), + MONOCOLORED_HYBRID_B("{2/B}", B, Type.HYBRID, Type.MONOCOLORED, Type.COLORED), + MONOCOLORED_HYBRID_R("{2/R}", R, Type.HYBRID, Type.MONOCOLORED, Type.COLORED), + MONOCOLORED_HYBRID_G("{2/G}", G, Type.HYBRID, Type.MONOCOLORED, Type.COLORED), + PHYREXIAN_W("{W/P}", W, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED), + PHYREXIAN_G("{G/P}", G, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED), + PHYREXIAN_R("{R/P}", R, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED), + PHYREXIAN_B("{B/P}", B, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED), + PHYREXIAN_U("{U/P}", U, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED), SNOW("{S}", Type.SNOW); private enum Type { @@ -115,26 +116,41 @@ public enum ManaSymbol { private final ManaSymbol manaSymbol2; /** - * * @param symbol * @param manaSymbol1 First associated mana symbol. For hybrid mana symbol. * @param manaSymbol2 Second associated mana symbol. For hybrid mana symbol. * @param types */ - private ManaSymbol(String symbol, ManaSymbol manaSymbol1, ManaSymbol manaSymbol2, Type... types) { + ManaSymbol(String symbol, ManaSymbol manaSymbol1, ManaSymbol manaSymbol2, Type... types) { this.symbol = symbol; boolean lPrimary = false, lColored = false, lGeneric = false, lColorless = false; boolean lMonocolored = false, lHybrid = false, lPhyrexian = false, lSnow = false; for (Type type : types) { switch (type) { - case PRIMARY: lPrimary = true; break; - case COLORED: lColored = true; break; - case GENERIC: lGeneric = true; break; - case COLORLESS: lColorless = true; break; - case MONOCOLORED: lMonocolored = true; break; - case HYBRID: lHybrid = true; break; - case PHYREXIAN: lPhyrexian = true; break; - case SNOW: lSnow = true; break; + case PRIMARY: + lPrimary = true; + break; + case COLORED: + lColored = true; + break; + case GENERIC: + lGeneric = true; + break; + case COLORLESS: + lColorless = true; + break; + case MONOCOLORED: + lMonocolored = true; + break; + case HYBRID: + lHybrid = true; + break; + case PHYREXIAN: + lPhyrexian = true; + break; + case SNOW: + lSnow = true; + break; } } primary = lPrimary; @@ -155,17 +171,16 @@ public enum ManaSymbol { } /** - * * @param symbol * @param manaSymbol Associated mana symbol. For monocolored hybrid and phyrexian mana. * @param types */ - private ManaSymbol(String symbol, ManaSymbol manaSymbol, Type... types) { + ManaSymbol(String symbol, ManaSymbol manaSymbol, Type... types) { this(symbol, manaSymbol, null, types); } - private ManaSymbol(String symbol, Type... types) { - this(symbol, null, null, types); + ManaSymbol(String symbol, Type... types) { + this(symbol, null, null, types); } public boolean isPrimary() { diff --git a/Mage/src/mage/ObjectColor.java b/Mage/src/main/java/mage/ObjectColor.java similarity index 95% rename from Mage/src/mage/ObjectColor.java rename to Mage/src/main/java/mage/ObjectColor.java index c34ea4269d5..dca7bfabd2e 100644 --- a/Mage/src/mage/ObjectColor.java +++ b/Mage/src/main/java/mage/ObjectColor.java @@ -35,7 +35,7 @@ import mage.util.ThreadLocalStringBuilder; public class ObjectColor implements Serializable, Copyable, Comparable { - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(10); + private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(10); public static final ObjectColor WHITE = new ObjectColor("W"); public static final ObjectColor BLUE = new ObjectColor("U"); diff --git a/Mage/src/mage/abilities/Abilities.java b/Mage/src/main/java/mage/abilities/Abilities.java similarity index 100% rename from Mage/src/mage/abilities/Abilities.java rename to Mage/src/main/java/mage/abilities/Abilities.java diff --git a/Mage/src/mage/abilities/AbilitiesImpl.java b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java similarity index 99% rename from Mage/src/mage/abilities/AbilitiesImpl.java rename to Mage/src/main/java/mage/abilities/AbilitiesImpl.java index 3e3b4d7ebd1..bec3cc96efb 100644 --- a/Mage/src/mage/abilities/AbilitiesImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java @@ -50,7 +50,7 @@ import mage.util.ThreadLocalStringBuilder; */ public class AbilitiesImpl extends ArrayList implements Abilities { - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(200); + private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(200); public AbilitiesImpl() {} diff --git a/Mage/src/mage/abilities/Ability.java b/Mage/src/main/java/mage/abilities/Ability.java similarity index 100% rename from Mage/src/mage/abilities/Ability.java rename to Mage/src/main/java/mage/abilities/Ability.java diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java similarity index 94% rename from Mage/src/mage/abilities/AbilityImpl.java rename to Mage/src/main/java/mage/abilities/AbilityImpl.java index 659d4987fb1..c4d7e73616a 100644 --- a/Mage/src/mage/abilities/AbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java @@ -84,8 +84,8 @@ import org.apache.log4j.Logger; */ public abstract class AbilityImpl implements Ability { - private static final transient Logger logger = Logger.getLogger(AbilityImpl.class); - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(100); + private static final Logger logger = Logger.getLogger(AbilityImpl.class); + private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(100); private static final List emptyWatchers = new ArrayList<>(); private static final List emptyAbilities = new ArrayList<>(); @@ -155,7 +155,7 @@ public abstract class AbilityImpl implements Ability { subAbilities.add(subAbility.copy()); } } - this.modes = ability.modes.copy(); + this.modes = ability.getModes().copy(); this.ruleAtTheTop = ability.ruleAtTheTop; this.ruleVisible = ability.ruleVisible; this.ruleAdditionalCostsVisible = ability.ruleAdditionalCostsVisible; @@ -196,6 +196,7 @@ public abstract class AbilityImpl implements Ability { boolean result = true; //20100716 - 117.12 if (checkIfClause(game)) { + for (Effect effect : getEffects()) { if (effect instanceof OneShotEffect) { boolean effectResult = effect.apply(game, this); @@ -255,9 +256,14 @@ public abstract class AbilityImpl implements Ability { /* 20130201 - 601.2b * If the spell is modal the player announces the mode choice (see rule 700.2). */ - if (!modes.choose(game, this)) { + if (!getModes().choose(game, this)) { return false; } + if (controller.isTestMode()) { + if (!controller.addTargets(this, game)) { + return false; + } + } getSourceObject(game); @@ -274,9 +280,8 @@ public abstract class AbilityImpl implements Ability { } // TODO: Because all (non targeted) choices have to be done during resolution // this has to be removed, if all using effects are changed - for (UUID modeId : this.getModes().getSelectedModes()) { - this.getModes().setActiveMode(modeId); - if (getChoices().size() > 0 && getChoices().choose(game, this) == false) { + for (Mode mode : this.getModes().getSelectedModes()) { + if (mode.getChoices().size() > 0 && mode.getChoices().choose(game, this) == false) { logger.debug("activate failed - choice"); return false; } @@ -312,9 +317,12 @@ public abstract class AbilityImpl implements Ability { // its mana cost; see rule 107.3), the player announces the value of that variable. VariableManaCost variableManaCost = handleManaXCosts(game, noMana, controller); String announceString = handleOtherXCosts(game, controller); - - for (UUID modeId : this.getModes().getSelectedModes()) { - this.getModes().setActiveMode(modeId); + // For effects from cards like Void Winnower x costs have to be set + if (game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL_LATE, getId(), getSourceId(), getControllerId()), this)) { + return false; + } + for (Mode mode : this.getModes().getSelectedModes()) { + this.getModes().setActiveMode(mode); //20121001 - 601.2c // 601.2c The player announces his or her choice of an appropriate player, object, or zone for // each target the spell requires. A spell may require some targets only if an alternative or @@ -335,7 +343,7 @@ public abstract class AbilityImpl implements Ability { if (sourceObject != null && !this.getAbilityType().equals(AbilityType.TRIGGERED)) { // triggered abilities check this already in playerImpl.triggerAbility sourceObject.adjustTargets(this, game); } - if (getTargets().size() > 0 && getTargets().chooseTargets(getEffects().get(0).getOutcome(), this.controllerId, this, noMana, game) == false) { + if (mode.getTargets().size() > 0 && mode.getTargets().chooseTargets(getEffects().get(0).getOutcome(), this.controllerId, this, noMana, game) == false) { if ((variableManaCost != null || announceString != null) && !game.isSimulation()) { game.informPlayer(controller, (sourceObject != null ? sourceObject.getIdName() : "") + ": no valid targets with this value of X"); } @@ -408,7 +416,7 @@ public abstract class AbilityImpl implements Ability { } if (variableManaCost != null) { int xValue = getManaCostsToPay().getX(); - game.informPlayers(new StringBuilder(controller.getLogName()).append(" announces a value of ").append(xValue).append(" for ").append(variableManaCost.getText()).toString()); + game.informPlayers(controller.getLogName() + " announces a value of " + xValue + " for " + variableManaCost.getText()); } } activated = true; @@ -508,12 +516,11 @@ public abstract class AbilityImpl implements Ability { // set the xcosts to paid variableCost.setAmount(xValue); ((Cost) variableCost).setPaid(); - String message = new StringBuilder(controller.getLogName()) - .append(" announces a value of ").append(xValue).append(" (").append(variableCost.getActionText()).append(")").toString(); + String message = controller.getLogName() + " announces a value of " + xValue + " (" + variableCost.getActionText() + ")"; if (announceString == null) { announceString = message; } else { - announceString = new StringBuilder(announceString).append(" ").append(message).toString(); + announceString = announceString + " " + message; } } } @@ -681,7 +688,7 @@ public abstract class AbilityImpl implements Ability { @Override public Effects getEffects() { - return modes.getMode().getEffects(); + return getModes().getMode().getEffects(); } @Override @@ -706,7 +713,7 @@ public abstract class AbilityImpl implements Ability { @Override public Choices getChoices() { - return modes.getMode().getChoices(); + return getModes().getMode().getChoices(); } @Override @@ -781,7 +788,7 @@ public abstract class AbilityImpl implements Ability { } String ruleStart = sbRule.toString(); - String text = modes.getText(); + String text = getModes().getText(); String rule; if (!text.isEmpty()) { if (ruleStart.length() > 1) { @@ -873,7 +880,7 @@ public abstract class AbilityImpl implements Ability { @Override public Targets getTargets() { - return modes.getMode().getTargets(); + return getModes().getMode().getTargets(); } @Override @@ -883,12 +890,12 @@ public abstract class AbilityImpl implements Ability { @Override public boolean isModal() { - return this.modes.size() > 1; + return getModes().size() > 1; } @Override public void addMode(Mode mode) { - this.modes.addMode(mode); + getModes().addMode(mode); } @Override @@ -899,9 +906,12 @@ public abstract class AbilityImpl implements Ability { @Override public boolean canChooseTarget(Game game) { int found = 0; - for (Mode mode : modes.values()) { + for (Mode mode : getModes().values()) { if (mode.getTargets().canChoose(sourceId, controllerId, game)) { found++; + if (getModes().isEachModeMoreThanOnce()) { + return true; + } if (found >= getModes().getMinModes()) { return true; } @@ -1034,7 +1044,7 @@ public abstract class AbilityImpl implements Ability { logger.warn("Could get no object: " + this.toString()); } return new StringBuilder(" activates: ") - .append(object != null ? this.formatRule(modes.getText(), object.getLogName()) : modes.getText()) + .append(object != null ? this.formatRule(getModes().getText(), object.getLogName()) : getModes().getText()) .append(" from ") .append(getMessageText(game)).toString(); } @@ -1103,13 +1113,15 @@ public abstract class AbilityImpl implements Ability { } } else if (object instanceof Spell && ((Spell) object).getSpellAbility().getModes().size() > 1) { Modes spellModes = ((Spell) object).getSpellAbility().getModes(); - int item = 0; - for (Mode mode : spellModes.values()) { - item++; - if (spellModes.getSelectedModes().contains(mode.getId())) { - spellModes.setActiveMode(mode.getId()); - sb.append(" (mode ").append(item).append(")"); - sb.append(getTargetDescriptionForLog(getTargets(), game)); + for (Mode selectedMode : spellModes.getSelectedModes()) { + int item = 0; + for (Mode mode : spellModes.values()) { + item++; + if (mode.getId().equals(selectedMode.getId())) { + sb.append(" (mode ").append(item).append(")"); + sb.append(getTargetDescriptionForLog(selectedMode.getTargets(), game)); + break; + } } } } else { diff --git a/Mage/src/mage/abilities/ActivatedAbility.java b/Mage/src/main/java/mage/abilities/ActivatedAbility.java similarity index 100% rename from Mage/src/mage/abilities/ActivatedAbility.java rename to Mage/src/main/java/mage/abilities/ActivatedAbility.java diff --git a/Mage/src/mage/abilities/ActivatedAbilityImpl.java b/Mage/src/main/java/mage/abilities/ActivatedAbilityImpl.java similarity index 100% rename from Mage/src/mage/abilities/ActivatedAbilityImpl.java rename to Mage/src/main/java/mage/abilities/ActivatedAbilityImpl.java diff --git a/Mage/src/mage/abilities/CompoundAbility.java b/Mage/src/main/java/mage/abilities/CompoundAbility.java similarity index 100% rename from Mage/src/mage/abilities/CompoundAbility.java rename to Mage/src/main/java/mage/abilities/CompoundAbility.java diff --git a/Mage/src/mage/abilities/DelayedTriggeredAbilities.java b/Mage/src/main/java/mage/abilities/DelayedTriggeredAbilities.java similarity index 100% rename from Mage/src/mage/abilities/DelayedTriggeredAbilities.java rename to Mage/src/main/java/mage/abilities/DelayedTriggeredAbilities.java diff --git a/Mage/src/mage/abilities/DelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/DelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/DelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/DelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/EvasionAbility.java b/Mage/src/main/java/mage/abilities/EvasionAbility.java similarity index 100% rename from Mage/src/mage/abilities/EvasionAbility.java rename to Mage/src/main/java/mage/abilities/EvasionAbility.java diff --git a/Mage/src/mage/abilities/LoyaltyAbility.java b/Mage/src/main/java/mage/abilities/LoyaltyAbility.java similarity index 100% rename from Mage/src/mage/abilities/LoyaltyAbility.java rename to Mage/src/main/java/mage/abilities/LoyaltyAbility.java diff --git a/Mage/src/mage/abilities/MageSingleton.java b/Mage/src/main/java/mage/abilities/MageSingleton.java similarity index 100% rename from Mage/src/mage/abilities/MageSingleton.java rename to Mage/src/main/java/mage/abilities/MageSingleton.java diff --git a/Mage/src/mage/abilities/Mode.java b/Mage/src/main/java/mage/abilities/Mode.java similarity index 100% rename from Mage/src/mage/abilities/Mode.java rename to Mage/src/main/java/mage/abilities/Mode.java diff --git a/Mage/src/mage/abilities/Modes.java b/Mage/src/main/java/mage/abilities/Modes.java similarity index 74% rename from Mage/src/mage/abilities/Modes.java rename to Mage/src/main/java/mage/abilities/Modes.java index be01464e4f0..08a317f95cf 100644 --- a/Mage/src/mage/abilities/Modes.java +++ b/Mage/src/main/java/mage/abilities/Modes.java @@ -30,7 +30,6 @@ package mage.abilities; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -50,33 +49,52 @@ import mage.util.CardUtil; */ public class Modes extends LinkedHashMap { - private UUID modeId; - private final Set selectedModes = new LinkedHashSet<>(); + private Mode mode; // the current mode of the selected modes + private final ArrayList selectedModes = new ArrayList<>(); private int minModes; private int maxModes; private TargetController modeChooser; - private boolean eachModeOnlyOnce; // state if each mode can be chosen only once + private boolean eachModeMoreThanOnce; // each mode can be selected multiple times during one choice + private boolean eachModeOnlyOnce; // state if each mode can be chosen only once as long as the source object exists public Modes() { - Mode mode = new Mode(); + this.mode = new Mode(); this.put(mode.getId(), mode); - this.modeId = mode.getId(); this.minModes = 1; this.maxModes = 1; - this.selectedModes.add(modeId); + this.selectedModes.add(mode); this.modeChooser = TargetController.YOU; + this.eachModeOnlyOnce = false; + this.eachModeMoreThanOnce = false; } public Modes(final Modes modes) { - this.modeId = modes.modeId; for (Map.Entry entry : modes.entrySet()) { this.put(entry.getKey(), entry.getValue().copy()); } this.minModes = modes.minModes; this.maxModes = modes.maxModes; - this.selectedModes.addAll(modes.selectedModes); + + if (modes.size() == 1) { + this.mode = values().iterator().next(); + this.selectedModes.add(mode); + } else { + // probably there is still a problem with copying modes with the same mode selected multiple times. + for (Mode selectedMode : modes.getSelectedModes()) { + Mode copiedMode = selectedMode.copy(); + this.selectedModes.add(copiedMode); + if (modes.getSelectedModes().size() == 1) { + this.mode = copiedMode; + } else { + if (selectedMode.equals(modes.getMode())) { + this.mode = copiedMode; + } + } + } + } this.modeChooser = modes.modeChooser; this.eachModeOnlyOnce = modes.eachModeOnlyOnce; + this.eachModeMoreThanOnce = modes.eachModeMoreThanOnce; } public Modes copy() { @@ -84,10 +102,21 @@ public class Modes extends LinkedHashMap { } public Mode getMode() { - return get(modeId); + return mode; } - public Set getSelectedModes() { + public UUID getModeId(int index) { + int idx = 0; + for (Mode currentMode : this.values()) { + idx++; + if (idx == index) { + return currentMode.getId(); + } + } + return null; + } + + public ArrayList getSelectedModes() { return selectedModes; } @@ -115,24 +144,9 @@ public class Modes extends LinkedHashMap { return this.modeChooser; } - public void setActiveMode(UUID modeId) { - if (selectedModes.contains(modeId)) { - this.modeId = modeId; - } - } - - public void setMode(Mode mode) { - if (this.containsKey(mode.getId())) { - this.modeId = mode.getId(); - this.selectedModes.add(mode.getId()); - Set copySelectedModes = new LinkedHashSet<>(); - copySelectedModes.addAll(selectedModes); - selectedModes.clear(); - for (UUID basicModeId : this.keySet()) { - if (copySelectedModes.contains(basicModeId)) { - selectedModes.add(basicModeId); - } - } + public void setActiveMode(Mode mode) { + if (selectedModes.contains(mode)) { + this.mode = mode; } } @@ -153,7 +167,7 @@ public class Modes extends LinkedHashMap { } } // check if all modes can be activated automatically - if (this.size() == this.getMinModes()) { + if (this.size() == this.getMinModes() && !isEachModeMoreThanOnce()) { Set onceSelectedModes = null; if (isEachModeOnlyOnce()) { onceSelectedModes = getAlreadySelectedModes(source, game); @@ -161,7 +175,7 @@ public class Modes extends LinkedHashMap { for (Mode mode : this.values()) { if ((!isEachModeOnlyOnce() || onceSelectedModes == null || !onceSelectedModes.contains(mode.getId())) && mode.getTargets().canChoose(source.getSourceId(), source.getControllerId(), game)) { - this.selectedModes.add(mode.getId()); + this.selectedModes.add(mode.copy()); } } if (isEachModeOnlyOnce()) { @@ -189,6 +203,7 @@ public class Modes extends LinkedHashMap { Player player = game.getPlayer(playerId); // player chooses modes manually + this.mode = null; while (this.selectedModes.size() < this.getMaxModes()) { Mode choice = player.chooseMode(this, source, game); if (choice == null) { @@ -197,28 +212,38 @@ public class Modes extends LinkedHashMap { } return this.selectedModes.size() >= this.getMinModes(); } - setMode(choice); + this.selectedModes.add(choice.copy()); + if (mode == null) { + mode = choice; + } } if (isEachModeOnlyOnce()) { setAlreadySelectedModes(selectedModes, source, game); } return true; } - this.modeId = this.values().iterator().next().getId(); - this.selectedModes.add(modeId); + if (mode == null) { + this.selectedModes.clear(); + Mode copiedMode = this.values().iterator().next().copy(); + this.selectedModes.add(copiedMode); + this.setActiveMode(copiedMode); + } if (isEachModeOnlyOnce()) { setAlreadySelectedModes(selectedModes, source, game); } return true; } - private void setAlreadySelectedModes(Set selectedModes, Ability source, Game game) { + private void setAlreadySelectedModes(ArrayList selectedModes, Ability source, Game game) { String key = getKey(source, game); Set onceSelectedModes = (Set) game.getState().getValue(key); if (onceSelectedModes == null) { onceSelectedModes = new HashSet<>(); } - onceSelectedModes.addAll(selectedModes); + for (Mode mode : selectedModes) { + onceSelectedModes.add(mode.getId()); + } + game.getState().setValue(key, onceSelectedModes); } @@ -232,7 +257,12 @@ public class Modes extends LinkedHashMap { public List getAvailableModes(Ability source, Game game) { List availableModes = new ArrayList<>(); - Set nonAvailableModes = getAlreadySelectedModes(source, game); + Set nonAvailableModes; + if (isEachModeMoreThanOnce()) { + nonAvailableModes = new HashSet<>(); + } else { + nonAvailableModes = getAlreadySelectedModes(source, game); + } for (Mode mode : this.values()) { if (isEachModeOnlyOnce() && nonAvailableModes != null && nonAvailableModes.contains(mode.getId())) { continue; @@ -253,13 +283,19 @@ public class Modes extends LinkedHashMap { sb.append("choose one or both "); } else if (this.getMinModes() == 2 && this.getMaxModes() == 2) { sb.append("choose two "); + } else if (this.getMinModes() == 3 && this.getMaxModes() == 3) { + sb.append("choose three "); } else { sb.append("choose one "); } if (isEachModeOnlyOnce()) { sb.append("that hasn't been chosen "); } - sb.append("—
"); + if (isEachModeMoreThanOnce()) { + sb.append(". You may choose the same mode more than once.
"); + } else { + sb.append("—
"); + } for (Mode mode : this.values()) { sb.append("&bull "); sb.append(mode.getEffects().getTextStartingUpperCase(mode)); @@ -283,4 +319,12 @@ public class Modes extends LinkedHashMap { this.eachModeOnlyOnce = eachModeOnlyOnce; } + public boolean isEachModeMoreThanOnce() { + return eachModeMoreThanOnce; + } + + public void setEachModeMoreThanOnce(boolean eachModeMoreThanOnce) { + this.eachModeMoreThanOnce = eachModeMoreThanOnce; + } + } diff --git a/Mage/src/main/java/mage/abilities/PlayLandAbility.java b/Mage/src/main/java/mage/abilities/PlayLandAbility.java new file mode 100644 index 00000000000..602cb8f6f4f --- /dev/null +++ b/Mage/src/main/java/mage/abilities/PlayLandAbility.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.abilities; + +import java.util.UUID; +import mage.constants.AbilityType; +import mage.constants.AsThoughEffectType; +import mage.constants.Zone; +import mage.game.Game; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class PlayLandAbility extends ActivatedAbilityImpl { + + public PlayLandAbility(String cardName) { + super(AbilityType.PLAY_LAND, Zone.HAND); + this.usesStack = false; + this.name = "Play " + cardName; + } + + public PlayLandAbility(PlayLandAbility ability) { + super(ability); + } + + @Override + public boolean canActivate(UUID playerId, Game game) { + if (!controlsAbility(playerId, game) + && !game.getContinuousEffects().asThough(getSourceId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, playerId, game)) { + return false; + } + //20091005 - 114.2a + return game.getActivePlayerId().equals(playerId) && game.getPlayer(playerId).canPlayLand(); + } + + @Override + public String getGameLogMessage(Game game) { + return " plays " + getMessageText(game); + } + + @Override + public String toString() { + return this.name; + } + + @Override + public String getRule() { + return this.name; + } + + @Override + public PlayLandAbility copy() { + return new PlayLandAbility(this); + } + +} diff --git a/Mage/src/mage/abilities/SpecialAction.java b/Mage/src/main/java/mage/abilities/SpecialAction.java similarity index 100% rename from Mage/src/mage/abilities/SpecialAction.java rename to Mage/src/main/java/mage/abilities/SpecialAction.java diff --git a/Mage/src/mage/abilities/SpecialActions.java b/Mage/src/main/java/mage/abilities/SpecialActions.java similarity index 100% rename from Mage/src/mage/abilities/SpecialActions.java rename to Mage/src/main/java/mage/abilities/SpecialActions.java diff --git a/Mage/src/mage/abilities/SpellAbility.java b/Mage/src/main/java/mage/abilities/SpellAbility.java similarity index 90% rename from Mage/src/mage/abilities/SpellAbility.java rename to Mage/src/main/java/mage/abilities/SpellAbility.java index 5106b8dc61c..01adf094ffe 100644 --- a/Mage/src/mage/abilities/SpellAbility.java +++ b/Mage/src/main/java/mage/abilities/SpellAbility.java @@ -178,4 +178,23 @@ public class SpellAbility extends ActivatedAbilityImpl { return cardName; } + public int getConvertedManaCost() { + int cmc = 0; + int xMultiplier = 0; + for (String symbolString : getManaCosts().getSymbols()) { + int index = symbolString.indexOf("{X}"); + while (index != -1) { + xMultiplier++; + symbolString = symbolString.substring(index + 3); + index = symbolString.indexOf("{X}"); + } + } + if (getSpellAbilityType().equals(SpellAbilityType.BASE_ALTERNATE)) { + cmc += getManaCostsToPay().getX() * xMultiplier; + } else { + cmc += getManaCosts().convertedManaCost() + getManaCostsToPay().getX() * xMultiplier; + } + return cmc; + + } } diff --git a/Mage/src/mage/abilities/StateTriggeredAbility.java b/Mage/src/main/java/mage/abilities/StateTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/StateTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/StateTriggeredAbility.java diff --git a/Mage/src/mage/abilities/StaticAbility.java b/Mage/src/main/java/mage/abilities/StaticAbility.java similarity index 100% rename from Mage/src/mage/abilities/StaticAbility.java rename to Mage/src/main/java/mage/abilities/StaticAbility.java diff --git a/Mage/src/mage/abilities/TriggeredAbilities.java b/Mage/src/main/java/mage/abilities/TriggeredAbilities.java similarity index 100% rename from Mage/src/mage/abilities/TriggeredAbilities.java rename to Mage/src/main/java/mage/abilities/TriggeredAbilities.java diff --git a/Mage/src/mage/abilities/TriggeredAbility.java b/Mage/src/main/java/mage/abilities/TriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/TriggeredAbility.java rename to Mage/src/main/java/mage/abilities/TriggeredAbility.java diff --git a/Mage/src/mage/abilities/TriggeredAbilityImpl.java b/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java similarity index 98% rename from Mage/src/mage/abilities/TriggeredAbilityImpl.java rename to Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java index aabda88d3c6..2db3f564bdd 100644 --- a/Mage/src/mage/abilities/TriggeredAbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java @@ -133,7 +133,8 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge || ruleLow.startsWith("return") || ruleLow.startsWith("tap") || ruleLow.startsWith("untap") - || ruleLow.startsWith("put")) { + || ruleLow.startsWith("put") + || ruleLow.startsWith("remove")) { sb.append("you may "); } else { if (!ruleLow.startsWith("its controller may")) { diff --git a/Mage/src/mage/abilities/abilityword/ConstellationAbility.java b/Mage/src/main/java/mage/abilities/abilityword/ConstellationAbility.java similarity index 100% rename from Mage/src/mage/abilities/abilityword/ConstellationAbility.java rename to Mage/src/main/java/mage/abilities/abilityword/ConstellationAbility.java diff --git a/Mage/src/mage/abilities/abilityword/GrandeurAbility.java b/Mage/src/main/java/mage/abilities/abilityword/GrandeurAbility.java similarity index 100% rename from Mage/src/mage/abilities/abilityword/GrandeurAbility.java rename to Mage/src/main/java/mage/abilities/abilityword/GrandeurAbility.java diff --git a/Mage/src/mage/abilities/abilityword/KinshipAbility.java b/Mage/src/main/java/mage/abilities/abilityword/KinshipAbility.java similarity index 100% rename from Mage/src/mage/abilities/abilityword/KinshipAbility.java rename to Mage/src/main/java/mage/abilities/abilityword/KinshipAbility.java diff --git a/Mage/src/mage/abilities/abilityword/LieutenantAbility.java b/Mage/src/main/java/mage/abilities/abilityword/LieutenantAbility.java similarity index 100% rename from Mage/src/mage/abilities/abilityword/LieutenantAbility.java rename to Mage/src/main/java/mage/abilities/abilityword/LieutenantAbility.java diff --git a/Mage/src/mage/abilities/abilityword/StriveAbility.java b/Mage/src/main/java/mage/abilities/abilityword/StriveAbility.java similarity index 96% rename from Mage/src/mage/abilities/abilityword/StriveAbility.java rename to Mage/src/main/java/mage/abilities/abilityword/StriveAbility.java index cc7c57bd046..8980398bd57 100644 --- a/Mage/src/mage/abilities/abilityword/StriveAbility.java +++ b/Mage/src/main/java/mage/abilities/abilityword/StriveAbility.java @@ -68,7 +68,7 @@ public class StriveAbility extends SimpleStaticAbility { @Override public String getRule() { - return new StringBuilder("Strive - {this} costs ").append(striveCost).append(" more to cast for each target beyond the first.").toString(); + return new StringBuilder("Strive - {this} costs ").append(striveCost).append(" more to cast for each target beyond the first.").toString(); } } diff --git a/Mage/src/mage/abilities/common/ActivateAsSorceryActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/ActivateAsSorceryActivatedAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/ActivateAsSorceryActivatedAbility.java rename to Mage/src/main/java/mage/abilities/common/ActivateAsSorceryActivatedAbility.java diff --git a/Mage/src/mage/abilities/common/ActivateIfConditionActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/ActivateIfConditionActivatedAbility.java rename to Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java diff --git a/Mage/src/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AnotherCreatureEntersBattlefieldTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AnotherCreatureEntersBattlefieldTriggeredAbility.java similarity index 83% rename from Mage/src/mage/abilities/common/AnotherCreatureEntersBattlefieldTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AnotherCreatureEntersBattlefieldTriggeredAbility.java index cb67ac5ca14..accd6b22057 100644 --- a/Mage/src/mage/abilities/common/AnotherCreatureEntersBattlefieldTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AnotherCreatureEntersBattlefieldTriggeredAbility.java @@ -30,8 +30,11 @@ public class AnotherCreatureEntersBattlefieldTriggeredAbility extends TriggeredA @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId() != this.getSourceId()) { - Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.CREATURE)) { + Permanent permanent = game.getPermanentEntering(event.getTargetId()); + if (permanent == null) { + permanent = game.getPermanent(event.getTargetId()); + } + if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) { return true; } } diff --git a/Mage/src/mage/abilities/common/AsEntersBattlefieldAbility.java b/Mage/src/main/java/mage/abilities/common/AsEntersBattlefieldAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AsEntersBattlefieldAbility.java rename to Mage/src/main/java/mage/abilities/common/AsEntersBattlefieldAbility.java diff --git a/Mage/src/mage/abilities/common/AttackedByCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttackedByCreatureTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttackedByCreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttackedByCreatureTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksAloneTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksAloneTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksAloneTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksAloneTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksEachCombatStaticAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksEachCombatStaticAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksEachCombatStaticAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksEachCombatStaticAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksEachTurnStaticAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksEachTurnStaticAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksEachTurnStaticAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksEachTurnStaticAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksOrBlocksEnchantedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksOrBlocksEnchantedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksOrBlocksEnchantedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksOrBlocksEnchantedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AttacksTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AttacksTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/AuraAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AuraAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/AuraAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/AuraAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesAuraAttachToManifestSourceEffect.java b/Mage/src/main/java/mage/abilities/common/BecomesAuraAttachToManifestSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesAuraAttachToManifestSourceEffect.java rename to Mage/src/main/java/mage/abilities/common/BecomesAuraAttachToManifestSourceEffect.java diff --git a/Mage/src/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesBlockedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesBlockedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesBlockedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesBlockedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesMonstrousSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesMonstrousSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesMonstrousSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesMonstrousSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesRenownedSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesRenownedSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesRenownedSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesRenownedSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesTappedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTappedSourceTriggeredAbility.java similarity index 84% rename from Mage/src/mage/abilities/common/BecomesTappedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesTappedSourceTriggeredAbility.java index 666e6b1f893..aeab425137c 100644 --- a/Mage/src/mage/abilities/common/BecomesTappedTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesTappedSourceTriggeredAbility.java @@ -38,23 +38,23 @@ import mage.game.events.GameEvent.EventType; * * @author nantuko */ -public class BecomesTappedTriggeredAbility extends TriggeredAbilityImpl { - - public BecomesTappedTriggeredAbility(Effect effect, boolean isOptional) { +public class BecomesTappedSourceTriggeredAbility extends TriggeredAbilityImpl { + + public BecomesTappedSourceTriggeredAbility(Effect effect, boolean isOptional) { super(Zone.BATTLEFIELD, effect, isOptional); } - public BecomesTappedTriggeredAbility(Effect effect) { + public BecomesTappedSourceTriggeredAbility(Effect effect) { super(Zone.BATTLEFIELD, effect); } - public BecomesTappedTriggeredAbility(final BecomesTappedTriggeredAbility ability) { + public BecomesTappedSourceTriggeredAbility(final BecomesTappedSourceTriggeredAbility ability) { super(ability); } @Override - public BecomesTappedTriggeredAbility copy() { - return new BecomesTappedTriggeredAbility(this); + public BecomesTappedSourceTriggeredAbility copy() { + return new BecomesTappedSourceTriggeredAbility(this); } @Override diff --git a/Mage/src/mage/abilities/common/BecomesTappedCreatureControlledTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTappedTriggeredAbility.java similarity index 53% rename from Mage/src/mage/abilities/common/BecomesTappedCreatureControlledTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesTappedTriggeredAbility.java index 4961f8af297..c771945c0ed 100644 --- a/Mage/src/mage/abilities/common/BecomesTappedCreatureControlledTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesTappedTriggeredAbility.java @@ -7,7 +7,7 @@ package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; @@ -16,26 +16,26 @@ import mage.game.permanent.Permanent; * * @author Jeff */ -public class BecomesTappedCreatureControlledTriggeredAbility extends TriggeredAbilityImpl{ - - FilterControlledCreaturePermanent filter; - - public BecomesTappedCreatureControlledTriggeredAbility(Effect effect, boolean optional) { - this(effect, optional, new FilterControlledCreaturePermanent("a creature you control")); +public class BecomesTappedTriggeredAbility extends TriggeredAbilityImpl{ + + FilterPermanent filter; + + public BecomesTappedTriggeredAbility(Effect effect, boolean optional) { + this(effect, optional, new FilterPermanent("a permanent")); } - public BecomesTappedCreatureControlledTriggeredAbility(Effect effect, boolean optional, FilterControlledCreaturePermanent filter) { + public BecomesTappedTriggeredAbility(Effect effect, boolean optional, FilterPermanent filter) { super(Zone.BATTLEFIELD, effect, optional); this.filter = filter; } - public BecomesTappedCreatureControlledTriggeredAbility(final BecomesTappedCreatureControlledTriggeredAbility ability) { + public BecomesTappedTriggeredAbility(final BecomesTappedTriggeredAbility ability) { super(ability); - this.filter = ability.filter; + this.filter = ability.filter.copy(); } @Override - public BecomesTappedCreatureControlledTriggeredAbility copy() { - return new BecomesTappedCreatureControlledTriggeredAbility(this); + public BecomesTappedTriggeredAbility copy() { + return new BecomesTappedTriggeredAbility(this); } @Override @@ -52,5 +52,5 @@ public class BecomesTappedCreatureControlledTriggeredAbility extends TriggeredAb @Override public String getRule() { return "When " + filter.getMessage() + " becomes tapped, " + super.getRule(); - } + } } diff --git a/Mage/src/mage/abilities/common/BecomesTargetAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTargetAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesTargetAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesTargetAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesTargetControllerSpellTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTargetControllerSpellTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesTargetControllerSpellTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesTargetControllerSpellTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BecomesTargetTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BecomesTargetTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BeginningOfCombatTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfCombatTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BeginningOfCombatTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BeginningOfCombatTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BeginningOfDrawTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfDrawTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BeginningOfDrawTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BeginningOfDrawTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BeginningOfEndStepTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfEndStepTriggeredAbility.java similarity index 95% rename from Mage/src/mage/abilities/common/BeginningOfEndStepTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BeginningOfEndStepTriggeredAbility.java index 2e87b2b424c..a81f7b7d76d 100644 --- a/Mage/src/mage/abilities/common/BeginningOfEndStepTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BeginningOfEndStepTriggeredAbility.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.common; import mage.abilities.TriggeredAbilityImpl; @@ -40,6 +39,7 @@ import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl { + private TargetController targetController; private Condition interveningIfClauseCondition; @@ -91,8 +91,9 @@ public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl { } return true; } - break; + break; case ANY: + case NEXT: if (getTargets().size() == 0) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); @@ -128,15 +129,17 @@ public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { StringBuilder sb = new StringBuilder(getEffects().getText(modes.getMode())); if (this.optional) { - if (sb.substring(0, 6).toLowerCase().equals("target")){ + if (sb.substring(0, 6).toLowerCase().equals("target")) { sb.insert(0, "you may have "); - } else if (!sb.substring(0, 4).toLowerCase().equals("you ")){ + } else if (!sb.substring(0, 4).toLowerCase().equals("you ")) { sb.insert(0, "you may "); } } switch (targetController) { case YOU: return sb.insert(0, generateConditionString()).insert(0, "At the beginning of your end step, ").toString(); + case NEXT: + return sb.insert(0, generateConditionString()).insert(0, "At the beginning of the end step, ").toString(); case OPPONENT: return sb.insert(0, generateConditionString()).insert(0, "At the beginning of each opponent's end step, ").toString(); case ANY: diff --git a/Mage/src/mage/abilities/common/BeginningOfPreCombatMainTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfPreCombatMainTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BeginningOfPreCombatMainTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BeginningOfPreCombatMainTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BeginningOfUntapTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfUntapTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BeginningOfUntapTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BeginningOfUntapTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BeginningOfUpkeepTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfUpkeepTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BeginningOfUpkeepTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BeginningOfUpkeepTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BeginningOfYourEndStepTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfYourEndStepTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BeginningOfYourEndStepTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BeginningOfYourEndStepTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BlocksAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BlocksAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BlocksAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BlocksCreatureAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksCreatureAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BlocksCreatureAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BlocksCreatureAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BlocksCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksCreatureTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BlocksCreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BlocksCreatureTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BlocksOrBecomesBlockedByCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedByCreatureTriggeredAbility.java similarity index 65% rename from Mage/src/mage/abilities/common/BlocksOrBecomesBlockedByCreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedByCreatureTriggeredAbility.java index 88c172b7a1b..b4231f41b10 100644 --- a/Mage/src/mage/abilities/common/BlocksOrBecomesBlockedByCreatureTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedByCreatureTriggeredAbility.java @@ -30,8 +30,11 @@ package mage.abilities.common; import mage.constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; /** @@ -40,19 +43,29 @@ import mage.target.targetpointer.FixedTarget; */ public class BlocksOrBecomesBlockedByCreatureTriggeredAbility extends TriggeredAbilityImpl { + // note that this is using the Filter#match(E e, Game game), + // not FilterInPlay#(E o, UUID sourceId, UUID playerId, Game game) + // this triggers on both blocked and blocking, so source and player don't have a consistent definition + protected FilterPermanent filter; protected String rule; public BlocksOrBecomesBlockedByCreatureTriggeredAbility(Effect effect, boolean optional) { - this(effect, optional, null); + this(effect, new FilterCreaturePermanent(), optional, null); } - public BlocksOrBecomesBlockedByCreatureTriggeredAbility(Effect effect, boolean optional, String rule) { + public BlocksOrBecomesBlockedByCreatureTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional) { + this(effect, filter, optional, null); + } + + public BlocksOrBecomesBlockedByCreatureTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional, String rule) { super(Zone.BATTLEFIELD, effect, optional); + this.filter = filter; this.rule = rule; } public BlocksOrBecomesBlockedByCreatureTriggeredAbility(final BlocksOrBecomesBlockedByCreatureTriggeredAbility ability) { super(ability); + this.filter = ability.filter; this.rule = ability.rule; } @@ -64,16 +77,22 @@ public class BlocksOrBecomesBlockedByCreatureTriggeredAbility extends TriggeredA @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getSourceId().equals(this.getSourceId())) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); + Permanent blocked = game.getPermanent(event.getTargetId()); + if (blocked != null && filter.match(blocked, game)) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getTargetId())); + } + return true; } - return true; } if (event.getTargetId().equals(this.getSourceId())) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); + Permanent blocker = game.getPermanent(event.getSourceId()); + if (blocker != null && filter.match(blocker, game)) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getSourceId())); + } + return true; } - return true; } return false; } @@ -83,7 +102,7 @@ public class BlocksOrBecomesBlockedByCreatureTriggeredAbility extends TriggeredA if (rule != null) { return rule; } - return "Whenever {this} blocks or becomes blocked by a creature, " + super.getRule(); + return "Whenever {this} blocks or becomes blocked by a " + filter.getMessage() + ", " + super.getRule(); } @Override diff --git a/Mage/src/mage/abilities/common/BlocksOrBecomesBlockedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BlocksOrBecomesBlockedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/BlocksTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/BlocksTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/BlocksTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/CanBeYourCommanderAbility.java b/Mage/src/main/java/mage/abilities/common/CanBeYourCommanderAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CanBeYourCommanderAbility.java rename to Mage/src/main/java/mage/abilities/common/CanBeYourCommanderAbility.java diff --git a/Mage/src/mage/abilities/common/CanBlockOnlyFlyingAbility.java b/Mage/src/main/java/mage/abilities/common/CanBlockOnlyFlyingAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CanBlockOnlyFlyingAbility.java rename to Mage/src/main/java/mage/abilities/common/CanBlockOnlyFlyingAbility.java diff --git a/Mage/src/mage/abilities/common/CantBeCounteredAbility.java b/Mage/src/main/java/mage/abilities/common/CantBeCounteredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CantBeCounteredAbility.java rename to Mage/src/main/java/mage/abilities/common/CantBeCounteredAbility.java diff --git a/Mage/src/mage/abilities/common/CantBlockAbility.java b/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CantBlockAbility.java rename to Mage/src/main/java/mage/abilities/common/CantBlockAbility.java diff --git a/Mage/src/mage/abilities/common/CastCommanderAbility.java b/Mage/src/main/java/mage/abilities/common/CastCommanderAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CastCommanderAbility.java rename to Mage/src/main/java/mage/abilities/common/CastCommanderAbility.java diff --git a/Mage/src/mage/abilities/common/ChancellorAbility.java b/Mage/src/main/java/mage/abilities/common/ChancellorAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/ChancellorAbility.java rename to Mage/src/main/java/mage/abilities/common/ChancellorAbility.java diff --git a/Mage/src/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/CycleAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/CycleAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CycleAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/CycleAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/CycleTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/CycleTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/CycleTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/CycleTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DamageAsThoughNotBlockedAbility.java b/Mage/src/main/java/mage/abilities/common/DamageAsThoughNotBlockedAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DamageAsThoughNotBlockedAbility.java rename to Mage/src/main/java/mage/abilities/common/DamageAsThoughNotBlockedAbility.java diff --git a/Mage/src/mage/abilities/common/DamageDealtToAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DamageDealtToAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DamageDealtToAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DamageDealtToAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsCombatDamageToACreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsCombatDamageToACreatureTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsCombatDamageToACreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsCombatDamageToACreatureTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsCombatDamageToAPlayerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsCombatDamageToAPlayerTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsCombatDamageToAPlayerTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsCombatDamageToAPlayerTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsCombatDamageTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsCombatDamageTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsCombatDamageTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsCombatDamageTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageGainLifeSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageGainLifeSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageGainLifeSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageGainLifeSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageToACreatureAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageToACreatureAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageToACreatureAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageToACreatureAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageToACreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageToACreatureTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageToACreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageToACreatureTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageToAPlayerAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageToAPlayerAttachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageToAPlayerAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageToAPlayerAttachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageToAPlayerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageToAPlayerTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageToAPlayerTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageToAPlayerTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DealtDamageToSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DiesAndDealtDamageThisTurnTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesAndDealtDamageThisTurnTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DiesAndDealtDamageThisTurnTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DiesAndDealtDamageThisTurnTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DiesAttachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesAttachedTriggeredAbility.java similarity index 89% rename from Mage/src/mage/abilities/common/DiesAttachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DiesAttachedTriggeredAbility.java index 11d4a2764f3..d623e85a579 100644 --- a/Mage/src/mage/abilities/common/DiesAttachedTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DiesAttachedTriggeredAbility.java @@ -70,9 +70,12 @@ public class DiesAttachedTriggeredAbility extends TriggeredAbilityImpl { Permanent attachment = game.getPermanentOrLKIBattlefield(getSourceId()); if (attachment != null && zEvent.getTargetId() != null && attachment.getAttachedTo() != null - && zEvent.getTargetId().equals(attachment.getAttachedTo()) - && attachment.getAttachedToZoneChangeCounter() == zEvent.getTarget().getZoneChangeCounter(game) - 1) { - triggered = true; + && zEvent.getTargetId().equals(attachment.getAttachedTo())) { + Permanent attachedTo = game.getPermanentOrLKIBattlefield(attachment.getAttachedTo()); + if (attachedTo != null + && attachment.getAttachedToZoneChangeCounter() == attachedTo.getZoneChangeCounter(game)) { // zoneChangeCounter is stored in Permanent + triggered = true; + } } } if (triggered) { diff --git a/Mage/src/mage/abilities/common/DiesCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesCreatureTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DiesCreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DiesCreatureTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java similarity index 89% rename from Mage/src/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java index 494c05fa7bd..1ea17bda77d 100644 --- a/Mage/src/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java @@ -49,7 +49,7 @@ public class DiesThisOrAnotherCreatureTriggeredAbility extends TriggeredAbilityI } public DiesThisOrAnotherCreatureTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter) { - super(Zone.BATTLEFIELD, effect, optional); + super(Zone.ALL, effect, optional); // Needs "ALL" if the source itself should trigger or multiple (incl. source go to grave) this.filter = filter; } @@ -70,11 +70,13 @@ public class DiesThisOrAnotherCreatureTriggeredAbility extends TriggeredAbilityI @Override public boolean isInUseableZone(Game game, MageObject source, GameEvent event) { - Permanent sourcePermanent; + Permanent sourcePermanent = null; if (game.getState().getZone(getSourceId()) == Zone.BATTLEFIELD) { sourcePermanent = game.getPermanent(getSourceId()); } else { - sourcePermanent = (Permanent) game.getLastKnownInformation(getSourceId(), Zone.BATTLEFIELD); + if (game.getShortLivingLKI(sourceId, Zone.BATTLEFIELD)) { + sourcePermanent = (Permanent) game.getLastKnownInformation(getSourceId(), Zone.BATTLEFIELD); + } } if (sourcePermanent == null) { return false; diff --git a/Mage/src/mage/abilities/common/DiesTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesTriggeredAbility.java similarity index 97% rename from Mage/src/mage/abilities/common/DiesTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DiesTriggeredAbility.java index 0efbd80e31e..04a19c3c971 100644 --- a/Mage/src/mage/abilities/common/DiesTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DiesTriggeredAbility.java @@ -89,7 +89,7 @@ public class DiesTriggeredAbility extends ZoneChangeTriggeredAbility { } } for (Effect effect : getEffects()) { - effect.setValue("diedPermanent", zEvent.getTarget()); + effect.setValue("permanentLeftBattlefield", zEvent.getTarget()); } return true; } diff --git a/Mage/src/mage/abilities/common/DiscardsACardOpponentTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiscardsACardOpponentTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DiscardsACardOpponentTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DiscardsACardOpponentTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DrawCardControllerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DrawCardControllerTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DrawCardControllerTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DrawCardControllerTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/DrawCardOpponentTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DrawCardOpponentTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/DrawCardOpponentTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/DrawCardOpponentTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/EndOfCombatTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EndOfCombatTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/EntersAnotherCreatureYourControlTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EntersAnotherCreatureYourControlTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EntersAnotherCreatureYourControlTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersAnotherCreatureYourControlTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EntersBattlefieldAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersBattlefieldAbility.java diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldControlledTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldControlledTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EntersBattlefieldControlledTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersBattlefieldControlledTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldOrDiesSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldOrDiesSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EntersBattlefieldOrDiesSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersBattlefieldOrDiesSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldTappedAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldTappedAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EntersBattlefieldTappedAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersBattlefieldTappedAbility.java diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldTriggeredAbility.java similarity index 97% rename from Mage/src/mage/abilities/common/EntersBattlefieldTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersBattlefieldTriggeredAbility.java index ddaf6be2b8a..528a8c65c10 100644 --- a/Mage/src/mage/abilities/common/EntersBattlefieldTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/EntersBattlefieldTriggeredAbility.java @@ -27,9 +27,9 @@ */ package mage.abilities.common; -import mage.constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -73,7 +73,7 @@ public class EntersBattlefieldTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - return event.getTargetId().equals(getSourceId()); + return event.getTargetId().equals(getSourceId()); } @Override @@ -81,7 +81,7 @@ public class EntersBattlefieldTriggeredAbility extends TriggeredAbilityImpl { if (noRule) { return super.getRule(); } - return (rulePrefix != null ? rulePrefix : "") + "When {this} enters the battlefield, "+ super.getRule(); + return (rulePrefix != null ? rulePrefix : "") + "When {this} enters the battlefield, " + super.getRule(); } @Override diff --git a/Mage/src/mage/abilities/common/EntersOrLeavesTheBattlefieldSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EntersOrLeavesTheBattlefieldSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/EntersOrLeavesTheBattlefieldSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/EntersOrLeavesTheBattlefieldSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/ExploitCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ExploitCreatureTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/ExploitCreatureTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/ExploitCreatureTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/FetchLandActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/FetchLandActivatedAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/FetchLandActivatedAbility.java rename to Mage/src/main/java/mage/abilities/common/FetchLandActivatedAbility.java diff --git a/Mage/src/mage/abilities/common/GainLifeControllerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/GainLifeControllerTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/GainLifeControllerTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/GainLifeControllerTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/GemstoneCavernsAbility.java b/Mage/src/main/java/mage/abilities/common/GemstoneCavernsAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/GemstoneCavernsAbility.java rename to Mage/src/main/java/mage/abilities/common/GemstoneCavernsAbility.java diff --git a/Mage/src/mage/abilities/common/LandfallAbility.java b/Mage/src/main/java/mage/abilities/common/LandfallAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/LandfallAbility.java rename to Mage/src/main/java/mage/abilities/common/LandfallAbility.java diff --git a/Mage/src/main/java/mage/abilities/common/LeavesBattlefieldTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/LeavesBattlefieldTriggeredAbility.java new file mode 100644 index 00000000000..23a867af0dd --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/LeavesBattlefieldTriggeredAbility.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.abilities.common; + +import mage.abilities.effects.Effect; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class LeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility { + + public LeavesBattlefieldTriggeredAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, null, effect, "When {this} leaves the battlefield, ", optional); + } + + public LeavesBattlefieldTriggeredAbility(LeavesBattlefieldTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (super.checkTrigger(event, game)) { + for (Effect effect : getEffects()) { + effect.setValue("permanentLeftBattlefield", ((ZoneChangeEvent) event).getTarget()); + } + return true; + } + return false; + } + + @Override + public LeavesBattlefieldTriggeredAbility copy() { + return new LeavesBattlefieldTriggeredAbility(this); + } + +} diff --git a/Mage/src/mage/abilities/common/LicidAbility.java b/Mage/src/main/java/mage/abilities/common/LicidAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/LicidAbility.java rename to Mage/src/main/java/mage/abilities/common/LicidAbility.java diff --git a/Mage/src/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java similarity index 92% rename from Mage/src/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java rename to Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java index 53d40539031..a415bb19a18 100644 --- a/Mage/src/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java @@ -71,16 +71,17 @@ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl { @Override public boolean canActivate(UUID playerId, Game game) { - if (super.canActivate(playerId, game)) { - ActivationInfo activationInfo = getActivationInfo(game); - return activationInfo == null || activationInfo.turnNum != game.getTurnNum() || activationInfo.activationCounter < maxActivationsPerTurn; - } - return false; + return super.canActivate(playerId, game) && hasMoreActivationsThisTurn(game); + } + + 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 (canActivate(this.controllerId, game)) { + if (hasMoreActivationsThisTurn(game)) { if (super.activate(game, noMana)) { ActivationInfo activationInfo = getActivationInfo(game); if (activationInfo == null) { diff --git a/Mage/src/mage/abilities/common/OnEventTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/OnEventTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/OnEventTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/OnEventTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/OpponentSacrificesPermanentTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/OpponentSacrificesPermanentTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/OpponentSacrificesPermanentTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/OpponentSacrificesPermanentTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/PassAbility.java b/Mage/src/main/java/mage/abilities/common/PassAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/PassAbility.java rename to Mage/src/main/java/mage/abilities/common/PassAbility.java diff --git a/Mage/src/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java b/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java rename to Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java diff --git a/Mage/src/mage/abilities/common/PlanswalkerEntersWithLoyalityCountersAbility.java b/Mage/src/main/java/mage/abilities/common/PlanswalkerEntersWithLoyalityCountersAbility.java similarity index 90% rename from Mage/src/mage/abilities/common/PlanswalkerEntersWithLoyalityCountersAbility.java rename to Mage/src/main/java/mage/abilities/common/PlanswalkerEntersWithLoyalityCountersAbility.java index aad230eaf2d..05e208b0815 100644 --- a/Mage/src/mage/abilities/common/PlanswalkerEntersWithLoyalityCountersAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PlanswalkerEntersWithLoyalityCountersAbility.java @@ -24,7 +24,7 @@ public class PlanswalkerEntersWithLoyalityCountersAbility extends EntersBattlefi } @Override - public EntersBattlefieldAbility copy() { + public PlanswalkerEntersWithLoyalityCountersAbility copy() { return new PlanswalkerEntersWithLoyalityCountersAbility(this); } } diff --git a/Mage/src/mage/abilities/common/PutCardIntoGraveFromAnywhereAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/PutCardIntoGraveFromAnywhereAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/PutCardIntoGraveFromAnywhereAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/PutCardIntoGraveFromAnywhereAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java rename to Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java diff --git a/Mage/src/mage/abilities/common/PutIntoGraveFromAnywhereSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceTriggeredAbility.java similarity index 96% rename from Mage/src/mage/abilities/common/PutIntoGraveFromAnywhereSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceTriggeredAbility.java index 96fae22b3b7..4a2ec10503a 100644 --- a/Mage/src/mage/abilities/common/PutIntoGraveFromAnywhereSourceTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceTriggeredAbility.java @@ -7,6 +7,7 @@ import mage.constants.Zone; * @author Loki */ public class PutIntoGraveFromAnywhereSourceTriggeredAbility extends ZoneChangeTriggeredAbility { + public PutIntoGraveFromAnywhereSourceTriggeredAbility(Effect effect, boolean optional) { super(Zone.GRAVEYARD, effect, "When {this} is put into a graveyard from anywhere, ", optional); } diff --git a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldSourceTriggeredAbility.java diff --git a/Mage/src/main/java/mage/abilities/common/SacrificeIfCastAtInstantTimeTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SacrificeIfCastAtInstantTimeTriggeredAbility.java new file mode 100644 index 00000000000..6941a1b66b1 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/SacrificeIfCastAtInstantTimeTriggeredAbility.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.abilities.common; + +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.delayed.AtTheBeginOfNextCleanupDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; + +/** + * + * @author Lonefox + */ +public class SacrificeIfCastAtInstantTimeTriggeredAbility extends TriggeredAbilityImpl { + + public SacrificeIfCastAtInstantTimeTriggeredAbility() { + super(Zone.STACK, new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new SacrificeSourceEffect()))); + } + + public SacrificeIfCastAtInstantTimeTriggeredAbility(final SacrificeIfCastAtInstantTimeTriggeredAbility ability) { + super(ability); + } + + @Override + public SacrificeIfCastAtInstantTimeTriggeredAbility copy() { + return new SacrificeIfCastAtInstantTimeTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + // The sacrifice occurs only if you cast it using its own ability. If you cast it using some other + // effect (for instance, if it gained flash from Vedalken Orrery), then it won't be sacrificed. + // CHECK + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && spell.getSourceId().equals(getSourceId())) { + return !(game.isMainPhase() && game.getActivePlayerId().equals(event.getPlayerId()) && game.getStack().size() == 1); + } + return false; + } + + @Override + public String getRule() { + return "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."; + } +} + diff --git a/Mage/src/mage/abilities/common/SacrificeSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SacrificeSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SacrificeSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/SacrificeSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/SimpleActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/SimpleActivatedAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SimpleActivatedAbility.java rename to Mage/src/main/java/mage/abilities/common/SimpleActivatedAbility.java diff --git a/Mage/src/mage/abilities/common/SimpleEvasionAbility.java b/Mage/src/main/java/mage/abilities/common/SimpleEvasionAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SimpleEvasionAbility.java rename to Mage/src/main/java/mage/abilities/common/SimpleEvasionAbility.java diff --git a/Mage/src/mage/abilities/common/SimpleStaticAbility.java b/Mage/src/main/java/mage/abilities/common/SimpleStaticAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SimpleStaticAbility.java rename to Mage/src/main/java/mage/abilities/common/SimpleStaticAbility.java diff --git a/Mage/src/mage/abilities/common/SimpleTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SimpleTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SimpleTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/SimpleTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/SkipUntapOptionalAbility.java b/Mage/src/main/java/mage/abilities/common/SkipUntapOptionalAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SkipUntapOptionalAbility.java rename to Mage/src/main/java/mage/abilities/common/SkipUntapOptionalAbility.java diff --git a/Mage/src/mage/abilities/common/SpellCastAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SpellCastAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SpellCastAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/SpellCastAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/SpellCastControllerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SpellCastControllerTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SpellCastControllerTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/SpellCastControllerTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/SpellCastOpponentTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SpellCastOpponentTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/SpellCastOpponentTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/SpellCastOpponentTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/TapForManaAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/TapForManaAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/TapForManaAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/TapForManaAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/TapForManaAllTriggeredManaAbility.java b/Mage/src/main/java/mage/abilities/common/TapForManaAllTriggeredManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/TapForManaAllTriggeredManaAbility.java rename to Mage/src/main/java/mage/abilities/common/TapForManaAllTriggeredManaAbility.java diff --git a/Mage/src/mage/abilities/common/TapLandForManaAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/TapLandForManaAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/TapLandForManaAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/TapLandForManaAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/TapLandForManaAllTriggeredManaAbility.java b/Mage/src/main/java/mage/abilities/common/TapLandForManaAllTriggeredManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/TapLandForManaAllTriggeredManaAbility.java rename to Mage/src/main/java/mage/abilities/common/TapLandForManaAllTriggeredManaAbility.java diff --git a/Mage/src/mage/abilities/common/TurnFaceUpAbility.java b/Mage/src/main/java/mage/abilities/common/TurnFaceUpAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/TurnFaceUpAbility.java rename to Mage/src/main/java/mage/abilities/common/TurnFaceUpAbility.java diff --git a/Mage/src/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/TurnedFaceUpSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/TurnedFaceUpSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/TurnedFaceUpSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/TurnedFaceUpSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/UnattachedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/UnattachedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/UnattachedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/UnattachedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/ZoneChangeAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ZoneChangeAllTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/ZoneChangeAllTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/ZoneChangeAllTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/ZoneChangeTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ZoneChangeTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/ZoneChangeTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/ZoneChangeTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfCombatDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfMainPhaseDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfMainPhaseDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheBeginOfMainPhaseDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfMainPhaseDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextCleanupDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfNextCleanupDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextCleanupDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfNextCleanupDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextUpkeepDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfNextUpkeepDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextUpkeepDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfNextUpkeepDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheEndOfCombatDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheEndOfCombatDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheEndOfCombatDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheEndOfCombatDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/AtTheEndOfTurnStepPostDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/AtTheEndOfTurnStepPostDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/AtTheEndOfTurnStepPostDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/AtTheEndOfTurnStepPostDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/OnLeaveReturnExiledToBattlefieldAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/OnLeaveReturnExiledToBattlefieldAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/OnLeaveReturnExiledToBattlefieldAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/OnLeaveReturnExiledToBattlefieldAbility.java diff --git a/Mage/src/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java diff --git a/Mage/src/mage/abilities/condition/CompoundCondition.java b/Mage/src/main/java/mage/abilities/condition/CompoundCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/CompoundCondition.java rename to Mage/src/main/java/mage/abilities/condition/CompoundCondition.java diff --git a/Mage/src/mage/abilities/condition/Condition.java b/Mage/src/main/java/mage/abilities/condition/Condition.java similarity index 100% rename from Mage/src/mage/abilities/condition/Condition.java rename to Mage/src/main/java/mage/abilities/condition/Condition.java diff --git a/Mage/src/mage/abilities/condition/FixedCondition.java b/Mage/src/main/java/mage/abilities/condition/FixedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/FixedCondition.java rename to Mage/src/main/java/mage/abilities/condition/FixedCondition.java diff --git a/Mage/src/mage/abilities/condition/IntCompareCondition.java b/Mage/src/main/java/mage/abilities/condition/IntCompareCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/IntCompareCondition.java rename to Mage/src/main/java/mage/abilities/condition/IntCompareCondition.java diff --git a/Mage/src/mage/abilities/condition/InvertCondition.java b/Mage/src/main/java/mage/abilities/condition/InvertCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/InvertCondition.java rename to Mage/src/main/java/mage/abilities/condition/InvertCondition.java diff --git a/Mage/src/mage/abilities/condition/LockedInCondition.java b/Mage/src/main/java/mage/abilities/condition/LockedInCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/LockedInCondition.java rename to Mage/src/main/java/mage/abilities/condition/LockedInCondition.java diff --git a/Mage/src/mage/abilities/condition/common/AttachedToCounterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/AttachedToCounterCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/AttachedToCounterCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/AttachedToCounterCondition.java diff --git a/Mage/src/mage/abilities/condition/common/AttachedToTappedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/AttachedToTappedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/AttachedToTappedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/AttachedToTappedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/CardsInAnyLibraryCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInAnyLibraryCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/CardsInAnyLibraryCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/CardsInAnyLibraryCondition.java diff --git a/Mage/src/mage/abilities/condition/common/CardsInControllerGraveCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInControllerGraveCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/CardsInControllerGraveCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/CardsInControllerGraveCondition.java diff --git a/Mage/src/mage/abilities/condition/common/CardsInHandCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/CardsInHandCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java diff --git a/Mage/src/mage/abilities/condition/common/CardsInOpponentGraveCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInOpponentGraveCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/CardsInOpponentGraveCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/CardsInOpponentGraveCondition.java diff --git a/Mage/src/mage/abilities/condition/common/CastFromHandCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CastFromHandCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/CastFromHandCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/CastFromHandCondition.java diff --git a/Mage/src/mage/abilities/condition/common/CommanderInPlayCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CommanderInPlayCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/CommanderInPlayCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/CommanderInPlayCondition.java diff --git a/Mage/src/mage/abilities/condition/common/ControlsCreatureGreatestPowerCondition.java b/Mage/src/main/java/mage/abilities/condition/common/ControlsCreatureGreatestPowerCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/ControlsCreatureGreatestPowerCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/ControlsCreatureGreatestPowerCondition.java diff --git a/Mage/src/mage/abilities/condition/common/ControlsCreatureGreatestToughnessCondition.java b/Mage/src/main/java/mage/abilities/condition/common/ControlsCreatureGreatestToughnessCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/ControlsCreatureGreatestToughnessCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/ControlsCreatureGreatestToughnessCondition.java diff --git a/Mage/src/mage/abilities/condition/common/DashedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/DashedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/DashedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/DashedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/DealtDamageToAnOpponent.java b/Mage/src/main/java/mage/abilities/condition/common/DealtDamageToAnOpponent.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/DealtDamageToAnOpponent.java rename to Mage/src/main/java/mage/abilities/condition/common/DealtDamageToAnOpponent.java diff --git a/Mage/src/mage/abilities/condition/common/DefendingPlayerControlsCondition.java b/Mage/src/main/java/mage/abilities/condition/common/DefendingPlayerControlsCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/DefendingPlayerControlsCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/DefendingPlayerControlsCondition.java diff --git a/Mage/src/mage/abilities/condition/common/DevouredCreaturesCondition.java b/Mage/src/main/java/mage/abilities/condition/common/DevouredCreaturesCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/DevouredCreaturesCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/DevouredCreaturesCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EnchantedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EnchantedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EnchantedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EnchantedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EnchantedCreatureColorCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EnchantedCreatureColorCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EnchantedCreatureColorCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EnchantedCreatureColorCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EnchantedTargetCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EnchantedTargetCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EnchantedTargetCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EnchantedTargetCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EquipmentAttachedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquipmentAttachedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EquipmentAttachedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EquipmentAttachedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EquippedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EquippedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EquippedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EquippedHasSubtypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSubtypeCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EquippedHasSubtypeCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EquippedHasSubtypeCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EquippedHasSupertypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EquippedHasSupertypeCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EquippedMatchesFilterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedMatchesFilterCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EquippedMatchesFilterCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EquippedMatchesFilterCondition.java diff --git a/Mage/src/mage/abilities/condition/common/EvokedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EvokedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/EvokedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/EvokedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/FaceDownSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/FaceDownSourceCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/FaceDownSourceCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/FaceDownSourceCondition.java diff --git a/Mage/src/mage/abilities/condition/common/FatefulHourCondition.java b/Mage/src/main/java/mage/abilities/condition/common/FatefulHourCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/FatefulHourCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/FatefulHourCondition.java diff --git a/Mage/src/mage/abilities/condition/common/FerociousCondition.java b/Mage/src/main/java/mage/abilities/condition/common/FerociousCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/FerociousCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/FerociousCondition.java diff --git a/Mage/src/mage/abilities/condition/common/FlippedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/FlippedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/FlippedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/FlippedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/FormidableCondition.java b/Mage/src/main/java/mage/abilities/condition/common/FormidableCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/FormidableCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/FormidableCondition.java diff --git a/Mage/src/mage/abilities/condition/common/HellbentCondition.java b/Mage/src/main/java/mage/abilities/condition/common/HellbentCondition.java similarity index 93% rename from Mage/src/mage/abilities/condition/common/HellbentCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/HellbentCondition.java index 598c207fd4d..842e960e508 100644 --- a/Mage/src/mage/abilities/condition/common/HellbentCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/HellbentCondition.java @@ -43,4 +43,9 @@ public class HellbentCondition implements Condition { public boolean apply(Game game, Ability source) { return game.getPlayer(source.getControllerId()).getHand().size() == 0; } + + @Override + public String toString() { + return "if you have no cards in hand"; + } } diff --git a/Mage/src/mage/abilities/condition/common/IsPhaseCondition.java b/Mage/src/main/java/mage/abilities/condition/common/IsPhaseCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/IsPhaseCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/IsPhaseCondition.java diff --git a/Mage/src/mage/abilities/condition/common/IsStepCondition.java b/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/IsStepCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java diff --git a/Mage/src/mage/abilities/condition/common/KickedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/KickedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/KickedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/KickedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/KickedCostCondition.java b/Mage/src/main/java/mage/abilities/condition/common/KickedCostCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/KickedCostCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/KickedCostCondition.java diff --git a/Mage/src/mage/abilities/condition/common/LandfallCondition.java b/Mage/src/main/java/mage/abilities/condition/common/LandfallCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/LandfallCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/LandfallCondition.java diff --git a/Mage/src/mage/abilities/condition/common/LastTimeCounterRemovedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/LastTimeCounterRemovedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/LastTimeCounterRemovedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/LastTimeCounterRemovedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/ManaWasSpentCondition.java b/Mage/src/main/java/mage/abilities/condition/common/ManaWasSpentCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/ManaWasSpentCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/ManaWasSpentCondition.java diff --git a/Mage/src/mage/abilities/condition/common/MetalcraftCondition.java b/Mage/src/main/java/mage/abilities/condition/common/MetalcraftCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/MetalcraftCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/MetalcraftCondition.java diff --git a/Mage/src/mage/abilities/condition/common/ModeChoiceSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/ModeChoiceSourceCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/ModeChoiceSourceCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/ModeChoiceSourceCondition.java diff --git a/Mage/src/mage/abilities/condition/common/MonstrousCondition.java b/Mage/src/main/java/mage/abilities/condition/common/MonstrousCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/MonstrousCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/MonstrousCondition.java diff --git a/Mage/src/mage/abilities/condition/common/MorbidCondition.java b/Mage/src/main/java/mage/abilities/condition/common/MorbidCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/MorbidCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/MorbidCondition.java diff --git a/Mage/src/mage/abilities/condition/common/MyMainPhaseCondition.java b/Mage/src/main/java/mage/abilities/condition/common/MyMainPhaseCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/MyMainPhaseCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/MyMainPhaseCondition.java diff --git a/Mage/src/mage/abilities/condition/common/MyTurnBeforeAttackersDeclaredCondition.java b/Mage/src/main/java/mage/abilities/condition/common/MyTurnBeforeAttackersDeclaredCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/MyTurnBeforeAttackersDeclaredCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/MyTurnBeforeAttackersDeclaredCondition.java diff --git a/Mage/src/mage/abilities/condition/common/MyTurnCondition.java b/Mage/src/main/java/mage/abilities/condition/common/MyTurnCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/MyTurnCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/MyTurnCondition.java diff --git a/Mage/src/mage/abilities/condition/common/NoControlledCreatureCondition.java b/Mage/src/main/java/mage/abilities/condition/common/NoControlledCreatureCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/NoControlledCreatureCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/NoControlledCreatureCondition.java diff --git a/Mage/src/mage/abilities/condition/common/NoCreatureCondition.java b/Mage/src/main/java/mage/abilities/condition/common/NoCreatureCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/NoCreatureCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/NoCreatureCondition.java diff --git a/Mage/src/mage/abilities/condition/common/NoCreatureOpponentCondition.java b/Mage/src/main/java/mage/abilities/condition/common/NoCreatureOpponentCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/NoCreatureOpponentCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/NoCreatureOpponentCondition.java diff --git a/Mage/src/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java b/Mage/src/main/java/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/NoSpellsWereCastLastTurnCondition.java diff --git a/Mage/src/mage/abilities/condition/common/NotMyTurnCondition.java b/Mage/src/main/java/mage/abilities/condition/common/NotMyTurnCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/NotMyTurnCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/NotMyTurnCondition.java diff --git a/Mage/src/mage/abilities/condition/common/OneControlledCreatureCondition.java b/Mage/src/main/java/mage/abilities/condition/common/OneControlledCreatureCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/OneControlledCreatureCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/OneControlledCreatureCondition.java diff --git a/Mage/src/mage/abilities/condition/common/OpponentControlsMoreCondition.java b/Mage/src/main/java/mage/abilities/condition/common/OpponentControlsMoreCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/OpponentControlsMoreCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/OpponentControlsMoreCondition.java diff --git a/Mage/src/mage/abilities/condition/common/OpponentControlsPermanentCondition.java b/Mage/src/main/java/mage/abilities/condition/common/OpponentControlsPermanentCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/OpponentControlsPermanentCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/OpponentControlsPermanentCondition.java diff --git a/Mage/src/mage/abilities/condition/common/OpponentLostLifeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/OpponentLostLifeCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/OpponentLostLifeCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/OpponentLostLifeCondition.java diff --git a/Mage/src/mage/abilities/condition/common/PermanentHasCounterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/PermanentHasCounterCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/PermanentHasCounterCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/PermanentHasCounterCondition.java diff --git a/Mage/src/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java b/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java diff --git a/Mage/src/mage/abilities/condition/common/ProwlCondition.java b/Mage/src/main/java/mage/abilities/condition/common/ProwlCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/ProwlCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/ProwlCondition.java diff --git a/Mage/src/mage/abilities/condition/common/RaidCondition.java b/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/RaidCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java diff --git a/Mage/src/mage/abilities/condition/common/RenownedSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/RenownedSourceCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/RenownedSourceCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/RenownedSourceCondition.java diff --git a/Mage/src/mage/abilities/condition/common/RenownedTargetCondition.java b/Mage/src/main/java/mage/abilities/condition/common/RenownedTargetCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/RenownedTargetCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/RenownedTargetCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceAttackingCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceAttackingCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceAttackingCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceAttackingCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceDealtDamageCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceDealtDamageCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceDealtDamageCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceDealtDamageCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceHasCounterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceHasCounterCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceHasCounterCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceHasCounterCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceHasSubtypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceHasSubtypeCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceHasSubtypeCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceHasSubtypeCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceIsSpellCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceIsSpellCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceIsSpellCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceIsSpellCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceMatchesFilterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceMatchesFilterCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceMatchesFilterCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceOnBattlefieldCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceOnBattlefieldCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceOnBattlefieldCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceOnBattlefieldCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceOnBattlefieldControlUnchangedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceOnBattlefieldControlUnchangedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceOnBattlefieldControlUnchangedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceOnBattlefieldControlUnchangedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SourceTappedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceTappedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SourceTappedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SourceTappedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SpellMasteryCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SpellMasteryCondition.java diff --git a/Mage/src/mage/abilities/condition/common/SuspendedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SuspendedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/SuspendedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/SuspendedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/TargetHasSubtypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/TargetHasSubtypeCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/TargetHasSubtypeCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/TargetHasSubtypeCondition.java diff --git a/Mage/src/mage/abilities/condition/common/TenOrLessLifeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/TenOrLessLifeCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/TenOrLessLifeCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/TenOrLessLifeCondition.java diff --git a/Mage/src/mage/abilities/condition/common/TopLibraryCardTypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/TopLibraryCardTypeCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/TopLibraryCardTypeCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/TopLibraryCardTypeCondition.java diff --git a/Mage/src/mage/abilities/condition/common/TransformedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/TransformedCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/TransformedCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/TransformedCondition.java diff --git a/Mage/src/mage/abilities/condition/common/TributeNotPaidCondition.java b/Mage/src/main/java/mage/abilities/condition/common/TributeNotPaidCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/TributeNotPaidCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/TributeNotPaidCondition.java diff --git a/Mage/src/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java b/Mage/src/main/java/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java similarity index 100% rename from Mage/src/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java rename to Mage/src/main/java/mage/abilities/condition/common/TwoOrMoreSpellsWereCastLastTurnCondition.java diff --git a/Mage/src/mage/abilities/costs/AbilityCosts.java b/Mage/src/main/java/mage/abilities/costs/AbilityCosts.java similarity index 100% rename from Mage/src/mage/abilities/costs/AbilityCosts.java rename to Mage/src/main/java/mage/abilities/costs/AbilityCosts.java diff --git a/Mage/src/mage/abilities/costs/AdjustingSourceCosts.java b/Mage/src/main/java/mage/abilities/costs/AdjustingSourceCosts.java similarity index 100% rename from Mage/src/mage/abilities/costs/AdjustingSourceCosts.java rename to Mage/src/main/java/mage/abilities/costs/AdjustingSourceCosts.java diff --git a/Mage/src/mage/abilities/costs/AlternativeCost.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/AlternativeCost.java rename to Mage/src/main/java/mage/abilities/costs/AlternativeCost.java diff --git a/Mage/src/mage/abilities/costs/AlternativeCost2.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCost2.java similarity index 100% rename from Mage/src/mage/abilities/costs/AlternativeCost2.java rename to Mage/src/main/java/mage/abilities/costs/AlternativeCost2.java diff --git a/Mage/src/mage/abilities/costs/AlternativeCost2Impl.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCost2Impl.java similarity index 100% rename from Mage/src/mage/abilities/costs/AlternativeCost2Impl.java rename to Mage/src/main/java/mage/abilities/costs/AlternativeCost2Impl.java diff --git a/Mage/src/mage/abilities/costs/AlternativeCostImpl.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCostImpl.java similarity index 100% rename from Mage/src/mage/abilities/costs/AlternativeCostImpl.java rename to Mage/src/main/java/mage/abilities/costs/AlternativeCostImpl.java diff --git a/Mage/src/mage/abilities/costs/AlternativeCostSourceAbility.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java similarity index 100% rename from Mage/src/mage/abilities/costs/AlternativeCostSourceAbility.java rename to Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java diff --git a/Mage/src/mage/abilities/costs/AlternativeSourceCosts.java b/Mage/src/main/java/mage/abilities/costs/AlternativeSourceCosts.java similarity index 100% rename from Mage/src/mage/abilities/costs/AlternativeSourceCosts.java rename to Mage/src/main/java/mage/abilities/costs/AlternativeSourceCosts.java diff --git a/Mage/src/mage/abilities/costs/CompositeCost.java b/Mage/src/main/java/mage/abilities/costs/CompositeCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/CompositeCost.java rename to Mage/src/main/java/mage/abilities/costs/CompositeCost.java diff --git a/Mage/src/mage/abilities/costs/Cost.java b/Mage/src/main/java/mage/abilities/costs/Cost.java similarity index 100% rename from Mage/src/mage/abilities/costs/Cost.java rename to Mage/src/main/java/mage/abilities/costs/Cost.java diff --git a/Mage/src/mage/abilities/costs/CostImpl.java b/Mage/src/main/java/mage/abilities/costs/CostImpl.java similarity index 100% rename from Mage/src/mage/abilities/costs/CostImpl.java rename to Mage/src/main/java/mage/abilities/costs/CostImpl.java diff --git a/Mage/src/mage/abilities/costs/Costs.java b/Mage/src/main/java/mage/abilities/costs/Costs.java similarity index 100% rename from Mage/src/mage/abilities/costs/Costs.java rename to Mage/src/main/java/mage/abilities/costs/Costs.java diff --git a/Mage/src/mage/abilities/costs/CostsImpl.java b/Mage/src/main/java/mage/abilities/costs/CostsImpl.java similarity index 100% rename from Mage/src/mage/abilities/costs/CostsImpl.java rename to Mage/src/main/java/mage/abilities/costs/CostsImpl.java diff --git a/Mage/src/mage/abilities/costs/DynamicCost.java b/Mage/src/main/java/mage/abilities/costs/DynamicCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/DynamicCost.java rename to Mage/src/main/java/mage/abilities/costs/DynamicCost.java diff --git a/Mage/src/mage/abilities/costs/OptionalAdditionalCost.java b/Mage/src/main/java/mage/abilities/costs/OptionalAdditionalCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/OptionalAdditionalCost.java rename to Mage/src/main/java/mage/abilities/costs/OptionalAdditionalCost.java diff --git a/Mage/src/mage/abilities/costs/OptionalAdditionalCostImpl.java b/Mage/src/main/java/mage/abilities/costs/OptionalAdditionalCostImpl.java similarity index 100% rename from Mage/src/mage/abilities/costs/OptionalAdditionalCostImpl.java rename to Mage/src/main/java/mage/abilities/costs/OptionalAdditionalCostImpl.java diff --git a/Mage/src/mage/abilities/costs/OptionalAdditionalModeSourceCosts.java b/Mage/src/main/java/mage/abilities/costs/OptionalAdditionalModeSourceCosts.java similarity index 100% rename from Mage/src/mage/abilities/costs/OptionalAdditionalModeSourceCosts.java rename to Mage/src/main/java/mage/abilities/costs/OptionalAdditionalModeSourceCosts.java diff --git a/Mage/src/mage/abilities/costs/OptionalAdditionalSourceCosts.java b/Mage/src/main/java/mage/abilities/costs/OptionalAdditionalSourceCosts.java similarity index 100% rename from Mage/src/mage/abilities/costs/OptionalAdditionalSourceCosts.java rename to Mage/src/main/java/mage/abilities/costs/OptionalAdditionalSourceCosts.java diff --git a/Mage/src/mage/abilities/costs/OrCost.java b/Mage/src/main/java/mage/abilities/costs/OrCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/OrCost.java rename to Mage/src/main/java/mage/abilities/costs/OrCost.java diff --git a/Mage/src/mage/abilities/costs/VariableCost.java b/Mage/src/main/java/mage/abilities/costs/VariableCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/VariableCost.java rename to Mage/src/main/java/mage/abilities/costs/VariableCost.java diff --git a/Mage/src/mage/abilities/costs/VariableCostImpl.java b/Mage/src/main/java/mage/abilities/costs/VariableCostImpl.java similarity index 100% rename from Mage/src/mage/abilities/costs/VariableCostImpl.java rename to Mage/src/main/java/mage/abilities/costs/VariableCostImpl.java diff --git a/Mage/src/mage/abilities/costs/common/ControlPermanentCost.java b/Mage/src/main/java/mage/abilities/costs/common/ControlPermanentCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ControlPermanentCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ControlPermanentCost.java diff --git a/Mage/src/mage/abilities/costs/common/DiscardCardCost.java b/Mage/src/main/java/mage/abilities/costs/common/DiscardCardCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/DiscardCardCost.java rename to Mage/src/main/java/mage/abilities/costs/common/DiscardCardCost.java diff --git a/Mage/src/mage/abilities/costs/common/DiscardHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/DiscardHandCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/DiscardHandCost.java rename to Mage/src/main/java/mage/abilities/costs/common/DiscardHandCost.java diff --git a/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/DiscardSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/DiscardSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/DiscardSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/DiscardTargetCost.java similarity index 95% rename from Mage/src/mage/abilities/costs/common/DiscardTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/DiscardTargetCost.java index c62ecfc3953..da388060961 100644 --- a/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/DiscardTargetCost.java @@ -59,9 +59,7 @@ public class DiscardTargetCost extends CostImpl { public DiscardTargetCost(DiscardTargetCost cost) { super(cost); - for (Card card : cost.cards) { - this.cards.add(card.copy()); - } + this.cards.addAll(cost.cards); this.randomDiscard = cost.randomDiscard; } @@ -84,7 +82,7 @@ public class DiscardTargetCost extends CostImpl { return false; } player.discard(card, ability, game); - this.cards.add(card.copy()); + this.cards.add(card); } } } @@ -96,7 +94,7 @@ public class DiscardTargetCost extends CostImpl { public void clearPaid() { super.clearPaid(); this.cards.clear(); - this.targets.clear(); + this.targets.clearChosen(); } @Override diff --git a/Mage/src/mage/abilities/costs/common/DiscardXTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/DiscardXTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/DiscardXTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/DiscardXTargetCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileFromGraveCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileFromGraveCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileFromHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileFromHandCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileFromStackCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromStackCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileFromStackCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileFromStackCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileOpponentsCardFromExileToGraveyardCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileOpponentsCardFromExileToGraveyardCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileOpponentsCardFromExileToGraveyardCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileOpponentsCardFromExileToGraveyardCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileSourceFromGraveCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileSourceFromGraveCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileSourceFromGraveCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileSourceFromGraveCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileTopCardOfGraveyardCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileTopCardOfGraveyardCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileTopCardOfGraveyardCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileTopCardOfGraveyardCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileTopCreatureCardOfGraveyardCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileTopCreatureCardOfGraveyardCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileTopCreatureCardOfGraveyardCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileTopCreatureCardOfGraveyardCost.java diff --git a/Mage/src/mage/abilities/costs/common/ExileXFromYourGraveCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileXFromYourGraveCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ExileXFromYourGraveCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ExileXFromYourGraveCost.java diff --git a/Mage/src/mage/abilities/costs/common/GainLifeOpponentCost.java b/Mage/src/main/java/mage/abilities/costs/common/GainLifeOpponentCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/GainLifeOpponentCost.java rename to Mage/src/main/java/mage/abilities/costs/common/GainLifeOpponentCost.java diff --git a/Mage/src/mage/abilities/costs/common/GainLifePlayersCost.java b/Mage/src/main/java/mage/abilities/costs/common/GainLifePlayersCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/GainLifePlayersCost.java rename to Mage/src/main/java/mage/abilities/costs/common/GainLifePlayersCost.java diff --git a/Mage/src/mage/abilities/costs/common/PayLifeCost.java b/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/PayLifeCost.java rename to Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java diff --git a/Mage/src/mage/abilities/costs/common/PayLoyaltyCost.java b/Mage/src/main/java/mage/abilities/costs/common/PayLoyaltyCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/PayLoyaltyCost.java rename to Mage/src/main/java/mage/abilities/costs/common/PayLoyaltyCost.java diff --git a/Mage/src/mage/abilities/costs/common/PayVariableLifeCost.java b/Mage/src/main/java/mage/abilities/costs/common/PayVariableLifeCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/PayVariableLifeCost.java rename to Mage/src/main/java/mage/abilities/costs/common/PayVariableLifeCost.java diff --git a/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java b/Mage/src/main/java/mage/abilities/costs/common/PayVariableLoyaltyCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java rename to Mage/src/main/java/mage/abilities/costs/common/PayVariableLoyaltyCost.java diff --git a/Mage/src/mage/abilities/costs/common/PutCountersSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/PutCountersSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/PutCountersSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/PutCountersSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java b/Mage/src/main/java/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java rename to Mage/src/main/java/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java diff --git a/Mage/src/mage/abilities/costs/common/RemoveCounterCost.java b/Mage/src/main/java/mage/abilities/costs/common/RemoveCounterCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/RemoveCounterCost.java rename to Mage/src/main/java/mage/abilities/costs/common/RemoveCounterCost.java diff --git a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/RemoveCountersSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/RemoveCountersSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/RemoveVariableCountersSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/RemoveVariableCountersSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/RemoveVariableCountersSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/RemoveVariableCountersSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/RemoveVariableCountersTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/RemoveVariableCountersTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/RemoveVariableCountersTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/RemoveVariableCountersTargetCost.java diff --git a/Mage/src/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java b/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java diff --git a/Mage/src/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java b/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java diff --git a/Mage/src/mage/abilities/costs/common/ReturnToHandSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/ReturnToHandSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/ReturnToHandSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/RevealHandSourceControllerCost.java b/Mage/src/main/java/mage/abilities/costs/common/RevealHandSourceControllerCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/RevealHandSourceControllerCost.java rename to Mage/src/main/java/mage/abilities/costs/common/RevealHandSourceControllerCost.java diff --git a/Mage/src/mage/abilities/costs/common/RevealSourceFromYourHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/RevealSourceFromYourHandCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/RevealSourceFromYourHandCost.java rename to Mage/src/main/java/mage/abilities/costs/common/RevealSourceFromYourHandCost.java diff --git a/Mage/src/mage/abilities/costs/common/RevealTargetFromHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/RevealTargetFromHandCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/RevealTargetFromHandCost.java rename to Mage/src/main/java/mage/abilities/costs/common/RevealTargetFromHandCost.java diff --git a/Mage/src/mage/abilities/costs/common/SacrificeAllCost.java b/Mage/src/main/java/mage/abilities/costs/common/SacrificeAllCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/SacrificeAllCost.java rename to Mage/src/main/java/mage/abilities/costs/common/SacrificeAllCost.java diff --git a/Mage/src/mage/abilities/costs/common/SacrificeSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/SacrificeSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/SacrificeSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/SacrificeSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/SacrificeTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/SacrificeTargetCost.java diff --git a/Mage/src/mage/abilities/costs/common/SacrificeXTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/SacrificeXTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/SacrificeXTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/SacrificeXTargetCost.java diff --git a/Mage/src/mage/abilities/costs/common/TapSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/TapSourceCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/TapSourceCost.java rename to Mage/src/main/java/mage/abilities/costs/common/TapSourceCost.java diff --git a/Mage/src/mage/abilities/costs/common/TapTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/TapTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/TapTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/TapTargetCost.java diff --git a/Mage/src/mage/abilities/costs/common/TapVariableTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/TapVariableTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/TapVariableTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/TapVariableTargetCost.java diff --git a/Mage/src/main/java/mage/abilities/costs/common/UntapSourceCost.java b/Mage/src/main/java/mage/abilities/costs/common/UntapSourceCost.java new file mode 100644 index 00000000000..8c28bce5b52 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/costs/common/UntapSourceCost.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.CostImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author Plopman + */ +public class UntapSourceCost extends CostImpl { + + public UntapSourceCost() { + this.text = "{Q}"; + } + + public UntapSourceCost(UntapSourceCost cost) { + super(cost); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent permanent = game.getPermanent(sourceId); + if (permanent != null) { + paid = permanent.untap(game); + } + return paid; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Permanent permanent = game.getPermanent(sourceId); + if (permanent != null) { + return permanent.isTapped() && !permanent.hasSummoningSickness(); + } + return false; + } + + @Override + public UntapSourceCost copy() { + return new UntapSourceCost(this); + } +} diff --git a/Mage/src/mage/abilities/costs/common/UntapTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/common/UntapTargetCost.java rename to Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java diff --git a/Mage/src/mage/abilities/costs/mana/AlternateManaPaymentAbility.java b/Mage/src/main/java/mage/abilities/costs/mana/AlternateManaPaymentAbility.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/AlternateManaPaymentAbility.java rename to Mage/src/main/java/mage/abilities/costs/mana/AlternateManaPaymentAbility.java diff --git a/Mage/src/mage/abilities/costs/mana/ColoredManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/ColoredManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/ColoredManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/ColoredManaCost.java diff --git a/Mage/src/mage/abilities/costs/mana/GenericManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/GenericManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/GenericManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/GenericManaCost.java diff --git a/Mage/src/mage/abilities/costs/mana/HybridManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/HybridManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/HybridManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/HybridManaCost.java diff --git a/Mage/src/mage/abilities/costs/mana/ManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/ManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/ManaCost.java diff --git a/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java similarity index 88% rename from Mage/src/mage/abilities/costs/mana/ManaCostImpl.java rename to Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java index c33e0f5799b..c87f2c0be5c 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java @@ -118,31 +118,31 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost { switch (mana) { case B: if (pool.pay(ManaType.BLACK, ability, sourceFilter, game)) { - this.payment.addBlack(); + this.payment.increaseBlack(); return true; } break; case U: if (pool.pay(ManaType.BLUE, ability, sourceFilter, game)) { - this.payment.addBlue(); + this.payment.increaseBlue(); return true; } break; case W: if (pool.pay(ManaType.WHITE, ability, sourceFilter, game)) { - this.payment.addWhite(); + this.payment.increaseWhite(); return true; } break; case G: if (pool.pay(ManaType.GREEN, ability, sourceFilter, game)) { - this.payment.addGreen(); + this.payment.increaseGreen(); return true; } break; case R: if (pool.pay(ManaType.RED, ability, sourceFilter, game)) { - this.payment.addRed(); + this.payment.increaseRed(); return true; } break; @@ -154,27 +154,27 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost { int conditionalCount = pool.getConditionalCount(ability, game, null); while (mana > payment.count() && (pool.count() > 0 || conditionalCount > 0)) { if (pool.pay(ManaType.COLORLESS, ability, sourceFilter, game)) { - this.payment.addColorless(); + this.payment.increaseColorless(); continue; } if (pool.pay(ManaType.BLACK, ability, sourceFilter, game)) { - this.payment.addBlack(); + this.payment.increaseBlack(); continue; } if (pool.pay(ManaType.BLUE, ability, sourceFilter, game)) { - this.payment.addBlue(); + this.payment.increaseBlue(); continue; } if (pool.pay(ManaType.WHITE, ability, sourceFilter, game)) { - this.payment.addWhite(); + this.payment.increaseWhite(); continue; } if (pool.pay(ManaType.GREEN, ability, sourceFilter, game)) { - this.payment.addGreen(); + this.payment.increaseGreen(); continue; } if (pool.pay(ManaType.RED, ability, sourceFilter, game)) { - this.payment.addRed(); + this.payment.increaseRed(); continue; } break; @@ -242,19 +242,19 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost { protected void addColoredOption(ColoredManaSymbol symbol) { switch (symbol) { case B: - this.options.add(Mana.BlackMana); + this.options.add(Mana.BlackMana(1)); break; case U: - this.options.add(Mana.BlueMana); + this.options.add(Mana.BlueMana(1)); break; case W: - this.options.add(Mana.WhiteMana); + this.options.add(Mana.WhiteMana(1)); break; case R: - this.options.add(Mana.RedMana); + this.options.add(Mana.RedMana(1)); break; case G: - this.options.add(Mana.GreenMana); + this.options.add(Mana.GreenMana(1)); break; } } diff --git a/Mage/src/mage/abilities/costs/mana/ManaCosts.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCosts.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/ManaCosts.java rename to Mage/src/main/java/mage/abilities/costs/mana/ManaCosts.java diff --git a/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java similarity index 96% rename from Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java rename to Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java index ac056ba437a..08d189c601d 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -67,12 +67,12 @@ public class ManaCostsImpl extends ArrayList implements M public ManaCostsImpl(final ManaCostsImpl costs) { this.id = costs.id; for (T cost : costs) { - this.add((T) cost.copy()); + this.add(cost.copy()); } } @Override - public boolean add(ManaCost cost) { + public final boolean add(ManaCost cost) { if (cost instanceof ManaCosts) { for (ManaCost manaCost : (ManaCosts) cost) { super.add((T) manaCost); @@ -298,7 +298,7 @@ public class ManaCostsImpl extends ArrayList implements M } @Override - public void load(String mana) { + public final void load(String mana) { this.clear(); if (costs.containsKey(mana)) { ManaCosts savedCosts = costs.get(mana); @@ -317,7 +317,10 @@ public class ManaCostsImpl extends ArrayList implements M if (Character.isDigit(symbol.charAt(0))) { this.add((T) new GenericManaCost(Integer.valueOf(symbol))); } else { - if (!symbol.equals("X")) { + if(symbol.equals("S")) { + this.add((T) new SnowManaCost()); + } + else if (!symbol.equals("X")) { this.add((T) new ColoredManaCost(ColoredManaSymbol.lookup(symbol.charAt(0)))); } else { // check X wasn't added before @@ -334,9 +337,7 @@ public class ManaCostsImpl extends ArrayList implements M //TODO: handle multiple {X} and/or {Y} symbols } } else { - if (symbol.equals("snow")) { - this.add((T) new SnowManaCost()); - } else if (Character.isDigit(symbol.charAt(0))) { + if (Character.isDigit(symbol.charAt(0))) { this.add((T) new MonoHybridManaCost(ColoredManaSymbol.lookup(symbol.charAt(2)))); } else if (symbol.contains("P")) { this.add((T) new PhyrexianManaCost(ColoredManaSymbol.lookup(symbol.charAt(0)))); @@ -433,7 +434,7 @@ public class ManaCostsImpl extends ArrayList implements M @Override public boolean isPaid() { for (T cost : this) { - if (!((T) cost instanceof VariableManaCost) && !cost.isPaid()) { + if (!(cost instanceof VariableManaCost) && !cost.isPaid()) { return false; } } @@ -465,7 +466,7 @@ public class ManaCostsImpl extends ArrayList implements M @Override public ManaCosts copy() { - return new ManaCostsImpl(this); + return new ManaCostsImpl<>(this); } @Override diff --git a/Mage/src/mage/abilities/costs/mana/ManaSymbols.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaSymbols.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/ManaSymbols.java rename to Mage/src/main/java/mage/abilities/costs/mana/ManaSymbols.java diff --git a/Mage/src/mage/abilities/costs/mana/MonoHybridManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/MonoHybridManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/MonoHybridManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/MonoHybridManaCost.java diff --git a/Mage/src/mage/abilities/costs/mana/PhyrexianManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/PhyrexianManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/PhyrexianManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/PhyrexianManaCost.java diff --git a/Mage/src/mage/abilities/costs/mana/SnowManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/SnowManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/SnowManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/SnowManaCost.java diff --git a/Mage/src/mage/abilities/costs/mana/VariableManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/VariableManaCost.java similarity index 100% rename from Mage/src/mage/abilities/costs/mana/VariableManaCost.java rename to Mage/src/main/java/mage/abilities/costs/mana/VariableManaCost.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalActivatedAbility.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalAsThoughEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalAsThoughEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalAsThoughEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalAsThoughEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalContinuousEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalContinuousEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalContinuousEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalContinuousEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalContinuousRuleModifyingEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalContinuousRuleModifyingEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalContinuousRuleModifyingEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalContinuousRuleModifyingEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalGainActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalGainActivatedAbility.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalManaEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalManaEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalManaEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalManaEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalOneShotEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalOneShotEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalOneShotEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalOneShotEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalReplacementEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalReplacementEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalReplacementEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalReplacementEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalRequirementEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalRequirementEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalRequirementEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalRequirementEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalRestrictionEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalRestrictionEffect.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalRestrictionEffect.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalRestrictionEffect.java diff --git a/Mage/src/mage/abilities/decorator/ConditionalTriggeredAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/decorator/ConditionalTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java diff --git a/Mage/src/mage/abilities/dynamicvalue/DynamicValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/DynamicValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/DynamicValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/DynamicValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/IntPlusDynamicValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/IntPlusDynamicValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/IntPlusDynamicValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/IntPlusDynamicValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/MultipliedValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/MultipliedValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/MultipliedValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/MultipliedValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/AttackingCreatureCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AttackingCreatureCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/AttackingCreatureCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/AttackingCreatureCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/AuraAttachedCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/AuraAttachedCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/AuraAttachedCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/AuraAttachedCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CardsInAllGraveyardsCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllGraveyardsCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/CardsInAllGraveyardsCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllGraveyardsCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInAllHandsCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CardsInControllerGraveyardCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerGraveyardCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/CardsInControllerGraveyardCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerGraveyardCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java similarity index 92% rename from Mage/src/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java index 71e9836cb8a..476057003c4 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java @@ -1,36 +1,36 @@ -package mage.abilities.dynamicvalue.common; - -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.effects.Effect; -import mage.game.Game; -import mage.players.Player; - -public class CardsInControllerHandCount implements DynamicValue { - - @Override - public int calculate(Game game, Ability sourceAbility, Effect effect) { - if (sourceAbility != null) { - Player controller = game.getPlayer(sourceAbility.getControllerId()); - if (controller != null) { - return controller.getHand().size(); - } - } - return 0; - } - - @Override - public CardsInControllerHandCount copy() { - return new CardsInControllerHandCount(); - } - - @Override - public String getMessage() { - return "card in your hand"; - } - - @Override - public String toString() { - return "1"; - } -} +package mage.abilities.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.players.Player; + +public class CardsInControllerHandCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + if (sourceAbility != null) { + Player controller = game.getPlayer(sourceAbility.getControllerId()); + if (controller != null) { + return controller.getHand().size(); + } + } + return 0; + } + + @Override + public CardsInControllerHandCount copy() { + return new CardsInControllerHandCount(); + } + + @Override + public String getMessage() { + return "cards in your hand"; + } + + @Override + public String toString() { + return "1"; + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayerHandCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ColorsOfManaSpentToCastCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ControllerGotLifeCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerGotLifeCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ControllerGotLifeCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerGotLifeCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ControllerLifeCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerLifeCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ControllerLifeCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ControllerLifeCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CountersCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CountersCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/CountersCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CountersCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesDiedThisTurnCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/DevotionCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DevotionCount.java similarity index 92% rename from Mage/src/mage/abilities/dynamicvalue/common/DevotionCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/DevotionCount.java index fd8edb3ebe5..8036e623e81 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/DevotionCount.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DevotionCount.java @@ -55,12 +55,12 @@ public class DevotionCount implements DynamicValue { @Override public String toString() { - return "put a number of"; + return "X"; } @Override public String getMessage() { - StringBuilder sb = new StringBuilder("devotion to "); + StringBuilder sb = new StringBuilder("your devotion to "); int count = 0; for (ColoredManaSymbol coloredManaSymbol : devotionColors) { if (count > 0) { diff --git a/Mage/src/mage/abilities/dynamicvalue/common/DevouredCreaturesCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DevouredCreaturesCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/DevouredCreaturesCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/DevouredCreaturesCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/DiscardCostCardConvertedMana.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/DomainValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DomainValue.java similarity index 91% rename from Mage/src/mage/abilities/dynamicvalue/common/DomainValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/DomainValue.java index 06c0efeef47..9470119c0d6 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/DomainValue.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/DomainValue.java @@ -53,11 +53,10 @@ public class DomainValue implements DynamicValue { int haveSwamps = 0; int haveForests = 0; UUID targetPlayer; - if(playerId != null) { + if (playerId != null) { targetPlayer = playerId; - } - else if(countTargetPlayer) { - targetPlayer = sourceAbility.getTargets().getFirstTarget(); + } else if (countTargetPlayer) { + targetPlayer = effect.getTargetPointer().getFirst(game, sourceAbility); } else { targetPlayer = sourceAbility.getControllerId(); } diff --git a/Mage/src/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/EquipmentAttachedCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ExileFromHandCostCardConvertedMana.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/GetXValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GetXValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/GetXValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/GetXValue.java diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/HighestConvertedManaCostValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/HighestConvertedManaCostValue.java new file mode 100644 index 00000000000..0acf8d10df0 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/HighestConvertedManaCostValue.java @@ -0,0 +1,47 @@ +package mage.abilities.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author nigelzor + */ +public class HighestConvertedManaCostValue implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int highCMC = 0; + Player controller = game.getPlayer(sourceAbility.getControllerId()); + if (controller != null) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { + if (permanent.getSpellAbility() != null) { + int cmc = permanent.getSpellAbility().getManaCosts().convertedManaCost(); + if (cmc > highCMC) { + highCMC = cmc; + } + } + } + } + return highCMC; + } + + @Override + public DynamicValue copy() { + return new HighestConvertedManaCostValue(); + } + + @Override + public String getMessage() { + return "the highest converted mana cost among permanents you control"; + } + + @Override + public String toString() { + return "X"; + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaSpentToCastCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ManaTypeInManaPoolCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaTypeInManaPoolCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ManaTypeInManaPoolCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ManaTypeInManaPoolCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ManacostVariableValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ManacostVariableValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ManacostVariableValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ManacostVariableValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/MorphManacostVariableValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/MultikickerCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/MultikickerCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/MultikickerCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/MultikickerCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/NumericSetToEffectValues.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/NumericSetToEffectValues.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/NumericSetToEffectValues.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/NumericSetToEffectValues.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ParleyCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/ParleyCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/ParleyCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/ParleyCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsTargetOpponentControlsCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/PermanentsYouOwnThatOpponentsControlCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/RemovedCountersForCostValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/RevealTargetFromHandCostCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SacrificeCostConvertedMana.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostConvertedMana.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SacrificeCostConvertedMana.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostConvertedMana.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesPower.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SacrificeCostCreaturesToughness.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SourcePermanentPowerCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SourcePermanentPowerCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SourcePermanentPowerCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SourcePermanentPowerCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SourcePermanentToughnessValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SourcePermanentToughnessValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SourcePermanentToughnessValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SourcePermanentToughnessValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/StaticValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/StaticValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SunburstCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SunburstCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SunburstCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SunburstCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SweepNumber.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/SweepNumber.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/SweepNumber.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/SweepNumber.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetConvertedManaCost.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/TargetPermanenToughnessValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanenToughnessValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/TargetPermanenToughnessValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanenToughnessValue.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/TargetPermanentPowerCount.java diff --git a/Mage/src/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java similarity index 100% rename from Mage/src/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java rename to Mage/src/main/java/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java diff --git a/Mage/src/mage/abilities/effects/ApplyCountersEffect.java b/Mage/src/main/java/mage/abilities/effects/ApplyCountersEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/ApplyCountersEffect.java rename to Mage/src/main/java/mage/abilities/effects/ApplyCountersEffect.java diff --git a/Mage/src/mage/abilities/effects/AsThoughEffect.java b/Mage/src/main/java/mage/abilities/effects/AsThoughEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/AsThoughEffect.java rename to Mage/src/main/java/mage/abilities/effects/AsThoughEffect.java diff --git a/Mage/src/mage/abilities/effects/AsThoughEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/AsThoughEffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/AsThoughEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/AsThoughEffectImpl.java diff --git a/Mage/src/mage/abilities/effects/AsThoughManaEffect.java b/Mage/src/main/java/mage/abilities/effects/AsThoughManaEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/AsThoughManaEffect.java rename to Mage/src/main/java/mage/abilities/effects/AsThoughManaEffect.java diff --git a/Mage/src/mage/abilities/effects/AsTurnedFaceUpEffect.java b/Mage/src/main/java/mage/abilities/effects/AsTurnedFaceUpEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/AsTurnedFaceUpEffect.java rename to Mage/src/main/java/mage/abilities/effects/AsTurnedFaceUpEffect.java diff --git a/Mage/src/mage/abilities/effects/AuraReplacementEffect.java b/Mage/src/main/java/mage/abilities/effects/AuraReplacementEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/AuraReplacementEffect.java rename to Mage/src/main/java/mage/abilities/effects/AuraReplacementEffect.java diff --git a/Mage/src/mage/abilities/effects/ContinuousEffect.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/ContinuousEffect.java rename to Mage/src/main/java/mage/abilities/effects/ContinuousEffect.java diff --git a/Mage/src/mage/abilities/effects/ContinuousEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/ContinuousEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/ContinuousEffectImpl.java diff --git a/Mage/src/mage/abilities/effects/ContinuousEffects.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java similarity index 99% rename from Mage/src/mage/abilities/effects/ContinuousEffects.java rename to Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java index 2f35dbd4901..6d6c73d06d4 100644 --- a/Mage/src/mage/abilities/effects/ContinuousEffects.java +++ b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java @@ -82,7 +82,7 @@ import org.apache.log4j.Logger; */ public class ContinuousEffects implements Serializable { - private static final transient Logger logger = Logger.getLogger(ContinuousEffects.class); + private static final Logger logger = Logger.getLogger(ContinuousEffects.class); private long order = 0; @@ -388,7 +388,9 @@ public class ContinuousEffects implements Serializable { // for replacment effects of static abilities do not use LKI to check if to apply if (ability.getAbilityType() != AbilityType.STATIC || ability.isInUseableZone(game, null, event)) { if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) { - if (!game.getScopeRelevant() || effect.hasSelfScope() || !event.getTargetId().equals(ability.getSourceId())) { + if (!game.getScopeRelevant() + || effect.hasSelfScope() + || !event.getTargetId().equals(ability.getSourceId())) { if (effect.applies(event, ability, game)) { applicableAbilities.add(ability); } @@ -985,6 +987,12 @@ public class ContinuousEffects implements Serializable { } layer = filterLayeredEffects(activeLayerEffects, Layer.PTChangingEffects_7); + for (ContinuousEffect effect : layer) { + HashSet abilities = layeredEffects.getAbility(effect.getId()); + for (Ability ability : abilities) { + effect.apply(Layer.PTChangingEffects_7, SubLayer.CharacteristicDefining_7a, ability, game); + } + } for (ContinuousEffect effect : layer) { HashSet abilities = layeredEffects.getAbility(effect.getId()); for (Ability ability : abilities) { diff --git a/Mage/src/mage/abilities/effects/ContinuousEffectsList.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffectsList.java similarity index 100% rename from Mage/src/mage/abilities/effects/ContinuousEffectsList.java rename to Mage/src/main/java/mage/abilities/effects/ContinuousEffectsList.java diff --git a/Mage/src/mage/abilities/effects/ContinuousRuleModifyingEffect.java b/Mage/src/main/java/mage/abilities/effects/ContinuousRuleModifyingEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/ContinuousRuleModifyingEffect.java rename to Mage/src/main/java/mage/abilities/effects/ContinuousRuleModifyingEffect.java diff --git a/Mage/src/mage/abilities/effects/ContinuousRuleModifyingEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/ContinuousRuleModifyingEffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/ContinuousRuleModifyingEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/ContinuousRuleModifyingEffectImpl.java diff --git a/Mage/src/mage/abilities/effects/CostModificationEffect.java b/Mage/src/main/java/mage/abilities/effects/CostModificationEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/CostModificationEffect.java rename to Mage/src/main/java/mage/abilities/effects/CostModificationEffect.java diff --git a/Mage/src/mage/abilities/effects/Effect.java b/Mage/src/main/java/mage/abilities/effects/Effect.java similarity index 100% rename from Mage/src/mage/abilities/effects/Effect.java rename to Mage/src/main/java/mage/abilities/effects/Effect.java diff --git a/Mage/src/mage/abilities/effects/EffectImpl.java b/Mage/src/main/java/mage/abilities/effects/EffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/EffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/EffectImpl.java diff --git a/Mage/src/mage/abilities/effects/Effects.java b/Mage/src/main/java/mage/abilities/effects/Effects.java similarity index 98% rename from Mage/src/mage/abilities/effects/Effects.java rename to Mage/src/main/java/mage/abilities/effects/Effects.java index 0dff8f53322..36a78daa694 100644 --- a/Mage/src/mage/abilities/effects/Effects.java +++ b/Mage/src/main/java/mage/abilities/effects/Effects.java @@ -89,7 +89,7 @@ public class Effects extends ArrayList { !lastRule.endsWith("\"") && !lastRule.startsWith("Level ") && !lastRule.endsWith(".)") && - !lastRule.endsWith("") ) { + !lastRule.endsWith("") ) { sbText.append("."); } return sbText.toString(); diff --git a/Mage/src/mage/abilities/effects/EntersBattlefieldEffect.java b/Mage/src/main/java/mage/abilities/effects/EntersBattlefieldEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/EntersBattlefieldEffect.java rename to Mage/src/main/java/mage/abilities/effects/EntersBattlefieldEffect.java diff --git a/Mage/src/mage/abilities/effects/OneShotEffect.java b/Mage/src/main/java/mage/abilities/effects/OneShotEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/OneShotEffect.java rename to Mage/src/main/java/mage/abilities/effects/OneShotEffect.java diff --git a/Mage/src/mage/abilities/effects/PayCostToAttackBlockEffect.java b/Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/PayCostToAttackBlockEffect.java rename to Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffect.java diff --git a/Mage/src/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java diff --git a/Mage/src/mage/abilities/effects/PlaneswalkerRedirectionEffect.java b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java similarity index 96% rename from Mage/src/mage/abilities/effects/PlaneswalkerRedirectionEffect.java rename to Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java index 7f2ee3c504d..e435a88f4c4 100644 --- a/Mage/src/mage/abilities/effects/PlaneswalkerRedirectionEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java @@ -109,6 +109,7 @@ public class PlaneswalkerRedirectionEffect extends RedirectionEffect { if (permanent != null) { return permanent.getControllerId(); } - return null; + // for effects like Deflecting Palm (could be wrong if card was played multiple times by different players) + return game.getContinuousEffects().getControllerOfSourceId(sourceId); } } diff --git a/Mage/src/mage/abilities/effects/PreventionEffect.java b/Mage/src/main/java/mage/abilities/effects/PreventionEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/PreventionEffect.java rename to Mage/src/main/java/mage/abilities/effects/PreventionEffect.java diff --git a/Mage/src/mage/abilities/effects/PreventionEffectData.java b/Mage/src/main/java/mage/abilities/effects/PreventionEffectData.java similarity index 100% rename from Mage/src/mage/abilities/effects/PreventionEffectData.java rename to Mage/src/main/java/mage/abilities/effects/PreventionEffectData.java diff --git a/Mage/src/mage/abilities/effects/PreventionEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/PreventionEffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/PreventionEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/PreventionEffectImpl.java diff --git a/Mage/src/mage/abilities/effects/PutTokenOntoBattlefieldCopySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/PutTokenOntoBattlefieldCopySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/PutTokenOntoBattlefieldCopySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/PutTokenOntoBattlefieldCopySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/RedirectionEffect.java b/Mage/src/main/java/mage/abilities/effects/RedirectionEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/RedirectionEffect.java rename to Mage/src/main/java/mage/abilities/effects/RedirectionEffect.java diff --git a/Mage/src/mage/abilities/effects/ReplacementEffect.java b/Mage/src/main/java/mage/abilities/effects/ReplacementEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/ReplacementEffect.java rename to Mage/src/main/java/mage/abilities/effects/ReplacementEffect.java diff --git a/Mage/src/mage/abilities/effects/ReplacementEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/ReplacementEffectImpl.java similarity index 52% rename from Mage/src/mage/abilities/effects/ReplacementEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/ReplacementEffectImpl.java index a0c22083815..9d77944003c 100644 --- a/Mage/src/mage/abilities/effects/ReplacementEffectImpl.java +++ b/Mage/src/main/java/mage/abilities/effects/ReplacementEffectImpl.java @@ -1,31 +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. -*/ - + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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 mage.abilities.Ability; @@ -50,13 +49,19 @@ public abstract class ReplacementEffectImpl extends ContinuousEffectImpl impleme // the resolution of spells or abilities that changed the permanent's characteristics on the stack // (see rule 400.7a), and continuous effects from the permanent's own static abilities, but ignoring // continuous effects from any other source that would affect it. - protected boolean selfScope; public ReplacementEffectImpl(Duration duration, Outcome outcome) { this(duration, outcome, true); } + /** + * + * @param duration + * @param outcome + * @param selfScope - is only relevant while permanents entering the + * battlefield events + */ public ReplacementEffectImpl(Duration duration, Outcome outcome, boolean selfScope) { super(duration, outcome); this.effectType = EffectType.REPLACEMENT; diff --git a/Mage/src/mage/abilities/effects/RequirementEffect.java b/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/RequirementEffect.java rename to Mage/src/main/java/mage/abilities/effects/RequirementEffect.java diff --git a/Mage/src/mage/abilities/effects/RestrictionEffect.java b/Mage/src/main/java/mage/abilities/effects/RestrictionEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/RestrictionEffect.java rename to Mage/src/main/java/mage/abilities/effects/RestrictionEffect.java diff --git a/Mage/src/mage/abilities/effects/RestrictionUntapNotMoreThanEffect.java b/Mage/src/main/java/mage/abilities/effects/RestrictionUntapNotMoreThanEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/RestrictionUntapNotMoreThanEffect.java rename to Mage/src/main/java/mage/abilities/effects/RestrictionUntapNotMoreThanEffect.java diff --git a/Mage/src/mage/abilities/effects/SearchEffect.java b/Mage/src/main/java/mage/abilities/effects/SearchEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/SearchEffect.java rename to Mage/src/main/java/mage/abilities/effects/SearchEffect.java diff --git a/Mage/src/mage/abilities/effects/SpliceCardEffect.java b/Mage/src/main/java/mage/abilities/effects/SpliceCardEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/SpliceCardEffect.java rename to Mage/src/main/java/mage/abilities/effects/SpliceCardEffect.java diff --git a/Mage/src/mage/abilities/effects/SpliceCardEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/SpliceCardEffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/SpliceCardEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/SpliceCardEffectImpl.java diff --git a/Mage/src/mage/abilities/effects/WhileConditionContinuousEffect.java b/Mage/src/main/java/mage/abilities/effects/WhileConditionContinuousEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/WhileConditionContinuousEffect.java rename to Mage/src/main/java/mage/abilities/effects/WhileConditionContinuousEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddConditionalManaEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddConditionalManaEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddContinuousEffectToGame.java b/Mage/src/main/java/mage/abilities/effects/common/AddContinuousEffectToGame.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddContinuousEffectToGame.java rename to Mage/src/main/java/mage/abilities/effects/common/AddContinuousEffectToGame.java diff --git a/Mage/src/mage/abilities/effects/common/AddManaAnyColorAttachedControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddManaAnyColorAttachedControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddManaAnyColorAttachedControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddManaAnyColorAttachedControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddManaInAnyCombinationEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddManaInAnyCombinationEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddManaInAnyCombinationEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddManaInAnyCombinationEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddManaOfAnyColorEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddManaOfAnyColorEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddManaOfAnyTypeProducedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddManaOfAnyTypeProducedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddManaOfAnyTypeProducedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddManaOfAnyTypeProducedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddManaToManaPoolSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddManaToManaPoolSourceControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddManaToManaPoolSourceControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddManaToManaPoolSourceControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AddManaToManaPoolTargetControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddManaToManaPoolTargetControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AddManaToManaPoolTargetControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AddManaToManaPoolTargetControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AffinityEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AffinityEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AffinityEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AffinityEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AmplifyEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AmplifyEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AmplifyEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AmplifyEffect.java diff --git a/Mage/src/mage/abilities/effects/common/AttachEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AttachEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/AttachEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/AttachEffect.java diff --git a/Mage/src/mage/abilities/effects/common/BasicManaEffect.java b/Mage/src/main/java/mage/abilities/effects/common/BasicManaEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/BasicManaEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/BasicManaEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantActivateAbilitiesAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantActivateAbilitiesAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantActivateAbilitiesAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantActivateAbilitiesAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantBeCounteredControlledEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredControlledEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantBeCounteredControlledEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredControlledEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantBeCounteredSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantBeCounteredSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantBeCounteredSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantBeRegeneratedTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantBeRegeneratedTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantBeTargetedAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantBeTargetedAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantBeTargetedAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantBeTargetedAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantBeTargetedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantBeTargetedSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CantBeTargetedTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CantBeTargetedTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CantBeTargetedTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CastCardFromOutsideTheGameEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CastCardFromOutsideTheGameEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CastCardFromOutsideTheGameEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CastCardFromOutsideTheGameEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CastSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CastSourceTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java diff --git a/Mage/src/mage/abilities/effects/common/ChangeATargetOfTargetSpellAbilityToSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChangeATargetOfTargetSpellAbilityToSourceEffect.java similarity index 94% rename from Mage/src/mage/abilities/effects/common/ChangeATargetOfTargetSpellAbilityToSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChangeATargetOfTargetSpellAbilityToSourceEffect.java index e660cd19671..d332b7ac6cd 100644 --- a/Mage/src/mage/abilities/effects/common/ChangeATargetOfTargetSpellAbilityToSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChangeATargetOfTargetSpellAbilityToSourceEffect.java @@ -8,6 +8,7 @@ package mage.abilities.effects.common; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; import mage.game.Game; @@ -50,9 +51,8 @@ public class ChangeATargetOfTargetSpellAbilityToSourceEffect extends OneShotEffe } else { return false; } - for (UUID modeId : sourceAbility.getModes().getSelectedModes()) { - sourceAbility.getModes().setActiveMode(modeId); - targets.addAll(sourceAbility.getTargets()); + for (Mode mode : sourceAbility.getModes().getSelectedModes()) { + targets.addAll(mode.getTargets()); } boolean twoTimesTarget = false; diff --git a/Mage/src/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java similarity index 81% rename from Mage/src/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java index 5d73e8dd40e..9aa16ac8c56 100644 --- a/Mage/src/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java @@ -8,6 +8,7 @@ package mage.abilities.effects.common; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; +import mage.choices.ChoiceBasicLandType; import mage.choices.ChoiceImpl; import mage.constants.Outcome; import mage.game.Game; @@ -45,14 +46,7 @@ public class ChooseBasicLandTypeEffect extends OneShotEffect { mageObject = game.getObject(source.getSourceId()); } if (controller != null && mageObject != null) { - ChoiceImpl choices = new ChoiceImpl(true); - choices.setMessage("Choose basic land type"); - choices.isRequired(); - choices.getChoices().add("Forest"); - choices.getChoices().add("Plains"); - choices.getChoices().add("Mountain"); - choices.getChoices().add("Island"); - choices.getChoices().add("Swamp"); + ChoiceImpl choices = new ChoiceBasicLandType(); if (controller.choose(Outcome.Neutral, choices, game)) { game.informPlayers(mageObject.getName() + ": Chosen basic land type is " + choices.getChoice()); game.getState().setValue(mageObject.getId().toString() + VALUE_KEY, choices.getChoice()); diff --git a/Mage/src/mage/abilities/effects/common/ChooseColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseColorEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ChooseColorEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseColorEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ChooseCreatureTypeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseCreatureTypeEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ChooseCreatureTypeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseCreatureTypeEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ChooseLandTypeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseLandTypeEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ChooseLandTypeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseLandTypeEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ChooseModeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseModeEffect.java similarity index 89% rename from Mage/src/mage/abilities/effects/common/ChooseModeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseModeEffect.java index 796f3e7fce7..bdfac9f3216 100644 --- a/Mage/src/mage/abilities/effects/common/ChooseModeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseModeEffect.java @@ -69,6 +69,9 @@ public class ChooseModeEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + if (sourcePermanent == null) { + sourcePermanent = game.getPermanentEntering(source.getSourceId()); + } if (controller != null) { Choice choice = new ChoiceImpl(true); choice.setMessage(choiceMessage); @@ -80,8 +83,9 @@ public class ChooseModeEffect extends OneShotEffect { controller.choose(Outcome.Neutral, choice, game); } if (choice.isChosen()) { - if (!game.isSimulation()) - game.informPlayers(new StringBuilder(sourcePermanent.getLogName()).append(": ").append(controller.getLogName()).append(" has chosen ").append(choice.getChoice()).toString()); + if (!game.isSimulation()) { + game.informPlayers(sourcePermanent.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); + } game.getState().setValue(source.getSourceId() + "_modeChoice", choice.getChoice()); sourcePermanent.addInfo("_modeChoice", "Chosen mode: " + choice.getChoice() + "", game); } @@ -93,7 +97,7 @@ public class ChooseModeEffect extends OneShotEffect { private String setText() { StringBuilder sb = new StringBuilder("choose "); int count = 0; - for (String choice: modes) { + for (String choice : modes) { count++; sb.append(choice); if (count + 1 < modes.size()) { diff --git a/Mage/src/mage/abilities/effects/common/ChooseNewTargetsTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseNewTargetsTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ChooseNewTargetsTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseNewTargetsTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ChooseOpponentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseOpponentEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ChooseOpponentEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseOpponentEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ChoosePlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChoosePlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ChoosePlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChoosePlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CipherEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CipherEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CipherEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CipherEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ClashEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ClashEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ClashEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ClashEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ClashWinReturnToHandSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ClashWinReturnToHandSpellEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ClashWinReturnToHandSpellEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ClashWinReturnToHandSpellEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CopyEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CopyEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CopyEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CopyEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CopyPermanentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CopyPermanentEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CopyPermanentEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CopyPermanentEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CopyTargetSpellEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CopyTargetSpellEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CopyTokenEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CopyTokenEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CopyTokenEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CopyTokenEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CounterTargetAndSearchGraveyardHandLibraryEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CounterTargetAndSearchGraveyardHandLibraryEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CounterTargetAndSearchGraveyardHandLibraryEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CounterTargetAndSearchGraveyardHandLibraryEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CounterTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CounterTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CounterTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CounterTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CounterTargetWithReplacementEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CounterTargetWithReplacementEffect.java similarity index 79% rename from Mage/src/mage/abilities/effects/common/CounterTargetWithReplacementEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CounterTargetWithReplacementEffect.java index 01e36d989b4..5a9a0485f59 100644 --- a/Mage/src/mage/abilities/effects/common/CounterTargetWithReplacementEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CounterTargetWithReplacementEffect.java @@ -27,17 +27,12 @@ */ package mage.abilities.effects.common; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.stack.Spell; -import mage.game.stack.StackObject; import mage.players.Player; /** @@ -77,20 +72,9 @@ public class CounterTargetWithReplacementEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - UUID objectId = source.getFirstTarget(); - UUID sourceId = source.getSourceId(); Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - StackObject stackObject = game.getStack().getStackObject(objectId); - if (stackObject != null && !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) { - if (stackObject instanceof Spell) { - controller.moveCards((Card) stackObject, null, targetZone, source, game); - } else { - game.getStack().remove(stackObject); - } - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId())); - return true; - } + return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, targetZone, false, flag); } return false; } diff --git a/Mage/src/mage/abilities/effects/common/CounterUnlessPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java similarity index 99% rename from Mage/src/mage/abilities/effects/common/CounterUnlessPaysEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java index be63142eb3e..585d8a8118e 100644 --- a/Mage/src/mage/abilities/effects/common/CounterUnlessPaysEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java @@ -122,7 +122,7 @@ public class CounterUnlessPaysEffect extends OneShotEffect { sb.append("{X}"); } if (genericMana != null && !genericMana.getMessage().isEmpty()) { - sb.append(", where X is your "); + sb.append(", where X is "); sb.append(genericMana.getMessage()); } return sb.toString(); diff --git a/Mage/src/mage/abilities/effects/common/CreateDelayedTriggeredAbilityEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateDelayedTriggeredAbilityEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CreateDelayedTriggeredAbilityEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CreateDelayedTriggeredAbilityEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CreateSpecialActionEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateSpecialActionEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CreateSpecialActionEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CreateSpecialActionEffect.java diff --git a/Mage/src/mage/abilities/effects/common/CreateTokenEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java similarity index 89% rename from Mage/src/mage/abilities/effects/common/CreateTokenEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java index 00c9dbd3a35..5b61e675d22 100644 --- a/Mage/src/mage/abilities/effects/common/CreateTokenEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenEffect.java @@ -29,12 +29,10 @@ package mage.abilities.effects.common; import java.util.ArrayList; import java.util.UUID; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.token.Token; @@ -52,7 +50,6 @@ public class CreateTokenEffect extends OneShotEffect { private boolean attacking; private UUID lastAddedTokenId; private ArrayList lastAddedTokenIds = new ArrayList<>(); - private boolean expansionSetCodeChecked; public CreateTokenEffect(Token token) { this(token, new StaticValue(1)); @@ -76,7 +73,6 @@ public class CreateTokenEffect extends OneShotEffect { this.amount = amount.copy(); this.tapped = tapped; this.attacking = attacking; - this.expansionSetCodeChecked = false; setText(); } @@ -88,7 +84,6 @@ public class CreateTokenEffect extends OneShotEffect { this.attacking = effect.attacking; this.lastAddedTokenId = effect.lastAddedTokenId; this.lastAddedTokenIds.addAll(effect.lastAddedTokenIds); - this.expansionSetCodeChecked = effect.expansionSetCodeChecked; } @Override @@ -98,9 +93,6 @@ public class CreateTokenEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - if (!expansionSetCodeChecked) { - updateExpansionSetCode(game, source); - } int value = amount.calculate(game, source, this); token.putOntoBattlefield(value, game, source.getSourceId(), source.getControllerId(), tapped, attacking); this.lastAddedTokenId = token.getLastAddedToken(); @@ -108,14 +100,6 @@ public class CreateTokenEffect extends OneShotEffect { return true; } - private void updateExpansionSetCode(Game game, Ability source) { - MageObject sourceObject = source.getSourceObject(game); - if (sourceObject instanceof Card) { - token.setExpansionSetCodeForImage(((Card) sourceObject).getExpansionSetCode()); - } - expansionSetCodeChecked = true; - } - public UUID getLastAddedTokenId() { return lastAddedTokenId; } diff --git a/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageAttachedControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAttachedControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageAttachedControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageAttachedControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageEachOtherEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageEachOtherEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageEachOtherEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageEachOtherEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageEverythingEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageEverythingEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageMultiEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageMultiEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageMultiEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamagePlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamagePlayersEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageSelfEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageSelfEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageSelfEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageSelfEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageTargetControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageTargetControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageTargetControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DamageTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DestroyAllControlledTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyAllControlledTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DestroyAllControlledTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DestroyAllControlledTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DestroyAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DestroyAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DestroyAllNamedPermanentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyAllNamedPermanentsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DestroyAllNamedPermanentsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DestroyAllNamedPermanentsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DestroyAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DestroyAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DestroyAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DestroyMultiTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyMultiTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DestroyMultiTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DestroyMultiTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DestroySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DestroySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DestroySourceEffect.java diff --git a/Mage/src/main/java/mage/abilities/effects/common/DestroyTargetAtBeginningOfNextEndStepEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyTargetAtBeginningOfNextEndStepEffect.java new file mode 100644 index 00000000000..02bb9967730 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/DestroyTargetAtBeginningOfNextEndStepEffect.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.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.Outcome; +import mage.game.Game; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LoneFox + */ +public class DestroyTargetAtBeginningOfNextEndStepEffect extends OneShotEffect { + + public DestroyTargetAtBeginningOfNextEndStepEffect() { + super(Outcome.Detriment); + this.staticText = "Destroy that creature at the beginning of the next end step"; + } + + public DestroyTargetAtBeginningOfNextEndStepEffect(final DestroyTargetAtBeginningOfNextEndStepEffect effect) { + super(effect); + } + + @Override + public DestroyTargetAtBeginningOfNextEndStepEffect copy() { + return new DestroyTargetAtBeginningOfNextEndStepEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + DestroyTargetEffect effect = new DestroyTargetEffect(); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } +} diff --git a/Mage/src/mage/abilities/effects/common/DestroyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DestroyTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DestroyTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DetainAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DetainAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DetainAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DetainAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DetainTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DetainTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DetainTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DetainTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DevourEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DevourEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DevourEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DevourEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DiscardOntoBattlefieldEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DiscardOntoBattlefieldEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DiscardOntoBattlefieldEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DiscardOntoBattlefieldEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DoIfClashWonEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DoIfClashWonEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DoIfClashWonEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DoIfClashWonEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java b/Mage/src/main/java/mage/abilities/effects/common/DoIfCostPaid.java similarity index 85% rename from Mage/src/mage/abilities/effects/common/DoIfCostPaid.java rename to Mage/src/main/java/mage/abilities/effects/common/DoIfCostPaid.java index 2d33c3d7484..e16c66de7bb 100644 --- a/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DoIfCostPaid.java @@ -18,16 +18,22 @@ public class DoIfCostPaid extends OneShotEffect { protected Effects executingEffects = new Effects(); private final Cost cost; private String chooseUseText; + private boolean optional; public DoIfCostPaid(Effect effect, Cost cost) { this(effect, cost, null); } public DoIfCostPaid(Effect effect, Cost cost, String chooseUseText) { + this(effect, cost, chooseUseText, true); + } + + public DoIfCostPaid(Effect effect, Cost cost, String chooseUseText, boolean optional) { super(Outcome.Benefit); this.executingEffects.add(effect); this.cost = cost; this.chooseUseText = chooseUseText; + this.optional = optional; } public DoIfCostPaid(final DoIfCostPaid effect) { @@ -35,6 +41,7 @@ public class DoIfCostPaid extends OneShotEffect { this.executingEffects = effect.executingEffects.copy(); this.cost = effect.cost.copy(); this.chooseUseText = effect.chooseUseText; + this.optional = effect.optional; } public void addEffect(Effect effect) { @@ -59,7 +66,8 @@ public class DoIfCostPaid extends OneShotEffect { } message = CardUtil.replaceSourceName(message, mageObject.getLogName()); boolean result = true; - if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffects.get(0).getOutcome(), message, source, game)) { + if (cost.canPay(source, source.getSourceId(), player.getId(), game) + && (optional && player.chooseUse(executingEffects.get(0).getOutcome(), message, source, game))) { cost.clearPaid(); if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) { for (Effect effect : executingEffects) { @@ -70,7 +78,7 @@ public class DoIfCostPaid extends OneShotEffect { game.addEffect((ContinuousEffect) effect, source); } } - player.resetStoredBookmark(game); // otherwise you can undo card drawn with Mentor of the Meek + player.resetStoredBookmark(game); // otherwise you can e.g. undo card drawn with Mentor of the Meek } } return result; @@ -87,7 +95,7 @@ public class DoIfCostPaid extends OneShotEffect { if (!staticText.isEmpty()) { return staticText; } - return "you may " + getCostText() + ". If you do, " + executingEffects.getText(mode); + return (optional ? "you may " : "") + getCostText() + ". If you do, " + executingEffects.getText(mode); } protected String getCostText() { diff --git a/Mage/src/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DoUnlessAnyPlayerPaysEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DontUntapAsLongAsSourceTappedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DontUntapAsLongAsSourceTappedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DontUntapAsLongAsSourceTappedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DontUntapAsLongAsSourceTappedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersNextUntapStepSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersNextUntapStepSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepEnchantedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepEnchantedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepEnchantedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DontUntapInControllersUntapStepTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DontUntapInControllersUntapStepTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DrawCardAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawCardAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DrawCardAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DrawCardAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DrawCardSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawCardSourceControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DrawCardSourceControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DrawCardSourceControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DrawCardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawCardTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DrawCardTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DrawCardTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DrawDiscardControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawDiscardControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DrawDiscardControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DrawDiscardControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DrawDiscardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawDiscardTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/DrawDiscardTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DrawDiscardTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DynamicManaEffect.java similarity index 95% rename from Mage/src/mage/abilities/effects/common/DynamicManaEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/DynamicManaEffect.java index d6f5cf01087..6d6cc7597a7 100644 --- a/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DynamicManaEffect.java @@ -154,15 +154,15 @@ public class DynamicManaEffect extends BasicManaEffect { } } if (choiceColor.getColor().isBlack()) { - computedMana.addBlack(); + computedMana.increaseBlack(); } else if (choiceColor.getColor().isBlue()) { - computedMana.addBlue(); + computedMana.increaseBlue(); } else if (choiceColor.getColor().isRed()) { - computedMana.addRed(); + computedMana.increaseRed(); } else if (choiceColor.getColor().isGreen()) { - computedMana.addGreen(); + computedMana.increaseGreen(); } else if (choiceColor.getColor().isWhite()) { - computedMana.addWhite(); + computedMana.increaseWhite(); } if (!oneChoice) { choiceColor.clearChoice(); diff --git a/Mage/src/mage/abilities/effects/common/EndTurnEffect.java b/Mage/src/main/java/mage/abilities/effects/common/EndTurnEffect.java similarity index 97% rename from Mage/src/mage/abilities/effects/common/EndTurnEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/EndTurnEffect.java index 2a5608c0f73..09dc3eb79af 100644 --- a/Mage/src/mage/abilities/effects/common/EndTurnEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/EndTurnEffect.java @@ -36,7 +36,7 @@ public class EndTurnEffect extends OneShotEffect { public EndTurnEffect() { super(Outcome.Detriment); - staticText = "End the turn (Exile all spells and abilities on the stack. Discard down to your maximum hand size. Damage wears off, and \"this turn\" and \"until end of turn\" effects end.)"; + staticText = "End the turn (Exile all spells and abilities on the stack. Discard down to your maximum hand size. Damage wears off, and \"this turn\" and \"until end of turn\" effects end.)"; } public EndTurnEffect(EndTurnEffect effect) { diff --git a/Mage/src/mage/abilities/effects/common/EnterBattlefieldPayCostOrPutGraveyardEffect.java b/Mage/src/main/java/mage/abilities/effects/common/EnterBattlefieldPayCostOrPutGraveyardEffect.java similarity index 57% rename from Mage/src/mage/abilities/effects/common/EnterBattlefieldPayCostOrPutGraveyardEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/EnterBattlefieldPayCostOrPutGraveyardEffect.java index f485ee25c02..e4b3e481310 100644 --- a/Mage/src/mage/abilities/effects/common/EnterBattlefieldPayCostOrPutGraveyardEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/EnterBattlefieldPayCostOrPutGraveyardEffect.java @@ -1,31 +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. -*/ - + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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; @@ -45,13 +44,12 @@ import mage.players.Player; * * @author LevelX2 */ - public class EnterBattlefieldPayCostOrPutGraveyardEffect extends ReplacementEffectImpl { private final Cost cost; public EnterBattlefieldPayCostOrPutGraveyardEffect(Cost cost) { - super(Duration.WhileOnBattlefield, Outcome.PutCardInPlay); + super(Duration.EndOfGame, Outcome.PutCardInPlay); this.cost = cost; staticText = "If {this} would enter the battlefield, " + cost.getText() + " instead. If you do, put {this} onto the battlefield. If you don't, put it into its owner's graveyard"; } @@ -75,7 +73,7 @@ public class EnterBattlefieldPayCostOrPutGraveyardEffect extends ReplacementEffe public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - if (player != null && cost != null && sourceObject != null){ + if (player != null && cost != null && sourceObject != null) { boolean replace = true; if (cost.canPay(source, source.getSourceId(), player.getId(), game)) { if (player.chooseUse(outcome, cost.getText() + "? (otherwise " + sourceObject.getLogName() + " is put into graveyard)", source, game)) { @@ -86,7 +84,7 @@ public class EnterBattlefieldPayCostOrPutGraveyardEffect extends ReplacementEffe if (replace) { Card card = game.getCard(event.getTargetId()); if (card != null) { - player.moveCards(card, game.getState().getZone(event.getTargetId()), Zone.GRAVEYARD, source, game); + player.moveCards(card, Zone.GRAVEYARD, source, game); } return true; } @@ -103,7 +101,7 @@ public class EnterBattlefieldPayCostOrPutGraveyardEffect extends ReplacementEffe public boolean applies(GameEvent event, Ability source, Game game) { if (source.getSourceId().equals(event.getTargetId())) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - if(zEvent.getToZone().equals(Zone.BATTLEFIELD)){ + if (zEvent.getToZone().equals(Zone.BATTLEFIELD)) { return true; } } diff --git a/Mage/src/mage/abilities/effects/common/EntersBattlefieldWithXCountersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/EntersBattlefieldWithXCountersEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/EntersBattlefieldWithXCountersEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/EntersBattlefieldWithXCountersEffect.java diff --git a/Mage/src/mage/abilities/effects/common/EnvoyEffect.java b/Mage/src/main/java/mage/abilities/effects/common/EnvoyEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/EnvoyEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/EnvoyEffect.java diff --git a/Mage/src/mage/abilities/effects/common/EpicEffect.java b/Mage/src/main/java/mage/abilities/effects/common/EpicEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/EpicEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/EpicEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java similarity index 83% rename from Mage/src/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java index 72874fb2fd0..6f3170a0700 100644 --- a/Mage/src/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAndReturnTransformedSourceEffect.java @@ -61,12 +61,11 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect { Permanent sourceObject = game.getPermanent(source.getSourceId()); Player controller = game.getPlayer(source.getControllerId()); if (sourceObject != null && controller != null && sourceObject.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter()) { - Card card = (Card) sourceObject; - if (controller.moveCards(card, Zone.BATTLEFIELD, Zone.EXILED, source, game)) { - Player owner = game.getPlayer(card.getOwnerId()); - if (owner != null) { - game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE); - owner.moveCards(card, Zone.BATTLEFIELD, source, game); + if (controller.moveCards(sourceObject, Zone.EXILED, source, game)) { + game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE); + Card cardFromExile = game.getCard(source.getSourceId()); + if (cardFromExile != null) { + controller.moveCards(cardFromExile, Zone.BATTLEFIELD, source, game, false, false, true, null); if (additionalEffect != null) { if (additionalEffect instanceof ContinuousEffect) { game.addEffect((ContinuousEffect) additionalEffect, source); diff --git a/Mage/src/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileCardFromOwnGraveyardControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileCardYouChooseTargetOpponentEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileFromZoneTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileFromZoneTargetEffect.java similarity index 90% rename from Mage/src/mage/abilities/effects/common/ExileFromZoneTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileFromZoneTargetEffect.java index 654c49ea41e..97ecc487a04 100644 --- a/Mage/src/mage/abilities/effects/common/ExileFromZoneTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileFromZoneTargetEffect.java @@ -30,7 +30,7 @@ package mage.abilities.effects.common; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; +import mage.cards.CardsImpl; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; @@ -91,16 +91,11 @@ public class ExileFromZoneTargetEffect extends OneShotEffect { default: } if (target != null && target.canChoose(source.getSourceId(), player.getId(), game)) { - if (target.choose(Outcome.Exile, player.getId(), source.getSourceId(), game)) { - for (UUID cardId : target.getTargets()) { - Card card = game.getCard(cardId); - if (card != null) { - card.moveToExile(exileId, exileName, source.getSourceId(), game); - } - } - return true; + if (target.chooseTarget(Outcome.Exile, player.getId(), source, game)) { + player.moveCardsToExile(new CardsImpl(target.getTargets()).getCards(game), source, game, true, exileId, exileName); } } + return true; } return false; } diff --git a/Mage/src/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllPlayersEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileGraveyardAllTargetPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileReturnToBattlefieldOwnerNextEndStepEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileReturnToBattlefieldOwnerNextEndStepEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileReturnToBattlefieldOwnerNextEndStepEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileReturnToBattlefieldOwnerNextEndStepEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ExileSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileSpellEffect.java similarity index 88% rename from Mage/src/mage/abilities/effects/common/ExileSpellEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileSpellEffect.java index 2725630dc30..dc531885637 100644 --- a/Mage/src/mage/abilities/effects/common/ExileSpellEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileSpellEffect.java @@ -34,6 +34,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; /** @@ -62,9 +63,12 @@ public class ExileSpellEffect extends OneShotEffect implements MageSingleton { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard(); - if (spellCard != null) { - controller.moveCards(spellCard, null, Zone.EXILED, source, game); + Spell spell = game.getStack().getSpell(source.getId()); + if (spell != null && !spell.isCopiedSpell()) { + Card spellCard = spell.getCard(); + if (spellCard != null) { + controller.moveCards(spellCard, Zone.EXILED, source, game); + } } return true; } diff --git a/Mage/src/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java similarity index 93% rename from Mage/src/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java index 5c7d93bdaf6..58c9e3c03ae 100644 --- a/Mage/src/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetAndSearchGraveyardHandLibraryEffect.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,31 +20,26 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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.SpellAbility; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; -import mage.cards.Card; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.Target; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; /** * * @author LevelX2 */ - public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEffect { public ExileTargetAndSearchGraveyardHandLibraryEffect(Boolean graveyardExileOptional, String searchWhatText, String searchForText) { @@ -66,17 +61,16 @@ public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTarget exileTarget = target; break; } - } + } if (exileTarget != null) { Permanent permanentToExile = game.getPermanent(exileTarget.getFirstTarget()); if (permanentToExile != null) { targetPlayerId = permanentToExile.getControllerId(); result = permanentToExile.moveToExile(null, "", source.getSourceId(), game); - this.applySearchAndExile(game, source, permanentToExile.getName(), targetPlayerId); + this.applySearchAndExile(game, source, permanentToExile.getName(), targetPlayerId); } } - return result; } @@ -92,4 +86,4 @@ public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTarget sb.append(super.getText(mode)); return sb.toString(); } -} \ No newline at end of file +} diff --git a/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ExileTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetForSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetForSourceEffect.java new file mode 100644 index 00000000000..697c07435ab --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetForSourceEffect.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.abilities.effects.common; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ExileTargetForSourceEffect extends OneShotEffect { + + public ExileTargetForSourceEffect() { + super(Outcome.Exile); + } + + public ExileTargetForSourceEffect(final ExileTargetForSourceEffect effect) { + super(effect); + } + + @Override + public ExileTargetForSourceEffect copy() { + return new ExileTargetForSourceEffect(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) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); + if (permanent != null) { + return controller.moveCardsToExile(permanent, source, game, true, exileId, sourceObject.getIdName()); + } else { + Card card = game.getCard(getTargetPointer().getFirst(game, source)); + if (card != null) { + return controller.moveCardsToExile(card, source, game, true, exileId, sourceObject.getIdName()); + } + } + } + return false; + } + + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + + if (mode.getTargets().isEmpty()) { + return "exile it"; + } else { + return "exile target " + mode.getTargets().get(0).getTargetName(); + } + } +} diff --git a/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/FightTargetSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/FightTargetSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/FightTargetsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/FightTargetsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/FightTargetsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/FlipSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/FlipSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/FlipSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/FlipSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/GainLifeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/GainLifeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/GainLifeEffect.java diff --git a/Mage/src/mage/abilities/effects/common/GainLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/GainLifeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/GetEmblemEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/GetEmblemEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java diff --git a/Mage/src/mage/abilities/effects/common/GetEmblemTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GetEmblemTargetPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/GetEmblemTargetPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/GetEmblemTargetPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/HideawayPlayEffect.java similarity index 56% rename from Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/HideawayPlayEffect.java index 749f5214e5e..6c757284942 100644 --- a/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/HideawayPlayEffect.java @@ -28,17 +28,13 @@ package mage.abilities.effects.common; import mage.abilities.Ability; -import mage.abilities.condition.common.MyMainPhaseCondition; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; -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; -import org.apache.log4j.Logger; /** * @author LevelX2 @@ -64,35 +60,13 @@ public class HideawayPlayEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { ExileZone zone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); if (zone == null || zone.isEmpty()) { - return false; + return true; } Card card = zone.getCards(game).iterator().next(); Player controller = game.getPlayer(source.getControllerId()); if (card != null && controller != null) { - if (card.getCardType().contains(CardType.LAND)) { - // If the revealed card is a land, you can play it only if it's your turn and you haven't yet played a land this turn. - if (game.getActivePlayerId().equals(source.getControllerId()) && controller.canPlayLand() && MyMainPhaseCondition.getInstance().apply(game, source)) { - if (controller.chooseUse(Outcome.Benefit, "Play " + card.getLogName() + " from Exile?", source, game)) { - // normal player.playLand(card, game) can't be used because this abilit is on the stack - card.setFaceDown(false, game); - return controller.moveCards(card, Zone.EXILED, Zone.BATTLEFIELD, source, game); - } - } else if (!game.isSimulation()) { - game.informPlayer(controller, "You're not able to play the land now due to regular restrictions."); - } - } else { - if (card.getSpellAbility() != null) { - // The land's last ability allows you to play the removed card as part of the resolution of that ability. - // Timing restrictions based on the card's type are ignored (for instance, if it's a creature or sorcery). - // Other play restrictions are not (such as "Play [this card] only during combat"). - if (controller.chooseUse(Outcome.Benefit, "Cast " + card.getLogName() + " without paying its mana cost?", source, game)) { - card.setFaceDown(false, game); - return controller.cast(card.getSpellAbility(), game, true); - } - } else { - Logger.getLogger(HideawayPlayEffect.class).error("Non land card had no spell ability: " + card.getName()); - return false; - } + if (controller.chooseUse(Outcome.PlayForFree, "Do you want to play " + card.getIdName() + " for free now?", source, game)) { + controller.playCard(card, game, true, false); } return true; } diff --git a/Mage/src/mage/abilities/effects/common/ImprintTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ImprintTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ImprintTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ImprintTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/InfoEffect.java b/Mage/src/main/java/mage/abilities/effects/common/InfoEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/InfoEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/InfoEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LookAtTargetPlayerHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookAtTargetPlayerHandEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LookAtTargetPlayerHandEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LookAtTargetPlayerHandEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseGameSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseGameSourceControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseGameSourceControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseGameSourceControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseGameTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseGameTargetPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseGameTargetPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseGameTargetPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseHalfLifeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseHalfLifeEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseHalfLifeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseHalfLifeEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseLifeOpponentsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/LoseLifeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ManaEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ManaEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ManaEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ManaEffect.java diff --git a/Mage/src/mage/abilities/effects/common/MayTapOrUntapTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/MayTapOrUntapTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/MayTapOrUntapTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/MayTapOrUntapTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/NameACardEffect.java b/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/NameACardEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PassEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PassEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PassEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PassEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PhaseOutSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PhaseOutSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PhaseOutSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PhaseOutSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PhaseOutTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PhaseOutTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PhaseOutTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PhaseOutTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PlayTargetWithoutPayingManaEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PlayTargetWithoutPayingManaEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PlayTargetWithoutPayingManaEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PlayTargetWithoutPayingManaEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PopulateEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PopulateEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageByAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageByAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageByAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageByAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageToAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageToAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageToAndByAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToAndByAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageToAndByAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToAndByAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageToAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageToAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageToControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageToControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageToPlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToPlayersEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageToPlayersEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToPlayersEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllDamageToSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllDamageToSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageToSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventAllNonCombatDamageToAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllNonCombatDamageToAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventAllNonCombatDamageToAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventAllNonCombatDamageToAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventCombatDamageBySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventCombatDamageBySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventCombatDamageBySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventCombatDamageBySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventCombatDamageToSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventCombatDamageToSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventCombatDamageToSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventCombatDamageToSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageBySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageBySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventDamageBySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventDamageBySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageByTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageByTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventDamageByTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventDamageByTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageToSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventDamageToSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageToTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventDamageToTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PreventNextDamageFromChosenSourceToYouEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutLandFromHandOntoBattlefieldEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutLandFromHandOntoBattlefieldEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutLandFromHandOntoBattlefieldEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutLandFromHandOntoBattlefieldEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutOnLibrarySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutOnLibrarySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutOnLibrarySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutOnLibrarySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutOnLibraryTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutOnLibraryTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutOnLibraryTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutOnLibraryTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutOntoBattlefieldTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutOntoBattlefieldTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutOntoBattlefieldTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutOntoBattlefieldTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutPermanentOnBattlefieldEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutPermanentOnBattlefieldEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutPermanentOnBattlefieldEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutPermanentOnBattlefieldEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java similarity index 90% rename from Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java index 3d42d6db098..61f433d298f 100644 --- a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java @@ -60,6 +60,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { private String additionalSubType; private boolean tapped; private boolean attacking; + private UUID attackedPlayer; public PutTokenOntoBattlefieldCopyTargetEffect() { super(Outcome.PutCreatureInPlay); @@ -68,6 +69,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.addedTokenPermanents = new ArrayList<>(); this.number = 1; this.additionalSubType = null; + this.attackedPlayer = null; } public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId) { @@ -89,8 +91,14 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { * @param additionalCardType the token gains tis card types in addition * @param gainsHaste the token gains haste * @param number number of tokens to put into play + * @param tapped + * @param attacking */ public PutTokenOntoBattlefieldCopyTargetEffect(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) { super(Outcome.PutCreatureInPlay); this.playerId = playerId; this.additionalCardType = additionalCardType; @@ -99,6 +107,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.number = number; this.tapped = tapped; this.attacking = attacking; + this.attackedPlayer = attackedPlayer; } public PutTokenOntoBattlefieldCopyTargetEffect(final PutTokenOntoBattlefieldCopyTargetEffect effect) { @@ -111,6 +120,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.additionalSubType = effect.additionalSubType; this.tapped = effect.tapped; this.attacking = effect.attacking; + this.attackedPlayer = effect.attackedPlayer; } @Override @@ -154,12 +164,10 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { if (gainsHaste) { token.addAbility(HasteAbility.getInstance()); } - if (additionalSubType != null) { - if (token.getSubtype().contains(additionalSubType)) { - token.getSubtype().add(additionalSubType); - } + if (additionalSubType != null && !token.getSubtype().contains(additionalSubType)) { + token.getSubtype().add(additionalSubType); } - token.putOntoBattlefield(number, game, source.getSourceId(), playerId == null ? source.getControllerId() : playerId, tapped, attacking); + token.putOntoBattlefield(number, game, source.getSourceId(), playerId == null ? source.getControllerId() : playerId, tapped, attacking, attackedPlayer); for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield Permanent tokenPermanent = game.getPermanent(tokenId); if (tokenPermanent != null) { diff --git a/Mage/src/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java similarity index 85% rename from Mage/src/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java index c52b88fff0a..421a97c768a 100644 --- a/Mage/src/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveEachPlayerEffect.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.UUID; @@ -44,7 +43,6 @@ import mage.util.CardUtil; * * @author LevelX2 */ - public class PutTopCardOfLibraryIntoGraveEachPlayerEffect extends OneShotEffect { private final DynamicValue numberCards; @@ -53,7 +51,7 @@ public class PutTopCardOfLibraryIntoGraveEachPlayerEffect extends OneShotEffect public PutTopCardOfLibraryIntoGraveEachPlayerEffect(int numberCards, TargetController targetController) { this(new StaticValue(numberCards), targetController); } - + public PutTopCardOfLibraryIntoGraveEachPlayerEffect(DynamicValue numberCards, TargetController targetController) { super(Outcome.Discard); this.numberCards = numberCards; @@ -76,42 +74,42 @@ public class PutTopCardOfLibraryIntoGraveEachPlayerEffect extends OneShotEffect public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - switch(targetController) { + switch (targetController) { case OPPONENT: - for(UUID playerId: game.getOpponents(source.getControllerId()) ) { + for (UUID playerId : game.getOpponents(source.getControllerId())) { putCardsToGravecard(playerId, source, game); } break; case ANY: - for(UUID playerId: player.getInRange() ) { + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { putCardsToGravecard(playerId, source, game); } break; case NOT_YOU: - for(UUID playerId: player.getInRange() ) { + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { if (!playerId.equals(source.getSourceId())) { putCardsToGravecard(playerId, source, game); } } break; default: - throw new UnsupportedOperationException("TargetController type not supported."); - } + throw new UnsupportedOperationException("TargetController type not supported."); + } return true; } return false; } - + private void putCardsToGravecard(UUID playerId, Ability source, Game game) { Player player = game.getPlayer(playerId); if (player != null) { - player.moveCards(player.getLibrary().getTopCards(game, numberCards.calculate(game, source, this)), Zone.LIBRARY, Zone.GRAVEYARD, source, game); + player.moveCards(player.getLibrary().getTopCards(game, numberCards.calculate(game, source, this)), Zone.GRAVEYARD, source, game); } } private String setText() { StringBuilder sb = new StringBuilder(); - switch(targetController) { + switch (targetController) { case OPPONENT: sb.append("Each opponent "); break; @@ -120,14 +118,14 @@ public class PutTopCardOfLibraryIntoGraveEachPlayerEffect extends OneShotEffect break; case NOT_YOU: sb.append("Each other player "); - break; + break; default: - throw new UnsupportedOperationException("TargetController type not supported."); + throw new UnsupportedOperationException("TargetController type not supported."); } sb.append("puts the top "); - sb.append(CardUtil.numberToText(numberCards.toString(),"a")); + sb.append(CardUtil.numberToText(numberCards.toString(), "a")); sb.append(" card"); - sb.append(numberCards.toString().equals("1")?"":"s"); + sb.append(numberCards.toString().equals("1") ? "" : "s"); sb.append(" of his or her library into his or her graveyard"); return sb.toString(); } diff --git a/Mage/src/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RegenerateAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RegenerateAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RegenerateAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RegenerateAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RegenerateAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RegenerateAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RegenerateAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RegenerateAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RegenerateSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RegenerateSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RegenerateSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RegenerateSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RegenerateTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RegenerateTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RegenerateTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RegenerateTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RemoveAllCountersSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RemoveAllCountersSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RemoveAllCountersSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RemoveAllCountersSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RemoveDelayedTriggeredAbilityEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RemoveDelayedTriggeredAbilityEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RemoveDelayedTriggeredAbilityEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RemoveDelayedTriggeredAbilityEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RemoveFromCombatSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RemoveFromCombatSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RemoveFromCombatSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RemoveFromCombatSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RemoveFromCombatTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RemoveFromCombatTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RemoveFromCombatTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RemoveFromCombatTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RemoveSpecialActionEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RemoveSpecialActionEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RemoveSpecialActionEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RemoveSpecialActionEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnFromExileEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromExileEffect.java similarity index 67% rename from Mage/src/mage/abilities/effects/common/ReturnFromExileEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnFromExileEffect.java index 58ebc6676bb..6d8b0880878 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnFromExileEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromExileEffect.java @@ -30,7 +30,6 @@ package mage.abilities.effects.common; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; import static mage.constants.Zone.BATTLEFIELD; @@ -84,39 +83,12 @@ public class ReturnFromExileEffect extends OneShotEffect { ExileZone exile = game.getExile().getExileZone(exileId); Player controller = game.getPlayer(source.getControllerId()); if (controller != null && exile != null) { - if (zone == Zone.GRAVEYARD) { - controller.moveCards(exile, zone, Zone.EXILED, source, game); - } else { - exile = exile.copy(); - for (UUID cardId : exile) { - Card card = game.getCard(cardId); - Player owner = game.getPlayer(card.getOwnerId()); - if (owner != null) { - switch (zone) { - case BATTLEFIELD: - card.moveToZone(zone, source.getSourceId(), game, tapped); - if (!game.isSimulation()) { - game.informPlayers(controller.getLogName() + " moves " + card.getLogName() + " to " + zone.toString().toLowerCase()); - } - break; - case HAND: - controller.moveCards(card, Zone.EXILED, Zone.HAND, source, game); - break; - case LIBRARY: - controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.EXILED, true, true); - break; - case GRAVEYARD: - controller.moveCards(card, Zone.EXILED, Zone.GRAVEYARD, source, game); - break; - default: - card.moveToZone(zone, source.getSourceId(), game, tapped); - if (!game.isSimulation()) { - game.informPlayers(controller.getLogName() + " moves " + card.getLogName() + " to " + zone.toString().toLowerCase()); - } - } - } - } - game.getExile().getExileZone(exileId).clear(); + switch (zone) { + case LIBRARY: + controller.putCardsOnTopOfLibrary(exile, game, source, false); + break; + default: + controller.moveCards(exile.getCards(game), zone, source, game, tapped, false, true, null); } return true; } diff --git a/Mage/src/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java similarity index 87% rename from Mage/src/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java index 1276b0acdff..1f24d70ccb1 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromExileForSourceEffect.java @@ -37,9 +37,10 @@ import static mage.constants.Zone.GRAVEYARD; import static mage.constants.Zone.HAND; import mage.game.ExileZone; import mage.game.Game; -import mage.game.permanent.PermanentToken; +import mage.game.permanent.Permanent; import mage.players.Player; import mage.util.CardUtil; +import org.apache.log4j.Logger; /** * @@ -95,16 +96,17 @@ public class ReturnFromExileForSourceEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (sourceObject != null && controller != null) { - int zoneChangeCounter = source.getSourceObjectZoneChangeCounter(); - if (zoneChangeCounter > 0 && previousZone && !(sourceObject instanceof PermanentToken)) { - zoneChangeCounter--; + Permanent permanentLeftBattlefield = (Permanent) getValue("permanentLeftBattlefield"); + if (permanentLeftBattlefield == null) { + Logger.getLogger(ReturnFromExileForSourceEffect.class).error("Permanent not found: " + sourceObject.getName()); + return false; } - ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), zoneChangeCounter)); + ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), permanentLeftBattlefield.getZoneChangeCounter(game))); if (exile != null) { // null is valid if source left battlefield before enters the battlefield effect resolved if (returnToZone.equals(Zone.BATTLEFIELD)) { controller.moveCards(exile.getCards(game), returnToZone, source, game, false, false, true, null); } else { - controller.moveCards(exile, null, returnToZone, source, game); + controller.moveCards(exile, returnToZone, source, game); } } return true; diff --git a/Mage/src/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnSourceFromGraveyardToBattlefieldEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnSourceFromGraveyardToBattlefieldEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnSourceFromGraveyardToBattlefieldEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnSourceFromGraveyardToBattlefieldEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnSourceFromGraveyardToHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnSourceFromGraveyardToHandEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnSourceFromGraveyardToHandEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnSourceFromGraveyardToHandEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToBattlefieldUnderYourControlTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToHandAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToHandAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToHandChosenControlledPermanentEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandFromBattlefieldAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandFromBattlefieldAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToHandFromBattlefieldAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToHandFromBattlefieldAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandFromGraveyardAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandFromGraveyardAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToHandFromGraveyardAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToHandFromGraveyardAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandSourceEffect.java similarity index 98% rename from Mage/src/mage/abilities/effects/common/ReturnToHandSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToHandSourceEffect.java index 10893c286b6..237c026c746 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToHandSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandSourceEffect.java @@ -57,7 +57,7 @@ public class ReturnToHandSourceEffect extends OneShotEffect { /** * - * @param fromBattlefieldOnly the object is only returned if it's on the + * @param fromBattlefieldOnly the object is only returned if it is on the * battlefield as the effect resolves * @param returnFromNextZone the object is only returned, if it has changed * the zone one time after the source ability triggered or was activated @@ -67,7 +67,7 @@ public class ReturnToHandSourceEffect extends OneShotEffect { super(Outcome.ReturnToHand); this.fromBattlefieldOnly = fromBattlefieldOnly; this.returnFromNextZone = returnFromNextZone; - staticText = "return {this} to it's owner's hand"; + staticText = "return {this} to its owner's hand"; } public ReturnToHandSourceEffect(final ReturnToHandSourceEffect effect) { diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandSpellEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToHandSpellEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToHandSpellEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java similarity index 88% rename from Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java index 7e6d25c1477..c4f1fd5a98c 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -27,10 +27,14 @@ */ package mage.abilities.effects.common; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; -import mage.cards.CardsImpl; +import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -70,7 +74,14 @@ public class ReturnToHandTargetEffect extends OneShotEffect { if (controller == null) { return false; } - return controller.moveCards(new CardsImpl(targetPointer.getTargets(game, source)), null, Zone.HAND, source, game); + Set cards = new LinkedHashSet<>(); + for (UUID targetId : targetPointer.getTargets(game, source)) { + MageObject mageObject = game.getObject(targetId); + if (mageObject instanceof Card) { + cards.add((Card) mageObject); + } + } + return controller.moveCards(cards, Zone.HAND, source, game); } @Override @@ -93,7 +104,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect { if (!target.getTargetName().startsWith("another")) { sb.append("target "); } - sb.append(target.getTargetName()).append(" to its owner's hand").toString(); + sb.append(target.getTargetName()).append(" to its owner's hand"); return sb.toString(); } } diff --git a/Mage/src/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RevealAndShuffleIntoLibrarySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RevealHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealHandTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RevealHandTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RevealHandTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java diff --git a/Mage/src/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/RevealTargetPlayerLibraryEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeEquippedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeEquippedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeEquippedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeEquippedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeOpponentsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java similarity index 78% rename from Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java index b36191ecbc3..f0904271903 100644 --- a/Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java @@ -1,29 +1,26 @@ package mage.abilities.effects.common; -import mage.MageObject; -import mage.constants.Outcome; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.costs.Cost; import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.util.CardUtil; /** - * Created by IntelliJ IDEA. - * User: Loki - * Date: 21.12.10 - * Time: 9:21 + * Created by IntelliJ IDEA. User: Loki Date: 21.12.10 Time: 9:21 */ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { + protected Cost cost; public SacrificeSourceUnlessPaysEffect(Cost cost) { super(Outcome.Sacrifice); this.cost = cost; - } + } public SacrificeSourceUnlessPaysEffect(final SacrificeSourceUnlessPaysEffect effect) { super(effect); @@ -33,14 +30,13 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); - MageObject sourceObject = source.getSourceObject(game); - if (sourceObject != null && player != null && permanent != null) { + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (player != null && sourcePermanent != null) { StringBuilder sb = new StringBuilder(cost.getText()).append("?"); - if (!sb.toString().toLowerCase().startsWith("exile ") && !sb.toString().toLowerCase().startsWith("return ") ) { + if (!sb.toString().toLowerCase().startsWith("exile ") && !sb.toString().toLowerCase().startsWith("return ")) { sb.insert(0, "Pay "); } - String message = CardUtil.replaceSourceName(sb.toString(), sourceObject.getLogName()); + String message = CardUtil.replaceSourceName(sb.toString(), sourcePermanent.getLogName()); message = Character.toUpperCase(message.charAt(0)) + message.substring(1); if (player.chooseUse(Outcome.Benefit, message, source, game)) { cost.clearPaid(); @@ -48,7 +44,7 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { return true; } } - permanent.sacrifice(source.getSourceId(), game); + sourcePermanent.sacrifice(source.getSourceId(), game); return true; } return false; @@ -61,7 +57,7 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { @Override public String getText(Mode mode) { - if(staticText != null && !staticText.isEmpty()) { + if (staticText != null && !staticText.isEmpty()) { return staticText; } @@ -74,11 +70,10 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { || costText.toLowerCase().startsWith("sacrifice")) { sb.append(costText.substring(0, 1).toLowerCase()); sb.append(costText.substring(1)); - } - else { + } else { sb.append("pay ").append(costText); } return sb.toString(); } - } +} diff --git a/Mage/src/mage/abilities/effects/common/SacrificeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SacrificeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SacrificeTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SetPlayerLifeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SetPlayerLifeAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SetPlayerLifeAllEffect.java diff --git a/Mage/src/main/java/mage/abilities/effects/common/ShuffleHandIntoLibraryDrawThatManySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ShuffleHandIntoLibraryDrawThatManySourceEffect.java new file mode 100644 index 00000000000..ae9dd269880 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/ShuffleHandIntoLibraryDrawThatManySourceEffect.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.effects.common; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class ShuffleHandIntoLibraryDrawThatManySourceEffect extends OneShotEffect { + + public ShuffleHandIntoLibraryDrawThatManySourceEffect() { + super(Outcome.DrawCard); + this.staticText = "shuffle the cards from your hand into your library, then draw that many cards"; + } + + public ShuffleHandIntoLibraryDrawThatManySourceEffect(final ShuffleHandIntoLibraryDrawThatManySourceEffect effect) { + super(effect); + } + + @Override + public ShuffleHandIntoLibraryDrawThatManySourceEffect copy() { + return new ShuffleHandIntoLibraryDrawThatManySourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int cardsHand = controller.getHand().size(); + if (cardsHand > 0) { + controller.moveCards(controller.getHand(), Zone.LIBRARY, source, game); + controller.shuffleLibrary(game); + game.applyEffects(); // then + controller.drawCards(cardsHand, game); + } + return true; + } + return false; + } +} diff --git a/Mage/src/mage/abilities/effects/common/ShuffleIntoLibraryGraveOfSourceOwnerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ShuffleIntoLibraryGraveOfSourceOwnerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ShuffleIntoLibraryGraveOfSourceOwnerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ShuffleIntoLibraryGraveOfSourceOwnerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ShuffleIntoLibrarySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ShuffleIntoLibrarySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ShuffleIntoLibrarySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ShuffleIntoLibrarySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ShuffleLibrarySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ShuffleLibrarySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ShuffleLibrarySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ShuffleLibrarySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ShuffleLibraryTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ShuffleLibraryTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ShuffleLibraryTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ShuffleLibraryTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/ShuffleSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ShuffleSpellEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ShuffleSpellEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ShuffleSpellEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SkipDrawStepEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SkipDrawStepEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SkipDrawStepEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SkipDrawStepEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java diff --git a/Mage/src/mage/abilities/effects/common/SkipUntapOptionalSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SkipUntapOptionalSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/SkipUntapOptionalSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/SkipUntapOptionalSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/TapAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/TapAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/TapAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/TapEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapEnchantedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/TapEnchantedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/TapEnchantedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/TapSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/TapSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/TapSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/TapSourceUnlessPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapSourceUnlessPaysEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/TapSourceUnlessPaysEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/TapSourceUnlessPaysEffect.java diff --git a/Mage/src/mage/abilities/effects/common/TapTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/TapTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/TapTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/TransformSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/TransformSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/TransformSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/UntapAllControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapAllControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/UntapAllControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/UntapAllControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/UntapAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/UntapAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/UntapAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/UntapAllLandsControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapAllLandsControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/UntapAllLandsControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/UntapAllLandsControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/UntapEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapEnchantedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/UntapEnchantedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/UntapEnchantedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/UntapLandsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapLandsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/UntapLandsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/UntapLandsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/UntapSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/UntapSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/UntapSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/UntapTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/UntapTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/UntapTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/WinGameSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/WinGameSourceControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/WinGameSourceControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/WinGameSourceControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/BlocksIfAbleTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackAnyPlayerAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackAnyPlayerAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackAnyPlayerAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackAnyPlayerAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackAnyPlayerSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackAnyPlayerSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackAnyPlayerSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackAnyPlayerSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackBlockAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackBlockAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackBlockAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackBlockAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackBlockTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackBlockTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessPaysSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java similarity index 93% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java index 693b73307a0..8c6f3c40fea 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.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.abilities.effects.common.combat; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.RestrictionEffect; -import mage.constants.AttachmentType; -import mage.constants.Duration; -import mage.game.Game; -import mage.game.permanent.Permanent; - - -/** - * - * @author LevelX2 - */ - -public class CantAttackControllerAttachedEffect extends RestrictionEffect { - - public CantAttackControllerAttachedEffect(AttachmentType attachmentType) { - super(Duration.WhileOnBattlefield); - if (attachmentType.equals(AttachmentType.AURA)) { - this.staticText = "Enchanted creature can't attack you or a planeswalker you control"; - } else { - this.staticText = "Equipped creature can't attack you or a planeswalker you control"; - } - } - - public CantAttackControllerAttachedEffect(final CantAttackControllerAttachedEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - return permanent.getAttachments().contains(source.getSourceId()); - } - - @Override - public boolean canAttack(UUID defenderId, Ability source, Game game) { - if (defenderId.equals(source.getControllerId())) { - return false; - } - Permanent plainswalker = game.getPermanent(defenderId); - return plainswalker == null || !plainswalker.getControllerId().equals(source.getControllerId()); - } - - - @Override - public CantAttackControllerAttachedEffect copy() { - return new CantAttackControllerAttachedEffect(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.abilities.effects.common.combat; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.RestrictionEffect; +import mage.constants.AttachmentType; +import mage.constants.Duration; +import mage.game.Game; +import mage.game.permanent.Permanent; + + +/** + * + * @author LevelX2 + */ + +public class CantAttackControllerAttachedEffect extends RestrictionEffect { + + public CantAttackControllerAttachedEffect(AttachmentType attachmentType) { + super(Duration.WhileOnBattlefield); + if (attachmentType.equals(AttachmentType.AURA)) { + this.staticText = "Enchanted creature can't attack you or a planeswalker you control"; + } else { + this.staticText = "Equipped creature can't attack you or a planeswalker you control"; + } + } + + public CantAttackControllerAttachedEffect(final CantAttackControllerAttachedEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getAttachments().contains(source.getSourceId()); + } + + @Override + public boolean canAttack(UUID defenderId, Ability source, Game game) { + if (defenderId.equals(source.getControllerId())) { + return false; + } + Permanent planeswalker = game.getPermanent(defenderId); + return planeswalker == null || !planeswalker.getControllerId().equals(source.getControllerId()); + } + + + @Override + public CantAttackControllerAttachedEffect copy() { + return new CantAttackControllerAttachedEffect(this); + } + +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackIfDefenderControlsPermanent.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackIfDefenderControlsPermanent.java new file mode 100644 index 00000000000..f0fbf61e2d0 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackIfDefenderControlsPermanent.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.effects.common.combat; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.RestrictionEffect; +import mage.constants.Duration; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author BursegSardaukar + */ + +public class CantAttackIfDefenderControlsPermanent extends RestrictionEffect { + + private final FilterPermanent filter; + + public CantAttackIfDefenderControlsPermanent(FilterPermanent filter) { + super(Duration.WhileOnBattlefield); + this.filter = filter; + staticText = new StringBuilder("{this} can't attack if defending player controls ").append(filter.getMessage()).toString(); + } + + public CantAttackIfDefenderControlsPermanent(final CantAttackIfDefenderControlsPermanent effect) { + super(effect); + this.filter = effect.filter; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canAttack(UUID defenderId, Ability source, Game game) { + UUID defendingPlayerId; + Player player = game.getPlayer(defenderId); + if (player == null) { + Permanent permanent = game.getPermanent(defenderId); + if (permanent != null) { + defendingPlayerId = permanent.getControllerId(); + } else { + return true; + } + } else { + defendingPlayerId = defenderId; + } + if (defendingPlayerId != null && game.getBattlefield().countAll(filter, defendingPlayerId, game) > 0) { + return false; + } + return true; + } + + @Override + public CantAttackIfDefenderControlsPermanent copy() { + return new CantAttackIfDefenderControlsPermanent(this); + } + +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouOrPlaneswalkerAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouOrPlaneswalkerAllEffect.java new file mode 100644 index 00000000000..96aa778fbac --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouOrPlaneswalkerAllEffect.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.effects.common.combat; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.RestrictionEffect; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author fireshoes + */ +public class CantAttackYouOrPlaneswalkerAllEffect extends RestrictionEffect { + + private final FilterCreaturePermanent filterAttacker; + + public CantAttackYouOrPlaneswalkerAllEffect(Duration duration) { + this(duration, new FilterCreaturePermanent()); + } + + public CantAttackYouOrPlaneswalkerAllEffect(Duration duration, FilterCreaturePermanent filter) { + super(duration, Outcome.Benefit); + this.filterAttacker = filter; + staticText = "Creatures can't attack you"; + } + + CantAttackYouOrPlaneswalkerAllEffect(final CantAttackYouOrPlaneswalkerAllEffect effect) { + super(effect); + this.filterAttacker = effect.filterAttacker; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return filterAttacker.match(permanent, source.getSourceId(), source.getControllerId(), game); + } + + @Override + public boolean canAttack(UUID defenderId, Ability source, Game game) { + if (defenderId.equals(source.getControllerId())) { + return false; + } + Permanent planeswalker = game.getPermanent(defenderId); + return planeswalker == null || !planeswalker.getControllerId().equals(source.getControllerId()); + } + + @Override + public CantAttackYouOrPlaneswalkerAllEffect copy() { + return new CantAttackYouOrPlaneswalkerAllEffect(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackYouUnlessPayManaAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayManaAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantAttackYouUnlessPayManaAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayManaAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithLessPowerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithLessPowerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithLessPowerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithLessPowerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByMoreThanOneSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java similarity index 96% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java index f26ba37acd4..36617682c8e 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java @@ -59,7 +59,7 @@ public class CantBeBlockedByOneAllEffect extends ContinuousEffectImpl { if (duration.equals(Duration.EndOfTurn)) { sb.append("this turn "); } - sb.append("except by ").append(CardUtil.numberToText(amount)).append(" or more creatures").toString(); + sb.append("except by ").append(CardUtil.numberToText(amount)).append(" or more creatures"); staticText = sb.toString(); } diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByOneTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByTargetSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByTargetSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByTargetSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByTargetSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBeBlockedTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBlockAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockAttackActivateAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttackActivateAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBlockAttackActivateAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttackActivateAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBlockSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBlockTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockUnlessPayManaAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockUnlessPayManaAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/CantBlockUnlessPayManaAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockUnlessPayManaAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAllAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAllAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAllAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAllAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAllSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAllSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAllSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAllSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAllTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAllTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAllTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAllTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByTargetSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByTargetSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/combat/MustBeBlockedByTargetSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByTargetSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/AddCardColorAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardColorAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/AddCardColorAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardColorAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/AddCardSubTypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubTypeTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/AddCardSubTypeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubTypeTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardSubtypeAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/AddCardTypeAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardTypeAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/AddCardTypeAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardTypeAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/AddCardTypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardTypeTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/AddCardTypeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/AddCardTypeTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesAuraSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java similarity index 90% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java index 5bb693449ef..06f4388a583 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java @@ -47,12 +47,20 @@ public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl { protected final static ArrayList allLandTypes = new ArrayList<>(); - static { + static { // 205.3i allLandTypes.add("Forest"); allLandTypes.add("Swamp"); allLandTypes.add("Plains"); - allLandTypes.add("Mountains"); + allLandTypes.add("Mountain"); allLandTypes.add("Island"); + allLandTypes.add("Urza's"); + allLandTypes.add("Mine"); + allLandTypes.add("Power-Plant"); + allLandTypes.add("Tower"); + allLandTypes.add("Desert"); + allLandTypes.add("Gate"); + allLandTypes.add("Lair"); + allLandTypes.add("Locus"); } protected ArrayList landTypes = new ArrayList<>(); @@ -108,6 +116,7 @@ public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl { } break; case TypeChangingEffects_4: + // subtypes are all removed by changing the subtype to a land type. permanent.getSubtype().removeAll(allLandTypes); permanent.getSubtype().addAll(landTypes); break; diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java similarity index 93% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java index 43e1bf12aad..e29c167c5cd 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java @@ -37,6 +37,7 @@ import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.abilities.mana.WhiteManaAbility; +import mage.cards.repository.CardRepository; import mage.choices.Choice; import mage.choices.ChoiceBasicLandType; import mage.constants.CardType; @@ -147,8 +148,19 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { Permanent land = game.getPermanent(targetPermanent); if (land != null) { switch (layer) { - case AbilityAddingRemovingEffects_6: + case TypeChangingEffects_4: + // Attention: Cards like Unstable Frontier that use this class do not give the "Basic" supertype to the target + if (!land.getCardType().contains(CardType.LAND)) { + land.getCardType().add(CardType.LAND); + } + // 305.7 Note that this doesn't remove any abilities that were granted to the land by other effects + // So the ability removing has to be done before Layer 6 land.removeAllAbilities(source.getSourceId(), game); + // 305.7 + land.getSubtype().removeAll(CardRepository.instance.getLandTypes()); + land.getSubtype().addAll(landTypes); + break; + case AbilityAddingRemovingEffects_6: for (String landType : landTypes) { switch (landType) { case "Swamp": @@ -169,14 +181,6 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { } } break; - case TypeChangingEffects_4: - // Attention: Cards like Unstable Frontier that use this class do not give the "Basic" supertype to the target - if (!land.getCardType().contains(CardType.LAND)) { - land.getCardType().add(CardType.LAND); - } - land.getSubtype().clear(); - land.getSubtype().addAll(landTypes); - break; } } } diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java similarity index 96% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java index 67c07ee1c0e..538a4841fbd 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java @@ -67,7 +67,7 @@ public class BecomesChosenCreatureTypeTargetEffect extends OneShotEffect { chosenType = typeChoice.getChoice(); if (chosenType != null && !chosenType.isEmpty()) { // ADD TYPE TO TARGET - ContinuousEffect effect = new BecomesSubtypeTargetEffect(Duration.EndOfTurn, chosenType); + ContinuousEffect effect = new BecomesCreatureTypeTargetEffect(Duration.EndOfTurn, chosenType); effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); game.addEffect(effect, source); return true; diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorOrColorsTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesColorSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesColorSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java similarity index 94% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java index f891657cff5..b01e282fb33 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java @@ -27,14 +27,14 @@ */ package mage.abilities.effects.common.continuous; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.ContinuousEffectImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; -import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.effects.ContinuousEffectImpl; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -42,13 +42,13 @@ import mage.game.permanent.token.Token; /** * @author LevelX2 - * + * */ public class BecomesCreatureAllEffect extends ContinuousEffectImpl { protected Token token; protected String type; - private FilterPermanent filter; + private final FilterPermanent filter; public BecomesCreatureAllEffect(Token token, String type, FilterPermanent filter, Duration duration) { super(duration, Outcome.BecomeCreature); @@ -71,7 +71,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { if (permanent != null) { switch (layer) { case TypeChangingEffects_4: @@ -93,8 +93,9 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl { break; case ColorChangingEffects_5: if (sublayer == SubLayer.NA) { - if (token.getColor(game).hasColor()) + if (token.getColor(game).hasColor()) { permanent.getColor(game).setColor(token.getColor(game)); + } } break; case AbilityAddingRemovingEffects_6: diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java similarity index 98% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java index 1658b00fc80..5a0f47fce55 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAttachedEffect.java @@ -29,6 +29,7 @@ package mage.abilities.effects.common.continuous; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.repository.CardRepository; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; @@ -110,7 +111,7 @@ public class BecomesCreatureAttachedEffect extends ContinuousEffectImpl { switch (loseType) { case ALL: case ALL_BUT_COLOR: - permanent.getSubtype().clear(); + permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); break; } if (token.getSubtype().size() > 0) { diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java similarity index 92% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java index 37d0e41ac46..b751dd98092 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java @@ -25,13 +25,13 @@ * 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.MageInt; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.repository.CardRepository; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; @@ -105,8 +105,8 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements } } } - if ("".equals(type) || type == null) { - permanent.getSubtype().clear(); + if ("".equals(type) || type == null && permanent.getCardType().contains(CardType.LAND)) { + permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); } if (token.getSubtype().size() > 0) { permanent.getSubtype().addAll(token.getSubtype()); @@ -123,14 +123,14 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { if (token.getAbilities().size() > 0) { - for (Ability ability: token.getAbilities()) { - permanent.addAbility(ability, game); + for (Ability ability : token.getAbilities()) { + permanent.addAbility(ability, source.getSourceId(), game); } } } break; case PTChangingEffects_7: - if (sublayer == SubLayer.SetPT_7b) { + if (sublayer == SubLayer.CharacteristicDefining_7a) { MageInt power = token.getPower(); MageInt toughness = token.getToughness(); if (power != null && toughness != null) { @@ -156,8 +156,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements private void setText() { if (type != null && type.length() > 0) { staticText = duration.toString() + " {this} becomes a " + token.getDescription() + " that's still a " + this.type; - } - else { + } else { staticText = duration.toString() + " {this} becomes a " + token.getDescription(); } } diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java similarity index 95% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java index 10c22909b9d..87eb0e989e9 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTargetEffect.java @@ -1,16 +1,16 @@ /* * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR @@ -20,7 +20,7 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. @@ -28,14 +28,15 @@ package mage.abilities.effects.common.continuous; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.repository.CardRepository; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; -import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.effects.ContinuousEffectImpl; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; @@ -87,11 +88,11 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { if (loseAllAbilities) { - permanent.getSubtype().clear(); + permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); permanent.getSubtype().addAll(token.getSubtype()); } else { if (token.getSubtype().size() > 0) { - for (String subtype :token.getSubtype()) { + for (String subtype : token.getSubtype()) { if (!permanent.getSubtype().contains(subtype)) { permanent.getSubtype().add(subtype); } @@ -143,7 +144,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { result = true; } } - if (!result && this.duration.equals(Duration.Custom) ) { + if (!result && this.duration.equals(Duration.Custom)) { this.discard(); } return result; @@ -166,7 +167,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl { } StringBuilder sb = new StringBuilder(); Target target = mode.getTargets().get(0); - if(target.getMaxNumberOfTargets() > 1){ + if (target.getMaxNumberOfTargets() > 1) { if (target.getNumberOfTargets() < target.getMaxNumberOfTargets()) { sb.append("up to "); } diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesSubtypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTypeTargetEffect.java similarity index 76% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesSubtypeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTypeTargetEffect.java index f056b1ffee2..b675cb48345 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesSubtypeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureTypeTargetEffect.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.repository.CardRepository; import mage.constants.Duration; import mage.constants.Layer; import static mage.constants.Layer.TypeChangingEffects_4; @@ -21,20 +22,20 @@ import mage.game.permanent.Permanent; * * @author LevelX2 */ -public class BecomesSubtypeTargetEffect extends ContinuousEffectImpl { +public class BecomesCreatureTypeTargetEffect extends ContinuousEffectImpl { protected ArrayList subtypes = new ArrayList(); - protected boolean loseOther; // loses other subtypes + protected boolean loseOther; // loses other creature types - public BecomesSubtypeTargetEffect(Duration duration, String subtype) { + public BecomesCreatureTypeTargetEffect(Duration duration, String subtype) { this(duration, createArrayList(subtype)); } - public BecomesSubtypeTargetEffect(Duration duration, ArrayList subtypes) { + public BecomesCreatureTypeTargetEffect(Duration duration, ArrayList subtypes) { this(duration, subtypes, true); } - public BecomesSubtypeTargetEffect(Duration duration, ArrayList subtypes, boolean loseOther) { + public BecomesCreatureTypeTargetEffect(Duration duration, ArrayList subtypes, boolean loseOther) { super(duration, Outcome.Detriment); this.subtypes = subtypes; this.staticText = setText(); @@ -47,7 +48,7 @@ public class BecomesSubtypeTargetEffect extends ContinuousEffectImpl { return subtypes; } - public BecomesSubtypeTargetEffect(final BecomesSubtypeTargetEffect effect) { + public BecomesCreatureTypeTargetEffect(final BecomesCreatureTypeTargetEffect effect) { super(effect); this.subtypes.addAll(effect.subtypes); this.loseOther = effect.loseOther; @@ -60,8 +61,8 @@ public class BecomesSubtypeTargetEffect extends ContinuousEffectImpl { } @Override - public BecomesSubtypeTargetEffect copy() { - return new BecomesSubtypeTargetEffect(this); + public BecomesCreatureTypeTargetEffect copy() { + return new BecomesCreatureTypeTargetEffect(this); } @Override @@ -72,7 +73,7 @@ public class BecomesSubtypeTargetEffect extends ContinuousEffectImpl { switch (layer) { case TypeChangingEffects_4: if (loseOther) { - permanent.getSubtype().clear(); + permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); permanent.getSubtype().addAll(subtypes); } else { for (String subtype : subtypes) { diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesFaceDownCreatureEffect.java 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 new file mode 100644 index 00000000000..5b126ac4b5a --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java @@ -0,0 +1,112 @@ +/* + * 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.effects.common.continuous; + +import java.util.ArrayList; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.repository.CardRepository; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class BecomesSubtypeAllEffect extends ContinuousEffectImpl { + + protected ArrayList subtypes = new ArrayList(); + protected boolean loseOther; // loses other subtypes + protected FilterCreaturePermanent filter; + + public BecomesSubtypeAllEffect(Duration duration, String subtype) { + this(duration, createArrayList(subtype)); + } + + public BecomesSubtypeAllEffect(Duration duration, ArrayList subtypes) { + this(duration, subtypes, new FilterCreaturePermanent("All creatures"), true); + } + + public BecomesSubtypeAllEffect(Duration duration, + ArrayList subtypes, FilterCreaturePermanent filter, boolean loseOther) { + super(duration, Outcome.Detriment); + this.subtypes = subtypes; + this.staticText = setText(); + this.loseOther = loseOther; + this.filter = filter; + } + + private static ArrayList createArrayList(String subtype) { + ArrayList subtypes = new ArrayList<>(); + subtypes.add(subtype); + return subtypes; + } + + public BecomesSubtypeAllEffect(final BecomesSubtypeAllEffect effect) { + super(effect); + this.subtypes.addAll(effect.subtypes); + this.loseOther = effect.loseOther; + this.filter = effect.filter; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public BecomesSubtypeAllEffect copy() { + return new BecomesSubtypeAllEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, + Game game) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) { + if (permanent != null) { + switch (layer) { + case TypeChangingEffects_4: + if (loseOther) { + permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); + permanent.getSubtype().addAll(subtypes); + } else { + for (String subtype : subtypes) { + if (!permanent.getSubtype().contains(subtype)) { + permanent.getSubtype().add(subtype); + } + } + } + break; + } + } else { + if (duration.equals(Duration.Custom)) { + discard(); + } + } + } + return true; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.TypeChangingEffects_4; + } + + private String setText() { + StringBuilder sb = new StringBuilder(); + sb.append("Target creature becomes that type"); + if (!duration.toString().isEmpty() + && !duration.equals(Duration.EndOfGame)) { + sb.append(" ").append(duration.toString()); + } + return sb.toString(); + } +} diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BoostAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostControlledEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BoostControlledEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostControlledEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostEquippedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BoostEquippedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostOpponentsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BoostOpponentsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostOpponentsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostPairedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostPairedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BoostPairedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostPairedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceEffect.java similarity index 89% rename from Mage/src/mage/abilities/effects/common/continuous/BoostSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceEffect.java index bb671aa3b69..93ab0363ad6 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BoostSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceEffect.java @@ -137,14 +137,24 @@ public class BoostSourceEffect extends ContinuousEffectImpl implements SourceEff if (duration != Duration.WhileOnBattlefield) { sb.append(" ").append(duration.toString()); } - String message = power.getMessage(); - if (message.length() == 0) { + String message = null; + String fixedPart = null; + if (t.contains("X")) { message = toughness.getMessage(); + fixedPart = ", where X is "; + } else if (p.contains("X")) { + message = power.getMessage(); + fixedPart = ", where X is "; + } else if (!power.getMessage().isEmpty()) { + message = power.getMessage(); + fixedPart = " for each "; + } else if (!toughness.getMessage().isEmpty()) { + message = toughness.getMessage(); + fixedPart = " for each "; } - if (message.length() > 0) { - sb.append(" for each "); + if (message != null && !message.isEmpty() && fixedPart != null) { + sb.append(fixedPart).append(message); } - sb.append(message); staticText = sb.toString(); } diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostSourceWhileControlsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceWhileControlsEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/BoostSourceWhileControlsEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostSourceWhileControlsEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostTargetEffect.java similarity index 98% rename from Mage/src/mage/abilities/effects/common/continuous/BoostTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/BoostTargetEffect.java index 1d11baae793..9ced7947bb8 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BoostTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostTargetEffect.java @@ -150,10 +150,10 @@ public class BoostTargetEffect extends ContinuousEffectImpl { } String message = null; String fixedPart = null; - if (t.equals("X")) { + if (t.contains("X")) { message = toughness.getMessage(); fixedPart = ", where X is "; - } else if (p.equals("X")) { + } else if (p.contains("X")) { message = power.getMessage(); fixedPart = ", where X is "; } else if (!power.getMessage().isEmpty()) { diff --git a/Mage/src/mage/abilities/effects/common/continuous/CantCastMoreThanOneSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CantCastMoreThanOneSpellEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/CantCastMoreThanOneSpellEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CantCastMoreThanOneSpellEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/CantGainLifeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CantGainLifeAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/CantGainLifeAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CantGainLifeAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/CantGainLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CantGainLifeTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/CantGainLifeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CantGainLifeTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/CommanderManaReplacementEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderManaReplacementEffect.java similarity index 93% rename from Mage/src/mage/abilities/effects/common/continuous/CommanderManaReplacementEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderManaReplacementEffect.java index 36ad215d042..b3e4e3de2c1 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/CommanderManaReplacementEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderManaReplacementEffect.java @@ -81,31 +81,31 @@ public class CommanderManaReplacementEffect extends ReplacementEffectImpl { Mana mana = ((ManaEvent) event).getMana(); if (mana.getBlack() > 0 && !commanderMana.isBlack()) { for (int i = 0; i < mana.getBlack(); i++) { - mana.addColorless(); + mana.increaseColorless(); } mana.setBlack(0); } if (mana.getBlue() > 0 && !commanderMana.isBlue()) { for (int i = 0; i < mana.getBlue(); i++) { - mana.addColorless(); + mana.increaseColorless(); } mana.setBlue(0); } if (mana.getGreen() > 0 && !commanderMana.isGreen()) { for (int i = 0; i < mana.getGreen(); i++) { - mana.addColorless(); + mana.increaseColorless(); } mana.setGreen(0); } if (mana.getRed() > 0 && !commanderMana.isRed()) { for (int i = 0; i < mana.getRed(); i++) { - mana.addColorless(); + mana.increaseColorless(); } mana.setRed(0); } if (mana.getWhite() > 0 && !commanderMana.isWhite()) { for (int i = 0; i < mana.getWhite(); i++) { - mana.addColorless(); + mana.increaseColorless(); } mana.setWhite(0); } diff --git a/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/CreaturesCantGetOrHaveAbilityEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CreaturesCantGetOrHaveAbilityEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/CreaturesCantGetOrHaveAbilityEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/CreaturesCantGetOrHaveAbilityEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/DontLoseByZeroOrLessLifeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/DontLoseByZeroOrLessLifeEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/DontLoseByZeroOrLessLifeEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/DontLoseByZeroOrLessLifeEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/ExchangeControlTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/ExchangeControlTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/ExchangeControlTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/ExchangeControlTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControllerEffect.java similarity index 95% rename from Mage/src/mage/abilities/effects/common/continuous/GainAbilityControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControllerEffect.java index b0c02b7f1e8..a4842f68bb1 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControllerEffect.java @@ -61,7 +61,10 @@ public class GainAbilityControllerEffect extends ContinuousEffectImpl { public GainAbilityControllerEffect(Ability ability, Duration duration) { super(duration, Layer.PlayerEffects, SubLayer.NA, Outcome.AddAbility); this.ability = ability; - staticText = "You have " + ability.getRule() + " " + duration.toString(); + staticText = "You have " + ability.getRule(); + if (!duration.toString().isEmpty()) { + staticText += " " + duration.toString(); + } } public GainAbilityControllerEffect(final GainAbilityControllerEffect effect) { diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityPairedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityPairedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainAbilityPairedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityPairedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilitySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilitySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainAbilitySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilitySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainAbilityTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainControlTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainControlTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainProtectionFromColorSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainProtectionFromColorSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainProtectionFromColorTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromTypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainProtectionFromTypeTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainProtectionFromTypeTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainProtectionFromTypeTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainSuspendEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainSuspendEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/GainSuspendEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/GainSuspendEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAbilityAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAbilityAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAbilityAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAbilityAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAbilityOrAnotherAbilityTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityOrAnotherAbilityTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAbilityOrAnotherAbilityTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityOrAnotherAbilityTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAbilityTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAllAbilitiesAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAllAbilitiesAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAllAbilitiesAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAllAbilitiesAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAllAbilitiesTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAllAbilitiesTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAllAbilitiesTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAllAbilitiesTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAllCreatureTypesTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAllCreatureTypesTargetEffect.java similarity index 93% rename from Mage/src/mage/abilities/effects/common/continuous/LoseAllCreatureTypesTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAllCreatureTypesTargetEffect.java index fdb1d714b8a..de41de7c2b2 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/LoseAllCreatureTypesTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseAllCreatureTypesTargetEffect.java @@ -30,6 +30,7 @@ package mage.abilities.effects.common.continuous; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.repository.CardRepository; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; @@ -42,30 +43,29 @@ import mage.game.permanent.Permanent; * @author emerald000 */ public class LoseAllCreatureTypesTargetEffect extends ContinuousEffectImpl { - + public LoseAllCreatureTypesTargetEffect(Duration duration) { super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Neutral); } - + public LoseAllCreatureTypesTargetEffect(final LoseAllCreatureTypesTargetEffect effect) { super(effect); } - + @Override public LoseAllCreatureTypesTargetEffect copy() { return new LoseAllCreatureTypesTargetEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { - permanent.getSubtype().clear(); - return true; + return permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); } return false; } - + @Override public String getText(Mode mode) { if (staticText != null && !staticText.isEmpty()) { diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseCreatureTypeSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseCreatureTypeSourceEffect.java similarity index 91% rename from Mage/src/mage/abilities/effects/common/continuous/LoseCreatureTypeSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/LoseCreatureTypeSourceEffect.java index 4f64c3fb862..f1f289a535a 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/LoseCreatureTypeSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/LoseCreatureTypeSourceEffect.java @@ -30,6 +30,7 @@ package mage.abilities.effects.common.continuous; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.repository.CardRepository; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; @@ -50,10 +51,11 @@ public class LoseCreatureTypeSourceEffect extends ContinuousEffectImpl implement private final int lessThan; /** - * Permanent loses the creature type as long as the dynamic value is less than the value of lessThan. - * + * Permanent loses the creature type as long as the dynamic value is less + * than the value of lessThan. + * * @param dynamicValue - * @param lessThan + * @param lessThan */ public LoseCreatureTypeSourceEffect(DynamicValue dynamicValue, int lessThan) { super(Duration.WhileOnBattlefield, Outcome.Detriment); @@ -84,7 +86,7 @@ public class LoseCreatureTypeSourceEffect extends ContinuousEffectImpl implement case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { permanent.getCardType().remove(CardType.CREATURE); - permanent.getSubtype().clear(); + permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); if (permanent.isAttacking() || permanent.getBlocking() > 0) { permanent.removeFromCombat(game); } @@ -102,7 +104,7 @@ public class LoseCreatureTypeSourceEffect extends ContinuousEffectImpl implement } private void setText() { - StringBuilder sb = new StringBuilder("As long as your "); + StringBuilder sb = new StringBuilder("As long as "); sb.append(dynamicValue.getMessage()).append(" is less than "); sb.append(CardUtil.numberToText(lessThan)).append(", {this} isn't a creature"); staticText = sb.toString(); diff --git a/Mage/src/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/MaximumHandSizeControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/PlayAdditionalLandsAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/PlayAdditionalLandsAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/PlayTheTopCardEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayTheTopCardEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/PlayTheTopCardEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/PlayTheTopCardEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/PlayWithHandRevealedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayWithHandRevealedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/PlayWithHandRevealedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/PlayWithHandRevealedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/PlayWithTheTopCardRevealedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayWithTheTopCardRevealedEffect.java similarity index 94% rename from Mage/src/mage/abilities/effects/common/continuous/PlayWithTheTopCardRevealedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/PlayWithTheTopCardRevealedEffect.java index e7a6b7cddc9..c7f6a8a0be7 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/PlayWithTheTopCardRevealedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayWithTheTopCardRevealedEffect.java @@ -41,18 +41,18 @@ import mage.players.Player; * @author nantuko */ public class PlayWithTheTopCardRevealedEffect extends ContinuousEffectImpl { - + protected boolean allPlayers; public PlayWithTheTopCardRevealedEffect() { this(false); } - + public PlayWithTheTopCardRevealedEffect(boolean allPlayers) { super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Detriment); this.allPlayers = allPlayers; if (allPlayers) { - staticText = "Each player plays with the top card of his or her library revealed."; + staticText = "Players play with the top card of their libraries revealed."; } else { staticText = "Play with the top card of your library revealed"; @@ -89,4 +89,4 @@ public class PlayWithTheTopCardRevealedEffect extends ContinuousEffectImpl { return new PlayWithTheTopCardRevealedEffect(this); } -} \ No newline at end of file +} diff --git a/Mage/src/mage/abilities/effects/common/continuous/SetCardColorAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardColorAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SetCardColorAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardColorAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java similarity index 87% rename from Mage/src/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java index 8dc84e142b0..6c008485293 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java @@ -29,10 +29,14 @@ package mage.abilities.effects.common.continuous; import java.util.ArrayList; import java.util.List; - import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; -import mage.constants.*; +import mage.cards.repository.CardRepository; +import mage.constants.AttachmentType; +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; @@ -48,14 +52,14 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); this.setSubtypes.add(setSubtype); this.attachmentType = attachmentType; - setText(); + setText(); } public SetCardSubtypeAttachedEffect(List setSubtypes, Duration duration, AttachmentType attachmentType) { super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); this.setSubtypes.addAll(setSubtypes); this.attachmentType = attachmentType; - setText(); + setText(); } public SetCardSubtypeAttachedEffect(final SetCardSubtypeAttachedEffect effect) { @@ -70,8 +74,8 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { if (equipment != null && equipment.getAttachedTo() != null) { Permanent target = game.getPermanent(equipment.getAttachedTo()); if (target != null) { - target.getSubtype().clear(); - target.getSubtype().addAll(setSubtypes); + target.getSubtype().retainAll(CardRepository.instance.getLandTypes()); + target.getSubtype().addAll(setSubtypes); } } return true; @@ -91,7 +95,7 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { } sb.append(" creature is a"); - for (String subtype: this.setSubtypes) { + for (String subtype : this.setSubtypes) { sb.append(" ").append(subtype); } staticText = sb.toString(); diff --git a/Mage/src/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SetPowerToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessSourceEffect.java similarity index 88% rename from Mage/src/mage/abilities/effects/common/continuous/SetPowerToughnessSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessSourceEffect.java index 1c2e3dbc87a..85333968831 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/SetPowerToughnessSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessSourceEffect.java @@ -48,13 +48,21 @@ public class SetPowerToughnessSourceEffect extends ContinuousEffectImpl { private int toughness; public SetPowerToughnessSourceEffect(DynamicValue amount, Duration duration) { - super(duration, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + this(amount, duration, SubLayer.CharacteristicDefining_7a); + } + + public SetPowerToughnessSourceEffect(DynamicValue amount, Duration duration, SubLayer subLayer) { + super(duration, Layer.PTChangingEffects_7, subLayer, Outcome.BoostCreature); this.amount = amount; staticText = "{this}'s power and toughness are each equal to the number of " + amount.getMessage(); } public SetPowerToughnessSourceEffect(int power, int toughness, Duration duration) { - super(duration, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + this(power, toughness, duration, SubLayer.CharacteristicDefining_7a); + } + + public SetPowerToughnessSourceEffect(int power, int toughness, Duration duration, SubLayer subLayer) { + super(duration, Layer.PTChangingEffects_7, subLayer, Outcome.BoostCreature); this.power = power; this.toughness = toughness; staticText = "{this}'s power and toughness is " + power + "/" + toughness + " " + duration.toString(); diff --git a/Mage/src/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SetToughnessSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SwitchPowerToughnessAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SwitchPowerToughnessAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SwitchPowerToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SwitchPowerToughnessSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/continuous/UntapAllDuringEachOtherPlayersUntapStepEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/UntapAllDuringEachOtherPlayersUntapStepEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/continuous/UntapAllDuringEachOtherPlayersUntapStepEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/continuous/UntapAllDuringEachOtherPlayersUntapStepEffect.java diff --git a/Mage/src/mage/abilities/effects/common/cost/CommanderCostModification.java b/Mage/src/main/java/mage/abilities/effects/common/cost/CommanderCostModification.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/cost/CommanderCostModification.java rename to Mage/src/main/java/mage/abilities/effects/common/cost/CommanderCostModification.java diff --git a/Mage/src/mage/abilities/effects/common/cost/CostModificationEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/common/cost/CostModificationEffectImpl.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/cost/CostModificationEffectImpl.java rename to Mage/src/main/java/mage/abilities/effects/common/cost/CostModificationEffectImpl.java diff --git a/Mage/src/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/cost/SpellsCostIncreasementAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostIncreasementAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/cost/SpellsCostIncreasementAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostIncreasementAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/cost/SpellsCostIncreasementControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostIncreasementControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/cost/SpellsCostIncreasementControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostIncreasementControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java similarity index 81% rename from Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java index b91b76a182e..9fd1453f429 100644 --- a/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java @@ -29,8 +29,10 @@ package mage.abilities.effects.common.cost; import java.util.LinkedHashSet; import java.util.Set; +import mage.MageObject; import mage.Mana; import mage.abilities.Ability; +import mage.abilities.ActivatedAbility; import mage.abilities.SpellAbility; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; @@ -100,23 +102,31 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI if (upTo) { Mana mana = abilityToModify.getManaCostsToPay().getMana(); int reduceMax = mana.getColorless(); - if (reduceMax > 2) { - reduceMax = 2; + if (reduceMax > amount) { + reduceMax = amount; } if (reduceMax > 0) { Player controller = game.getPlayer(abilityToModify.getControllerId()); if (controller == null) { return false; } - ChoiceImpl choice = new ChoiceImpl(true); - Set set = new LinkedHashSet<>(); - for (int i = 0; i <= reduceMax; i++) { - set.add(String.valueOf(i)); + int reduce = reduceMax; + if (!(abilityToModify instanceof ActivatedAbility) || !((ActivatedAbility) abilityToModify).isCheckPlayableMode()) { + ChoiceImpl choice = new ChoiceImpl(false); + Set set = new LinkedHashSet<>(); + for (int i = 0; i <= amount; i++) { + set.add(String.valueOf(i)); + } + choice.setChoices(set); + MageObject mageObject = game.getObject(abilityToModify.getSourceId()); + choice.setMessage("Reduce cost of " + (mageObject != null ? mageObject.getIdName() : filter.getMessage())); + if (controller.choose(Outcome.Benefit, choice, game)) { + reduce = Integer.parseInt(choice.getChoice()); + } else { + reduce = reduceMax; // cancel will be set to max possible reduce + } } - choice.setChoices(set); - choice.setMessage("Reduce cost of " + filter); - if (controller.choose(Outcome.Benefit, choice, game)) { - int reduce = Integer.parseInt(choice.getChoice()); + if (reduce > 0) { CardUtil.reduceCost(abilityToModify, reduce); } } diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java similarity index 79% rename from Mage/src/mage/abilities/effects/common/counter/AddCountersAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java index a818747e8e5..709eb78698a 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddCountersAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java @@ -27,12 +27,10 @@ */ package mage.abilities.effects.common.counter; -import java.util.List; -import java.util.UUID; import mage.MageObject; -import mage.constants.Outcome; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.counters.Counter; import mage.filter.FilterPermanent; import mage.game.Game; @@ -67,21 +65,16 @@ public class AddCountersAllEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null) { if (counter != null) { - UUID controllerId = source.getControllerId(); - List permanents = game.getBattlefield().getAllActivePermanents(); - for (Permanent permanent : permanents) { - if (filter.match(permanent, source.getSourceId(), controllerId, game)) { - permanent.addCounters(counter.copy(), game); - if (!game.isSimulation()) - game.informPlayers(new StringBuilder(sourceObject.getName()).append(": ") - .append(controller.getLogName()).append(" puts ") - .append(counter.getCount()).append(" ").append(counter.getName().toLowerCase()) - .append(" counter on ").append(permanent.getName()).toString()); + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + permanent.addCounters(counter.copy(), game); + if (!game.isSimulation()) { + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " puts " + counter.getCount() + " " + counter.getName().toLowerCase() + + " counter on " + permanent.getLogName()); } } - } + } return true; - } + } return false; } diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersControllerEffect.java similarity index 96% rename from Mage/src/mage/abilities/effects/common/counter/AddCountersControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersControllerEffect.java index c02550d8940..a2b0e1ae66e 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddCountersControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersControllerEffect.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,19 +20,17 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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.counter; import java.util.UUID; - -import mage.constants.Outcome; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.counters.Counter; import mage.game.Game; import mage.game.permanent.Permanent; @@ -44,13 +42,13 @@ import mage.players.Player; public class AddCountersControllerEffect extends OneShotEffect { private Counter counter; - private boolean enchantedEquipped; + private final boolean enchantedEquipped; /** - * + * * @param counter Counter to add. Includes type and amount. - * @param enchantedEquipped If true, not source controller will get counter, - * but permanent's controller that source enchants or equippes. + * @param enchantedEquipped If true, not source controller will get counter, + * but permanent's controller that source enchants or equippes. */ public AddCountersControllerEffect(Counter counter, boolean enchantedEquipped) { super(Outcome.Benefit); diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddPlusOneCountersAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddPlusOneCountersAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/AddRemoveAllTimeSuspentCountersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddRemoveAllTimeSuspentCountersEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/AddRemoveAllTimeSuspentCountersEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/AddRemoveAllTimeSuspentCountersEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/ProliferateEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/ProliferateEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/RemoveCounterSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCounterSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/counter/RemoveCounterSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCounterSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/common/counter/RemoveCounterTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCounterTargetEffect.java similarity index 52% rename from Mage/src/mage/abilities/effects/common/counter/RemoveCounterTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCounterTargetEffect.java index 5b651f6662d..9f636d65b52 100644 --- a/Mage/src/mage/abilities/effects/common/counter/RemoveCounterTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCounterTargetEffect.java @@ -28,14 +28,19 @@ package mage.abilities.effects.common.counter; +import java.util.HashSet; +import java.util.Set; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; import mage.constants.Outcome; import mage.counters.Counter; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.players.Player; import mage.util.CardUtil; /** @@ -46,6 +51,11 @@ import mage.util.CardUtil; public class RemoveCounterTargetEffect extends OneShotEffect { private final Counter counter; + public RemoveCounterTargetEffect() { + super(Outcome.UnboostCreature); + counter = null; + } + public RemoveCounterTargetEffect(Counter counter) { super(Outcome.UnboostCreature); this.counter = counter; @@ -53,21 +63,24 @@ public class RemoveCounterTargetEffect extends OneShotEffect { public RemoveCounterTargetEffect(RemoveCounterTargetEffect effect) { super(effect); - this.counter = effect.counter.copy(); + this.counter = effect.counter == null ? null : effect.counter.copy(); } @Override public boolean apply(Game game, Ability source) { Permanent p = game.getPermanent(targetPointer.getFirst(game, source)); - if (p != null && p.getCounters().getCount(counter.getName()) >= counter.getCount()) { - p.removeCounters(counter.getName(), counter.getCount(), game); - if (!game.isSimulation()) - game.informPlayers(new StringBuilder("Removed ").append(counter.getCount()).append(" ").append(counter.getName()) - .append(" counter from ").append(p.getName()).toString()); - return true; + if(p != null) { + Counter toRemove = (counter == null ? selectCounterType(game, source, p) : counter); + if(toRemove != null && p.getCounters().getCount(toRemove.getName()) >= toRemove.getCount()) { + p.removeCounters(toRemove.getName(), toRemove.getCount(), game); + if(!game.isSimulation()) + game.informPlayers("Removed " + toRemove.getCount() + " " + toRemove.getName() + + " counter from " + p.getName()); + return true; + } } Card c = game.getCard(targetPointer.getFirst(game, source)); - if (c != null && c.getCounters(game).getCount(counter.getName()) >= counter.getCount()) { + if (c != null && counter != null && c.getCounters(game).getCount(counter.getName()) >= counter.getCount()) { c.removeCounters(counter.getName(), counter.getCount(), game); if (!game.isSimulation()) game.informPlayers(new StringBuilder("Removed ").append(counter.getCount()).append(" ").append(counter.getName()) @@ -78,21 +91,54 @@ public class RemoveCounterTargetEffect extends OneShotEffect { return false; } + private Counter selectCounterType(Game game, Ability source, Permanent permanent) { + Player controller = game.getPlayer(source.getControllerId()); + if(controller != null && permanent.getCounters().size() > 0) { + String counterName = null; + if(permanent.getCounters().size() > 1) { + Choice choice = new ChoiceImpl(true); + Set choices = new HashSet<>(); + for(Counter counter : permanent.getCounters().values()) { + if (permanent.getCounters().getCount(counter.getName()) > 0) { + choices.add(counter.getName()); + } + } + choice.setChoices(choices); + choice.setMessage("Choose a counter type to remove from " + permanent.getName()); + controller.choose(Outcome.Detriment, choice, game); + counterName = choice.getChoice(); + } else { + for(Counter counter : permanent.getCounters().values()) { + if(counter.getCount() > 0) { + counterName = counter.getName(); + } + } + } + return new Counter(counterName); + } + return null; + } + @Override public RemoveCounterTargetEffect copy() { return new RemoveCounterTargetEffect(this); } @Override - public String getText(Mode mode) { - if (staticText != null && !staticText.isEmpty()) { - return staticText; - } - StringBuilder sb = new StringBuilder("remove "); - sb.append(CardUtil.numberToText(counter.getCount(), "a")); - sb.append(" ").append(counter.getName()); - sb.append(counter.getCount() > 1 ?" counters from ":" counter from "); - sb.append(mode.getTargets().get(0).getTargetName()); - return sb.toString(); + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + + String text = "remove "; + if(counter == null) { + text += "a counter"; + } + else { + text += CardUtil.numberToText(counter.getCount(), "a") + " " + counter.getName(); + text += counter.getCount() > 1 ? " counters" : " counter"; + } + text += " from target " + mode.getTargets().get(0).getTargetName(); + return text; } } diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java similarity index 99% rename from Mage/src/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java index d77f5ca6a46..4ab5210339c 100644 --- a/Mage/src/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardCardYouChooseTargetEffect.java @@ -221,7 +221,7 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect { sb.append(" of them."); } - sb.append(" That player discards ").append(discardMultipleCards ? "those cards" : "that card").toString(); + sb.append(" That player discards ").append(discardMultipleCards ? "those cards" : "that card"); return sb.toString(); } } diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/discard/DiscardControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/discard/DiscardControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/discard/DiscardEachPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardHandAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardHandAllEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/discard/DiscardHandAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/discard/DiscardHandAllEffect.java diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardHandControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardHandControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/discard/DiscardHandControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/discard/DiscardHandControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardHandTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/discard/DiscardHandTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/discard/DiscardHandTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/discard/DiscardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/discard/DiscardTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java b/Mage/src/main/java/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java rename to Mage/src/main/java/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java diff --git a/Mage/src/mage/abilities/effects/common/ruleModifying/CantRegenerateTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CantRegenerateTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/ruleModifying/CantRegenerateTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CantRegenerateTargetEffect.java diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CastOnlyIfYouHaveCastAnotherSpellEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CastOnlyIfYouHaveCastAnotherSpellEffect.java new file mode 100644 index 00000000000..072e2360ef3 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CastOnlyIfYouHaveCastAnotherSpellEffect.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.abilities.effects.common.ruleModifying; + +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.watchers.common.CastSpellLastTurnWatcher; + +/** + * + * @author LoneFox + */ + +public class CastOnlyIfYouHaveCastAnotherSpellEffect extends ContinuousRuleModifyingEffectImpl { + public CastOnlyIfYouHaveCastAnotherSpellEffect() { + super(Duration.EndOfGame, Outcome.Detriment); + staticText = "Cast {this} only if you've cast another spell this turn"; + } + + public CastOnlyIfYouHaveCastAnotherSpellEffect(final CastOnlyIfYouHaveCastAnotherSpellEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.CAST_SPELL; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getSourceId().equals(source.getSourceId())) { + CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get("CastSpellLastTurnWatcher"); + if (watcher != null && watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId()) == 0) { + return true; + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public CastOnlyIfYouHaveCastAnotherSpellEffect copy() { + return new CastOnlyIfYouHaveCastAnotherSpellEffect(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java similarity index 97% rename from Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java index 694e8bf70eb..f47985c9ada 100644 --- a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInHandEffect.java @@ -122,9 +122,9 @@ public class SearchLibraryPutInHandEffect extends SearchEffect { sb.append(rulePrefix); if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) { sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" "); - sb.append(target.getTargetName()).append(revealCards ? ", reveal them, " : "").append(" and put them into your hand"); + sb.append(target.getTargetName()).append(revealCards ? ", reveal them," : "").append(" and put them into your hand"); } else { - sb.append("a ").append(target.getTargetName()).append(revealCards ? ", reveal it, " : "").append(" and put that card into your hand"); + sb.append("a ").append(target.getTargetName()).append(revealCards ? ", reveal it," : "").append(" and put that card into your hand"); } if (forceShuffle) { sb.append(". Then shuffle your library"); diff --git a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java diff --git a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayTargetPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayTargetPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayTargetPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java diff --git a/Mage/src/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java similarity index 78% rename from Mage/src/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java index dd9c3c94e60..26a88824f6c 100644 --- a/Mage/src/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java @@ -27,12 +27,10 @@ */ package mage.abilities.effects.common.search; -import java.util.List; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.Outcome; @@ -98,14 +96,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect filter.setMessage("card named " + cardName + " in the graveyard of " + targetPlayer.getLogName()); TargetCard target = new TargetCard((graveyardExileOptional ? 0 : cardsCount), cardsCount, Zone.GRAVEYARD, filter); if (controller.choose(Outcome.Exile, targetPlayer.getGraveyard(), target, game)) { - List targets = target.getTargets(); - for (UUID targetId : targets) { - Card targetCard = targetPlayer.getGraveyard().get(targetId, game); - if (targetCard != null) { - targetPlayer.getGraveyard().remove(targetCard); - controller.moveCardToExileWithInfo(targetCard, null, null, source.getSourceId(), game, Zone.GRAVEYARD, true); - } - } + controller.moveCards(new CardsImpl(target.getTargets()), Zone.EXILED, source, game); } } @@ -114,14 +105,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect filter.setMessage("card named " + cardName + " in the hand of " + targetPlayer.getLogName()); TargetCard target = new TargetCard(0, cardsCount, Zone.HAND, filter); if (controller.choose(Outcome.Exile, targetPlayer.getHand(), target, game)) { - List targets = target.getTargets(); - for (UUID targetId : targets) { - Card targetCard = targetPlayer.getHand().get(targetId, game); - if (targetCard != null) { - targetPlayer.getHand().remove(targetCard); - controller.moveCardToExileWithInfo(targetCard, null, null, source.getSourceId(), game, Zone.HAND, true); - } - } + controller.moveCards(new CardsImpl(target.getTargets()), Zone.EXILED, source, game); } // cards in Library @@ -131,15 +115,8 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect filter.setMessage("card named " + cardName + " in the library of " + targetPlayer.getLogName()); TargetCardInLibrary targetLib = new TargetCardInLibrary(0, cardsCount, filter); if (controller.choose(Outcome.Exile, cardsInLibrary, targetLib, game)) { - List targets = targetLib.getTargets(); - for (UUID targetId : targets) { - Card targetCard = targetPlayer.getLibrary().remove(targetId, game); - if (targetCard != null) { - controller.moveCardToExileWithInfo(targetCard, null, null, source.getSourceId(), game, Zone.LIBRARY, true); - } - } + controller.moveCards(new CardsImpl(targetLib.getTargets()), Zone.EXILED, source, game); } - targetPlayer.shuffleLibrary(game); } diff --git a/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java diff --git a/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/turn/AddExtraTurnTargetEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/turn/AddExtraTurnTargetEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/turn/AddExtraTurnTargetEffect.java diff --git a/Mage/src/mage/abilities/effects/common/turn/ControlTargetPlayerNextTurnEffect.java b/Mage/src/main/java/mage/abilities/effects/common/turn/ControlTargetPlayerNextTurnEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/turn/ControlTargetPlayerNextTurnEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/turn/ControlTargetPlayerNextTurnEffect.java diff --git a/Mage/src/mage/abilities/effects/common/turn/SkipNextTurnSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/turn/SkipNextTurnSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/common/turn/SkipNextTurnSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/turn/SkipNextTurnSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/BolsterEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/BolsterEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/FatesealEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/FatesealEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/FatesealEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/FatesealEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/ManifestEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ManifestEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/ManifestEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/ManifestEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/ManifestTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ManifestTargetPlayerEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/ManifestTargetPlayerEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/ManifestTargetPlayerEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/ProtectionChosenColorAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ProtectionChosenColorAttachedEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/ProtectionChosenColorAttachedEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/ProtectionChosenColorAttachedEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/ProtectionChosenColorSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ProtectionChosenColorSourceEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/ProtectionChosenColorSourceEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/ProtectionChosenColorSourceEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/ScryEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ScryEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/ScryEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/ScryEffect.java diff --git a/Mage/src/mage/abilities/effects/keyword/SweepEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java similarity index 100% rename from Mage/src/mage/abilities/effects/keyword/SweepEffect.java rename to Mage/src/main/java/mage/abilities/effects/keyword/SweepEffect.java diff --git a/Mage/src/mage/abilities/keyword/AffinityForArtifactsAbility.java b/Mage/src/main/java/mage/abilities/keyword/AffinityForArtifactsAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/AffinityForArtifactsAbility.java rename to Mage/src/main/java/mage/abilities/keyword/AffinityForArtifactsAbility.java diff --git a/Mage/src/mage/abilities/keyword/AffinityForLandTypeAbility.java b/Mage/src/main/java/mage/abilities/keyword/AffinityForLandTypeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/AffinityForLandTypeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/AffinityForLandTypeAbility.java diff --git a/Mage/src/mage/abilities/keyword/AmplifyAbility.java b/Mage/src/main/java/mage/abilities/keyword/AmplifyAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/AmplifyAbility.java rename to Mage/src/main/java/mage/abilities/keyword/AmplifyAbility.java diff --git a/Mage/src/mage/abilities/keyword/AnnihilatorAbility.java b/Mage/src/main/java/mage/abilities/keyword/AnnihilatorAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/AnnihilatorAbility.java rename to Mage/src/main/java/mage/abilities/keyword/AnnihilatorAbility.java diff --git a/Mage/src/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java b/Mage/src/main/java/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java rename to Mage/src/main/java/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java diff --git a/Mage/src/mage/abilities/keyword/AuraSwapAbility.java b/Mage/src/main/java/mage/abilities/keyword/AuraSwapAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/AuraSwapAbility.java rename to Mage/src/main/java/mage/abilities/keyword/AuraSwapAbility.java diff --git a/Mage/src/mage/abilities/keyword/AwakenAbility.java b/Mage/src/main/java/mage/abilities/keyword/AwakenAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/AwakenAbility.java rename to Mage/src/main/java/mage/abilities/keyword/AwakenAbility.java diff --git a/Mage/src/mage/abilities/keyword/BasicLandcyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/BasicLandcyclingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BasicLandcyclingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BasicLandcyclingAbility.java diff --git a/Mage/src/mage/abilities/keyword/BattalionAbility.java b/Mage/src/main/java/mage/abilities/keyword/BattalionAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BattalionAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BattalionAbility.java diff --git a/Mage/src/mage/abilities/keyword/BattleCryAbility.java b/Mage/src/main/java/mage/abilities/keyword/BattleCryAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BattleCryAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BattleCryAbility.java diff --git a/Mage/src/mage/abilities/keyword/BestowAbility.java b/Mage/src/main/java/mage/abilities/keyword/BestowAbility.java similarity index 96% rename from Mage/src/mage/abilities/keyword/BestowAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BestowAbility.java index 3f721f87006..93307330d3b 100644 --- a/Mage/src/mage/abilities/keyword/BestowAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/BestowAbility.java @@ -35,6 +35,7 @@ import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.SourceEffect; import mage.cards.Card; +import mage.cards.repository.CardRepository; import mage.constants.CardType; import mage.constants.DependencyType; import mage.constants.Duration; @@ -181,7 +182,7 @@ public class BestowAbility extends SpellAbility { } } else { permanent.getCardType().remove(CardType.CREATURE); - permanent.getSubtype().clear(); + permanent.getSubtype().retainAll(CardRepository.instance.getLandTypes()); if (!permanent.getSubtype().contains("Aura")) { permanent.getSubtype().add("Aura"); } diff --git a/Mage/src/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java b/Mage/src/main/java/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java diff --git a/Mage/src/mage/abilities/keyword/BloodrushAbility.java b/Mage/src/main/java/mage/abilities/keyword/BloodrushAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BloodrushAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BloodrushAbility.java diff --git a/Mage/src/mage/abilities/keyword/BloodthirstAbility.java b/Mage/src/main/java/mage/abilities/keyword/BloodthirstAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BloodthirstAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BloodthirstAbility.java diff --git a/Mage/src/mage/abilities/keyword/BushidoAbility.java b/Mage/src/main/java/mage/abilities/keyword/BushidoAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BushidoAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BushidoAbility.java diff --git a/Mage/src/mage/abilities/keyword/BuybackAbility.java b/Mage/src/main/java/mage/abilities/keyword/BuybackAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/BuybackAbility.java rename to Mage/src/main/java/mage/abilities/keyword/BuybackAbility.java diff --git a/Mage/src/mage/abilities/keyword/CanAttackOnlyAloneAbility.java b/Mage/src/main/java/mage/abilities/keyword/CanAttackOnlyAloneAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/CanAttackOnlyAloneAbility.java rename to Mage/src/main/java/mage/abilities/keyword/CanAttackOnlyAloneAbility.java diff --git a/Mage/src/mage/abilities/keyword/CantAttackAloneAbility.java b/Mage/src/main/java/mage/abilities/keyword/CantAttackAloneAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/CantAttackAloneAbility.java rename to Mage/src/main/java/mage/abilities/keyword/CantAttackAloneAbility.java diff --git a/Mage/src/mage/abilities/keyword/CantBeBlockedSourceAbility.java b/Mage/src/main/java/mage/abilities/keyword/CantBeBlockedSourceAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/CantBeBlockedSourceAbility.java rename to Mage/src/main/java/mage/abilities/keyword/CantBeBlockedSourceAbility.java diff --git a/Mage/src/mage/abilities/keyword/CantBlockAloneAbility.java b/Mage/src/main/java/mage/abilities/keyword/CantBlockAloneAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/CantBlockAloneAbility.java rename to Mage/src/main/java/mage/abilities/keyword/CantBlockAloneAbility.java diff --git a/Mage/src/mage/abilities/keyword/CascadeAbility.java b/Mage/src/main/java/mage/abilities/keyword/CascadeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/CascadeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/CascadeAbility.java diff --git a/Mage/src/mage/abilities/keyword/ChampionAbility.java b/Mage/src/main/java/mage/abilities/keyword/ChampionAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ChampionAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ChampionAbility.java diff --git a/Mage/src/mage/abilities/keyword/ChangelingAbility.java b/Mage/src/main/java/mage/abilities/keyword/ChangelingAbility.java similarity index 99% rename from Mage/src/mage/abilities/keyword/ChangelingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ChangelingAbility.java index 94fb1debb65..bc90a8764c9 100644 --- a/Mage/src/mage/abilities/keyword/ChangelingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ChangelingAbility.java @@ -61,7 +61,7 @@ public class ChangelingAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Changeling (This card is every creature type.)"; + return "Changeling (This card is every creature type.)"; } @Override diff --git a/Mage/src/mage/abilities/keyword/ChannelAbility.java b/Mage/src/main/java/mage/abilities/keyword/ChannelAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ChannelAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ChannelAbility.java diff --git a/Mage/src/mage/abilities/keyword/ConspireAbility.java b/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java similarity index 96% rename from Mage/src/mage/abilities/keyword/ConspireAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java index a655b31721d..a1321b9e9bc 100644 --- a/Mage/src/mage/abilities/keyword/ConspireAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java @@ -104,13 +104,13 @@ public class ConspireAbility extends StaticAbility implements OptionalAdditional this.conspireId = conspireId; switch (conspireTargets) { case NONE: - reminderText = "As you cast this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it.)"; + reminderText = "As you cast this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it."; break; case ONE: - reminderText = "As you cast this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose a new target for the copy.)"; + reminderText = "As you cast this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose a new target for the copy."; break; case MORE: - reminderText = "As you cast this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose a new targets for the copy.)"; + reminderText = "As you cast this spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose new targets for the copy."; break; } Cost cost = new TapTargetCost(new TargetControlledPermanent(2, 2, filter, true)); diff --git a/Mage/src/mage/abilities/keyword/ConvokeAbility.java b/Mage/src/main/java/mage/abilities/keyword/ConvokeAbility.java similarity index 93% rename from Mage/src/mage/abilities/keyword/ConvokeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ConvokeAbility.java index aac3ab7ab74..232be52c57c 100644 --- a/Mage/src/mage/abilities/keyword/ConvokeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ConvokeAbility.java @@ -222,32 +222,32 @@ class ConvokeEffect extends OneShotEffect { chooseManaType.setChoice(chooseManaType.getChoices().iterator().next()); } if (chooseManaType.getChoice().equals("Black")) { - manaPool.addMana(Mana.BlackMana, game, source); + manaPool.addMana(Mana.BlackMana(1), game, source); manaPool.unlockManaType(ManaType.BLACK); } if (chooseManaType.getChoice().equals("Blue")) { - manaPool.addMana(Mana.BlueMana, game, source); + manaPool.addMana(Mana.BlueMana(1), game, source); manaPool.unlockManaType(ManaType.BLUE); } if (chooseManaType.getChoice().equals("Green")) { - manaPool.addMana(Mana.GreenMana, game, source); + manaPool.addMana(Mana.GreenMana(1), game, source); manaPool.unlockManaType(ManaType.GREEN); } if (chooseManaType.getChoice().equals("White")) { - manaPool.addMana(Mana.WhiteMana, game, source); + manaPool.addMana(Mana.WhiteMana(1), game, source); manaPool.unlockManaType(ManaType.WHITE); } if (chooseManaType.getChoice().equals("Red")) { - manaPool.addMana(Mana.RedMana, game, source); + manaPool.addMana(Mana.RedMana(1), game, source); manaPool.unlockManaType(ManaType.RED); } if (chooseManaType.getChoice().equals("Colorless")) { - manaPool.addMana(Mana.ColorlessMana, game, source); + manaPool.addMana(Mana.ColorlessMana(1), game, source); manaPool.unlockManaType(ManaType.COLORLESS); } manaName = chooseManaType.getChoice().toLowerCase(); } else { - manaPool.addMana(Mana.ColorlessMana, game, source); + manaPool.addMana(Mana.ColorlessMana(1), game, source); manaPool.unlockManaType(ManaType.COLORLESS); manaName = "colorless"; } diff --git a/Mage/src/mage/abilities/keyword/CumulativeUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/CumulativeUpkeepAbility.java rename to Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java diff --git a/Mage/src/mage/abilities/keyword/CyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/CyclingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/CyclingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/CyclingAbility.java diff --git a/Mage/src/mage/abilities/keyword/DashAbility.java b/Mage/src/main/java/mage/abilities/keyword/DashAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DashAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DashAbility.java diff --git a/Mage/src/mage/abilities/keyword/DeathtouchAbility.java b/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DeathtouchAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java diff --git a/Mage/src/mage/abilities/keyword/DefenderAbility.java b/Mage/src/main/java/mage/abilities/keyword/DefenderAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DefenderAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DefenderAbility.java diff --git a/Mage/src/mage/abilities/keyword/DelveAbility.java b/Mage/src/main/java/mage/abilities/keyword/DelveAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DelveAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DelveAbility.java diff --git a/Mage/src/mage/abilities/keyword/DethroneAbility.java b/Mage/src/main/java/mage/abilities/keyword/DethroneAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DethroneAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DethroneAbility.java diff --git a/Mage/src/mage/abilities/keyword/DevoidAbility.java b/Mage/src/main/java/mage/abilities/keyword/DevoidAbility.java similarity index 89% rename from Mage/src/mage/abilities/keyword/DevoidAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DevoidAbility.java index ec25acc9727..7aff3d5e46a 100644 --- a/Mage/src/mage/abilities/keyword/DevoidAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/DevoidAbility.java @@ -35,7 +35,7 @@ public class DevoidAbility extends SimpleStaticAbility { @Override public String getRule() { - return "Devoid (This card has no color.)"; + return "Devoid (This card has no color.)"; } } diff --git a/Mage/src/mage/abilities/keyword/DevourAbility.java b/Mage/src/main/java/mage/abilities/keyword/DevourAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DevourAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DevourAbility.java diff --git a/Mage/src/mage/abilities/keyword/DoubleStrikeAbility.java b/Mage/src/main/java/mage/abilities/keyword/DoubleStrikeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DoubleStrikeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DoubleStrikeAbility.java diff --git a/Mage/src/mage/abilities/keyword/DredgeAbility.java b/Mage/src/main/java/mage/abilities/keyword/DredgeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/DredgeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/DredgeAbility.java diff --git a/Mage/src/mage/abilities/keyword/EchoAbility.java b/Mage/src/main/java/mage/abilities/keyword/EchoAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/EchoAbility.java rename to Mage/src/main/java/mage/abilities/keyword/EchoAbility.java diff --git a/Mage/src/mage/abilities/keyword/EnchantAbility.java b/Mage/src/main/java/mage/abilities/keyword/EnchantAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/EnchantAbility.java rename to Mage/src/main/java/mage/abilities/keyword/EnchantAbility.java diff --git a/Mage/src/mage/abilities/keyword/EntwineAbility.java b/Mage/src/main/java/mage/abilities/keyword/EntwineAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/EntwineAbility.java rename to Mage/src/main/java/mage/abilities/keyword/EntwineAbility.java diff --git a/Mage/src/mage/abilities/keyword/EquipAbility.java b/Mage/src/main/java/mage/abilities/keyword/EquipAbility.java similarity index 99% rename from Mage/src/mage/abilities/keyword/EquipAbility.java rename to Mage/src/main/java/mage/abilities/keyword/EquipAbility.java index 5316e6ff92c..7e6ff39582f 100644 --- a/Mage/src/mage/abilities/keyword/EquipAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EquipAbility.java @@ -80,7 +80,7 @@ public class EquipAbility extends ActivatedAbilityImpl { @Override public String getRule() { StringBuilder sb = new StringBuilder("Equip ").append(costs.getText()).append(manaCosts.getText()); - sb.append(" (").append(manaCosts.getText()).append(": Attach to target creature you control. Equip only as a sorcery.)").toString(); + sb.append(" (").append(manaCosts.getText()).append(": Attach to target creature you control. Equip only as a sorcery.)"); return sb.toString(); } diff --git a/Mage/src/mage/abilities/keyword/EvokeAbility.java b/Mage/src/main/java/mage/abilities/keyword/EvokeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/EvokeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/EvokeAbility.java diff --git a/Mage/src/mage/abilities/keyword/EvolveAbility.java b/Mage/src/main/java/mage/abilities/keyword/EvolveAbility.java similarity index 95% rename from Mage/src/mage/abilities/keyword/EvolveAbility.java rename to Mage/src/main/java/mage/abilities/keyword/EvolveAbility.java index 00712d973c8..a23e25143b6 100644 --- a/Mage/src/mage/abilities/keyword/EvolveAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EvolveAbility.java @@ -166,9 +166,8 @@ class EvolveEffect extends OneShotEffect { if (triggeringCreature != null) { Permanent sourceCreature = game.getPermanent(source.getSourceId()); if (sourceCreature != null && EvolveAbility.isPowerOrThoughnessGreater(sourceCreature, triggeringCreature)) { - game.getState().setValue("EvolveAddCounterActive", Boolean.TRUE); sourceCreature.addCounters(CounterType.P1P1.createInstance(), game); - game.getState().setValue("EvolveAddCounterActive", Boolean.FALSE); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EVOLVED_CREATURE, sourceCreature.getId(), source.getSourceId(), source.getControllerId())); } return true; } diff --git a/Mage/src/mage/abilities/keyword/ExaltedAbility.java b/Mage/src/main/java/mage/abilities/keyword/ExaltedAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ExaltedAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ExaltedAbility.java diff --git a/Mage/src/mage/abilities/keyword/ExploitAbility.java b/Mage/src/main/java/mage/abilities/keyword/ExploitAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ExploitAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ExploitAbility.java diff --git a/Mage/src/mage/abilities/keyword/ExtortAbility.java b/Mage/src/main/java/mage/abilities/keyword/ExtortAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ExtortAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ExtortAbility.java diff --git a/Mage/src/mage/abilities/keyword/FadingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/FadingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FadingAbility.java diff --git a/Mage/src/mage/abilities/keyword/FearAbility.java b/Mage/src/main/java/mage/abilities/keyword/FearAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/FearAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FearAbility.java diff --git a/Mage/src/mage/abilities/keyword/FirstStrikeAbility.java b/Mage/src/main/java/mage/abilities/keyword/FirstStrikeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/FirstStrikeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FirstStrikeAbility.java diff --git a/Mage/src/mage/abilities/keyword/FlankingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/FlankingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java diff --git a/Mage/src/mage/abilities/keyword/FlashAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlashAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/FlashAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FlashAbility.java diff --git a/Mage/src/mage/abilities/keyword/FlashbackAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlashbackAbility.java similarity index 66% rename from Mage/src/mage/abilities/keyword/FlashbackAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FlashbackAbility.java index d1f23c4dbd1..9b514380393 100644 --- a/Mage/src/mage/abilities/keyword/FlashbackAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FlashbackAbility.java @@ -29,18 +29,13 @@ package mage.abilities.keyword; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.SpellAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.VariableCost; -import mage.abilities.costs.mana.VariableManaCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.ReplacementEffectImpl; -import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; -import mage.abilities.effects.common.ExileSourceEffect; import mage.cards.Card; import mage.cards.SplitCard; -import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SpellAbilityType; @@ -54,13 +49,14 @@ import mage.players.Player; /** * 702.32. Flashback * - * 702.32a. Flashback appears on some instants and sorceries. It represents two static abilities: - * one that functions while the card is in a player‘s graveyard and the other that functions - * while the card is on the stack. Flashback [cost] means, "You may cast this card from your - * graveyard by paying [cost] rather than paying its mana cost" and, "If the flashback cost - * was paid, exile this card instead of putting it anywhere else any time it would leave the - * stack." Casting a spell using its flashback ability follows the rules for paying alternative - * costs in rules 601.2b and 601.2e–g. + * 702.32a. Flashback appears on some instants and sorceries. It represents two + * static abilities: one that functions while the card is in a player‘s + * graveyard and the other that functions while the card is on the stack. + * Flashback [cost] means, "You may cast this card from your graveyard by paying + * [cost] rather than paying its mana cost" and, "If the flashback cost was + * paid, exile this card instead of putting it anywhere else any time it would + * leave the stack." Casting a spell using its flashback ability follows the + * rules for paying alternative costs in rules 601.2b and 601.2e–g. * * @author nantuko */ @@ -92,10 +88,10 @@ public class FlashbackAbility extends SpellAbility { if (card != null) { // Flashback can never cast a split card by Fuse, because Fuse only works from hand if (card.isSplitCard()) { - if (((SplitCard)card).getLeftHalfCard().getName().equals(abilityName)) { - return ((SplitCard)card).getLeftHalfCard().getSpellAbility().canActivate(playerId, game); - } else if (((SplitCard)card).getRightHalfCard().getName().equals(abilityName)) { - return ((SplitCard)card).getRightHalfCard().getSpellAbility().canActivate(playerId, game); + if (((SplitCard) card).getLeftHalfCard().getName().equals(abilityName)) { + return ((SplitCard) card).getLeftHalfCard().getSpellAbility().canActivate(playerId, game); + } else if (((SplitCard) card).getRightHalfCard().getName().equals(abilityName)) { + return ((SplitCard) card).getRightHalfCard().getSpellAbility().canActivate(playerId, game); } } return card.getSpellAbility().canActivate(playerId, game); @@ -108,7 +104,7 @@ public class FlashbackAbility extends SpellAbility { public FlashbackAbility copy() { return new FlashbackAbility(this); } - + @Override public String getRule(boolean all) { return this.getRule(); @@ -126,6 +122,9 @@ public class FlashbackAbility extends SpellAbility { sbRule.append(manaCosts.getText()); } if (costs.size() > 0) { + if (manaCosts.size() > 0) { + sbRule.append(", "); + } sbRule.append(costs.getText()); sbRule.append("."); } @@ -176,45 +175,33 @@ class FlashbackEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { SpellAbility spellAbility; - switch(((FlashbackAbility) source).getSpellAbilityType()) { + switch (((FlashbackAbility) source).getSpellAbilityType()) { case SPLIT_LEFT: - spellAbility = ((SplitCard)card).getLeftHalfCard().getSpellAbility(); + spellAbility = ((SplitCard) card).getLeftHalfCard().getSpellAbility().copy(); break; case SPLIT_RIGHT: - spellAbility = ((SplitCard)card).getRightHalfCard().getSpellAbility(); + spellAbility = ((SplitCard) card).getRightHalfCard().getSpellAbility().copy(); break; default: - spellAbility = card.getSpellAbility(); + spellAbility = card.getSpellAbility().copy(); } spellAbility.clear(); - // used if flashbacked spell has a {X} cost - int amount = source.getManaCostsToPay().getX(); - if (amount == 0) { - // add variable cost like Discard X cards to get the X value to the spell - // because there is currently no way to set the x value in anotehr way, it's set for the - // x mana value to be known by the spell - for (Cost cost:source.getCosts()) { - if (cost instanceof VariableCost && cost.isPaid()) { - amount = ((VariableCost) cost).getAmount(); - break; - } - } - } - if (amount > 0) { - // multiplier must be taken into account because if the base spell has {X}{X} the x value would be wrongly halfed - for (VariableCost variableCost: spellAbility.getManaCostsToPay().getVariableCosts()) { - if (variableCost instanceof VariableManaCost) { - amount = amount * ((VariableManaCost)variableCost).getMultiplier(); - break; - } + // set the payed flashback costs to the spell ability so abilities like Converge or calculation of {X} values work + spellAbility.getManaCostsToPay().clear(); + spellAbility.getManaCostsToPay().addAll(source.getManaCostsToPay()); + // needed to get e.g. paid costs from Conflagrate + spellAbility.getCosts().clear(); + for (Cost cost : source.getCosts()) { + if (!(cost instanceof VariableCost)) { + spellAbility.getCosts().add(cost); } - spellAbility.getManaCostsToPay().setX(amount); } - if (!game.isSimulation()) - game.informPlayers(new StringBuilder(controller.getLogName()).append(" flashbacks ").append(card.getName()).toString()); + if (!game.isSimulation()) { + game.informPlayers(controller.getLogName() + " flashbacks " + card.getLogName()); + } spellAbility.setCostModificationActive(false); // prevents to apply cost modification twice for flashbacked spells - if (controller.cast(spellAbility, game, true)) { + if (controller.cast(spellAbility, game, false)) { game.addEffect(new FlashbackReplacementEffect(), source); return true; } @@ -252,7 +239,7 @@ class FlashbackReplacementEffect extends ReplacementEffectImpl { if (controller != null) { Card card = game.getCard(event.getTargetId()); if (card != null) { - return controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, game.getState().getZone(card.getId()), true); + return controller.moveCards(card, Zone.EXILED, source, game); } } return false; @@ -265,8 +252,8 @@ class FlashbackReplacementEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - return event.getTargetId().equals(source.getSourceId()) - && ((ZoneChangeEvent)event).getFromZone() == Zone.STACK - && ((ZoneChangeEvent)event).getToZone() != Zone.EXILED; + return event.getTargetId().equals(source.getSourceId()) + && ((ZoneChangeEvent) event).getFromZone() == Zone.STACK + && ((ZoneChangeEvent) event).getToZone() != Zone.EXILED; } } diff --git a/Mage/src/mage/abilities/keyword/FlyingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/FlyingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java diff --git a/Mage/src/mage/abilities/keyword/ForecastAbility.java b/Mage/src/main/java/mage/abilities/keyword/ForecastAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ForecastAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ForecastAbility.java diff --git a/Mage/src/mage/abilities/keyword/ForestcyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/ForestcyclingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ForestcyclingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ForestcyclingAbility.java diff --git a/Mage/src/mage/abilities/keyword/ForestwalkAbility.java b/Mage/src/main/java/mage/abilities/keyword/ForestwalkAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ForestwalkAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ForestwalkAbility.java diff --git a/Mage/src/mage/abilities/keyword/FortifyAbility.java b/Mage/src/main/java/mage/abilities/keyword/FortifyAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/FortifyAbility.java rename to Mage/src/main/java/mage/abilities/keyword/FortifyAbility.java diff --git a/Mage/src/mage/abilities/keyword/GraftAbility.java b/Mage/src/main/java/mage/abilities/keyword/GraftAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/GraftAbility.java rename to Mage/src/main/java/mage/abilities/keyword/GraftAbility.java diff --git a/Mage/src/mage/abilities/keyword/GravestormAbility.java b/Mage/src/main/java/mage/abilities/keyword/GravestormAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/GravestormAbility.java rename to Mage/src/main/java/mage/abilities/keyword/GravestormAbility.java diff --git a/Mage/src/mage/abilities/keyword/HasteAbility.java b/Mage/src/main/java/mage/abilities/keyword/HasteAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/HasteAbility.java rename to Mage/src/main/java/mage/abilities/keyword/HasteAbility.java diff --git a/Mage/src/mage/abilities/keyword/HauntAbility.java b/Mage/src/main/java/mage/abilities/keyword/HauntAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/HauntAbility.java rename to Mage/src/main/java/mage/abilities/keyword/HauntAbility.java diff --git a/Mage/src/mage/abilities/keyword/HeroicAbility.java b/Mage/src/main/java/mage/abilities/keyword/HeroicAbility.java similarity index 51% rename from Mage/src/mage/abilities/keyword/HeroicAbility.java rename to Mage/src/main/java/mage/abilities/keyword/HeroicAbility.java index 5b89f5d65b1..2df1ea081ce 100644 --- a/Mage/src/mage/abilities/keyword/HeroicAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/HeroicAbility.java @@ -1,34 +1,34 @@ /* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are those of the -* authors and should not be interpreted as representing official policies, either expressed -* or implied, of BetaSteward_at_googlemail.com. -*/ - + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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 java.util.UUID; +import mage.abilities.Mode; import mage.abilities.SpellAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; @@ -44,7 +44,6 @@ import mage.target.Target; * * @author LevelX2 */ - public class HeroicAbility extends TriggeredAbilityImpl { public HeroicAbility(Effect effect) { @@ -83,19 +82,19 @@ public class HeroicAbility extends TriggeredAbilityImpl { private boolean checkSpell(Spell spell, Game game) { if (spell != null) { SpellAbility sa = spell.getSpellAbility(); - for(UUID modeId :sa.getModes().getSelectedModes()) { - for (Target target : sa.getModes().get(modeId).getTargets()) { + for (Mode mode : sa.getModes().getSelectedModes()) { + for (Target target : mode.getTargets()) { if (!target.isNotTarget() && target.getTargets().contains(this.getSourceId())) { return true; } } - for (Effect effect : sa.getModes().get(modeId).getEffects()) { + for (Effect effect : mode.getEffects()) { for (UUID targetId : effect.getTargetPointer().getTargets(game, sa)) { if (targetId.equals(this.getSourceId())) { return true; } } - } + } } } return false; diff --git a/Mage/src/mage/abilities/keyword/HexproofAbility.java b/Mage/src/main/java/mage/abilities/keyword/HexproofAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/HexproofAbility.java rename to Mage/src/main/java/mage/abilities/keyword/HexproofAbility.java diff --git a/Mage/src/mage/abilities/keyword/HideawayAbility.java b/Mage/src/main/java/mage/abilities/keyword/HideawayAbility.java similarity index 96% rename from Mage/src/mage/abilities/keyword/HideawayAbility.java rename to Mage/src/main/java/mage/abilities/keyword/HideawayAbility.java index b312fc9f3fb..a3944296a2f 100644 --- a/Mage/src/mage/abilities/keyword/HideawayAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/HideawayAbility.java @@ -96,7 +96,7 @@ class HideawayExileEffect extends OneShotEffect { public HideawayExileEffect() { super(Outcome.Benefit); - this.staticText = "Look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library"; + this.staticText = "look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library"; } public HideawayExileEffect(final HideawayExileEffect effect) { diff --git a/Mage/src/mage/abilities/keyword/HorsemanshipAbility.java b/Mage/src/main/java/mage/abilities/keyword/HorsemanshipAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/HorsemanshipAbility.java rename to Mage/src/main/java/mage/abilities/keyword/HorsemanshipAbility.java diff --git a/Mage/src/mage/abilities/keyword/IndestructibleAbility.java b/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/IndestructibleAbility.java rename to Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java diff --git a/Mage/src/mage/abilities/keyword/InfectAbility.java b/Mage/src/main/java/mage/abilities/keyword/InfectAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/InfectAbility.java rename to Mage/src/main/java/mage/abilities/keyword/InfectAbility.java diff --git a/Mage/src/mage/abilities/keyword/IngestAbility.java b/Mage/src/main/java/mage/abilities/keyword/IngestAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/IngestAbility.java rename to Mage/src/main/java/mage/abilities/keyword/IngestAbility.java diff --git a/Mage/src/mage/abilities/keyword/InspiredAbility.java b/Mage/src/main/java/mage/abilities/keyword/InspiredAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/InspiredAbility.java rename to Mage/src/main/java/mage/abilities/keyword/InspiredAbility.java diff --git a/Mage/src/mage/abilities/keyword/IntimidateAbility.java b/Mage/src/main/java/mage/abilities/keyword/IntimidateAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/IntimidateAbility.java rename to Mage/src/main/java/mage/abilities/keyword/IntimidateAbility.java diff --git a/Mage/src/mage/abilities/keyword/IslandcyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/IslandcyclingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/IslandcyclingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/IslandcyclingAbility.java diff --git a/Mage/src/mage/abilities/keyword/IslandwalkAbility.java b/Mage/src/main/java/mage/abilities/keyword/IslandwalkAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/IslandwalkAbility.java rename to Mage/src/main/java/mage/abilities/keyword/IslandwalkAbility.java diff --git a/Mage/src/mage/abilities/keyword/KickerAbility.java b/Mage/src/main/java/mage/abilities/keyword/KickerAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/KickerAbility.java rename to Mage/src/main/java/mage/abilities/keyword/KickerAbility.java diff --git a/Mage/src/mage/abilities/keyword/LandwalkAbility.java b/Mage/src/main/java/mage/abilities/keyword/LandwalkAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/LandwalkAbility.java rename to Mage/src/main/java/mage/abilities/keyword/LandwalkAbility.java diff --git a/Mage/src/mage/abilities/keyword/LevelUpAbility.java b/Mage/src/main/java/mage/abilities/keyword/LevelUpAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/LevelUpAbility.java rename to Mage/src/main/java/mage/abilities/keyword/LevelUpAbility.java diff --git a/Mage/src/mage/abilities/keyword/LevelerCardBuilder.java b/Mage/src/main/java/mage/abilities/keyword/LevelerCardBuilder.java similarity index 96% rename from Mage/src/mage/abilities/keyword/LevelerCardBuilder.java rename to Mage/src/main/java/mage/abilities/keyword/LevelerCardBuilder.java index a5691ed3222..950d40d0088 100644 --- a/Mage/src/mage/abilities/keyword/LevelerCardBuilder.java +++ b/Mage/src/main/java/mage/abilities/keyword/LevelerCardBuilder.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,15 +20,15 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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; +import java.util.ArrayList; +import java.util.List; import mage.abilities.Abilities; import mage.abilities.AbilitiesImpl; import mage.abilities.Ability; @@ -39,18 +39,17 @@ import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; -import mage.cards.Card; -import mage.cards.LevelerCard; import mage.constants.Duration; +import mage.constants.SubLayer; +import mage.constants.Zone; import mage.counters.CounterType; -import java.util.ArrayList; -import java.util.List; - /** - * The implementation by BetaSteward was discarded as requires special handling in Mage.Core. + * The implementation by BetaSteward was discarded as requires special handling + * in Mage.Core. * - * Instead it was replaced by conditional continuous effects and builder pattern. + * Instead it was replaced by conditional continuous effects and builder + * pattern. * * @author BetaSteward_at_googlemail.com * @author noxx @@ -82,7 +81,7 @@ public class LevelerCardBuilder { constructed.add(staticAbility); } - ContinuousEffect effect = new SetPowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield); + ContinuousEffect effect = new SetPowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield, SubLayer.SetPT_7b); ConditionalContinuousEffect ptEffect = new ConditionalContinuousEffect(effect, condition, rule); constructed.add(new SimpleStaticAbility(Zone.BATTLEFIELD, ptEffect)); @@ -212,12 +211,11 @@ public class LevelerCardBuilder { sb.append("Level ").append(level1); if (level2 == -1) { sb.append("+"); - } - else { + } else { sb.append("-").append(level2); } sb.append(": ").append(power).append("/").append(toughness).append(" "); - for (String rule: abilities.getRules("{this}")) { + for (String rule : abilities.getRules("{this}")) { sb.append(rule).append(" "); } return sb.toString(); diff --git a/Mage/src/mage/abilities/keyword/LeylineAbility.java b/Mage/src/main/java/mage/abilities/keyword/LeylineAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/LeylineAbility.java rename to Mage/src/main/java/mage/abilities/keyword/LeylineAbility.java diff --git a/Mage/src/mage/abilities/keyword/LifelinkAbility.java b/Mage/src/main/java/mage/abilities/keyword/LifelinkAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/LifelinkAbility.java rename to Mage/src/main/java/mage/abilities/keyword/LifelinkAbility.java diff --git a/Mage/src/mage/abilities/keyword/LivingWeaponAbility.java b/Mage/src/main/java/mage/abilities/keyword/LivingWeaponAbility.java similarity index 65% rename from Mage/src/mage/abilities/keyword/LivingWeaponAbility.java rename to Mage/src/main/java/mage/abilities/keyword/LivingWeaponAbility.java index f97bb511293..96feaae41bc 100644 --- a/Mage/src/mage/abilities/keyword/LivingWeaponAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/LivingWeaponAbility.java @@ -1,11 +1,14 @@ package mage.abilities.keyword; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; import mage.constants.CardType; -import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; @@ -22,7 +25,7 @@ public class LivingWeaponAbility extends EntersBattlefieldTriggeredAbility { @Override public String getRule() { - return "Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.)"; + return "Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.)"; } @Override @@ -31,9 +34,9 @@ public class LivingWeaponAbility extends EntersBattlefieldTriggeredAbility { } } -class LivingWeaponEffect extends OneShotEffect { +class LivingWeaponEffect extends CreateTokenEffect { LivingWeaponEffect() { - super(Outcome.PutCreatureInPlay); + super(new GermToken()); } LivingWeaponEffect(final LivingWeaponEffect effect) { @@ -44,13 +47,13 @@ class LivingWeaponEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - GermToken token = new GermToken(); - token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - Permanent p = game.getPermanent(token.getLastAddedToken()); - if (p != null) { - p.addAttachment(source.getSourceId(), game); - return true; - } + if (super.apply(game, source)) { + Permanent p = game.getPermanent(this.getLastAddedTokenId()); + if (p != null) { + p.addAttachment(source.getSourceId(), game); + return true; + } + } } return false; } @@ -62,9 +65,16 @@ class LivingWeaponEffect extends OneShotEffect { } class GermToken extends Token { + + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("C14", "MBS", "MM2")); + } + public GermToken() { super("Germ", "a 0/0 black Germ creature token"); - this.setOriginalExpansionSetCode("MBS"); + availableImageSetCodes = tokenImageSets; cardType.add(CardType.CREATURE); color.setBlack(true); subtype.add("Germ"); diff --git a/Mage/src/mage/abilities/keyword/MadnessAbility.java b/Mage/src/main/java/mage/abilities/keyword/MadnessAbility.java similarity index 98% rename from Mage/src/mage/abilities/keyword/MadnessAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MadnessAbility.java index e679fd72d0e..7c0ad8e22dd 100644 --- a/Mage/src/mage/abilities/keyword/MadnessAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MadnessAbility.java @@ -47,7 +47,7 @@ public class MadnessAbility extends StaticAbility { public MadnessAbility(Card card, ManaCosts madnessCost) { super(Zone.HAND, new MadnessReplacementEffect((ManaCosts) madnessCost)); addSubAbility(new MadnessTriggeredAbility((ManaCosts) madnessCost)); - rule = "Madness " + madnessCost.getText() + " (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)"; + rule = "Madness " + madnessCost.getText() + " (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)"; } public MadnessAbility(final MadnessAbility ability) { @@ -73,7 +73,7 @@ class MadnessReplacementEffect extends ReplacementEffectImpl { public MadnessReplacementEffect(ManaCosts madnessCost) { super(Duration.EndOfGame, Outcome.Benefit); - staticText = "Madness " + madnessCost.getText() + " (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)"; + staticText = "Madness " + madnessCost.getText() + " (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)"; } public MadnessReplacementEffect(final MadnessReplacementEffect effect) { diff --git a/Mage/src/mage/abilities/keyword/MenaceAbility.java b/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/MenaceAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java diff --git a/Mage/src/mage/abilities/keyword/MiracleAbility.java b/Mage/src/main/java/mage/abilities/keyword/MiracleAbility.java similarity index 99% rename from Mage/src/mage/abilities/keyword/MiracleAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MiracleAbility.java index 2ba71e795d1..20996fb6625 100644 --- a/Mage/src/mage/abilities/keyword/MiracleAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MiracleAbility.java @@ -92,7 +92,7 @@ import mage.watchers.common.MiracleWatcher; */ public class MiracleAbility extends TriggeredAbilityImpl { - private static final String staticRule = " (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)"; + private static final String staticRule = " (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)"; private String ruleText; @SuppressWarnings("unchecked") diff --git a/Mage/src/mage/abilities/keyword/ModularAbility.java b/Mage/src/main/java/mage/abilities/keyword/ModularAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ModularAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ModularAbility.java diff --git a/Mage/src/mage/abilities/keyword/MonstrosityAbility.java b/Mage/src/main/java/mage/abilities/keyword/MonstrosityAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/MonstrosityAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MonstrosityAbility.java diff --git a/Mage/src/mage/abilities/keyword/MorphAbility.java b/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/MorphAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MorphAbility.java diff --git a/Mage/src/mage/abilities/keyword/MountaincyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/MountaincyclingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/MountaincyclingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MountaincyclingAbility.java diff --git a/Mage/src/mage/abilities/keyword/MountainwalkAbility.java b/Mage/src/main/java/mage/abilities/keyword/MountainwalkAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/MountainwalkAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MountainwalkAbility.java diff --git a/Mage/src/mage/abilities/keyword/MultikickerAbility.java b/Mage/src/main/java/mage/abilities/keyword/MultikickerAbility.java similarity index 93% rename from Mage/src/mage/abilities/keyword/MultikickerAbility.java rename to Mage/src/main/java/mage/abilities/keyword/MultikickerAbility.java index b7bbe62336f..cfa6a791d51 100644 --- a/Mage/src/mage/abilities/keyword/MultikickerAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MultikickerAbility.java @@ -43,7 +43,7 @@ import mage.abilities.costs.OptionalAdditionalCost; public class MultikickerAbility extends KickerAbility { protected static final String MultikickerKeyword = "Multikicker"; - protected static final String MultikickerReminder = "(You may pay an additional {cost} any number of times as you cast this spell.)"; + protected static final String MultikickerReminder = "You may pay an additional {cost} any number of times as you cast this spell."; public MultikickerAbility(String manaString) { super(MultikickerKeyword, MultikickerReminder); diff --git a/Mage/src/main/java/mage/abilities/keyword/MyriadAbility.java b/Mage/src/main/java/mage/abilities/keyword/MyriadAbility.java new file mode 100644 index 00000000000..a6da1169771 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/MyriadAbility.java @@ -0,0 +1,90 @@ +/* + * 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.keyword; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +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.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +public class MyriadAbility extends AttacksTriggeredAbility { + + public MyriadAbility() { + super(new MyriadEffect(), false, + "Myriad (Whenever this creature attacks, for each opponent other than the defending player, put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile those tokens at the end of combat.)", + SetTargetPointer.PLAYER + ); + } + + public MyriadAbility(final MyriadAbility ability) { + super(ability); + } + + @Override + public MyriadAbility copy() { + return new MyriadAbility(this); + } + +} + +class MyriadEffect extends OneShotEffect { + + public MyriadEffect() { + super(Outcome.Benefit); + this.staticText = "for each opponent other than the defending player, you may put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile the tokens at the end of combat"; + } + + public MyriadEffect(final MyriadEffect effect) { + super(effect); + } + + @Override + public MyriadEffect copy() { + return new MyriadEffect(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) { + UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + if (playerId != defendingPlayerId && controller.hasOpponent(playerId, game)) { + 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); + effect.setTargetPointer(new FixedTarget(sourceObject, game)); + effect.apply(game, source); + for (Permanent tokenPermanent : effect.getAddedPermanent()) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + } + } + + } + return true; + } + return false; + } +} diff --git a/Mage/src/mage/abilities/keyword/NinjutsuAbility.java b/Mage/src/main/java/mage/abilities/keyword/NinjutsuAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/NinjutsuAbility.java rename to Mage/src/main/java/mage/abilities/keyword/NinjutsuAbility.java diff --git a/Mage/src/mage/abilities/keyword/OfferingAbility.java b/Mage/src/main/java/mage/abilities/keyword/OfferingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/OfferingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/OfferingAbility.java diff --git a/Mage/src/mage/abilities/keyword/OutlastAbility.java b/Mage/src/main/java/mage/abilities/keyword/OutlastAbility.java similarity index 95% rename from Mage/src/mage/abilities/keyword/OutlastAbility.java rename to Mage/src/main/java/mage/abilities/keyword/OutlastAbility.java index a04377e4060..3cf864db724 100644 --- a/Mage/src/mage/abilities/keyword/OutlastAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/OutlastAbility.java @@ -60,7 +60,7 @@ public class OutlastAbility extends ActivatedAbilityImpl { @Override public String getRule() { StringBuilder sb = new StringBuilder("Outlast ").append(manaCosts.getText()); - sb.append(" (").append(getManaCosts().getText()).append(", ").append(getCosts().getText()).append(": Put a +1/+1 counter on this creature. Outlast only as a sorcery.)").toString(); + sb.append(" (").append(getManaCosts().getText()).append(", ").append(getCosts().getText()).append(": Put a +1/+1 counter on this creature. Outlast only as a sorcery.)"); return sb.toString(); } diff --git a/Mage/src/mage/abilities/keyword/OverloadAbility.java b/Mage/src/main/java/mage/abilities/keyword/OverloadAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/OverloadAbility.java rename to Mage/src/main/java/mage/abilities/keyword/OverloadAbility.java diff --git a/Mage/src/mage/abilities/keyword/PersistAbility.java b/Mage/src/main/java/mage/abilities/keyword/PersistAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/PersistAbility.java rename to Mage/src/main/java/mage/abilities/keyword/PersistAbility.java diff --git a/Mage/src/mage/abilities/keyword/PhasingAbility.java b/Mage/src/main/java/mage/abilities/keyword/PhasingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/PhasingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/PhasingAbility.java diff --git a/Mage/src/mage/abilities/keyword/PlainscyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/PlainscyclingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/PlainscyclingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/PlainscyclingAbility.java diff --git a/Mage/src/mage/abilities/keyword/PlainswalkAbility.java b/Mage/src/main/java/mage/abilities/keyword/PlainswalkAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/PlainswalkAbility.java rename to Mage/src/main/java/mage/abilities/keyword/PlainswalkAbility.java diff --git a/Mage/src/mage/abilities/keyword/PoisonousAbility.java b/Mage/src/main/java/mage/abilities/keyword/PoisonousAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/PoisonousAbility.java rename to Mage/src/main/java/mage/abilities/keyword/PoisonousAbility.java diff --git a/Mage/src/mage/abilities/keyword/ProtectionAbility.java b/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ProtectionAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java diff --git a/Mage/src/mage/abilities/keyword/ProvokeAbility.java b/Mage/src/main/java/mage/abilities/keyword/ProvokeAbility.java similarity index 88% rename from Mage/src/mage/abilities/keyword/ProvokeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ProvokeAbility.java index 94b4c53f65d..d92a4f1642f 100644 --- a/Mage/src/mage/abilities/keyword/ProvokeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ProvokeAbility.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 java.util.UUID; @@ -42,26 +41,24 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; /** - * 702.38. Provoke - * 702.38a Provoke is a triggered ability. “Provoke” means “Whenever this creature attacks, you may - * choose to have target creature defending player controls block this creature this combat - * if able. If you do, untap that creature.” - * 702.38b If a creature has multiple instances of provoke, each triggers separately. + * 702.38. Provoke 702.38a Provoke is a triggered ability. “Provoke” means + * “Whenever this creature attacks, you may choose to have target creature + * defending player controls block this creature this combat if able. If you do, + * untap that creature.” 702.38b If a creature has multiple instances of + * provoke, each triggers separately. * * @author LevelX2 * */ - public class ProvokeAbility extends AttacksTriggeredAbility { - public ProvokeAbility() { + public ProvokeAbility() { super(new UntapTargetEffect(), true, "Provoke (Whenever this attacks, you may have target creature defending player controls untap and block it if able.)"); this.addEffect(new ProvokeRequirementEffect()); } public ProvokeAbility(final ProvokeAbility ability) { super(ability); - this.text = ability.text; } @Override diff --git a/Mage/src/mage/abilities/keyword/ProwessAbility.java b/Mage/src/main/java/mage/abilities/keyword/ProwessAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ProwessAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ProwessAbility.java diff --git a/Mage/src/mage/abilities/keyword/ProwlAbility.java b/Mage/src/main/java/mage/abilities/keyword/ProwlAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ProwlAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ProwlAbility.java diff --git a/Mage/src/mage/abilities/keyword/RampageAbility.java b/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/RampageAbility.java rename to Mage/src/main/java/mage/abilities/keyword/RampageAbility.java diff --git a/Mage/src/mage/abilities/keyword/ReachAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ReachAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ReachAbility.java diff --git a/Mage/src/mage/abilities/keyword/ReboundAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReboundAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ReboundAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ReboundAbility.java diff --git a/Mage/src/mage/abilities/keyword/RecoverAbility.java b/Mage/src/main/java/mage/abilities/keyword/RecoverAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/RecoverAbility.java rename to Mage/src/main/java/mage/abilities/keyword/RecoverAbility.java diff --git a/Mage/src/mage/abilities/keyword/ReinforceAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ReinforceAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java diff --git a/Mage/src/mage/abilities/keyword/RenownAbility.java b/Mage/src/main/java/mage/abilities/keyword/RenownAbility.java similarity index 93% rename from Mage/src/mage/abilities/keyword/RenownAbility.java rename to Mage/src/main/java/mage/abilities/keyword/RenownAbility.java index 878a7659768..7a4e2aab391 100644 --- a/Mage/src/mage/abilities/keyword/RenownAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RenownAbility.java @@ -101,9 +101,9 @@ class BecomesRenownedSourceEffect extends OneShotEffect { // Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) StringBuilder sb = new StringBuilder("Renown "); sb.append(renownValue == Integer.MAX_VALUE ? "X" : renownValue) - .append(". (When this creature deals combat damage to a player, if it isn't renowned, put ") + .append(" (When this creature deals combat damage to a player, if it isn't renowned, put ") .append(renownValue == Integer.MAX_VALUE ? "X" : CardUtil.numberToText(renownValue, "a")) - .append(" +1/+1 counter on it and it becomes renowned.)").toString(); + .append(" +1/+1 counter on it and it becomes renowned.)"); return sb.toString(); } diff --git a/Mage/src/mage/abilities/keyword/ReplicateAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReplicateAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ReplicateAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ReplicateAbility.java diff --git a/Mage/src/mage/abilities/keyword/RetraceAbility.java b/Mage/src/main/java/mage/abilities/keyword/RetraceAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/RetraceAbility.java rename to Mage/src/main/java/mage/abilities/keyword/RetraceAbility.java diff --git a/Mage/src/mage/abilities/keyword/RippleAbility.java b/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java similarity index 92% rename from Mage/src/mage/abilities/keyword/RippleAbility.java rename to Mage/src/main/java/mage/abilities/keyword/RippleAbility.java index ad404d5e871..dde3a57961e 100644 --- a/Mage/src/mage/abilities/keyword/RippleAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java @@ -59,7 +59,7 @@ public class RippleAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Ripple ((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.)"; } diff --git a/Mage/src/mage/abilities/keyword/ScavengeAbility.java b/Mage/src/main/java/mage/abilities/keyword/ScavengeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ScavengeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ScavengeAbility.java diff --git a/Mage/src/mage/abilities/keyword/ShadowAbility.java b/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ShadowAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java diff --git a/Mage/src/mage/abilities/keyword/ShroudAbility.java b/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/ShroudAbility.java rename to Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java diff --git a/Mage/src/mage/abilities/keyword/SoulbondAbility.java b/Mage/src/main/java/mage/abilities/keyword/SoulbondAbility.java similarity index 97% rename from Mage/src/mage/abilities/keyword/SoulbondAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SoulbondAbility.java index eb39830a782..f8150ded958 100644 --- a/Mage/src/mage/abilities/keyword/SoulbondAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SoulbondAbility.java @@ -54,7 +54,7 @@ public class SoulbondAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Soulbond (You may pair this creature with another unpaired creature when either enters the battlefield. They remain paired for as long as you control both of them.)"; + return "Soulbond (You may pair this creature with another unpaired creature when either enters the battlefield. They remain paired for as long as you control both of them.)"; } @Override diff --git a/Mage/src/mage/abilities/keyword/SoulshiftAbility.java b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java similarity index 96% rename from Mage/src/mage/abilities/keyword/SoulshiftAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java index 7927a9fd7d7..96f32a31dc9 100644 --- a/Mage/src/mage/abilities/keyword/SoulshiftAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java @@ -89,10 +89,10 @@ public class SoulshiftAbility extends DiesTriggeredAbility { @Override public String getRule() { if (amount instanceof StaticValue) { - return "Soulshift " + amount.toString() + " (When this creature dies, you may return target Spirit card with converted mana cost " + amount.toString() + " or less from your graveyard to your hand.)"; + return "Soulshift " + amount.toString() + " (When this creature dies, you may return target Spirit card with converted mana cost " + amount.toString() + " or less from your graveyard to your hand.)"; } else { return "{this} has soulshift X, where X is the number of " + amount.getMessage() + - ". (When this creature dies, you may return target Spirit card with converted mana cost X or less from your graveyard to your hand.)"; + ". (When this creature dies, you may return target Spirit card with converted mana cost X or less from your graveyard to your hand.)"; } } diff --git a/Mage/src/mage/abilities/keyword/SpliceOntoArcaneAbility.java b/Mage/src/main/java/mage/abilities/keyword/SpliceOntoArcaneAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/SpliceOntoArcaneAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SpliceOntoArcaneAbility.java diff --git a/Mage/src/mage/abilities/keyword/SplitSecondAbility.java b/Mage/src/main/java/mage/abilities/keyword/SplitSecondAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/SplitSecondAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SplitSecondAbility.java diff --git a/Mage/src/mage/abilities/keyword/StormAbility.java b/Mage/src/main/java/mage/abilities/keyword/StormAbility.java similarity index 99% rename from Mage/src/mage/abilities/keyword/StormAbility.java rename to Mage/src/main/java/mage/abilities/keyword/StormAbility.java index df0352dece5..9994e218b05 100644 --- a/Mage/src/mage/abilities/keyword/StormAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/StormAbility.java @@ -84,7 +84,7 @@ public class StormAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies.)" ; + return "Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies.)" ; } } diff --git a/Mage/src/mage/abilities/keyword/SunburstAbility.java b/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/SunburstAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java diff --git a/Mage/src/mage/abilities/keyword/SuspendAbility.java b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/SuspendAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java diff --git a/Mage/src/mage/abilities/keyword/SwampcyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/SwampcyclingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/SwampcyclingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SwampcyclingAbility.java diff --git a/Mage/src/mage/abilities/keyword/SwampwalkAbility.java b/Mage/src/main/java/mage/abilities/keyword/SwampwalkAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/SwampwalkAbility.java rename to Mage/src/main/java/mage/abilities/keyword/SwampwalkAbility.java diff --git a/Mage/src/mage/abilities/keyword/TotemArmorAbility.java b/Mage/src/main/java/mage/abilities/keyword/TotemArmorAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/TotemArmorAbility.java rename to Mage/src/main/java/mage/abilities/keyword/TotemArmorAbility.java diff --git a/Mage/src/mage/abilities/keyword/TrampleAbility.java b/Mage/src/main/java/mage/abilities/keyword/TrampleAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/TrampleAbility.java rename to Mage/src/main/java/mage/abilities/keyword/TrampleAbility.java diff --git a/Mage/src/mage/abilities/keyword/TransformAbility.java b/Mage/src/main/java/mage/abilities/keyword/TransformAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/TransformAbility.java rename to Mage/src/main/java/mage/abilities/keyword/TransformAbility.java diff --git a/Mage/src/mage/abilities/keyword/TransmuteAbility.java b/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/TransmuteAbility.java rename to Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java diff --git a/Mage/src/mage/abilities/keyword/TributeAbility.java b/Mage/src/main/java/mage/abilities/keyword/TributeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/TributeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/TributeAbility.java diff --git a/Mage/src/mage/abilities/keyword/UndyingAbility.java b/Mage/src/main/java/mage/abilities/keyword/UndyingAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/UndyingAbility.java rename to Mage/src/main/java/mage/abilities/keyword/UndyingAbility.java diff --git a/Mage/src/mage/abilities/keyword/UnearthAbility.java b/Mage/src/main/java/mage/abilities/keyword/UnearthAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/UnearthAbility.java rename to Mage/src/main/java/mage/abilities/keyword/UnearthAbility.java diff --git a/Mage/src/mage/abilities/keyword/UnleashAbility.java b/Mage/src/main/java/mage/abilities/keyword/UnleashAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/UnleashAbility.java rename to Mage/src/main/java/mage/abilities/keyword/UnleashAbility.java diff --git a/Mage/src/mage/abilities/keyword/VanishingSacrificeAbility.java b/Mage/src/main/java/mage/abilities/keyword/VanishingSacrificeAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/VanishingSacrificeAbility.java rename to Mage/src/main/java/mage/abilities/keyword/VanishingSacrificeAbility.java diff --git a/Mage/src/mage/abilities/keyword/VanishingUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/VanishingUpkeepAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/VanishingUpkeepAbility.java rename to Mage/src/main/java/mage/abilities/keyword/VanishingUpkeepAbility.java diff --git a/Mage/src/mage/abilities/keyword/VigilanceAbility.java b/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/VigilanceAbility.java rename to Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java diff --git a/Mage/src/mage/abilities/keyword/WitherAbility.java b/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java similarity index 100% rename from Mage/src/mage/abilities/keyword/WitherAbility.java rename to Mage/src/main/java/mage/abilities/keyword/WitherAbility.java diff --git a/Mage/src/mage/abilities/mana/ActivateAsSorceryManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ActivateAsSorceryManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ActivateAsSorceryManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ActivateAsSorceryManaAbility.java diff --git a/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java diff --git a/Mage/src/mage/abilities/mana/ActivateOncePerTurnManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ActivateOncePerTurnManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ActivateOncePerTurnManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ActivateOncePerTurnManaAbility.java diff --git a/Mage/src/mage/abilities/mana/AnyColorManaAbility.java b/Mage/src/main/java/mage/abilities/mana/AnyColorManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/AnyColorManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/AnyColorManaAbility.java diff --git a/Mage/src/mage/abilities/mana/AnyColorOpponentLandsProduceManaAbility.java b/Mage/src/main/java/mage/abilities/mana/AnyColorOpponentLandsProduceManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/AnyColorOpponentLandsProduceManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/AnyColorOpponentLandsProduceManaAbility.java diff --git a/Mage/src/mage/abilities/mana/BasicManaAbility.java b/Mage/src/main/java/mage/abilities/mana/BasicManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/BasicManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/BasicManaAbility.java diff --git a/Mage/src/mage/abilities/mana/BlackManaAbility.java b/Mage/src/main/java/mage/abilities/mana/BlackManaAbility.java similarity index 97% rename from Mage/src/mage/abilities/mana/BlackManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/BlackManaAbility.java index 96e1c591506..1c6f4f4648f 100644 --- a/Mage/src/mage/abilities/mana/BlackManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/BlackManaAbility.java @@ -39,7 +39,7 @@ import mage.constants.ColoredManaSymbol; public class BlackManaAbility extends BasicManaAbility { public BlackManaAbility() { - super(new BasicManaEffect(Mana.BlackMana)); + super(new BasicManaEffect(Mana.BlackMana(1))); this.netMana.add(new Mana(ColoredManaSymbol.B)); } diff --git a/Mage/src/mage/abilities/mana/BlueManaAbility.java b/Mage/src/main/java/mage/abilities/mana/BlueManaAbility.java similarity index 97% rename from Mage/src/mage/abilities/mana/BlueManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/BlueManaAbility.java index 5c26f819063..de55909692b 100644 --- a/Mage/src/mage/abilities/mana/BlueManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/BlueManaAbility.java @@ -39,7 +39,7 @@ import mage.constants.ColoredManaSymbol; public class BlueManaAbility extends BasicManaAbility { public BlueManaAbility() { - super(new BasicManaEffect(Mana.BlueMana)); + super(new BasicManaEffect(Mana.BlueMana(1))); this.netMana.add(new Mana(ColoredManaSymbol.U)); } diff --git a/Mage/src/mage/abilities/mana/ColorlessManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java similarity index 97% rename from Mage/src/mage/abilities/mana/ColorlessManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java index 3f1e5636ca3..6b1c725d637 100644 --- a/Mage/src/mage/abilities/mana/ColorlessManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java @@ -38,7 +38,7 @@ import mage.abilities.effects.common.BasicManaEffect; public class ColorlessManaAbility extends BasicManaAbility { public ColorlessManaAbility() { - super(new BasicManaEffect(Mana.ColorlessMana)); + super(new BasicManaEffect(Mana.ColorlessMana(1))); this.netMana.add(new Mana(0,0,0,0,0,1,0)); } diff --git a/Mage/src/mage/abilities/mana/CommanderColorIdentityManaAbility.java b/Mage/src/main/java/mage/abilities/mana/CommanderColorIdentityManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/CommanderColorIdentityManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/CommanderColorIdentityManaAbility.java diff --git a/Mage/src/mage/abilities/mana/ConditionalAnyColorManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ConditionalAnyColorManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ConditionalAnyColorManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ConditionalAnyColorManaAbility.java diff --git a/Mage/src/mage/abilities/mana/ConditionalColoredManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ConditionalColoredManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ConditionalColoredManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ConditionalColoredManaAbility.java diff --git a/Mage/src/mage/abilities/mana/ConditionalColorlessManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ConditionalColorlessManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ConditionalColorlessManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ConditionalColorlessManaAbility.java diff --git a/Mage/src/mage/abilities/mana/ConditionalManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ConditionalManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ConditionalManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ConditionalManaAbility.java diff --git a/Mage/src/mage/abilities/mana/DelayedTriggeredManaAbility.java b/Mage/src/main/java/mage/abilities/mana/DelayedTriggeredManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/DelayedTriggeredManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/DelayedTriggeredManaAbility.java diff --git a/Mage/src/mage/abilities/mana/DynamicManaAbility.java b/Mage/src/main/java/mage/abilities/mana/DynamicManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/DynamicManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/DynamicManaAbility.java diff --git a/Mage/src/mage/abilities/mana/GreenManaAbility.java b/Mage/src/main/java/mage/abilities/mana/GreenManaAbility.java similarity index 97% rename from Mage/src/mage/abilities/mana/GreenManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/GreenManaAbility.java index 683c6df3335..54f00eccca8 100644 --- a/Mage/src/mage/abilities/mana/GreenManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/GreenManaAbility.java @@ -39,7 +39,7 @@ import mage.constants.ColoredManaSymbol; public class GreenManaAbility extends BasicManaAbility { public GreenManaAbility() { - super(new BasicManaEffect(Mana.GreenMana)); + super(new BasicManaEffect(Mana.GreenMana(1))); this.netMana.add(new Mana(ColoredManaSymbol.G)); } diff --git a/Mage/src/mage/abilities/mana/ManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/ManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/ManaAbility.java diff --git a/Mage/src/mage/abilities/mana/ManaOptions.java b/Mage/src/main/java/mage/abilities/mana/ManaOptions.java similarity index 91% rename from Mage/src/mage/abilities/mana/ManaOptions.java rename to Mage/src/main/java/mage/abilities/mana/ManaOptions.java index bb5977e813f..65a3518e6af 100644 --- a/Mage/src/mage/abilities/mana/ManaOptions.java +++ b/Mage/src/main/java/mage/abilities/mana/ManaOptions.java @@ -296,25 +296,25 @@ public class ManaOptions extends ArrayList { for (Mana existingMana : existingManas) { Mana manaToPay = manaAvailable.copy(); manaToPay.subtract(existingMana); - if (manaToPay.getBlack() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.BlackMana.toString())) { - manaToPay.subtract(Mana.BlackMana); - addManaCombination(Mana.BlackMana, existingMana, payCombinations, payCombinationsStrings); + if (manaToPay.getBlack() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.BlackMana(1).toString())) { + manaToPay.subtract(Mana.BlackMana(1)); + addManaCombination(Mana.BlackMana(1), existingMana, payCombinations, payCombinationsStrings); } - if (manaToPay.getBlue() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.BlueMana.toString())) { - manaToPay.subtract(Mana.BlueMana); - addManaCombination(Mana.BlueMana, existingMana, payCombinations, payCombinationsStrings); + if (manaToPay.getBlue() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.BlueMana(1).toString())) { + manaToPay.subtract(Mana.BlueMana(1)); + addManaCombination(Mana.BlueMana(1), existingMana, payCombinations, payCombinationsStrings); } - if (manaToPay.getGreen() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.GreenMana.toString())) { - manaToPay.subtract(Mana.GreenMana); - addManaCombination(Mana.GreenMana, existingMana, payCombinations, payCombinationsStrings); + if (manaToPay.getGreen() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.GreenMana(1).toString())) { + manaToPay.subtract(Mana.GreenMana(1)); + addManaCombination(Mana.GreenMana(1), existingMana, payCombinations, payCombinationsStrings); } - if (manaToPay.getRed() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.RedMana.toString())) { - manaToPay.subtract(Mana.RedMana); - addManaCombination(Mana.RedMana, existingMana, payCombinations, payCombinationsStrings); + if (manaToPay.getRed() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.RedMana(1).toString())) { + manaToPay.subtract(Mana.RedMana(1)); + addManaCombination(Mana.RedMana(1), existingMana, payCombinations, payCombinationsStrings); } - if (manaToPay.getWhite() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.WhiteMana.toString())) { - manaToPay.subtract(Mana.WhiteMana); - addManaCombination(Mana.WhiteMana, existingMana, payCombinations, payCombinationsStrings); + if (manaToPay.getWhite() > 0 && !payCombinationsStrings.contains(existingMana.toString() + Mana.WhiteMana(1).toString())) { + manaToPay.subtract(Mana.WhiteMana(1)); + addManaCombination(Mana.WhiteMana(1), existingMana, payCombinations, payCombinationsStrings); } } } diff --git a/Mage/src/mage/abilities/mana/RedManaAbility.java b/Mage/src/main/java/mage/abilities/mana/RedManaAbility.java similarity index 97% rename from Mage/src/mage/abilities/mana/RedManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/RedManaAbility.java index 417002fcc2b..b07cc876061 100644 --- a/Mage/src/mage/abilities/mana/RedManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/RedManaAbility.java @@ -39,7 +39,7 @@ import mage.constants.ColoredManaSymbol; public class RedManaAbility extends BasicManaAbility { public RedManaAbility() { - super(new BasicManaEffect(Mana.RedMana)); + super(new BasicManaEffect(Mana.RedMana(1))); this.netMana.add(new Mana(ColoredManaSymbol.R)); } diff --git a/Mage/src/mage/abilities/mana/SimpleManaAbility.java b/Mage/src/main/java/mage/abilities/mana/SimpleManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/SimpleManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/SimpleManaAbility.java diff --git a/Mage/src/mage/abilities/mana/TriggeredManaAbility.java b/Mage/src/main/java/mage/abilities/mana/TriggeredManaAbility.java similarity index 100% rename from Mage/src/mage/abilities/mana/TriggeredManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/TriggeredManaAbility.java diff --git a/Mage/src/mage/abilities/mana/WhiteManaAbility.java b/Mage/src/main/java/mage/abilities/mana/WhiteManaAbility.java similarity index 97% rename from Mage/src/mage/abilities/mana/WhiteManaAbility.java rename to Mage/src/main/java/mage/abilities/mana/WhiteManaAbility.java index cba870ec0b5..600544fea08 100644 --- a/Mage/src/mage/abilities/mana/WhiteManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/WhiteManaAbility.java @@ -39,7 +39,7 @@ import mage.constants.ColoredManaSymbol; public class WhiteManaAbility extends BasicManaAbility { public WhiteManaAbility() { - super(new BasicManaEffect(Mana.WhiteMana)); + super(new BasicManaEffect(Mana.WhiteMana(1))); this.netMana.add(new Mana(ColoredManaSymbol.W)); } diff --git a/Mage/src/mage/abilities/mana/builder/Builder.java b/Mage/src/main/java/mage/abilities/mana/builder/Builder.java similarity index 100% rename from Mage/src/mage/abilities/mana/builder/Builder.java rename to Mage/src/main/java/mage/abilities/mana/builder/Builder.java diff --git a/Mage/src/mage/abilities/mana/builder/ConditionalManaBuilder.java b/Mage/src/main/java/mage/abilities/mana/builder/ConditionalManaBuilder.java similarity index 100% rename from Mage/src/mage/abilities/mana/builder/ConditionalManaBuilder.java rename to Mage/src/main/java/mage/abilities/mana/builder/ConditionalManaBuilder.java diff --git a/Mage/src/mage/abilities/mana/conditional/ArtifactCastConditionalMana.java b/Mage/src/main/java/mage/abilities/mana/conditional/ArtifactCastConditionalMana.java similarity index 100% rename from Mage/src/mage/abilities/mana/conditional/ArtifactCastConditionalMana.java rename to Mage/src/main/java/mage/abilities/mana/conditional/ArtifactCastConditionalMana.java diff --git a/Mage/src/mage/abilities/mana/conditional/ArtifactCastManaCondition.java b/Mage/src/main/java/mage/abilities/mana/conditional/ArtifactCastManaCondition.java similarity index 100% rename from Mage/src/mage/abilities/mana/conditional/ArtifactCastManaCondition.java rename to Mage/src/main/java/mage/abilities/mana/conditional/ArtifactCastManaCondition.java diff --git a/Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java b/Mage/src/main/java/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java similarity index 100% rename from Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java rename to Mage/src/main/java/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java diff --git a/Mage/src/mage/abilities/mana/conditional/CreatureCastConditionalMana.java b/Mage/src/main/java/mage/abilities/mana/conditional/CreatureCastConditionalMana.java similarity index 100% rename from Mage/src/mage/abilities/mana/conditional/CreatureCastConditionalMana.java rename to Mage/src/main/java/mage/abilities/mana/conditional/CreatureCastConditionalMana.java diff --git a/Mage/src/mage/abilities/mana/conditional/CreatureCastManaCondition.java b/Mage/src/main/java/mage/abilities/mana/conditional/CreatureCastManaCondition.java similarity index 100% rename from Mage/src/mage/abilities/mana/conditional/CreatureCastManaCondition.java rename to Mage/src/main/java/mage/abilities/mana/conditional/CreatureCastManaCondition.java diff --git a/Mage/src/mage/abilities/mana/conditional/ManaCondition.java b/Mage/src/main/java/mage/abilities/mana/conditional/ManaCondition.java similarity index 100% rename from Mage/src/mage/abilities/mana/conditional/ManaCondition.java rename to Mage/src/main/java/mage/abilities/mana/conditional/ManaCondition.java diff --git a/Mage/src/mage/actions/MageDrawAction.java b/Mage/src/main/java/mage/actions/MageDrawAction.java similarity index 100% rename from Mage/src/mage/actions/MageDrawAction.java rename to Mage/src/main/java/mage/actions/MageDrawAction.java diff --git a/Mage/src/mage/actions/MageLoseGameAction.java b/Mage/src/main/java/mage/actions/MageLoseGameAction.java similarity index 100% rename from Mage/src/mage/actions/MageLoseGameAction.java rename to Mage/src/main/java/mage/actions/MageLoseGameAction.java diff --git a/Mage/src/mage/actions/impl/MageAction.java b/Mage/src/main/java/mage/actions/impl/MageAction.java similarity index 100% rename from Mage/src/mage/actions/impl/MageAction.java rename to Mage/src/main/java/mage/actions/impl/MageAction.java diff --git a/Mage/src/mage/actions/score/ArtificialScoringSystem.java b/Mage/src/main/java/mage/actions/score/ArtificialScoringSystem.java similarity index 87% rename from Mage/src/mage/actions/score/ArtificialScoringSystem.java rename to Mage/src/main/java/mage/actions/score/ArtificialScoringSystem.java index ebd1ee066d5..cc8688a8490 100644 --- a/Mage/src/mage/actions/score/ArtificialScoringSystem.java +++ b/Mage/src/main/java/mage/actions/score/ArtificialScoringSystem.java @@ -11,7 +11,7 @@ public class ArtificialScoringSystem implements ScoringSystem { public static ArtificialScoringSystem inst; - private static final transient Logger log = Logger.getLogger(ArtificialScoringSystem.class); + private static final Logger log = Logger.getLogger(ArtificialScoringSystem.class); static { inst = new ArtificialScoringSystem(); diff --git a/Mage/src/mage/actions/score/ScoringConstants.java b/Mage/src/main/java/mage/actions/score/ScoringConstants.java similarity index 100% rename from Mage/src/mage/actions/score/ScoringConstants.java rename to Mage/src/main/java/mage/actions/score/ScoringConstants.java diff --git a/Mage/src/mage/actions/score/ScoringSystem.java b/Mage/src/main/java/mage/actions/score/ScoringSystem.java similarity index 100% rename from Mage/src/mage/actions/score/ScoringSystem.java rename to Mage/src/main/java/mage/actions/score/ScoringSystem.java diff --git a/Mage/src/mage/cards/Card.java b/Mage/src/main/java/mage/cards/Card.java similarity index 100% rename from Mage/src/mage/cards/Card.java rename to Mage/src/main/java/mage/cards/Card.java diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java similarity index 99% rename from Mage/src/mage/cards/CardImpl.java rename to Mage/src/main/java/mage/cards/CardImpl.java index a24fc9323df..c57a99b9a5d 100644 --- a/Mage/src/mage/cards/CardImpl.java +++ b/Mage/src/main/java/mage/cards/CardImpl.java @@ -558,7 +558,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card { break; } if (removed) { - game.rememberLKI(objectId, fromZone, lkiObject != null ? lkiObject : this); + game.rememberLKI(lkiObject != null ? lkiObject.getId() : objectId, fromZone, lkiObject != null ? lkiObject : this); } else { logger.warn("Couldn't find card in fromZone, card=" + getIdName() + ", fromZone=" + fromZone); } diff --git a/Mage/src/mage/cards/Cards.java b/Mage/src/main/java/mage/cards/Cards.java similarity index 100% rename from Mage/src/mage/cards/Cards.java rename to Mage/src/main/java/mage/cards/Cards.java diff --git a/Mage/src/mage/cards/CardsImpl.java b/Mage/src/main/java/mage/cards/CardsImpl.java similarity index 98% rename from Mage/src/mage/cards/CardsImpl.java rename to Mage/src/main/java/mage/cards/CardsImpl.java index ee177f0741e..a33afd45810 100644 --- a/Mage/src/mage/cards/CardsImpl.java +++ b/Mage/src/main/java/mage/cards/CardsImpl.java @@ -49,7 +49,7 @@ import mage.util.ThreadLocalStringBuilder; */ public class CardsImpl extends LinkedHashSet implements Cards, Serializable { - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(200); + private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(200); private static Random rnd = new Random(); private UUID ownerId; diff --git a/Mage/src/mage/cards/ExpansionSet.java b/Mage/src/main/java/mage/cards/ExpansionSet.java similarity index 96% rename from Mage/src/mage/cards/ExpansionSet.java rename to Mage/src/main/java/mage/cards/ExpansionSet.java index 7758bb84a3f..99ef9952849 100644 --- a/Mage/src/mage/cards/ExpansionSet.java +++ b/Mage/src/main/java/mage/cards/ExpansionSet.java @@ -58,7 +58,7 @@ public abstract class ExpansionSet implements Serializable { protected int numBoosterSpecial; protected int numBoosterLands; - protected int ratioBoosterSpecialLand = 0; // if > 0 basic lands are replaced with speical land in the ratio every X land is replaced by special land + protected int ratioBoosterSpecialLand = 0; // if > 0 basic lands are replaced with special land in the ratio every X land is replaced by special land protected int numBoosterCommon; protected int numBoosterUncommon; diff --git a/Mage/src/mage/cards/LevelerCard.java b/Mage/src/main/java/mage/cards/LevelerCard.java similarity index 100% rename from Mage/src/mage/cards/LevelerCard.java rename to Mage/src/main/java/mage/cards/LevelerCard.java diff --git a/Mage/src/mage/cards/Sets.java b/Mage/src/main/java/mage/cards/Sets.java similarity index 100% rename from Mage/src/mage/cards/Sets.java rename to Mage/src/main/java/mage/cards/Sets.java diff --git a/Mage/src/mage/cards/SplitCard.java b/Mage/src/main/java/mage/cards/SplitCard.java similarity index 100% rename from Mage/src/mage/cards/SplitCard.java rename to Mage/src/main/java/mage/cards/SplitCard.java diff --git a/Mage/src/mage/cards/SplitCardHalf.java b/Mage/src/main/java/mage/cards/SplitCardHalf.java similarity index 100% rename from Mage/src/mage/cards/SplitCardHalf.java rename to Mage/src/main/java/mage/cards/SplitCardHalf.java diff --git a/Mage/src/mage/cards/SplitCardHalfImpl.java b/Mage/src/main/java/mage/cards/SplitCardHalfImpl.java similarity index 100% rename from Mage/src/mage/cards/SplitCardHalfImpl.java rename to Mage/src/main/java/mage/cards/SplitCardHalfImpl.java diff --git a/Mage/src/mage/cards/basiclands/BasicLand.java b/Mage/src/main/java/mage/cards/basiclands/BasicLand.java similarity index 100% rename from Mage/src/mage/cards/basiclands/BasicLand.java rename to Mage/src/main/java/mage/cards/basiclands/BasicLand.java diff --git a/Mage/src/mage/cards/basiclands/Forest.java b/Mage/src/main/java/mage/cards/basiclands/Forest.java similarity index 100% rename from Mage/src/mage/cards/basiclands/Forest.java rename to Mage/src/main/java/mage/cards/basiclands/Forest.java diff --git a/Mage/src/mage/cards/basiclands/Island.java b/Mage/src/main/java/mage/cards/basiclands/Island.java similarity index 100% rename from Mage/src/mage/cards/basiclands/Island.java rename to Mage/src/main/java/mage/cards/basiclands/Island.java diff --git a/Mage/src/mage/cards/basiclands/Mountain.java b/Mage/src/main/java/mage/cards/basiclands/Mountain.java similarity index 100% rename from Mage/src/mage/cards/basiclands/Mountain.java rename to Mage/src/main/java/mage/cards/basiclands/Mountain.java diff --git a/Mage/src/mage/cards/basiclands/Plains.java b/Mage/src/main/java/mage/cards/basiclands/Plains.java similarity index 100% rename from Mage/src/mage/cards/basiclands/Plains.java rename to Mage/src/main/java/mage/cards/basiclands/Plains.java diff --git a/Mage/src/mage/cards/basiclands/Swamp.java b/Mage/src/main/java/mage/cards/basiclands/Swamp.java similarity index 100% rename from Mage/src/mage/cards/basiclands/Swamp.java rename to Mage/src/main/java/mage/cards/basiclands/Swamp.java diff --git a/Mage/src/mage/cards/decks/Constructed.java b/Mage/src/main/java/mage/cards/decks/Constructed.java similarity index 100% rename from Mage/src/mage/cards/decks/Constructed.java rename to Mage/src/main/java/mage/cards/decks/Constructed.java diff --git a/Mage/src/mage/cards/decks/Deck.java b/Mage/src/main/java/mage/cards/decks/Deck.java similarity index 93% rename from Mage/src/mage/cards/decks/Deck.java rename to Mage/src/main/java/mage/cards/decks/Deck.java index 7d2dff0e14a..dd965a4a692 100644 --- a/Mage/src/mage/cards/decks/Deck.java +++ b/Mage/src/main/java/mage/cards/decks/Deck.java @@ -130,14 +130,10 @@ public class Deck implements Serializable { public Set getExpansionSetCodes() { Set sets = new LinkedHashSet<>(); for (Card card : getCards()) { - if (!sets.contains(card.getExpansionSetCode())) { - sets.add(card.getExpansionSetCode()); - } + sets.add(card.getExpansionSetCode()); } for (Card card : getSideboard()) { - if (!sets.contains(card.getExpansionSetCode())) { - sets.add(card.getExpansionSetCode()); - } + sets.add(card.getExpansionSetCode()); } return sets; } diff --git a/Mage/src/mage/cards/decks/DeckCardInfo.java b/Mage/src/main/java/mage/cards/decks/DeckCardInfo.java similarity index 100% rename from Mage/src/mage/cards/decks/DeckCardInfo.java rename to Mage/src/main/java/mage/cards/decks/DeckCardInfo.java diff --git a/Mage/src/mage/cards/decks/DeckCardLists.java b/Mage/src/main/java/mage/cards/decks/DeckCardLists.java similarity index 100% rename from Mage/src/mage/cards/decks/DeckCardLists.java rename to Mage/src/main/java/mage/cards/decks/DeckCardLists.java diff --git a/Mage/src/mage/cards/decks/DeckValidator.java b/Mage/src/main/java/mage/cards/decks/DeckValidator.java similarity index 100% rename from Mage/src/mage/cards/decks/DeckValidator.java rename to Mage/src/main/java/mage/cards/decks/DeckValidator.java diff --git a/Mage/src/mage/cards/decks/InvalidDeckException.java b/Mage/src/main/java/mage/cards/decks/InvalidDeckException.java similarity index 100% rename from Mage/src/mage/cards/decks/InvalidDeckException.java rename to Mage/src/main/java/mage/cards/decks/InvalidDeckException.java diff --git a/Mage/src/mage/cards/decks/importer/DckDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/DckDeckImporter.java similarity index 100% rename from Mage/src/mage/cards/decks/importer/DckDeckImporter.java rename to Mage/src/main/java/mage/cards/decks/importer/DckDeckImporter.java diff --git a/Mage/src/mage/cards/decks/importer/DecDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/DecDeckImporter.java similarity index 100% rename from Mage/src/mage/cards/decks/importer/DecDeckImporter.java rename to Mage/src/main/java/mage/cards/decks/importer/DecDeckImporter.java diff --git a/Mage/src/mage/cards/decks/importer/DeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/DeckImporter.java similarity index 100% rename from Mage/src/mage/cards/decks/importer/DeckImporter.java rename to Mage/src/main/java/mage/cards/decks/importer/DeckImporter.java diff --git a/Mage/src/mage/cards/decks/importer/DeckImporterUtil.java b/Mage/src/main/java/mage/cards/decks/importer/DeckImporterUtil.java similarity index 100% rename from Mage/src/mage/cards/decks/importer/DeckImporterUtil.java rename to Mage/src/main/java/mage/cards/decks/importer/DeckImporterUtil.java diff --git a/Mage/src/mage/cards/decks/importer/MWSDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/MWSDeckImporter.java similarity index 98% rename from Mage/src/mage/cards/decks/importer/MWSDeckImporter.java rename to Mage/src/main/java/mage/cards/decks/importer/MWSDeckImporter.java index f8bb97629ae..7ee643ff02a 100644 --- a/Mage/src/mage/cards/decks/importer/MWSDeckImporter.java +++ b/Mage/src/main/java/mage/cards/decks/importer/MWSDeckImporter.java @@ -73,7 +73,8 @@ public class MWSDeckImporter extends DeckImporter { if (!cards.isEmpty()) { cardInfo = cards.get(new Random().nextInt(cards.size())); } - } else { + } + if (cardInfo == null) { cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(lineName, true); } diff --git a/Mage/src/mage/cards/decks/importer/TxtDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java similarity index 100% rename from Mage/src/mage/cards/decks/importer/TxtDeckImporter.java rename to Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java diff --git a/Mage/src/mage/cards/mock/MockAbility.java b/Mage/src/main/java/mage/cards/mock/MockAbility.java similarity index 100% rename from Mage/src/mage/cards/mock/MockAbility.java rename to Mage/src/main/java/mage/cards/mock/MockAbility.java diff --git a/Mage/src/mage/cards/mock/MockCard.java b/Mage/src/main/java/mage/cards/mock/MockCard.java similarity index 100% rename from Mage/src/mage/cards/mock/MockCard.java rename to Mage/src/main/java/mage/cards/mock/MockCard.java diff --git a/Mage/src/mage/cards/mock/MockSplitCard.java b/Mage/src/main/java/mage/cards/mock/MockSplitCard.java similarity index 100% rename from Mage/src/mage/cards/mock/MockSplitCard.java rename to Mage/src/main/java/mage/cards/mock/MockSplitCard.java diff --git a/Mage/src/mage/cards/mock/MockSplitCardHalf.java b/Mage/src/main/java/mage/cards/mock/MockSplitCardHalf.java similarity index 100% rename from Mage/src/mage/cards/mock/MockSplitCardHalf.java rename to Mage/src/main/java/mage/cards/mock/MockSplitCardHalf.java diff --git a/Mage/src/mage/cards/repository/CardCriteria.java b/Mage/src/main/java/mage/cards/repository/CardCriteria.java similarity index 93% rename from Mage/src/mage/cards/repository/CardCriteria.java rename to Mage/src/main/java/mage/cards/repository/CardCriteria.java index 3f33e19da69..38e25425db6 100644 --- a/Mage/src/mage/cards/repository/CardCriteria.java +++ b/Mage/src/main/java/mage/cards/repository/CardCriteria.java @@ -59,6 +59,7 @@ public class CardCriteria { private boolean red; private boolean white; private boolean colorless; + private Integer convertedManaCost; private String sortBy; private Long start; private Long count; @@ -173,6 +174,11 @@ public class CardCriteria { return this; } + public CardCriteria convertedManaCost(Integer convertedManaCost) { + this.convertedManaCost = convertedManaCost; + return this; + } + public CardCriteria maxCardNumber(int maxCardNumber) { this.maxCardNumber = maxCardNumber; return this; @@ -248,6 +254,11 @@ public class CardCriteria { clausesCount++; } + if (convertedManaCost != null) { + where.eq("convertedManaCost", convertedManaCost); + clausesCount++; + } + if (!black || !blue || !green || !red || !white || !colorless) { int colorClauses = 0; if (black) { diff --git a/Mage/src/mage/cards/repository/CardInfo.java b/Mage/src/main/java/mage/cards/repository/CardInfo.java similarity index 100% rename from Mage/src/mage/cards/repository/CardInfo.java rename to Mage/src/main/java/mage/cards/repository/CardInfo.java diff --git a/Mage/src/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java similarity index 92% rename from Mage/src/mage/cards/repository/CardRepository.java rename to Mage/src/main/java/mage/cards/repository/CardRepository.java index ab5ff527376..b3c0b68a37e 100644 --- a/Mage/src/mage/cards/repository/CardRepository.java +++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java @@ -61,14 +61,16 @@ public enum CardRepository { private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE"; private static final String VERSION_ENTITY_NAME = "card"; // raise this if db structure was changed - private static final long CARD_DB_VERSION = 42; + private static final long CARD_DB_VERSION = 43; // raise this if new cards were added to the server - private static final long CARD_CONTENT_VERSION = 40; + private static final long CARD_CONTENT_VERSION = 43; private final Random random = new Random(); private Dao cardDao; private Set classNames; + private final TreeSet landTypes = new TreeSet(); + private CardRepository() { File file = new File("db"); if (!file.exists()) { @@ -85,7 +87,7 @@ public enum CardRepository { TableUtils.createTableIfNotExists(connectionSource, CardInfo.class); cardDao = DaoManager.createDao(connectionSource, CardInfo.class); } catch (SQLException ex) { - ex.printStackTrace(); + Logger.getLogger(CardRepository.class).error("Error creating card repository - ", ex); } } @@ -102,7 +104,7 @@ public enum CardRepository { } } } catch (SQLException ex) { - Logger.getLogger(CardRepository.class).error("Error adding cards to DB: " + ex.getCause()); + Logger.getLogger(CardRepository.class).error("Error adding cards to DB - ", ex); } return null; } @@ -240,6 +242,7 @@ public enum CardRepository { subtypes.add("Reflection"); subtypes.add("Sand"); subtypes.add("Saproling"); + subtypes.add("Scion"); subtypes.add("Serf"); subtypes.add("Splinter"); subtypes.add("Survivor"); @@ -252,21 +255,22 @@ public enum CardRepository { } public Set getLandTypes() { - TreeSet subtypes = new TreeSet<>(); - try { - QueryBuilder qb = cardDao.queryBuilder(); - qb.distinct().selectColumns("subtypes"); - qb.where().like("types", new SelectArg('%' + CardType.LAND.name() + '%')); - List results = cardDao.query(qb.prepare()); - for (CardInfo card : results) { - subtypes.addAll(card.getSubTypes()); - } - // Removing Dryad because of Dryad Arbor - subtypes.remove("Dryad"); + if (landTypes.isEmpty()) { + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("subtypes"); + qb.where().like("types", new SelectArg('%' + CardType.LAND.name() + '%')); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + landTypes.addAll(card.getSubTypes()); + } + // Removing Dryad because of Dryad Arbor + landTypes.remove("Dryad"); - } catch (SQLException ex) { + } catch (SQLException ex) { + } } - return subtypes; + return landTypes; } public CardInfo findCard(String setCode, int cardNumber) { @@ -391,7 +395,7 @@ public enum CardRepository { ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); return RepositoryUtil.getDatabaseVersion(connectionSource, VERSION_ENTITY_NAME + "Content"); } catch (SQLException ex) { - ex.printStackTrace(); + Logger.getLogger(CardRepository.class).error("Error getting content version from DB - ", ex); } return 0; } @@ -401,7 +405,7 @@ public enum CardRepository { ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); RepositoryUtil.updateVersion(connectionSource, VERSION_ENTITY_NAME + "Content", version); } catch (SQLException ex) { - ex.printStackTrace(); + Logger.getLogger(CardRepository.class).error("Error getting content version - ", ex); } } diff --git a/Mage/src/mage/cards/repository/CardScanner.java b/Mage/src/main/java/mage/cards/repository/CardScanner.java similarity index 100% rename from Mage/src/mage/cards/repository/CardScanner.java rename to Mage/src/main/java/mage/cards/repository/CardScanner.java diff --git a/Mage/src/mage/cards/repository/DatabaseVersion.java b/Mage/src/main/java/mage/cards/repository/DatabaseVersion.java similarity index 100% rename from Mage/src/mage/cards/repository/DatabaseVersion.java rename to Mage/src/main/java/mage/cards/repository/DatabaseVersion.java diff --git a/Mage/src/mage/cards/repository/ExpansionInfo.java b/Mage/src/main/java/mage/cards/repository/ExpansionInfo.java similarity index 100% rename from Mage/src/mage/cards/repository/ExpansionInfo.java rename to Mage/src/main/java/mage/cards/repository/ExpansionInfo.java diff --git a/Mage/src/mage/cards/repository/ExpansionRepository.java b/Mage/src/main/java/mage/cards/repository/ExpansionRepository.java similarity index 100% rename from Mage/src/mage/cards/repository/ExpansionRepository.java rename to Mage/src/main/java/mage/cards/repository/ExpansionRepository.java diff --git a/Mage/src/mage/cards/repository/RepositoryUtil.java b/Mage/src/main/java/mage/cards/repository/RepositoryUtil.java similarity index 100% rename from Mage/src/mage/cards/repository/RepositoryUtil.java rename to Mage/src/main/java/mage/cards/repository/RepositoryUtil.java diff --git a/Mage/src/mage/choices/Choice.java b/Mage/src/main/java/mage/choices/Choice.java similarity index 100% rename from Mage/src/mage/choices/Choice.java rename to Mage/src/main/java/mage/choices/Choice.java diff --git a/Mage/src/mage/choices/ChoiceBasicLandType.java b/Mage/src/main/java/mage/choices/ChoiceBasicLandType.java similarity index 100% rename from Mage/src/mage/choices/ChoiceBasicLandType.java rename to Mage/src/main/java/mage/choices/ChoiceBasicLandType.java diff --git a/Mage/src/mage/choices/ChoiceColor.java b/Mage/src/main/java/mage/choices/ChoiceColor.java similarity index 100% rename from Mage/src/mage/choices/ChoiceColor.java rename to Mage/src/main/java/mage/choices/ChoiceColor.java diff --git a/Mage/src/mage/choices/ChoiceColorOrArtifact.java b/Mage/src/main/java/mage/choices/ChoiceColorOrArtifact.java similarity index 100% rename from Mage/src/mage/choices/ChoiceColorOrArtifact.java rename to Mage/src/main/java/mage/choices/ChoiceColorOrArtifact.java diff --git a/Mage/src/mage/choices/ChoiceImpl.java b/Mage/src/main/java/mage/choices/ChoiceImpl.java similarity index 100% rename from Mage/src/mage/choices/ChoiceImpl.java rename to Mage/src/main/java/mage/choices/ChoiceImpl.java diff --git a/Mage/src/mage/choices/ChoiceLeftOrRight.java b/Mage/src/main/java/mage/choices/ChoiceLeftOrRight.java similarity index 100% rename from Mage/src/mage/choices/ChoiceLeftOrRight.java rename to Mage/src/main/java/mage/choices/ChoiceLeftOrRight.java diff --git a/Mage/src/mage/choices/Choices.java b/Mage/src/main/java/mage/choices/Choices.java similarity index 100% rename from Mage/src/mage/choices/Choices.java rename to Mage/src/main/java/mage/choices/Choices.java diff --git a/Mage/src/mage/constants/AbilityType.java b/Mage/src/main/java/mage/constants/AbilityType.java similarity index 100% rename from Mage/src/mage/constants/AbilityType.java rename to Mage/src/main/java/mage/constants/AbilityType.java diff --git a/Mage/src/mage/constants/AbilityWord.java b/Mage/src/main/java/mage/constants/AbilityWord.java similarity index 100% rename from Mage/src/mage/constants/AbilityWord.java rename to Mage/src/main/java/mage/constants/AbilityWord.java diff --git a/Mage/src/mage/constants/AsThoughEffectType.java b/Mage/src/main/java/mage/constants/AsThoughEffectType.java similarity index 100% rename from Mage/src/mage/constants/AsThoughEffectType.java rename to Mage/src/main/java/mage/constants/AsThoughEffectType.java diff --git a/Mage/src/mage/constants/AttachmentType.java b/Mage/src/main/java/mage/constants/AttachmentType.java similarity index 100% rename from Mage/src/mage/constants/AttachmentType.java rename to Mage/src/main/java/mage/constants/AttachmentType.java diff --git a/Mage/src/mage/constants/CardType.java b/Mage/src/main/java/mage/constants/CardType.java similarity index 100% rename from Mage/src/mage/constants/CardType.java rename to Mage/src/main/java/mage/constants/CardType.java diff --git a/Mage/src/mage/constants/ColoredManaSymbol.java b/Mage/src/main/java/mage/constants/ColoredManaSymbol.java similarity index 100% rename from Mage/src/mage/constants/ColoredManaSymbol.java rename to Mage/src/main/java/mage/constants/ColoredManaSymbol.java diff --git a/Mage/src/mage/constants/CostModificationType.java b/Mage/src/main/java/mage/constants/CostModificationType.java similarity index 100% rename from Mage/src/mage/constants/CostModificationType.java rename to Mage/src/main/java/mage/constants/CostModificationType.java diff --git a/Mage/src/mage/constants/DependencyType.java b/Mage/src/main/java/mage/constants/DependencyType.java similarity index 100% rename from Mage/src/mage/constants/DependencyType.java rename to Mage/src/main/java/mage/constants/DependencyType.java diff --git a/Mage/src/mage/constants/Duration.java b/Mage/src/main/java/mage/constants/Duration.java similarity index 100% rename from Mage/src/mage/constants/Duration.java rename to Mage/src/main/java/mage/constants/Duration.java diff --git a/Mage/src/mage/constants/EffectType.java b/Mage/src/main/java/mage/constants/EffectType.java similarity index 100% rename from Mage/src/mage/constants/EffectType.java rename to Mage/src/main/java/mage/constants/EffectType.java diff --git a/Mage/src/mage/constants/EnlargeMode.java b/Mage/src/main/java/mage/constants/EnlargeMode.java similarity index 100% rename from Mage/src/mage/constants/EnlargeMode.java rename to Mage/src/main/java/mage/constants/EnlargeMode.java diff --git a/Mage/src/mage/constants/Layer.java b/Mage/src/main/java/mage/constants/Layer.java similarity index 100% rename from Mage/src/mage/constants/Layer.java rename to Mage/src/main/java/mage/constants/Layer.java diff --git a/Mage/src/mage/constants/MageObjectType.java b/Mage/src/main/java/mage/constants/MageObjectType.java similarity index 100% rename from Mage/src/mage/constants/MageObjectType.java rename to Mage/src/main/java/mage/constants/MageObjectType.java diff --git a/Mage/src/mage/constants/ManaType.java b/Mage/src/main/java/mage/constants/ManaType.java similarity index 100% rename from Mage/src/mage/constants/ManaType.java rename to Mage/src/main/java/mage/constants/ManaType.java diff --git a/Mage/src/mage/constants/MatchTimeLimit.java b/Mage/src/main/java/mage/constants/MatchTimeLimit.java similarity index 100% rename from Mage/src/mage/constants/MatchTimeLimit.java rename to Mage/src/main/java/mage/constants/MatchTimeLimit.java diff --git a/Mage/src/mage/constants/MultiplayerAttackOption.java b/Mage/src/main/java/mage/constants/MultiplayerAttackOption.java similarity index 100% rename from Mage/src/mage/constants/MultiplayerAttackOption.java rename to Mage/src/main/java/mage/constants/MultiplayerAttackOption.java diff --git a/Mage/src/mage/constants/Outcome.java b/Mage/src/main/java/mage/constants/Outcome.java similarity index 100% rename from Mage/src/mage/constants/Outcome.java rename to Mage/src/main/java/mage/constants/Outcome.java diff --git a/Mage/src/mage/constants/PhaseStep.java b/Mage/src/main/java/mage/constants/PhaseStep.java similarity index 100% rename from Mage/src/mage/constants/PhaseStep.java rename to Mage/src/main/java/mage/constants/PhaseStep.java diff --git a/Mage/src/mage/constants/PlayerAction.java b/Mage/src/main/java/mage/constants/PlayerAction.java similarity index 100% rename from Mage/src/mage/constants/PlayerAction.java rename to Mage/src/main/java/mage/constants/PlayerAction.java diff --git a/Mage/src/mage/constants/RangeOfInfluence.java b/Mage/src/main/java/mage/constants/RangeOfInfluence.java similarity index 100% rename from Mage/src/mage/constants/RangeOfInfluence.java rename to Mage/src/main/java/mage/constants/RangeOfInfluence.java diff --git a/Mage/src/mage/constants/Rarity.java b/Mage/src/main/java/mage/constants/Rarity.java similarity index 100% rename from Mage/src/mage/constants/Rarity.java rename to Mage/src/main/java/mage/constants/Rarity.java diff --git a/Mage/src/mage/constants/SetTargetPointer.java b/Mage/src/main/java/mage/constants/SetTargetPointer.java similarity index 100% rename from Mage/src/mage/constants/SetTargetPointer.java rename to Mage/src/main/java/mage/constants/SetTargetPointer.java diff --git a/Mage/src/mage/constants/SetType.java b/Mage/src/main/java/mage/constants/SetType.java similarity index 100% rename from Mage/src/mage/constants/SetType.java rename to Mage/src/main/java/mage/constants/SetType.java diff --git a/Mage/src/mage/constants/SkillLevel.java b/Mage/src/main/java/mage/constants/SkillLevel.java similarity index 100% rename from Mage/src/mage/constants/SkillLevel.java rename to Mage/src/main/java/mage/constants/SkillLevel.java diff --git a/Mage/src/mage/constants/SpellAbilityType.java b/Mage/src/main/java/mage/constants/SpellAbilityType.java similarity index 100% rename from Mage/src/mage/constants/SpellAbilityType.java rename to Mage/src/main/java/mage/constants/SpellAbilityType.java diff --git a/Mage/src/mage/constants/SubLayer.java b/Mage/src/main/java/mage/constants/SubLayer.java similarity index 100% rename from Mage/src/mage/constants/SubLayer.java rename to Mage/src/main/java/mage/constants/SubLayer.java diff --git a/Mage/src/mage/constants/TableState.java b/Mage/src/main/java/mage/constants/TableState.java similarity index 100% rename from Mage/src/mage/constants/TableState.java rename to Mage/src/main/java/mage/constants/TableState.java diff --git a/Mage/src/mage/constants/TargetController.java b/Mage/src/main/java/mage/constants/TargetController.java similarity index 54% rename from Mage/src/mage/constants/TargetController.java rename to Mage/src/main/java/mage/constants/TargetController.java index 8c10feb9591..ed2f4f02e20 100644 --- a/Mage/src/mage/constants/TargetController.java +++ b/Mage/src/main/java/mage/constants/TargetController.java @@ -5,5 +5,6 @@ package mage.constants; * @author North */ public enum TargetController { - ANY, YOU, NOT_YOU, OPPONENT, CONTROLLER_ATTACHED_TO + + ANY, YOU, NOT_YOU, OPPONENT, CONTROLLER_ATTACHED_TO, NEXT } diff --git a/Mage/src/mage/constants/TimingRule.java b/Mage/src/main/java/mage/constants/TimingRule.java similarity index 100% rename from Mage/src/mage/constants/TimingRule.java rename to Mage/src/main/java/mage/constants/TimingRule.java diff --git a/Mage/src/mage/constants/TournamentPlayerState.java b/Mage/src/main/java/mage/constants/TournamentPlayerState.java similarity index 100% rename from Mage/src/mage/constants/TournamentPlayerState.java rename to Mage/src/main/java/mage/constants/TournamentPlayerState.java diff --git a/Mage/src/mage/constants/TurnPhase.java b/Mage/src/main/java/mage/constants/TurnPhase.java similarity index 100% rename from Mage/src/mage/constants/TurnPhase.java rename to Mage/src/main/java/mage/constants/TurnPhase.java diff --git a/Mage/src/mage/constants/WatcherScope.java b/Mage/src/main/java/mage/constants/WatcherScope.java similarity index 100% rename from Mage/src/mage/constants/WatcherScope.java rename to Mage/src/main/java/mage/constants/WatcherScope.java diff --git a/Mage/src/mage/constants/Zone.java b/Mage/src/main/java/mage/constants/Zone.java similarity index 100% rename from Mage/src/mage/constants/Zone.java rename to Mage/src/main/java/mage/constants/Zone.java diff --git a/Mage/src/mage/counters/BoostCounter.java b/Mage/src/main/java/mage/counters/BoostCounter.java similarity index 100% rename from Mage/src/mage/counters/BoostCounter.java rename to Mage/src/main/java/mage/counters/BoostCounter.java diff --git a/Mage/src/main/java/mage/counters/Counter.java b/Mage/src/main/java/mage/counters/Counter.java new file mode 100644 index 00000000000..7a9c16e5b5f --- /dev/null +++ b/Mage/src/main/java/mage/counters/Counter.java @@ -0,0 +1,172 @@ +/* +* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of BetaSteward_at_googlemail.com. +*/ + +package mage.counters; + +import org.apache.log4j.Logger; + +import java.io.Serializable; + +/** + * @author BetaSteward_at_googlemail.com + */ +public class Counter implements Serializable { + + private static final Logger logger = Logger.getLogger(Counter.class); + + protected final String name; + protected int count; + + + /** + * Creates a {@link Counter} with the provided {@code name} and a default value of 1 + * + * @param name the name of this counter. + */ + public Counter(final String name) { + this.name = name; + this.count = 1; + } + + + /** + * Creates a {@link Counter} with the provided {@code name} and {@code count} + * + * @param name the name of this counter. + * @param count the value of this counter. + */ + public Counter(final String name, final int count) { + this.name = name; + this.count = count; + } + + + /** + * Creates a {@link Counter} from an existing {@link Counter} object. + * + * @param counter the {@link Counter} to create a copy from. + */ + public Counter(final Counter counter) { + this.name = counter.name; + this.count = counter.count; + } + + /** + * Increases the {@code count} by 1 + */ + public void increase() { + count++; + } + + /** + * Adds the passed in {@code amount} to the {@code count} + * + * @param amount the value to add to the {@code count} + */ + public void add(int amount) { + count += amount; + } + + + /** + * Decreases the {@code count} by one. Will not allow the count to be less than 0. + * If an attempt is made to make the count be less than zero, the call will be logged. + */ + public void decrease() { + if (count > 0) { + count--; + } else { + logger.warn("An attempt was made to set the counter '" + name + + "' to less than 0. Setting to 0."); + } + } + + + /** + * Decreases the {@code count} by tne passed in {@code amount}. Will not allow the count + * to be less than 0. If an attempt is made to make the count be less than zero, the call will be logged. + */ + public void remove(int amount) { + if (count > amount) { + count -= amount; + } else { + logger.warn("An attempt was made to set the counter '" + name + + "' to less than 0. Setting to 0."); + count = 0; + } + } + + + /** + * Returns the name of this {@link Counter} + * + * @return the name of this {@link Counter} + */ + public String getName() { + return name; + } + + /** + * Returns the count of this {@link Counter} + * + * @return the count of this {@link Counter} + */ + public int getCount() { + return count; + } + + /** + * Returns a deep copy of this object. + * + * @return a deep copy of this object. + */ + public Counter copy() { + return new Counter(this); + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Counter counter = (Counter) o; + + if (count != counter.count) return false; + return !(name != null ? !name.equals(counter.name) : counter.name != null); + + } + + + @Override + public int hashCode() { + int result = name != null ? name.hashCode() : 0; + result = 31 * result + count; + return result; + } +} diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java similarity index 99% rename from Mage/src/mage/counters/CounterType.java rename to Mage/src/main/java/mage/counters/CounterType.java index 907e0cc8526..6b5335c2463 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -88,6 +88,7 @@ public enum CounterType { POISON("poison"), PRESSURE("pressure"), QUEST("quest"), + SCREAM("scream"), SHELL("shell"), SHIELD("shield"), SHRED("shred"), diff --git a/Mage/src/mage/counters/Counters.java b/Mage/src/main/java/mage/counters/Counters.java similarity index 99% rename from Mage/src/mage/counters/Counters.java rename to Mage/src/main/java/mage/counters/Counters.java index 473106f081f..21842e59783 100644 --- a/Mage/src/mage/counters/Counters.java +++ b/Mage/src/main/java/mage/counters/Counters.java @@ -56,7 +56,7 @@ public class Counters extends HashMap implements Serializable { if (!this.containsKey(name)) { this.put(name, new Counter(name)); } - this.get(name).add(); + this.get(name).increase(); } public void addCounter(String name, int amount) { diff --git a/Mage/src/mage/filter/Filter.java b/Mage/src/main/java/mage/filter/Filter.java similarity index 100% rename from Mage/src/mage/filter/Filter.java rename to Mage/src/main/java/mage/filter/Filter.java diff --git a/Mage/src/mage/filter/FilterAbility.java b/Mage/src/main/java/mage/filter/FilterAbility.java similarity index 100% rename from Mage/src/mage/filter/FilterAbility.java rename to Mage/src/main/java/mage/filter/FilterAbility.java diff --git a/Mage/src/mage/filter/FilterCard.java b/Mage/src/main/java/mage/filter/FilterCard.java similarity index 100% rename from Mage/src/mage/filter/FilterCard.java rename to Mage/src/main/java/mage/filter/FilterCard.java diff --git a/Mage/src/mage/filter/FilterImpl.java b/Mage/src/main/java/mage/filter/FilterImpl.java similarity index 100% rename from Mage/src/mage/filter/FilterImpl.java rename to Mage/src/main/java/mage/filter/FilterImpl.java diff --git a/Mage/src/mage/filter/FilterInPlay.java b/Mage/src/main/java/mage/filter/FilterInPlay.java similarity index 100% rename from Mage/src/mage/filter/FilterInPlay.java rename to Mage/src/main/java/mage/filter/FilterInPlay.java diff --git a/Mage/src/mage/filter/FilterMana.java b/Mage/src/main/java/mage/filter/FilterMana.java similarity index 100% rename from Mage/src/mage/filter/FilterMana.java rename to Mage/src/main/java/mage/filter/FilterMana.java diff --git a/Mage/src/mage/filter/FilterObject.java b/Mage/src/main/java/mage/filter/FilterObject.java similarity index 100% rename from Mage/src/mage/filter/FilterObject.java rename to Mage/src/main/java/mage/filter/FilterObject.java diff --git a/Mage/src/mage/filter/FilterPermanent.java b/Mage/src/main/java/mage/filter/FilterPermanent.java similarity index 100% rename from Mage/src/mage/filter/FilterPermanent.java rename to Mage/src/main/java/mage/filter/FilterPermanent.java diff --git a/Mage/src/mage/filter/FilterPlayer.java b/Mage/src/main/java/mage/filter/FilterPlayer.java similarity index 100% rename from Mage/src/mage/filter/FilterPlayer.java rename to Mage/src/main/java/mage/filter/FilterPlayer.java diff --git a/Mage/src/mage/filter/FilterSpell.java b/Mage/src/main/java/mage/filter/FilterSpell.java similarity index 100% rename from Mage/src/mage/filter/FilterSpell.java rename to Mage/src/main/java/mage/filter/FilterSpell.java diff --git a/Mage/src/mage/filter/FilterStackObject.java b/Mage/src/main/java/mage/filter/FilterStackObject.java similarity index 100% rename from Mage/src/mage/filter/FilterStackObject.java rename to Mage/src/main/java/mage/filter/FilterStackObject.java diff --git a/Mage/src/mage/filter/common/FilterArtifactCard.java b/Mage/src/main/java/mage/filter/common/FilterArtifactCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterArtifactCard.java rename to Mage/src/main/java/mage/filter/common/FilterArtifactCard.java diff --git a/Mage/src/mage/filter/common/FilterArtifactOrEnchantmentPermanent.java b/Mage/src/main/java/mage/filter/common/FilterArtifactOrEnchantmentPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterArtifactOrEnchantmentPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterArtifactOrEnchantmentPermanent.java diff --git a/Mage/src/mage/filter/common/FilterArtifactPermanent.java b/Mage/src/main/java/mage/filter/common/FilterArtifactPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterArtifactPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterArtifactPermanent.java diff --git a/Mage/src/mage/filter/common/FilterArtifactSpell.java b/Mage/src/main/java/mage/filter/common/FilterArtifactSpell.java similarity index 100% rename from Mage/src/mage/filter/common/FilterArtifactSpell.java rename to Mage/src/main/java/mage/filter/common/FilterArtifactSpell.java diff --git a/Mage/src/mage/filter/common/FilterAttackingCreature.java b/Mage/src/main/java/mage/filter/common/FilterAttackingCreature.java similarity index 100% rename from Mage/src/mage/filter/common/FilterAttackingCreature.java rename to Mage/src/main/java/mage/filter/common/FilterAttackingCreature.java diff --git a/Mage/src/mage/filter/common/FilterAttackingOrBlockingCreature.java b/Mage/src/main/java/mage/filter/common/FilterAttackingOrBlockingCreature.java similarity index 100% rename from Mage/src/mage/filter/common/FilterAttackingOrBlockingCreature.java rename to Mage/src/main/java/mage/filter/common/FilterAttackingOrBlockingCreature.java diff --git a/Mage/src/mage/filter/common/FilterBasicLandCard.java b/Mage/src/main/java/mage/filter/common/FilterBasicLandCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterBasicLandCard.java rename to Mage/src/main/java/mage/filter/common/FilterBasicLandCard.java diff --git a/Mage/src/mage/filter/common/FilterBlockingCreature.java b/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java similarity index 100% rename from Mage/src/mage/filter/common/FilterBlockingCreature.java rename to Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java diff --git a/Mage/src/mage/filter/common/FilterBySubtypeCard.java b/Mage/src/main/java/mage/filter/common/FilterBySubtypeCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterBySubtypeCard.java rename to Mage/src/main/java/mage/filter/common/FilterBySubtypeCard.java diff --git a/Mage/src/mage/filter/common/FilterControlledArtifactPermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledArtifactPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterControlledArtifactPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterControlledArtifactPermanent.java diff --git a/Mage/src/mage/filter/common/FilterControlledCreatureInPlay.java b/Mage/src/main/java/mage/filter/common/FilterControlledCreatureInPlay.java similarity index 100% rename from Mage/src/mage/filter/common/FilterControlledCreatureInPlay.java rename to Mage/src/main/java/mage/filter/common/FilterControlledCreatureInPlay.java diff --git a/Mage/src/mage/filter/common/FilterControlledCreaturePermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledCreaturePermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterControlledCreaturePermanent.java rename to Mage/src/main/java/mage/filter/common/FilterControlledCreaturePermanent.java diff --git a/Mage/src/mage/filter/common/FilterControlledEnchantmentPermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledEnchantmentPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterControlledEnchantmentPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterControlledEnchantmentPermanent.java diff --git a/Mage/src/mage/filter/common/FilterControlledLandPermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledLandPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterControlledLandPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterControlledLandPermanent.java diff --git a/Mage/src/mage/filter/common/FilterControlledPermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterControlledPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterControlledPermanent.java diff --git a/Mage/src/mage/filter/common/FilterControlledPlaneswalkerPermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledPlaneswalkerPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterControlledPlaneswalkerPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterControlledPlaneswalkerPermanent.java diff --git a/Mage/src/mage/filter/common/FilterCreatureCard.java b/Mage/src/main/java/mage/filter/common/FilterCreatureCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureCard.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureCard.java diff --git a/Mage/src/mage/filter/common/FilterCreatureForAttack.java b/Mage/src/main/java/mage/filter/common/FilterCreatureForAttack.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureForAttack.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureForAttack.java diff --git a/Mage/src/mage/filter/common/FilterCreatureForCombat.java b/Mage/src/main/java/mage/filter/common/FilterCreatureForCombat.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureForCombat.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureForCombat.java diff --git a/Mage/src/mage/filter/common/FilterCreatureForCombatBase.java b/Mage/src/main/java/mage/filter/common/FilterCreatureForCombatBase.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureForCombatBase.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureForCombatBase.java diff --git a/Mage/src/mage/filter/common/FilterCreatureForCombatBlock.java b/Mage/src/main/java/mage/filter/common/FilterCreatureForCombatBlock.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureForCombatBlock.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureForCombatBlock.java diff --git a/Mage/src/mage/filter/common/FilterCreatureOrPlaneswalkerPermanent.java b/Mage/src/main/java/mage/filter/common/FilterCreatureOrPlaneswalkerPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureOrPlaneswalkerPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureOrPlaneswalkerPermanent.java diff --git a/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java b/Mage/src/main/java/mage/filter/common/FilterCreatureOrPlayer.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureOrPlayer.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureOrPlayer.java diff --git a/Mage/src/mage/filter/common/FilterCreaturePermanent.java b/Mage/src/main/java/mage/filter/common/FilterCreaturePermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreaturePermanent.java rename to Mage/src/main/java/mage/filter/common/FilterCreaturePermanent.java diff --git a/Mage/src/mage/filter/common/FilterCreatureSpell.java b/Mage/src/main/java/mage/filter/common/FilterCreatureSpell.java similarity index 100% rename from Mage/src/mage/filter/common/FilterCreatureSpell.java rename to Mage/src/main/java/mage/filter/common/FilterCreatureSpell.java diff --git a/Mage/src/mage/filter/common/FilterEnchantmentCard.java b/Mage/src/main/java/mage/filter/common/FilterEnchantmentCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterEnchantmentCard.java rename to Mage/src/main/java/mage/filter/common/FilterEnchantmentCard.java diff --git a/Mage/src/mage/filter/common/FilterEnchantmentPermanent.java b/Mage/src/main/java/mage/filter/common/FilterEnchantmentPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterEnchantmentPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterEnchantmentPermanent.java diff --git a/Mage/src/mage/filter/common/FilterInstantOrSorceryCard.java b/Mage/src/main/java/mage/filter/common/FilterInstantOrSorceryCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterInstantOrSorceryCard.java rename to Mage/src/main/java/mage/filter/common/FilterInstantOrSorceryCard.java diff --git a/Mage/src/mage/filter/common/FilterInstantOrSorcerySpell.java b/Mage/src/main/java/mage/filter/common/FilterInstantOrSorcerySpell.java similarity index 100% rename from Mage/src/mage/filter/common/FilterInstantOrSorcerySpell.java rename to Mage/src/main/java/mage/filter/common/FilterInstantOrSorcerySpell.java diff --git a/Mage/src/mage/filter/common/FilterLandCard.java b/Mage/src/main/java/mage/filter/common/FilterLandCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterLandCard.java rename to Mage/src/main/java/mage/filter/common/FilterLandCard.java diff --git a/Mage/src/mage/filter/common/FilterLandPermanent.java b/Mage/src/main/java/mage/filter/common/FilterLandPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterLandPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterLandPermanent.java diff --git a/Mage/src/mage/filter/common/FilterNonlandCard.java b/Mage/src/main/java/mage/filter/common/FilterNonlandCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterNonlandCard.java rename to Mage/src/main/java/mage/filter/common/FilterNonlandCard.java diff --git a/Mage/src/mage/filter/common/FilterNonlandPermanent.java b/Mage/src/main/java/mage/filter/common/FilterNonlandPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterNonlandPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterNonlandPermanent.java diff --git a/Mage/src/mage/filter/common/FilterOwnedCard.java b/Mage/src/main/java/mage/filter/common/FilterOwnedCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterOwnedCard.java rename to Mage/src/main/java/mage/filter/common/FilterOwnedCard.java diff --git a/Mage/src/mage/filter/common/FilterPermanentCard.java b/Mage/src/main/java/mage/filter/common/FilterPermanentCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterPermanentCard.java rename to Mage/src/main/java/mage/filter/common/FilterPermanentCard.java diff --git a/Mage/src/mage/filter/common/FilterPermanentOrPlayer.java b/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java similarity index 100% rename from Mage/src/mage/filter/common/FilterPermanentOrPlayer.java rename to Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java diff --git a/Mage/src/mage/filter/common/FilterPermanentOrPlayerWithCounter.java b/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayerWithCounter.java similarity index 100% rename from Mage/src/mage/filter/common/FilterPermanentOrPlayerWithCounter.java rename to Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayerWithCounter.java diff --git a/Mage/src/mage/filter/common/FilterPlaneswalkerOrPlayer.java b/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerOrPlayer.java similarity index 100% rename from Mage/src/mage/filter/common/FilterPlaneswalkerOrPlayer.java rename to Mage/src/main/java/mage/filter/common/FilterPlaneswalkerOrPlayer.java diff --git a/Mage/src/mage/filter/common/FilterPlaneswalkerPermanent.java b/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterPlaneswalkerPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterPlaneswalkerPermanent.java diff --git a/Mage/src/mage/filter/common/FilterSpellOrPermanent.java b/Mage/src/main/java/mage/filter/common/FilterSpellOrPermanent.java similarity index 100% rename from Mage/src/mage/filter/common/FilterSpellOrPermanent.java rename to Mage/src/main/java/mage/filter/common/FilterSpellOrPermanent.java diff --git a/Mage/src/mage/filter/common/FilterSpiritOrArcaneCard.java b/Mage/src/main/java/mage/filter/common/FilterSpiritOrArcaneCard.java similarity index 100% rename from Mage/src/mage/filter/common/FilterSpiritOrArcaneCard.java rename to Mage/src/main/java/mage/filter/common/FilterSpiritOrArcaneCard.java diff --git a/Mage/src/mage/filter/common/FilterUntappedCreature.java b/Mage/src/main/java/mage/filter/common/FilterUntappedCreature.java similarity index 100% rename from Mage/src/mage/filter/common/FilterUntappedCreature.java rename to Mage/src/main/java/mage/filter/common/FilterUntappedCreature.java diff --git a/Mage/src/mage/filter/predicate/IntComparePredicate.java b/Mage/src/main/java/mage/filter/predicate/IntComparePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/IntComparePredicate.java rename to Mage/src/main/java/mage/filter/predicate/IntComparePredicate.java diff --git a/Mage/src/mage/filter/predicate/ObjectPlayer.java b/Mage/src/main/java/mage/filter/predicate/ObjectPlayer.java similarity index 100% rename from Mage/src/mage/filter/predicate/ObjectPlayer.java rename to Mage/src/main/java/mage/filter/predicate/ObjectPlayer.java diff --git a/Mage/src/mage/filter/predicate/ObjectPlayerPredicate.java b/Mage/src/main/java/mage/filter/predicate/ObjectPlayerPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/ObjectPlayerPredicate.java rename to Mage/src/main/java/mage/filter/predicate/ObjectPlayerPredicate.java diff --git a/Mage/src/mage/filter/predicate/ObjectSourcePlayer.java b/Mage/src/main/java/mage/filter/predicate/ObjectSourcePlayer.java similarity index 100% rename from Mage/src/mage/filter/predicate/ObjectSourcePlayer.java rename to Mage/src/main/java/mage/filter/predicate/ObjectSourcePlayer.java diff --git a/Mage/src/mage/filter/predicate/ObjectSourcePlayerPredicate.java b/Mage/src/main/java/mage/filter/predicate/ObjectSourcePlayerPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/ObjectSourcePlayerPredicate.java rename to Mage/src/main/java/mage/filter/predicate/ObjectSourcePlayerPredicate.java diff --git a/Mage/src/mage/filter/predicate/Predicate.java b/Mage/src/main/java/mage/filter/predicate/Predicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/Predicate.java rename to Mage/src/main/java/mage/filter/predicate/Predicate.java diff --git a/Mage/src/mage/filter/predicate/Predicates.java b/Mage/src/main/java/mage/filter/predicate/Predicates.java similarity index 100% rename from Mage/src/mage/filter/predicate/Predicates.java rename to Mage/src/main/java/mage/filter/predicate/Predicates.java diff --git a/Mage/src/mage/filter/predicate/mageobject/AbilityPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/AbilityPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/AbilityPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/AbilityPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/AnotherCardPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/AnotherCardPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/AnotherCardPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/AnotherCardPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/AnotherTargetPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/AnotherTargetPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/AnotherTargetPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/AnotherTargetPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/CardIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/CardIdPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/CardIdPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/CardIdPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/CardTypePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/CardTypePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/CardTypePredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/CardTypePredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/ColorPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ColorPredicate.java similarity index 94% rename from Mage/src/mage/filter/predicate/mageobject/ColorPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/ColorPredicate.java index 74e5164049d..d6f3ad0a97d 100644 --- a/Mage/src/mage/filter/predicate/mageobject/ColorPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/ColorPredicate.java @@ -46,7 +46,7 @@ public class ColorPredicate implements Predicate { @Override public boolean apply(MageObject input, Game game) { - return input.getColor(game).contains(color); + return color != null && input.getColor(game).contains(color); } @Override diff --git a/Mage/src/mage/filter/predicate/mageobject/ColorlessPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ColorlessPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/ColorlessPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/ColorlessPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/FromSetPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/FromSetPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/FromSetPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/FromSetPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/MonocoloredPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/MonocoloredPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/MonocoloredPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/MonocoloredPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/MulticoloredPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/MulticoloredPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/MulticoloredPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/MulticoloredPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/NamePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/NamePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/NamePredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/NamePredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java similarity index 91% rename from Mage/src/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java index 7284bd1943d..6d405199201 100644 --- a/Mage/src/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java @@ -27,7 +27,6 @@ */ package mage.filter.predicate.mageobject; -import java.util.UUID; import mage.MageObject; import mage.abilities.Mode; import mage.filter.predicate.Predicate; @@ -52,8 +51,7 @@ public class NumberOfTargetsPredicate implements Predicate { Spell spell = game.getStack().getSpell(input.getId()); if (spell != null) { int numberOfTargets = 0; - for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) { - Mode mode = spell.getSpellAbility().getModes().get(modeId); + for (Mode mode : spell.getSpellAbility().getModes().getSelectedModes()) { for (Target target : mode.getTargets()) { numberOfTargets += target.getTargets().size(); } diff --git a/Mage/src/mage/filter/predicate/mageobject/PowerPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/PowerPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/PowerPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/PowerPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/SharesColorWithSourcePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/SharesColorWithSourcePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/SharesColorWithSourcePredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/SharesColorWithSourcePredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/SubtypePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/SubtypePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/SubtypePredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/SubtypePredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/SupertypePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/SupertypePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/SupertypePredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/SupertypePredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/ToughnessPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ToughnessPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/ToughnessPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/ToughnessPredicate.java diff --git a/Mage/src/mage/filter/predicate/mageobject/VariableManaCostPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/VariableManaCostPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/mageobject/VariableManaCostPredicate.java rename to Mage/src/main/java/mage/filter/predicate/mageobject/VariableManaCostPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/AuraCardCanAttachToPermanentId.java b/Mage/src/main/java/mage/filter/predicate/other/AuraCardCanAttachToPermanentId.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/AuraCardCanAttachToPermanentId.java rename to Mage/src/main/java/mage/filter/predicate/other/AuraCardCanAttachToPermanentId.java diff --git a/Mage/src/mage/filter/predicate/other/AuraPermanentCanAttachToPermanentId.java b/Mage/src/main/java/mage/filter/predicate/other/AuraPermanentCanAttachToPermanentId.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/AuraPermanentCanAttachToPermanentId.java rename to Mage/src/main/java/mage/filter/predicate/other/AuraPermanentCanAttachToPermanentId.java diff --git a/Mage/src/mage/filter/predicate/other/CardCanTargetPermanentId.java b/Mage/src/main/java/mage/filter/predicate/other/CardCanTargetPermanentId.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/CardCanTargetPermanentId.java rename to Mage/src/main/java/mage/filter/predicate/other/CardCanTargetPermanentId.java diff --git a/Mage/src/mage/filter/predicate/other/CardTextPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/CardTextPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/CardTextPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/CardTextPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/CounterCardPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/CounterCardPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/CounterCardPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/CounterCardPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/ExpansionSetPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/ExpansionSetPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/ExpansionSetPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/ExpansionSetPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/FaceDownPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/FaceDownPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/FaceDownPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/FaceDownPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/OwnerIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/OwnerIdPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/OwnerIdPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/OwnerIdPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/OwnerPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/OwnerPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/OwnerPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/OwnerPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/PermanentCanTargetPermanentId.java b/Mage/src/main/java/mage/filter/predicate/other/PermanentCanTargetPermanentId.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/PermanentCanTargetPermanentId.java rename to Mage/src/main/java/mage/filter/predicate/other/PermanentCanTargetPermanentId.java diff --git a/Mage/src/mage/filter/predicate/other/PlayerCanGainLifePredicate.java b/Mage/src/main/java/mage/filter/predicate/other/PlayerCanGainLifePredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/PlayerCanGainLifePredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/PlayerCanGainLifePredicate.java diff --git a/Mage/src/mage/filter/predicate/other/PlayerIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/PlayerIdPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/PlayerIdPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/PlayerIdPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/PlayerPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/PlayerPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/other/PlayerPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/PlayerPredicate.java diff --git a/Mage/src/mage/filter/predicate/other/TargetsPermanentPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/TargetsPermanentPredicate.java similarity index 86% rename from Mage/src/mage/filter/predicate/other/TargetsPermanentPredicate.java rename to Mage/src/main/java/mage/filter/predicate/other/TargetsPermanentPredicate.java index 5471eae280c..aad5bb551b6 100644 --- a/Mage/src/mage/filter/predicate/other/TargetsPermanentPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/other/TargetsPermanentPredicate.java @@ -53,13 +53,12 @@ public class TargetsPermanentPredicate implements ObjectSourcePlayerPredicate input, Game game) { StackObject object = game.getStack().getStackObject(input.getObject().getId()); - if(object != null) { - for(UUID modeId : object.getStackAbility().getModes().getSelectedModes()) { - Mode mode = object.getStackAbility().getModes().get(modeId); - for(Target target : mode.getTargets()) { - for(UUID targetId : target.getTargets()) { + if (object != null) { + for (Mode mode : object.getStackAbility().getModes().getSelectedModes()) { + for (Target target : mode.getTargets()) { + for (UUID targetId : target.getTargets()) { Permanent permanent = game.getPermanentOrLKIBattlefield(targetId); - if(permanent != null && targetFilter.match(permanent, input.getSourceId(), input.getPlayerId(), game)) { + if (permanent != null && targetFilter.match(permanent, input.getSourceId(), input.getPlayerId(), game)) { return true; } } diff --git a/Mage/src/mage/filter/predicate/permanent/AnotherPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/AnotherPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/AnotherPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/AnotherPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/AttachedToPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/AttachedToPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/AttachedToPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/AttachedToPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/AttackingPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/AttackingPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/AttackingPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/AttackingPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/BlockedByIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/BlockedByIdPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/BlockedByIdPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/BlockedByIdPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/BlockedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/BlockedPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/BlockedPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/BlockedPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/BlockingAttackerIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/BlockingAttackerIdPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/BlockingAttackerIdPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/BlockingAttackerIdPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/BlockingPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/BlockingPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/BlockingPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/BlockingPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/CanBeEnchantedByPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/CanBeEnchantedByPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/CanBeEnchantedByPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/CanBeEnchantedByPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/CardCounterPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/CardCounterPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/CardCounterPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/CardCounterPredicate.java diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/CommanderPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/CommanderPredicate.java new file mode 100644 index 00000000000..1e12b9d6acf --- /dev/null +++ b/Mage/src/main/java/mage/filter/predicate/permanent/CommanderPredicate.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.filter.predicate.permanent; + +import mage.constants.CardType; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class CommanderPredicate implements Predicate { + + @Override + public boolean apply(Permanent input, Game game) { + Player owner = game.getPlayer(input.getOwnerId()); + return input.getCardType().contains(CardType.CREATURE) + && owner != null + && input.getId().equals(owner.getCommanderId()); + } + + @Override + public String toString() { + return "Commander creature"; + } +} diff --git a/Mage/src/mage/filter/predicate/permanent/ControllerControlsIslandPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/ControllerControlsIslandPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/ControllerControlsIslandPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/ControllerControlsIslandPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/ControllerIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/ControllerIdPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/ControllerIdPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/ControllerIdPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/ControllerPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/ControllerPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/ControllerPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/ControllerPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/CounterAnyPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/CounterAnyPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/CounterAnyPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/CounterAnyPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/CounterPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/CounterPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/CounterPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/CounterPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/DamagedPlayerThisTurnPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/DamagedPlayerThisTurnPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/DamagedPlayerThisTurnPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/DamagedPlayerThisTurnPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/EnchantedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/EnchantedPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/EnchantedPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/PermanentIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/PermanentIdPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/PermanentIdPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/PermanentIdPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/SummoningSicknessPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/SummoningSicknessPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/SummoningSicknessPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/SummoningSicknessPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/TappedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/TappedPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/TappedPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/TappedPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/TokenPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/TokenPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/TokenPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/TokenPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/UnblockedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/UnblockedPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/UnblockedPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/UnblockedPredicate.java diff --git a/Mage/src/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java similarity index 100% rename from Mage/src/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java rename to Mage/src/main/java/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java diff --git a/Mage/src/mage/game/CardAttribute.java b/Mage/src/main/java/mage/game/CardAttribute.java similarity index 100% rename from Mage/src/mage/game/CardAttribute.java rename to Mage/src/main/java/mage/game/CardAttribute.java diff --git a/Mage/src/mage/game/CardState.java b/Mage/src/main/java/mage/game/CardState.java similarity index 100% rename from Mage/src/mage/game/CardState.java rename to Mage/src/main/java/mage/game/CardState.java diff --git a/Mage/src/mage/game/Controllable.java b/Mage/src/main/java/mage/game/Controllable.java similarity index 100% rename from Mage/src/mage/game/Controllable.java rename to Mage/src/main/java/mage/game/Controllable.java diff --git a/Mage/src/mage/game/Exile.java b/Mage/src/main/java/mage/game/Exile.java similarity index 100% rename from Mage/src/mage/game/Exile.java rename to Mage/src/main/java/mage/game/Exile.java diff --git a/Mage/src/mage/game/ExileZone.java b/Mage/src/main/java/mage/game/ExileZone.java similarity index 100% rename from Mage/src/mage/game/ExileZone.java rename to Mage/src/main/java/mage/game/ExileZone.java diff --git a/Mage/src/mage/game/Game.java b/Mage/src/main/java/mage/game/Game.java similarity index 98% rename from Mage/src/mage/game/Game.java rename to Mage/src/main/java/mage/game/Game.java index 432ade1bf80..3e44fb3657d 100644 --- a/Mage/src/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -290,6 +290,8 @@ public interface Game extends MageItem, Serializable { boolean replaceEvent(GameEvent event); + boolean replaceEvent(GameEvent event, Ability targetAbility); + /** * Creates and fires an damage prevention event * @@ -383,6 +385,8 @@ public interface Game extends MageItem, Serializable { UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility); + UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility, Ability source); + void applyEffects(); boolean checkStateAndTriggered(); @@ -421,7 +425,7 @@ public interface Game extends MageItem, Serializable { void cheat(UUID ownerId, List library, List hand, List battlefield, List graveyard); - // controlling the behaviour of replacement effects + // controlling the behaviour of replacement effects while permanents entering the battlefield void setScopeRelevant(boolean scopeRelevant); public boolean getScopeRelevant(); diff --git a/Mage/src/mage/game/GameCommanderImpl.java b/Mage/src/main/java/mage/game/GameCommanderImpl.java similarity index 94% rename from Mage/src/mage/game/GameCommanderImpl.java rename to Mage/src/main/java/mage/game/GameCommanderImpl.java index 4181efc3e4c..2d9602d02ac 100644 --- a/Mage/src/mage/game/GameCommanderImpl.java +++ b/Mage/src/main/java/mage/game/GameCommanderImpl.java @@ -129,7 +129,9 @@ public abstract class GameCommanderImpl extends GameImpl { if (!mulliganedCards.containsKey(playerId)) { mulliganedCards.put(playerId, new CardsImpl()); } - card.moveToExile(null, "", null, this); + player.getHand().remove(card); + getExile().add(card); + getState().setZone(card.getId(), Zone.EXILED); card.setFaceDown(true, this); mulliganedCards.get(playerId).add(card); } @@ -168,7 +170,9 @@ public abstract class GameCommanderImpl extends GameImpl { if (player != null && mulliganedCards.containsKey(playerId)) { for (Card card : mulliganedCards.get(playerId).getCards(this)) { if (card != null) { - card.moveToZone(Zone.LIBRARY, null, this, false); + getExile().removeCard(card, this); + player.getLibrary().putOnTop(card, this); + getState().setZone(card.getId(), Zone.LIBRARY); card.setFaceDown(false, this); } } diff --git a/Mage/src/mage/game/GameException.java b/Mage/src/main/java/mage/game/GameException.java similarity index 100% rename from Mage/src/mage/game/GameException.java rename to Mage/src/main/java/mage/game/GameException.java diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java similarity index 96% rename from Mage/src/mage/game/GameImpl.java rename to Mage/src/main/java/mage/game/GameImpl.java index 816db0ded7b..54797d22c3e 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -138,7 +138,7 @@ public abstract class GameImpl implements Game, Serializable { private static final int ROLLBACK_TURNS_MAX = 4; - private static final transient Logger logger = Logger.getLogger(GameImpl.class); + private static final Logger logger = Logger.getLogger(GameImpl.class); private static final FilterPermanent filterAura = new FilterPermanent(); private static final FilterPermanent filterEquipment = new FilterPermanent(); @@ -671,7 +671,8 @@ public abstract class GameImpl implements Game, Serializable { } @Override - public void removeBookmark(int bookmark) { + public void removeBookmark(int bookmark + ) { if (!simulation) { if (bookmark != 0) { while (savedStates.size() > bookmark) { @@ -724,7 +725,7 @@ public abstract class GameImpl implements Game, Serializable { boolean wasPaused = state.isPaused(); state.resume(); if (!gameOver(null)) { - fireInformEvent(new StringBuilder("Turn ").append(state.getTurnNum()).toString()); + fireInformEvent("Turn " + state.getTurnNum()); if (checkStopOnTurnOption()) { return; } @@ -1489,6 +1490,14 @@ public abstract class GameImpl implements Game, Serializable { } } + @Override + public UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility, Ability source) { + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(this), this); + return addDelayedTriggeredAbility(delayedAbility); + } + @Override public UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility) { DelayedTriggeredAbility newAbility = delayedAbility.copy(); @@ -1876,7 +1885,7 @@ public abstract class GameImpl implements Game, Serializable { Player controller = this.getPlayer(legend.getControllerId()); if (controller != null) { Target targetLegendaryToKeep = new TargetPermanent(filterLegendName); - targetLegendaryToKeep.setTargetName(new StringBuilder(legend.getName()).append(" to keep (Legendary Rule)?").toString()); + targetLegendaryToKeep.setTargetName(legend.getName() + " to keep (Legendary Rule)?"); controller.chooseTarget(Outcome.Benefit, targetLegendaryToKeep, null, this); for (Permanent dupLegend : getBattlefield().getActivePermanents(filterLegendName, legend.getControllerId(), this)) { if (!targetLegendaryToKeep.getTargets().contains(dupLegend.getId())) { @@ -2290,6 +2299,11 @@ public abstract class GameImpl implements Game, Serializable { return state.replaceEvent(event, this); } + @Override + public boolean replaceEvent(GameEvent event, Ability targetAbility) { + return state.replaceEvent(event, targetAbility, this); + } + @Override public PreventionEffectData preventDamage(GameEvent event, Ability source, Game game, boolean preventAllDamage) { return preventDamage(event, source, game, Integer.MAX_VALUE); diff --git a/Mage/src/mage/game/GameInfo.java b/Mage/src/main/java/mage/game/GameInfo.java similarity index 100% rename from Mage/src/mage/game/GameInfo.java rename to Mage/src/main/java/mage/game/GameInfo.java diff --git a/Mage/src/mage/game/GameOptions.java b/Mage/src/main/java/mage/game/GameOptions.java similarity index 100% rename from Mage/src/mage/game/GameOptions.java rename to Mage/src/main/java/mage/game/GameOptions.java diff --git a/Mage/src/mage/game/GameReplay.java b/Mage/src/main/java/mage/game/GameReplay.java similarity index 100% rename from Mage/src/mage/game/GameReplay.java rename to Mage/src/main/java/mage/game/GameReplay.java diff --git a/Mage/src/mage/game/GameState.java b/Mage/src/main/java/mage/game/GameState.java similarity index 98% rename from Mage/src/mage/game/GameState.java rename to Mage/src/main/java/mage/game/GameState.java index 68f312ad7aa..748ead016f2 100644 --- a/Mage/src/mage/game/GameState.java +++ b/Mage/src/main/java/mage/game/GameState.java @@ -86,7 +86,7 @@ import mage.watchers.Watchers; */ public class GameState implements Serializable, Copyable { - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(1024); + private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(1024); private final Players players; private final PlayerList playerList; @@ -309,7 +309,7 @@ public class GameState implements Serializable, Copyable { for (StackObject spell : stack) { sb.append(spell.getControllerId()).append(spell.getName()); sb.append(spell.getStackAbility().toString()); - for (Mode mode : spell.getStackAbility().getModes().values()) { + for (Mode mode : spell.getStackAbility().getModes().getSelectedModes()) { if (!mode.getTargets().isEmpty()) { sb.append("targets"); for (Target target : mode.getTargets()) { @@ -367,7 +367,7 @@ public class GameState implements Serializable, Copyable { for (StackObject spell : stack) { sb.append(spell.getControllerId()).append(spell.getName()); sb.append(spell.getStackAbility().toString()); - for (Mode mode : spell.getStackAbility().getModes().values()) { + for (Mode mode : spell.getStackAbility().getModes().getSelectedModes()) { if (!mode.getTargets().isEmpty()) { sb.append("targets"); for (Target target : mode.getTargets()) { @@ -668,7 +668,11 @@ public class GameState implements Serializable, Copyable { } public boolean replaceEvent(GameEvent event, Game game) { - if (effects.preventedByRuleModification(event, null, game, false)) { + return replaceEvent(event, null, game); + } + + public boolean replaceEvent(GameEvent event, Ability targetAbility, Game game) { + if (effects.preventedByRuleModification(event, targetAbility, game, false)) { return true; } return effects.replaceEvent(event, game); @@ -709,7 +713,7 @@ public class GameState implements Serializable, Copyable { public void addAbility(Ability ability, MageObject attachedTo) { if (ability instanceof StaticAbility) { - for (Mode mode : ability.getModes().values()) { + for (Mode mode : ability.getModes().getSelectedModes()) { for (Effect effect : mode.getEffects()) { if (effect instanceof ContinuousEffect) { addEffect((ContinuousEffect) effect, ability); @@ -731,7 +735,7 @@ public class GameState implements Serializable, Copyable { */ public void addAbility(Ability ability, UUID sourceId, Card attachedTo) { if (ability instanceof StaticAbility) { - for (Mode mode : ability.getModes().values()) { + for (Mode mode : ability.getModes().getSelectedModes()) { for (Effect effect : mode.getEffects()) { if (effect instanceof ContinuousEffect) { addEffect((ContinuousEffect) effect, sourceId, ability); diff --git a/Mage/src/mage/game/GameStates.java b/Mage/src/main/java/mage/game/GameStates.java similarity index 97% rename from Mage/src/mage/game/GameStates.java rename to Mage/src/main/java/mage/game/GameStates.java index e88e45c27d7..b65cbccea3c 100644 --- a/Mage/src/mage/game/GameStates.java +++ b/Mage/src/main/java/mage/game/GameStates.java @@ -40,7 +40,7 @@ import java.util.List; */ public class GameStates implements Serializable { - private static final transient Logger logger = Logger.getLogger(GameStates.class); + private static final Logger logger = Logger.getLogger(GameStates.class); // private final List states; private final List states; diff --git a/Mage/src/mage/game/GameTinyLeadersImpl.java b/Mage/src/main/java/mage/game/GameTinyLeadersImpl.java similarity index 100% rename from Mage/src/mage/game/GameTinyLeadersImpl.java rename to Mage/src/main/java/mage/game/GameTinyLeadersImpl.java diff --git a/Mage/src/mage/game/Graveyard.java b/Mage/src/main/java/mage/game/Graveyard.java similarity index 100% rename from Mage/src/mage/game/Graveyard.java rename to Mage/src/main/java/mage/game/Graveyard.java diff --git a/Mage/src/mage/game/LookedAt.java b/Mage/src/main/java/mage/game/LookedAt.java similarity index 100% rename from Mage/src/mage/game/LookedAt.java rename to Mage/src/main/java/mage/game/LookedAt.java diff --git a/Mage/src/mage/game/Revealed.java b/Mage/src/main/java/mage/game/Revealed.java similarity index 100% rename from Mage/src/mage/game/Revealed.java rename to Mage/src/main/java/mage/game/Revealed.java diff --git a/Mage/src/mage/game/Seat.java b/Mage/src/main/java/mage/game/Seat.java similarity index 100% rename from Mage/src/mage/game/Seat.java rename to Mage/src/main/java/mage/game/Seat.java diff --git a/Mage/src/mage/game/Table.java b/Mage/src/main/java/mage/game/Table.java similarity index 100% rename from Mage/src/mage/game/Table.java rename to Mage/src/main/java/mage/game/Table.java diff --git a/Mage/src/mage/game/Team.java b/Mage/src/main/java/mage/game/Team.java similarity index 100% rename from Mage/src/mage/game/Team.java rename to Mage/src/main/java/mage/game/Team.java diff --git a/Mage/src/mage/game/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java similarity index 96% rename from Mage/src/mage/game/combat/Combat.java rename to Mage/src/main/java/mage/game/combat/Combat.java index b03625617c6..7b041bdef57 100644 --- a/Mage/src/mage/game/combat/Combat.java +++ b/Mage/src/main/java/mage/game/combat/Combat.java @@ -212,12 +212,31 @@ public class Combat implements Serializable, Copyable { * @return */ public boolean addAttackingCreature(UUID creatureId, Game game) { + return this.addAttackingCreature(creatureId, game, null); + } + + public boolean addAttackingCreature(UUID creatureId, Game game, UUID playerToAttack) { + Set possibleDefenders; + if (playerToAttack != null) { + possibleDefenders = new HashSet<>(); + for (UUID objectId : defenders) { + Permanent planeswalker = game.getPermanent(objectId); + if (planeswalker != null && planeswalker.getControllerId().equals(playerToAttack)) { + possibleDefenders.add(objectId); + } else if (playerToAttack.equals(objectId)) { + possibleDefenders.add(objectId); + } + } + } else { + possibleDefenders = new HashSet(defenders); + } Player player = game.getPlayer(attackerId); - if (defenders.size() == 1) { - addAttackerToCombat(creatureId, defenders.iterator().next(), game); + if (possibleDefenders.size() == 1) { + addAttackerToCombat(creatureId, possibleDefenders.iterator().next(), game); return true; } else { - TargetDefender target = new TargetDefender(defenders, creatureId); + TargetDefender target = new TargetDefender(possibleDefenders, creatureId); + target.setNotTarget(true); target.setRequired(true); player.chooseTarget(Outcome.Damage, target, null, game); if (target.getFirstTarget() != null) { @@ -380,7 +399,7 @@ public class Combat implements Serializable, Copyable { public void selectBlockers(Player blockController, Game game) { Player attacker = game.getPlayer(attackerId); //20101001 - 509.1c - this.retrieveMustBlockAttackerRequirements(attacker, game); + game.getCombat().retrieveMustBlockAttackerRequirements(attacker, game); Player controller; for (UUID defenderId : getPlayerDefenders(game)) { Player defender = game.getPlayer(defenderId); @@ -396,26 +415,26 @@ public class Combat implements Serializable, Copyable { if (game.isPaused() || game.gameOver(null) || game.executingRollback()) { return; } - if (!this.checkBlockRestrictions(defender, game)) { + if (!game.getCombat().checkBlockRestrictions(defender, game)) { if (controller.isHuman()) { // only human player can decide to do the block in another way continue; } } - choose = !this.checkBlockRequirementsAfter(defender, controller, game); + choose = !game.getCombat().checkBlockRequirementsAfter(defender, controller, game); if (!choose) { - choose = !this.checkBlockRestrictionsAfter(defender, controller, game); + choose = !game.getCombat().checkBlockRestrictionsAfter(defender, controller, game); } } game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_BLOCKERS, defenderId, defenderId)); // add info about attacker blocked by blocker to the game log if (!game.isSimulation()) { - this.logBlockerInfo(defender, game); + game.getCombat().logBlockerInfo(defender, game); } } } // tool to catch the bug about flyers blocked by non flyers or intimidate blocked by creatures with other colors - TraceUtil.traceCombatIfNeeded(game, this); + TraceUtil.traceCombatIfNeeded(game, game.getCombat()); } /** @@ -519,6 +538,11 @@ public class Combat implements Serializable, Copyable { UUID attackingCreatureId = requirementEntry.getKey().mustBlockAttacker(ability, game); Player defender = game.getPlayer(possibleBlocker.getControllerId()); if (attackingCreatureId != null && defender != null && possibleBlocker.canBlock(attackingCreatureId, game)) { + Permanent attackingCreature = game.getPermanent(attackingCreatureId); + if (attackingCreature == null || !attackingCreature.isAttacking()) { + // creature that must be blocked is not attacking + continue; + } // check if the possible blocker has to pay cost to block, if so don't force if (game.getContinuousEffects().checkIfThereArePayCostToAttackBlockEffects( GameEvent.getEvent(GameEvent.EventType.DECLARE_BLOCKER, attackingCreatureId, possibleBlocker.getId(), possibleBlocker.getControllerId()), game)) { diff --git a/Mage/src/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java similarity index 98% rename from Mage/src/mage/game/combat/CombatGroup.java rename to Mage/src/main/java/mage/game/combat/CombatGroup.java index e7cf83c8a75..51c1c196256 100644 --- a/Mage/src/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -411,12 +411,30 @@ public class CombatGroup implements Serializable, Copyable { return true; } + /** + * + * @param blockerId + * @param playerId controller of the blocking creature + * @param game + */ public void addBlocker(UUID blockerId, UUID playerId, Game game) { for (UUID attackerId : attackers) { if (game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_BLOCKER, attackerId, blockerId, playerId))) { return; } } + addBlockerToGroup(blockerId, playerId, game); + } + + /** + * Adds a blocker to a combat group without creating a DECLARE_BLOCKER + * event. + * + * @param blockerId + * @param playerId controller of the blocking creature + * @param game + */ + public void addBlockerToGroup(UUID blockerId, UUID playerId, Game game) { Permanent blocker = game.getPermanent(blockerId); if (blockerId != null && blocker != null) { blocker.setBlocking(blocker.getBlocking() + 1); diff --git a/Mage/src/mage/game/command/Command.java b/Mage/src/main/java/mage/game/command/Command.java similarity index 100% rename from Mage/src/mage/game/command/Command.java rename to Mage/src/main/java/mage/game/command/Command.java diff --git a/Mage/src/mage/game/command/CommandObject.java b/Mage/src/main/java/mage/game/command/CommandObject.java similarity index 100% rename from Mage/src/mage/game/command/CommandObject.java rename to Mage/src/main/java/mage/game/command/CommandObject.java diff --git a/Mage/src/mage/game/command/Commander.java b/Mage/src/main/java/mage/game/command/Commander.java similarity index 100% rename from Mage/src/mage/game/command/Commander.java rename to Mage/src/main/java/mage/game/command/Commander.java diff --git a/Mage/src/mage/game/command/Emblem.java b/Mage/src/main/java/mage/game/command/Emblem.java similarity index 100% rename from Mage/src/mage/game/command/Emblem.java rename to Mage/src/main/java/mage/game/command/Emblem.java diff --git a/Mage/src/mage/game/draft/BoosterDraft.java b/Mage/src/main/java/mage/game/draft/BoosterDraft.java similarity index 100% rename from Mage/src/mage/game/draft/BoosterDraft.java rename to Mage/src/main/java/mage/game/draft/BoosterDraft.java diff --git a/Mage/src/mage/game/draft/Draft.java b/Mage/src/main/java/mage/game/draft/Draft.java similarity index 100% rename from Mage/src/mage/game/draft/Draft.java rename to Mage/src/main/java/mage/game/draft/Draft.java diff --git a/Mage/src/mage/game/draft/DraftCube.java b/Mage/src/main/java/mage/game/draft/DraftCube.java similarity index 100% rename from Mage/src/mage/game/draft/DraftCube.java rename to Mage/src/main/java/mage/game/draft/DraftCube.java diff --git a/Mage/src/mage/game/draft/DraftImpl.java b/Mage/src/main/java/mage/game/draft/DraftImpl.java similarity index 100% rename from Mage/src/mage/game/draft/DraftImpl.java rename to Mage/src/main/java/mage/game/draft/DraftImpl.java diff --git a/Mage/src/mage/game/draft/DraftOptions.java b/Mage/src/main/java/mage/game/draft/DraftOptions.java similarity index 100% rename from Mage/src/mage/game/draft/DraftOptions.java rename to Mage/src/main/java/mage/game/draft/DraftOptions.java diff --git a/Mage/src/mage/game/draft/DraftPlayer.java b/Mage/src/main/java/mage/game/draft/DraftPlayer.java similarity index 100% rename from Mage/src/mage/game/draft/DraftPlayer.java rename to Mage/src/main/java/mage/game/draft/DraftPlayer.java diff --git a/Mage/src/mage/game/draft/RandomBoosterDraft.java b/Mage/src/main/java/mage/game/draft/RandomBoosterDraft.java similarity index 100% rename from Mage/src/mage/game/draft/RandomBoosterDraft.java rename to Mage/src/main/java/mage/game/draft/RandomBoosterDraft.java diff --git a/Mage/src/mage/game/events/DamageCreatureEvent.java b/Mage/src/main/java/mage/game/events/DamageCreatureEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamageCreatureEvent.java rename to Mage/src/main/java/mage/game/events/DamageCreatureEvent.java diff --git a/Mage/src/mage/game/events/DamageEvent.java b/Mage/src/main/java/mage/game/events/DamageEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamageEvent.java rename to Mage/src/main/java/mage/game/events/DamageEvent.java diff --git a/Mage/src/mage/game/events/DamagePlaneswalkerEvent.java b/Mage/src/main/java/mage/game/events/DamagePlaneswalkerEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamagePlaneswalkerEvent.java rename to Mage/src/main/java/mage/game/events/DamagePlaneswalkerEvent.java diff --git a/Mage/src/mage/game/events/DamagePlayerEvent.java b/Mage/src/main/java/mage/game/events/DamagePlayerEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamagePlayerEvent.java rename to Mage/src/main/java/mage/game/events/DamagePlayerEvent.java diff --git a/Mage/src/mage/game/events/DamagedCreatureEvent.java b/Mage/src/main/java/mage/game/events/DamagedCreatureEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamagedCreatureEvent.java rename to Mage/src/main/java/mage/game/events/DamagedCreatureEvent.java diff --git a/Mage/src/mage/game/events/DamagedEvent.java b/Mage/src/main/java/mage/game/events/DamagedEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamagedEvent.java rename to Mage/src/main/java/mage/game/events/DamagedEvent.java diff --git a/Mage/src/mage/game/events/DamagedPlaneswalkerEvent.java b/Mage/src/main/java/mage/game/events/DamagedPlaneswalkerEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamagedPlaneswalkerEvent.java rename to Mage/src/main/java/mage/game/events/DamagedPlaneswalkerEvent.java diff --git a/Mage/src/mage/game/events/DamagedPlayerEvent.java b/Mage/src/main/java/mage/game/events/DamagedPlayerEvent.java similarity index 100% rename from Mage/src/mage/game/events/DamagedPlayerEvent.java rename to Mage/src/main/java/mage/game/events/DamagedPlayerEvent.java diff --git a/Mage/src/mage/game/events/EntersTheBattlefieldEvent.java b/Mage/src/main/java/mage/game/events/EntersTheBattlefieldEvent.java similarity index 100% rename from Mage/src/mage/game/events/EntersTheBattlefieldEvent.java rename to Mage/src/main/java/mage/game/events/EntersTheBattlefieldEvent.java diff --git a/Mage/src/mage/game/events/EventDispatcher.java b/Mage/src/main/java/mage/game/events/EventDispatcher.java similarity index 100% rename from Mage/src/mage/game/events/EventDispatcher.java rename to Mage/src/main/java/mage/game/events/EventDispatcher.java diff --git a/Mage/src/mage/game/events/EventSource.java b/Mage/src/main/java/mage/game/events/EventSource.java similarity index 100% rename from Mage/src/mage/game/events/EventSource.java rename to Mage/src/main/java/mage/game/events/EventSource.java diff --git a/Mage/src/mage/game/events/ExternalEvent.java b/Mage/src/main/java/mage/game/events/ExternalEvent.java similarity index 100% rename from Mage/src/mage/game/events/ExternalEvent.java rename to Mage/src/main/java/mage/game/events/ExternalEvent.java diff --git a/Mage/src/mage/game/events/GameEvent.java b/Mage/src/main/java/mage/game/events/GameEvent.java similarity index 99% rename from Mage/src/mage/game/events/GameEvent.java rename to Mage/src/main/java/mage/game/events/GameEvent.java index 38e9ebeefe8..95b1a318e67 100644 --- a/Mage/src/mage/game/events/GameEvent.java +++ b/Mage/src/main/java/mage/game/events/GameEvent.java @@ -109,6 +109,10 @@ public class GameEvent implements Serializable { LOSE_LIFE, LOST_LIFE, PLAY_LAND, LAND_PLAYED, CAST_SPELL, + /* SPELL_CAST + x-Costs are already defined + */ + CAST_SPELL_LATE, /* SPELL_CAST targetId id of the spell that's cast sourceId sourceId of the spell that's cast @@ -214,6 +218,7 @@ public class GameEvent implements Serializable { SACRIFICE_PERMANENT, SACRIFICED_PERMANENT, FIGHTED_PERMANENT, EXPLOITED_CREATURE, + EVOLVED_CREATURE, ATTACH, ATTACHED, UNATTACH, UNATTACHED, ADD_COUNTER, COUNTER_ADDED, diff --git a/Mage/src/mage/game/events/Listener.java b/Mage/src/main/java/mage/game/events/Listener.java similarity index 100% rename from Mage/src/mage/game/events/Listener.java rename to Mage/src/main/java/mage/game/events/Listener.java diff --git a/Mage/src/mage/game/events/MageEvent.java b/Mage/src/main/java/mage/game/events/MageEvent.java similarity index 100% rename from Mage/src/mage/game/events/MageEvent.java rename to Mage/src/main/java/mage/game/events/MageEvent.java diff --git a/Mage/src/mage/game/events/ManaEvent.java b/Mage/src/main/java/mage/game/events/ManaEvent.java similarity index 100% rename from Mage/src/mage/game/events/ManaEvent.java rename to Mage/src/main/java/mage/game/events/ManaEvent.java diff --git a/Mage/src/mage/game/events/PlayerQueryEvent.java b/Mage/src/main/java/mage/game/events/PlayerQueryEvent.java similarity index 100% rename from Mage/src/mage/game/events/PlayerQueryEvent.java rename to Mage/src/main/java/mage/game/events/PlayerQueryEvent.java diff --git a/Mage/src/mage/game/events/PlayerQueryEventSource.java b/Mage/src/main/java/mage/game/events/PlayerQueryEventSource.java similarity index 100% rename from Mage/src/mage/game/events/PlayerQueryEventSource.java rename to Mage/src/main/java/mage/game/events/PlayerQueryEventSource.java diff --git a/Mage/src/mage/game/events/TableEvent.java b/Mage/src/main/java/mage/game/events/TableEvent.java similarity index 100% rename from Mage/src/mage/game/events/TableEvent.java rename to Mage/src/main/java/mage/game/events/TableEvent.java diff --git a/Mage/src/mage/game/events/TableEventSource.java b/Mage/src/main/java/mage/game/events/TableEventSource.java similarity index 100% rename from Mage/src/mage/game/events/TableEventSource.java rename to Mage/src/main/java/mage/game/events/TableEventSource.java diff --git a/Mage/src/mage/game/events/ZoneChangeEvent.java b/Mage/src/main/java/mage/game/events/ZoneChangeEvent.java similarity index 100% rename from Mage/src/mage/game/events/ZoneChangeEvent.java rename to Mage/src/main/java/mage/game/events/ZoneChangeEvent.java diff --git a/Mage/src/mage/game/events/ZoneChangeGroupEvent.java b/Mage/src/main/java/mage/game/events/ZoneChangeGroupEvent.java similarity index 100% rename from Mage/src/mage/game/events/ZoneChangeGroupEvent.java rename to Mage/src/main/java/mage/game/events/ZoneChangeGroupEvent.java diff --git a/Mage/src/mage/game/match/Match.java b/Mage/src/main/java/mage/game/match/Match.java similarity index 100% rename from Mage/src/mage/game/match/Match.java rename to Mage/src/main/java/mage/game/match/Match.java diff --git a/Mage/src/mage/game/match/MatchImpl.java b/Mage/src/main/java/mage/game/match/MatchImpl.java similarity index 89% rename from Mage/src/mage/game/match/MatchImpl.java rename to Mage/src/main/java/mage/game/match/MatchImpl.java index 956f32bebd1..9bc0db8ca2f 100644 --- a/Mage/src/mage/game/match/MatchImpl.java +++ b/Mage/src/main/java/mage/game/match/MatchImpl.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,15 +20,13 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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.match; - import java.util.ArrayList; import java.util.Collections; import java.util.Date; @@ -54,7 +52,7 @@ import org.apache.log4j.Logger; public abstract class MatchImpl implements Match { private static final Logger logger = Logger.getLogger(MatchImpl.class); - + protected UUID id = UUID.randomUUID(); protected List players = new ArrayList<>(); protected List games = new ArrayList<>(); @@ -87,7 +85,7 @@ public abstract class MatchImpl implements Match { @Override public MatchPlayer getPlayer(UUID playerId) { - for (MatchPlayer player: players) { + for (MatchPlayer player : players) { if (player.getPlayer().getId().equals(playerId)) { return player; } @@ -97,7 +95,7 @@ public abstract class MatchImpl implements Match { @Override public void addPlayer(Player player, Deck deck) { - MatchPlayer matchPlayer = new MatchPlayer(player, deck); + MatchPlayer matchPlayer = new MatchPlayer(player, deck, this); player.setMatchPlayer(matchPlayer); players.add(matchPlayer); } @@ -145,10 +143,10 @@ public abstract class MatchImpl implements Match { if (getGame() == null && isDoneSideboarding()) { checkIfMatchEnds(); } - if (getGame() != null && getGame().hasEnded()) { - for (MatchPlayer matchPlayer:players) { + if (getGame() != null && getGame().hasEnded()) { + for (MatchPlayer matchPlayer : players) { if (matchPlayer.getPlayer().hasQuit() && !matchPlayer.hasQuit()) { - logger.warn("MatchPlayer was not set to quit matchId " + this.getId()+ " - " + matchPlayer.getName()); + logger.warn("MatchPlayer was not set to quit matchId " + this.getId() + " - " + matchPlayer.getName()); matchPlayer.setQuit(true); } } @@ -166,7 +164,7 @@ public abstract class MatchImpl implements Match { public boolean checkIfMatchEnds() { int activePlayers = 0; MatchPlayer matchWinner = null; - for (MatchPlayer matchPlayer: players) { + for (MatchPlayer matchPlayer : players) { if (!matchPlayer.hasQuit()) { activePlayers++; matchWinner = matchPlayer; @@ -192,7 +190,7 @@ public abstract class MatchImpl implements Match { if (games.isEmpty()) { return null; } - return games.get(games.size() -1); + return games.get(games.size() - 1); } @Override @@ -222,16 +220,16 @@ public abstract class MatchImpl implements Match { protected void initGame(Game game) throws GameException { addGame(); // raises only the number - shufflePlayers(); - for (MatchPlayer matchPlayer: this.players) { + shufflePlayers(); + for (MatchPlayer matchPlayer : this.players) { if (!matchPlayer.hasQuit()) { matchPlayer.getPlayer().init(game); game.loadCards(matchPlayer.getDeck().getCards(), matchPlayer.getPlayer().getId()); game.loadCards(matchPlayer.getDeck().getSideboard(), matchPlayer.getPlayer().getId()); game.addPlayer(matchPlayer.getPlayer(), matchPlayer.getDeck()); // set the priority time left for the match - if (games.isEmpty()) { // first game full time - matchPlayer.getPlayer().setPriorityTimeLeft(options.getPriorityTime()); + if (games.isEmpty()) { // first game full time + matchPlayer.getPlayer().setPriorityTimeLeft(options.getPriorityTime()); } else { if (matchPlayer.getPriorityTimeLeft() > 0) { matchPlayer.getPlayer().setPriorityTimeLeft(matchPlayer.getPriorityTimeLeft()); @@ -249,7 +247,7 @@ public abstract class MatchImpl implements Match { @Override public void endGame() { Game game = getGame(); - for (MatchPlayer matchPlayer: this.players) { + for (MatchPlayer matchPlayer : this.players) { Player player = game.getPlayer(matchPlayer.getPlayer().getId()); if (player != null) { // get the left time from player priority timer @@ -277,7 +275,7 @@ public abstract class MatchImpl implements Match { StringBuilder playersInfo = new StringBuilder(); int counter = 0; - for (MatchPlayer matchPlayer: getPlayers()) { + for (MatchPlayer matchPlayer : getPlayers()) { if (counter > 0) { playersInfo.append(" - "); } @@ -290,14 +288,13 @@ public abstract class MatchImpl implements Match { String duelingTime = ""; if (game.hasEnded()) { if (game.getEndTime() != null) { - duelingTime = " (" + DateFormat.getDuration((game.getEndTime().getTime() - game.getStartTime().getTime())/1000) + ")"; + duelingTime = " (" + DateFormat.getDuration((game.getEndTime().getTime() - game.getStartTime().getTime()) / 1000) + ")"; } state = "Finished" + duelingTime; result = game.getWinner(); - } - else { + } else { if (game.getStartTime() != null) { - duelingTime = " (" + DateFormat.getDuration((new Date().getTime() - game.getStartTime().getTime())/1000) + ")"; + duelingTime = " (" + DateFormat.getDuration((new Date().getTime() - game.getStartTime().getTime()) / 1000) + ")"; } state = "Dueling" + duelingTime; result = ""; @@ -317,7 +314,7 @@ public abstract class MatchImpl implements Match { @Override public void setTournamentRound(int round) { - for (GameInfo gameInfo: gamesInfo) { + for (GameInfo gameInfo : gamesInfo) { gameInfo.setRoundNum(round); } } @@ -326,7 +323,7 @@ public abstract class MatchImpl implements Match { public UUID getChooser() { UUID loserId = null; Game game = getGame(); - for (MatchPlayer player: this.players) { + for (MatchPlayer player : this.players) { Player p = game.getPlayer(player.getPlayer().getId()); if (p != null && p.hasLost() && !p.hasQuit()) { loserId = p.getId(); @@ -342,7 +339,7 @@ public abstract class MatchImpl implements Match { @Override public void sideboard() { - for (MatchPlayer player: this.players) { + for (MatchPlayer player : this.players) { if (!player.hasQuit()) { if (player.getDeck() != null) { player.setSideboarding(); @@ -352,18 +349,19 @@ public abstract class MatchImpl implements Match { } } } - synchronized(this) { + synchronized (this) { while (!isDoneSideboarding()) { try { this.wait(); - } catch (InterruptedException ex) { } + } catch (InterruptedException ex) { + } } } } @Override public boolean isDoneSideboarding() { - for (MatchPlayer player: this.players) { + for (MatchPlayer player : this.players) { if (!player.hasQuit() && !player.isDoneSideboarding()) { return false; } @@ -375,7 +373,7 @@ public abstract class MatchImpl implements Match { //@Override public boolean areAllDoneSideboarding() { int count = 0; - for (MatchPlayer player: this.players) { + for (MatchPlayer player : this.players) { if (!player.hasQuit() && player.isDoneSideboarding()) { return true; } @@ -419,9 +417,9 @@ public abstract class MatchImpl implements Match { protected String createGameStartMessage() { StringBuilder sb = new StringBuilder(); sb.append("
Match score:
"); - for (MatchPlayer mp :this.getPlayers()) { + for (MatchPlayer mp : this.getPlayers()) { sb.append(" ").append(mp.getPlayer().getLogName()); - sb.append(" - ").append(mp.getWins()).append(mp.getWins()==1?" win":" wins"); + sb.append(" - ").append(mp.getWins()).append(mp.getWins() == 1 ? " win" : " wins"); if (mp.hasQuit()) { sb.append(" QUITTED"); } @@ -431,7 +429,7 @@ public abstract class MatchImpl implements Match { if (getDraws() > 0) { sb.append(" Draws: ").append(getDraws()).append("
"); } - sb.append("
").append("You have to win ").append(this.getWinsNeeded()).append(this.getWinsNeeded() == 1 ? " game":" games").append(" to win the complete match
"); + sb.append("
").append("You have to win ").append(this.getWinsNeeded()).append(this.getWinsNeeded() == 1 ? " game" : " games").append(" to win the complete match
"); sb.append("
Game has started

"); return sb.toString(); } @@ -464,13 +462,13 @@ public abstract class MatchImpl implements Match { @Override public void cleanUpOnMatchEnd(boolean isSaveGameActivated, boolean isTournament) { - for (MatchPlayer matchPlayer: players) { + for (MatchPlayer matchPlayer : players) { matchPlayer.cleanUpOnMatchEnd(); } if ((!isSaveGameActivated && !isTournament) || this.getGame().isSimulation()) { this.getGames().clear(); - } - } + } + } @Override public void addDraw() { @@ -482,10 +480,9 @@ public abstract class MatchImpl implements Match { return draws; } - @Override public void cleanUp() { - for (MatchPlayer matchPlayer: players) { + for (MatchPlayer matchPlayer : players) { matchPlayer.cleanUpOnMatchEnd(); } this.getGames().clear(); diff --git a/Mage/src/mage/game/match/MatchOptions.java b/Mage/src/main/java/mage/game/match/MatchOptions.java similarity index 100% rename from Mage/src/mage/game/match/MatchOptions.java rename to Mage/src/main/java/mage/game/match/MatchOptions.java diff --git a/Mage/src/mage/game/match/MatchPlayer.java b/Mage/src/main/java/mage/game/match/MatchPlayer.java similarity index 95% rename from Mage/src/mage/game/match/MatchPlayer.java rename to Mage/src/main/java/mage/game/match/MatchPlayer.java index 6f77ebfe8a5..f2c5d483dd4 100644 --- a/Mage/src/mage/game/match/MatchPlayer.java +++ b/Mage/src/main/java/mage/game/match/MatchPlayer.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.game.match; import java.io.Serializable; @@ -38,26 +37,27 @@ import mage.players.Player; * @author BetaSteward_at_googlemail.com */ public class MatchPlayer implements Serializable { - + private static final long serialVersionUID = 42L; - + private int wins; + private int winsNeeded; private boolean matchWinner; private Deck deck; private Player player; private final String name; - + private boolean quit; //private final boolean timerTimeout; private boolean doneSideboarding; private int priorityTimeLeft; - - public MatchPlayer(Player player, Deck deck) { + public MatchPlayer(Player player, Deck deck, Match match) { this.player = player; this.deck = deck; this.wins = 0; + this.winsNeeded = match.getWinsNeeded(); this.doneSideboarding = true; this.quit = false; //this.timerTimeout = false; @@ -77,6 +77,10 @@ public class MatchPlayer implements Serializable { return wins; } + public int getWinsNeeded() { + return winsNeeded; + } + public void addWin() { this.wins++; } @@ -153,5 +157,5 @@ public class MatchPlayer implements Serializable { public String getName() { return name; } - + } diff --git a/Mage/src/mage/game/match/MatchType.java b/Mage/src/main/java/mage/game/match/MatchType.java similarity index 100% rename from Mage/src/mage/game/match/MatchType.java rename to Mage/src/main/java/mage/game/match/MatchType.java diff --git a/Mage/src/mage/game/permanent/Battlefield.java b/Mage/src/main/java/mage/game/permanent/Battlefield.java similarity index 100% rename from Mage/src/mage/game/permanent/Battlefield.java rename to Mage/src/main/java/mage/game/permanent/Battlefield.java diff --git a/Mage/src/mage/game/permanent/Permanent.java b/Mage/src/main/java/mage/game/permanent/Permanent.java similarity index 100% rename from Mage/src/mage/game/permanent/Permanent.java rename to Mage/src/main/java/mage/game/permanent/Permanent.java diff --git a/Mage/src/mage/game/permanent/PermanentCard.java b/Mage/src/main/java/mage/game/permanent/PermanentCard.java similarity index 94% rename from Mage/src/mage/game/permanent/PermanentCard.java rename to Mage/src/main/java/mage/game/permanent/PermanentCard.java index 2e87290d9e2..795f83501e0 100644 --- a/Mage/src/mage/game/permanent/PermanentCard.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentCard.java @@ -48,18 +48,20 @@ public class PermanentCard extends PermanentImpl { protected int maxLevelCounters; protected Card card; - // protected int zoneChangeCounter; + // the number this permanent instance had + protected int zoneChangeCounter; public PermanentCard(Card card, UUID controllerId, Game game) { super(card.getId(), card.getOwnerId(), controllerId, card.getName()); // this.card = card.copy(); this.card = card; + this.zoneChangeCounter = card.getZoneChangeCounter(game); // local value already set to the raised number init(card, game); } private void init(Card card, Game game) { copyFromCard(card); - // this.zoneChangeCounter = card.getZoneChangeCounter(game); + /*if (card.getCardType().contains(CardType.PLANESWALKER)) { this.loyalty = new MageInt(card.getLoyalty().getValue()); }*/ @@ -79,6 +81,7 @@ public class PermanentCard extends PermanentImpl { super(permanent); this.card = permanent.card.copy(); this.maxLevelCounters = permanent.maxLevelCounters; + this.zoneChangeCounter = permanent.zoneChangeCounter; } @Override @@ -89,7 +92,7 @@ public class PermanentCard extends PermanentImpl { super.reset(game); } - protected void copyFromCard(Card card) { + protected void copyFromCard(final Card card) { this.name = card.getName(); this.abilities.clear(); if (this.faceDown) { @@ -257,12 +260,14 @@ public class PermanentCard extends PermanentImpl { @Override public int getZoneChangeCounter(Game game) { - return card.getZoneChangeCounter(game); + // permanent value of zone change counter stays always the same without exception of update during the process of putting the permanent onto the battlefield + return zoneChangeCounter; } @Override public void updateZoneChangeCounter(Game game) { card.updateZoneChangeCounter(game); + zoneChangeCounter = card.getZoneChangeCounter(game); } @Override diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java similarity index 99% rename from Mage/src/mage/game/permanent/PermanentImpl.java rename to Mage/src/main/java/mage/game/permanent/PermanentImpl.java index 3b767772abc..b1f15c03398 100644 --- a/Mage/src/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java @@ -84,7 +84,7 @@ import mage.util.ThreadLocalStringBuilder; */ public abstract class PermanentImpl extends CardImpl implements Permanent { - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(300); + private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(300); protected boolean tapped; protected boolean flipped; diff --git a/Mage/src/mage/game/permanent/PermanentToken.java b/Mage/src/main/java/mage/game/permanent/PermanentToken.java similarity index 100% rename from Mage/src/mage/game/permanent/PermanentToken.java rename to Mage/src/main/java/mage/game/permanent/PermanentToken.java diff --git a/Mage/src/mage/game/permanent/token/AngelToken.java b/Mage/src/main/java/mage/game/permanent/token/AngelToken.java similarity index 56% rename from Mage/src/mage/game/permanent/token/AngelToken.java rename to Mage/src/main/java/mage/game/permanent/token/AngelToken.java index c21fd10160c..95a43e34646 100644 --- a/Mage/src/mage/game/permanent/token/AngelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/AngelToken.java @@ -1,25 +1,34 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; public class AngelToken extends Token { - + + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("AVR", "C14", "CFX", "GTC", "ISD", "M14", "ORI", "ZEN")); + } + public AngelToken() { - this("M14"); + this(null); } public AngelToken(String setCode) { super("Angel", "4/4 white Angel creature token with flying"); - this.setOriginalExpansionSetCode(setCode); + availableImageSetCodes = tokenImageSets; + setOriginalExpansionSetCode(setCode); + cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Angel"); power = new MageInt(4); toughness = new MageInt(4); addAbility(FlyingAbility.getInstance()); - } } diff --git a/Mage/src/mage/game/permanent/token/BearToken.java b/Mage/src/main/java/mage/game/permanent/token/BearToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/BearToken.java rename to Mage/src/main/java/mage/game/permanent/token/BearToken.java diff --git a/Mage/src/mage/game/permanent/token/BeastToken.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/BeastToken.java rename to Mage/src/main/java/mage/game/permanent/token/BeastToken.java diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java new file mode 100644 index 00000000000..4304707b4e2 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.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.game.permanent.token; + +import java.util.Arrays; +import mage.MageInt; +import mage.constants.CardType; + +/** + * + * @author LoneFox + */ +public class BeastToken2 extends Token { + + public BeastToken2() { + super("Beast", "4/4 green Beast creature token"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Beast"); + power = new MageInt(4); + toughness = new MageInt(4); + availableImageSetCodes.addAll(Arrays.asList("ZEN", "C14", "DDD", "C15")); + } + + public BeastToken2(final BeastToken2 token) { + super(token); + } + + @Override + public BeastToken2 copy() { + return new BeastToken2(this); + } + + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD")) { + this.setTokenType(2); + } + } +} diff --git a/Mage/src/mage/game/permanent/token/BirdToken.java b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/BirdToken.java rename to Mage/src/main/java/mage/game/permanent/token/BirdToken.java diff --git a/Mage/src/mage/game/permanent/token/CatToken.java b/Mage/src/main/java/mage/game/permanent/token/CatToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/CatToken.java rename to Mage/src/main/java/mage/game/permanent/token/CatToken.java diff --git a/Mage/src/mage/game/permanent/token/CentaurToken.java b/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/CentaurToken.java rename to Mage/src/main/java/mage/game/permanent/token/CentaurToken.java diff --git a/Mage/src/mage/game/permanent/token/CitizenToken.java b/Mage/src/main/java/mage/game/permanent/token/CitizenToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/CitizenToken.java rename to Mage/src/main/java/mage/game/permanent/token/CitizenToken.java diff --git a/Mage/src/mage/game/permanent/token/DemonToken.java b/Mage/src/main/java/mage/game/permanent/token/DemonToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/DemonToken.java rename to Mage/src/main/java/mage/game/permanent/token/DemonToken.java diff --git a/Mage/src/mage/game/permanent/token/DragonToken.java b/Mage/src/main/java/mage/game/permanent/token/DragonToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/DragonToken.java rename to Mage/src/main/java/mage/game/permanent/token/DragonToken.java diff --git a/Mage/src/mage/game/permanent/token/DragonToken2.java b/Mage/src/main/java/mage/game/permanent/token/DragonToken2.java similarity index 100% rename from Mage/src/mage/game/permanent/token/DragonToken2.java rename to Mage/src/main/java/mage/game/permanent/token/DragonToken2.java diff --git a/Mage/src/mage/game/permanent/token/DrakeToken.java b/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/DrakeToken.java rename to Mage/src/main/java/mage/game/permanent/token/DrakeToken.java diff --git a/Mage/src/mage/game/permanent/token/EldraziScionToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java similarity index 98% rename from Mage/src/mage/game/permanent/token/EldraziScionToken.java rename to Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java index 92d33cadc1f..29e8a55f307 100644 --- a/Mage/src/mage/game/permanent/token/EldraziScionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java @@ -48,7 +48,7 @@ public class EldraziScionToken extends Token { subtype.add("Scion"); power = new MageInt(1); toughness = new MageInt(1); - addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana, new SacrificeSourceCost())); + addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new SacrificeSourceCost())); setOriginalExpansionSetCode("BFZ"); } diff --git a/Mage/src/mage/game/permanent/token/EldraziSpawnToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziSpawnToken.java similarity index 88% rename from Mage/src/mage/game/permanent/token/EldraziSpawnToken.java rename to Mage/src/main/java/mage/game/permanent/token/EldraziSpawnToken.java index ec4e3a30a77..27f02431fc6 100644 --- a/Mage/src/mage/game/permanent/token/EldraziSpawnToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziSpawnToken.java @@ -28,6 +28,9 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.Random; import mage.constants.CardType; import mage.constants.Zone; @@ -42,6 +45,12 @@ import mage.abilities.mana.SimpleManaAbility; */ public class EldraziSpawnToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("ROE", "MM2", "DDP")); + } + public EldraziSpawnToken() { super("Eldrazi Spawn", "0/1 colorless Eldrazi Spawn creature with \"Sacrifice this creature: Add {1} to your mana pool.\""); cardType.add(CardType.CREATURE); @@ -49,8 +58,9 @@ public class EldraziSpawnToken extends Token { subtype.add("Spawn"); power = new MageInt(0); toughness = new MageInt(1); - addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana, new SacrificeSourceCost())); - this.setOriginalExpansionSetCode("ROE"); + addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new SacrificeSourceCost())); + + availableImageSetCodes = tokenImageSets; // Get one of the three possible token images this.setTokenType(new Random().nextInt(3) + 1); } diff --git a/Mage/src/mage/game/permanent/token/ElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/ElementalToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/ElementalToken.java rename to Mage/src/main/java/mage/game/permanent/token/ElementalToken.java diff --git a/Mage/src/mage/game/permanent/token/ElephantToken.java b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java similarity index 87% rename from Mage/src/mage/game/permanent/token/ElephantToken.java rename to Mage/src/main/java/mage/game/permanent/token/ElephantToken.java index 2b04118862a..a95182b2b1a 100644 --- a/Mage/src/mage/game/permanent/token/ElephantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java @@ -28,6 +28,10 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.MageInt; import mage.ObjectColor; import mage.constants.CardType; @@ -38,6 +42,12 @@ import mage.constants.CardType; */ public class ElephantToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("C14", "CNS", "DDD", "MM2", "WWK")); + } + public ElephantToken() { super("Elephant", "3/3 green Elephant creature token"); cardType.add(CardType.CREATURE); @@ -46,7 +56,7 @@ public class ElephantToken extends Token { power = new MageInt(3); toughness = new MageInt(3); - this.setOriginalExpansionSetCode("DDD"); + availableImageSetCodes = tokenImageSets; } } \ No newline at end of file diff --git a/Mage/src/mage/game/permanent/token/ElfToken.java b/Mage/src/main/java/mage/game/permanent/token/ElfToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/ElfToken.java rename to Mage/src/main/java/mage/game/permanent/token/ElfToken.java diff --git a/Mage/src/mage/game/permanent/token/EmptyToken.java b/Mage/src/main/java/mage/game/permanent/token/EmptyToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/EmptyToken.java rename to Mage/src/main/java/mage/game/permanent/token/EmptyToken.java diff --git a/Mage/src/mage/game/permanent/token/FaerieRogueToken.java b/Mage/src/main/java/mage/game/permanent/token/FaerieRogueToken.java similarity index 89% rename from Mage/src/mage/game/permanent/token/FaerieRogueToken.java rename to Mage/src/main/java/mage/game/permanent/token/FaerieRogueToken.java index a64ff364484..d4c111c3243 100644 --- a/Mage/src/mage/game/permanent/token/FaerieRogueToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FaerieRogueToken.java @@ -28,7 +28,10 @@ package mage.game.permanent.token; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; + import mage.constants.CardType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; @@ -39,6 +42,12 @@ import mage.abilities.keyword.FlyingAbility; */ public class FaerieRogueToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("SHM", "MOR", "MMA", "MM2")); + } + public FaerieRogueToken() { super("Faerie Rogue", "1/1 black Faerie Rogue creature token with flying"); cardType.add(CardType.CREATURE); @@ -48,6 +57,7 @@ public class FaerieRogueToken extends Token { power = new MageInt(1); toughness = new MageInt(1); addAbility(FlyingAbility.getInstance()); - availableImageSetCodes.addAll(Arrays.asList("SHM", "MOR", "MMA")); + + availableImageSetCodes = tokenImageSets; } } diff --git a/Mage/src/mage/game/permanent/token/FrogToken.java b/Mage/src/main/java/mage/game/permanent/token/FrogToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/FrogToken.java rename to Mage/src/main/java/mage/game/permanent/token/FrogToken.java diff --git a/Mage/src/mage/game/permanent/token/GoatToken.java b/Mage/src/main/java/mage/game/permanent/token/GoatToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/GoatToken.java rename to Mage/src/main/java/mage/game/permanent/token/GoatToken.java diff --git a/Mage/src/mage/game/permanent/token/GoblinRogueToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinRogueToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/GoblinRogueToken.java rename to Mage/src/main/java/mage/game/permanent/token/GoblinRogueToken.java diff --git a/Mage/src/mage/game/permanent/token/GoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/GoblinToken.java rename to Mage/src/main/java/mage/game/permanent/token/GoblinToken.java diff --git a/Mage/src/mage/game/permanent/token/GoblinTokenWithHaste.java b/Mage/src/main/java/mage/game/permanent/token/GoblinTokenWithHaste.java similarity index 100% rename from Mage/src/mage/game/permanent/token/GoblinTokenWithHaste.java rename to Mage/src/main/java/mage/game/permanent/token/GoblinTokenWithHaste.java diff --git a/Mage/src/mage/game/permanent/token/GolemToken.java b/Mage/src/main/java/mage/game/permanent/token/GolemToken.java similarity index 87% rename from Mage/src/mage/game/permanent/token/GolemToken.java rename to Mage/src/main/java/mage/game/permanent/token/GolemToken.java index 273943d7fa1..e17e3754f10 100644 --- a/Mage/src/mage/game/permanent/token/GolemToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GolemToken.java @@ -27,6 +27,10 @@ */ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.constants.CardType; import mage.MageInt; @@ -36,8 +40,14 @@ import mage.MageInt; */ public class GolemToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("MM2", "NPH", "SOM")); + } + public GolemToken() { - this("SOM"); + this(null); } public GolemToken(String setCode) { @@ -48,5 +58,7 @@ public class GolemToken extends Token { subtype.add("Golem"); power = new MageInt(3); toughness = new MageInt(3); + + availableImageSetCodes = tokenImageSets; } } diff --git a/Mage/src/mage/game/permanent/token/HornetToken.java b/Mage/src/main/java/mage/game/permanent/token/HornetToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/HornetToken.java rename to Mage/src/main/java/mage/game/permanent/token/HornetToken.java diff --git a/Mage/src/mage/game/permanent/token/HumanToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/HumanToken.java rename to Mage/src/main/java/mage/game/permanent/token/HumanToken.java diff --git a/Mage/src/mage/game/permanent/token/InsectInfectToken.java b/Mage/src/main/java/mage/game/permanent/token/InsectInfectToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/InsectInfectToken.java rename to Mage/src/main/java/mage/game/permanent/token/InsectInfectToken.java diff --git a/Mage/src/mage/game/permanent/token/InsectToken.java b/Mage/src/main/java/mage/game/permanent/token/InsectToken.java similarity index 87% rename from Mage/src/mage/game/permanent/token/InsectToken.java rename to Mage/src/main/java/mage/game/permanent/token/InsectToken.java index 4fe7f8533ba..cd1e1be1686 100644 --- a/Mage/src/mage/game/permanent/token/InsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/InsectToken.java @@ -28,6 +28,10 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.MageInt; import mage.constants.CardType; @@ -37,8 +41,14 @@ import mage.constants.CardType; */ public class InsectToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("M10", "MM2")); + } + public InsectToken() { - this("M10"); + this(null); } public InsectToken(String setCode) { @@ -49,5 +59,7 @@ public class InsectToken extends Token { subtype.add("Insect"); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = tokenImageSets; } } \ No newline at end of file diff --git a/Mage/src/mage/game/permanent/token/KithkinToken.java b/Mage/src/main/java/mage/game/permanent/token/KithkinToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/KithkinToken.java rename to Mage/src/main/java/mage/game/permanent/token/KithkinToken.java diff --git a/Mage/src/mage/game/permanent/token/KnightToken.java b/Mage/src/main/java/mage/game/permanent/token/KnightToken.java similarity index 63% rename from Mage/src/mage/game/permanent/token/KnightToken.java rename to Mage/src/main/java/mage/game/permanent/token/KnightToken.java index 3ffd6de9350..909b39ab182 100644 --- a/Mage/src/mage/game/permanent/token/KnightToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KnightToken.java @@ -1,5 +1,8 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import mage.constants.CardType; import mage.MageInt; import mage.abilities.keyword.VigilanceAbility; @@ -10,15 +13,21 @@ import mage.abilities.keyword.VigilanceAbility; */ public class KnightToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("ORI", "RTR")); + } + public KnightToken() { super("Knight", "2/2 white Knight creature token with vigilance"); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Knight"); power = new MageInt(2); toughness = new MageInt(2); this.addAbility(VigilanceAbility.getInstance()); - setOriginalExpansionSetCode("RTR"); + + availableImageSetCodes = tokenImageSets; } } diff --git a/Mage/src/mage/game/permanent/token/KorSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/KorSoldierToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/KorSoldierToken.java rename to Mage/src/main/java/mage/game/permanent/token/KorSoldierToken.java diff --git a/Mage/src/mage/game/permanent/token/MerfolkWizardToken.java b/Mage/src/main/java/mage/game/permanent/token/MerfolkWizardToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/MerfolkWizardToken.java rename to Mage/src/main/java/mage/game/permanent/token/MerfolkWizardToken.java diff --git a/Mage/src/mage/game/permanent/token/MinionToken.java b/Mage/src/main/java/mage/game/permanent/token/MinionToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/MinionToken.java rename to Mage/src/main/java/mage/game/permanent/token/MinionToken.java diff --git a/Mage/src/mage/game/permanent/token/MyrToken.java b/Mage/src/main/java/mage/game/permanent/token/MyrToken.java similarity index 59% rename from Mage/src/mage/game/permanent/token/MyrToken.java rename to Mage/src/main/java/mage/game/permanent/token/MyrToken.java index 0d26eb7c3ba..63d68661769 100644 --- a/Mage/src/mage/game/permanent/token/MyrToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MyrToken.java @@ -1,12 +1,22 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.MageInt; import mage.constants.CardType; public class MyrToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("C14", "MM2", "NPH", "SOM")); + } + public MyrToken() { - this("SOM"); + this(null); } public MyrToken(String expansionSetCode) { @@ -17,5 +27,7 @@ public class MyrToken extends Token { subtype.add("Myr"); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = tokenImageSets; } } \ No newline at end of file diff --git a/Mage/src/mage/game/permanent/token/PegasusToken.java b/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/PegasusToken.java rename to Mage/src/main/java/mage/game/permanent/token/PegasusToken.java diff --git a/Mage/src/mage/game/permanent/token/PlantToken.java b/Mage/src/main/java/mage/game/permanent/token/PlantToken.java similarity index 85% rename from Mage/src/mage/game/permanent/token/PlantToken.java rename to Mage/src/main/java/mage/game/permanent/token/PlantToken.java index f44a3f854a9..054a798df25 100644 --- a/Mage/src/mage/game/permanent/token/PlantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PlantToken.java @@ -28,10 +28,21 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.MageInt; import mage.constants.CardType; public class PlantToken extends Token { + + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("WWK", "DDP")); + } + public PlantToken() { super("Plant", "0/1 green Plant creature"); cardType.add(CardType.CREATURE); @@ -39,6 +50,7 @@ public class PlantToken extends Token { subtype.add("Plant"); power = new MageInt(0); toughness = new MageInt(1); - this.setOriginalExpansionSetCode("WWK"); + + availableImageSetCodes = tokenImageSets; } } diff --git a/Mage/src/mage/game/permanent/token/RatToken.java b/Mage/src/main/java/mage/game/permanent/token/RatToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/RatToken.java rename to Mage/src/main/java/mage/game/permanent/token/RatToken.java diff --git a/Mage/src/mage/game/permanent/token/SaprolingToken.java b/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java similarity index 85% rename from Mage/src/mage/game/permanent/token/SaprolingToken.java rename to Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java index b6c0fc5c5a3..b6e79eb952f 100644 --- a/Mage/src/mage/game/permanent/token/SaprolingToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java @@ -28,6 +28,10 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.MageInt; import mage.constants.CardType; @@ -37,6 +41,12 @@ import mage.constants.CardType; */ public class SaprolingToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("10E", "ALA", "DDE", "DDH", "DDJ", "M12", "M13", "M14", "MM2", "MMA", "RTR")); + } + public SaprolingToken() { super("Saproling", "1/1 green Saproling creature token"); this.setOriginalExpansionSetCode("MMA"); @@ -45,5 +55,7 @@ public class SaprolingToken extends Token { subtype.add("Saproling"); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = tokenImageSets; } } \ No newline at end of file diff --git a/Mage/src/mage/game/permanent/token/SliverToken.java b/Mage/src/main/java/mage/game/permanent/token/SliverToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/SliverToken.java rename to Mage/src/main/java/mage/game/permanent/token/SliverToken.java diff --git a/Mage/src/mage/game/permanent/token/SnakeToken.java b/Mage/src/main/java/mage/game/permanent/token/SnakeToken.java similarity index 87% rename from Mage/src/mage/game/permanent/token/SnakeToken.java rename to Mage/src/main/java/mage/game/permanent/token/SnakeToken.java index 47d6700aa9c..19e778a015a 100644 --- a/Mage/src/mage/game/permanent/token/SnakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SnakeToken.java @@ -28,6 +28,10 @@ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import mage.MageInt; import mage.constants.CardType; @@ -37,18 +41,26 @@ import mage.constants.CardType; */ public class SnakeToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("ZEN", "KTK", "MM2")); + } + public SnakeToken() { - this("ZEN"); + this(null); } public SnakeToken(String setCode) { super("Snake", "1/1 green Snake creature token"); - setOriginalExpansionSetCode(setCode); cardType.add(CardType.CREATURE); color.setGreen(true); subtype.add("Snake"); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = tokenImageSets; + setOriginalExpansionSetCode(setCode); } } diff --git a/Mage/src/mage/game/permanent/token/SoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java similarity index 99% rename from Mage/src/mage/game/permanent/token/SoldierToken.java rename to Mage/src/main/java/mage/game/permanent/token/SoldierToken.java index 956f808b5b7..6264190b018 100644 --- a/Mage/src/mage/game/permanent/token/SoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java @@ -43,7 +43,7 @@ public class SoldierToken extends Token { final static private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13", "MM2", "MMA", "RTR", "SOM")); + tokenImageSets.addAll(Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13", "MM2", "MMA", "RTR", "SOM", "DDF", "M10")); } public SoldierToken() { diff --git a/Mage/src/mage/game/permanent/token/SoldierTokenWithHaste.java b/Mage/src/main/java/mage/game/permanent/token/SoldierTokenWithHaste.java similarity index 100% rename from Mage/src/mage/game/permanent/token/SoldierTokenWithHaste.java rename to Mage/src/main/java/mage/game/permanent/token/SoldierTokenWithHaste.java diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiderToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiderToken.java new file mode 100644 index 00000000000..98333d8fc9a --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/SpiderToken.java @@ -0,0 +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.MageInt; +import mage.abilities.keyword.ReachAbility; +import mage.constants.CardType; + +/** + * + * @author fireshoes + */ +public class SpiderToken extends Token { + + public SpiderToken() { + super("Spider", "1/2 green Spider creature token with reach"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Spider"); + power = new MageInt(1); + toughness = new MageInt(2); + addAbility(ReachAbility.getInstance()); + } +} diff --git a/Mage/src/mage/game/permanent/token/SpiritToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/SpiritToken.java rename to Mage/src/main/java/mage/game/permanent/token/SpiritToken.java diff --git a/Mage/src/mage/game/permanent/token/SpiritWhiteToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java similarity index 72% rename from Mage/src/mage/game/permanent/token/SpiritWhiteToken.java rename to Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java index ad7532b5d69..75ef08c1855 100644 --- a/Mage/src/mage/game/permanent/token/SpiritWhiteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java @@ -27,6 +27,9 @@ */ package mage.game.permanent.token; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; @@ -36,15 +39,23 @@ import mage.constants.CardType; */ public class SpiritWhiteToken extends Token { + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("AVR", "C14", "CNS", "DDC", "DDK", "FRF", "ISD", "KTK", "M15", "MM2", "SHM")); + } + public SpiritWhiteToken() { - this("SHM", 0); + this(null, 0); } public SpiritWhiteToken(String setCode) { this(setCode, 0); } + public SpiritWhiteToken(String setCode, int tokenType) { super("Spirit", "1/1 white Spirit creature token with flying"); + availableImageSetCodes = tokenImageSets; setOriginalExpansionSetCode(setCode); if (tokenType > 0) { setTokenType(tokenType); @@ -57,4 +68,21 @@ public class SpiritWhiteToken extends Token { addAbility(FlyingAbility.getInstance()); } + + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("AVR")) { + setTokenType(1); + } + } + + public SpiritWhiteToken(final SpiritWhiteToken token) { + super(token); + } + + @Override + public SpiritWhiteToken copy() { + return new SpiritWhiteToken(this); + } } diff --git a/Mage/src/mage/game/permanent/token/SquirrelToken.java b/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/SquirrelToken.java rename to Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java diff --git a/Mage/src/mage/game/permanent/token/ThopterColorlessToken.java b/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/ThopterColorlessToken.java rename to Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java diff --git a/Mage/src/mage/game/permanent/token/WolfToken.java b/Mage/src/main/java/mage/game/permanent/token/ThrullToken.java similarity index 74% rename from Mage/src/mage/game/permanent/token/WolfToken.java rename to Mage/src/main/java/mage/game/permanent/token/ThrullToken.java index 77cf16ad898..3ce76ac9e26 100644 --- a/Mage/src/mage/game/permanent/token/WolfToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThrullToken.java @@ -28,36 +28,32 @@ package mage.game.permanent.token; -import mage.constants.CardType; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import mage.MageInt; -import mage.ObjectColor; +import mage.constants.CardType; /** * - * @author BetaSteward_at_googlemail.com + * @author Quercitron */ -public class WolfToken extends Token { +public class ThrullToken extends Token { - public WolfToken() { - this("ISD"); + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("MM2")); } - - public WolfToken(String setCode) { - super("Wolf", "2/2 green Wolf creature token"); - this.setOriginalExpansionSetCode(setCode); - if (setCode.equals("ISD")) { - setTokenType(Type.SECOND.code); - } + + public ThrullToken() { + super("Thrull", "1/1 black Thrull creature token"); cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Wolf"); - power = new MageInt(2); - toughness = new MageInt(2); - } + subtype.add("Thrull"); + color.setBlack(true); + power = new MageInt(1); + toughness = new MageInt(1); - public WolfToken(Token.Type type) { - this(); - setTokenType(type.getCode()); + availableImageSetCodes = tokenImageSets; } - } diff --git a/Mage/src/mage/game/permanent/token/Token.java b/Mage/src/main/java/mage/game/permanent/token/Token.java similarity index 84% rename from Mage/src/mage/game/permanent/token/Token.java rename to Mage/src/main/java/mage/game/permanent/token/Token.java index 5f9686cf8a9..5db9c045be6 100644 --- a/Mage/src/mage/game/permanent/token/Token.java +++ b/Mage/src/main/java/mage/game/permanent/token/Token.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.UUID; +import mage.MageObject; import mage.MageObjectImpl; import mage.ObjectColor; import mage.abilities.Abilities; @@ -54,6 +55,7 @@ public class Token extends MageObjectImpl { private int tokenType; private int originalCardNumber; private String originalExpansionSetCode; + private boolean expansionSetCodeChecked; private Card copySourceCard; // the card the Token is a copy from // list of set codes tokene images are available for @@ -90,6 +92,7 @@ public class Token extends MageObjectImpl { if (abilities != null) { this.abilities = abilities.copy(); } + this.expansionSetCodeChecked = false; } public Token(final Token token) { @@ -100,6 +103,7 @@ public class Token extends MageObjectImpl { this.lastAddedTokenIds.addAll(token.lastAddedTokenIds); this.originalCardNumber = token.originalCardNumber; this.originalExpansionSetCode = token.originalExpansionSetCode; + this.expansionSetCodeChecked = token.expansionSetCodeChecked; this.copySourceCard = token.copySourceCard; // will never be changed this.availableImageSetCodes = token.availableImageSetCodes; } @@ -133,13 +137,24 @@ public class Token extends MageObjectImpl { } public boolean putOntoBattlefield(int amount, Game game, UUID sourceId, UUID controllerId, boolean tapped, boolean attacking) { + return putOntoBattlefield(amount, game, sourceId, controllerId, tapped, attacking, null); + } + + public boolean putOntoBattlefield(int amount, Game game, UUID sourceId, UUID controllerId, boolean tapped, boolean attacking, UUID attackedPlayer) { Player controller = game.getPlayer(controllerId); if (controller == null) { return false; } lastAddedTokenIds.clear(); - // TODO: Check this setCode handling because it makes no sense if token put into play with e.g. "Feldon of the third Path" + + // moved here from CreateTokenEffect because not all cards that create tokens use CreateTokenEffect + // they use putOntoBattlefield directly Card source = game.getCard(sourceId); + if (!expansionSetCodeChecked) { + expansionSetCodeChecked = this.updateExpansionSetCode(source); + } + + // TODO: Check this setCode handling because it makes no sense if token put into play with e.g. "Feldon of the third Path" String setCode; if (this.getOriginalExpansionSetCode() != null && !this.getOriginalExpansionSetCode().isEmpty()) { setCode = this.getOriginalExpansionSetCode(); @@ -178,7 +193,7 @@ public class Token extends MageObjectImpl { this.lastAddedTokenId = permanent.getId(); game.addSimultaneousEvent(new ZoneChangeEvent(permanent, permanent.getControllerId(), Zone.OUTSIDE, Zone.BATTLEFIELD)); if (attacking && game.getCombat() != null) { - game.getCombat().addAttackingCreature(permanent.getId(), game); + game.getCombat().addAttackingCreature(permanent.getId(), game, attackedPlayer); } if (!game.isSimulation()) { game.informPlayers(controller.getLogName() + " puts a " + permanent.getLogName() + " token onto the battlefield"); @@ -230,7 +245,11 @@ public class Token extends MageObjectImpl { if (availableImageSetCodes.contains(code)) { setOriginalExpansionSetCode(code); } else { - setOriginalExpansionSetCode(availableImageSetCodes.get(new Random().nextInt(availableImageSetCodes.size()))); + // we should not set random set if appropriate set is already used + if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty() + || !availableImageSetCodes.contains(getOriginalExpansionSetCode())) { + setOriginalExpansionSetCode(availableImageSetCodes.get(new Random().nextInt(availableImageSetCodes.size()))); + } } } else { if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()) { @@ -238,4 +257,12 @@ public class Token extends MageObjectImpl { } } } + + public boolean updateExpansionSetCode(Card source) { + if (source == null) { + return false; + } + this.setExpansionSetCodeForImage(source.getExpansionSetCode()); + return true; + } } diff --git a/Mage/src/mage/game/permanent/token/WarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/WarriorToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/WarriorToken.java rename to Mage/src/main/java/mage/game/permanent/token/WarriorToken.java diff --git a/Mage/src/mage/game/permanent/token/BeastToken2.java b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java similarity index 68% rename from Mage/src/mage/game/permanent/token/BeastToken2.java rename to Mage/src/main/java/mage/game/permanent/token/WolfToken.java index 57b22f20eb1..bae31220032 100644 --- a/Mage/src/mage/game/permanent/token/BeastToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java @@ -28,40 +28,55 @@ package mage.game.permanent.token; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; + import mage.constants.CardType; import mage.MageInt; /** * - * @author LoneFox + * @author BetaSteward_at_googlemail.com */ -public class BeastToken2 extends Token { +public class WolfToken extends Token { + + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("BNG", "C14", "CNS", "FNMP", "ISD", "LRW", "M10", "M14", "MM2", "SHM", "SOM", "ZEN")); + } + + public WolfToken() { + this((String) null); + } + + public WolfToken(String setCode) { + super("Wolf", "2/2 green Wolf creature token"); + availableImageSetCodes = tokenImageSets; + setOriginalExpansionSetCode(setCode); - public BeastToken2() { - super("Beast", "4/4 green Beast creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Beast"); - power = new MageInt(4); - toughness = new MageInt(4); - availableImageSetCodes.addAll(Arrays.asList("ZEN", "C14", "DDD")); - } - - public BeastToken2(final BeastToken2 token) { - super(token); - } - - @Override - public BeastToken2 copy() { - return new BeastToken2(this); + subtype.add("Wolf"); + power = new MageInt(2); + toughness = new MageInt(2); } @Override public void setExpansionSetCodeForImage(String code) { super.setExpansionSetCodeForImage(code); - if(getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD")) { + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ISD")) { this.setTokenType(2); } } + + public WolfToken(final WolfToken token) { + super(token); + } + + @Override + public Token copy() { + return new WolfToken(this); + } } diff --git a/Mage/src/mage/game/permanent/token/WolfTokenWithDeathtouch.java b/Mage/src/main/java/mage/game/permanent/token/WolfTokenWithDeathtouch.java similarity index 100% rename from Mage/src/mage/game/permanent/token/WolfTokenWithDeathtouch.java rename to Mage/src/main/java/mage/game/permanent/token/WolfTokenWithDeathtouch.java diff --git a/Mage/src/mage/game/permanent/token/WurmToken.java b/Mage/src/main/java/mage/game/permanent/token/WurmToken.java similarity index 100% rename from Mage/src/mage/game/permanent/token/WurmToken.java rename to Mage/src/main/java/mage/game/permanent/token/WurmToken.java diff --git a/Mage/src/mage/game/permanent/token/WurmToken2.java b/Mage/src/main/java/mage/game/permanent/token/WurmToken2.java similarity index 100% rename from Mage/src/mage/game/permanent/token/WurmToken2.java rename to Mage/src/main/java/mage/game/permanent/token/WurmToken2.java diff --git a/Mage/src/mage/game/permanent/token/ZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java similarity index 96% rename from Mage/src/mage/game/permanent/token/ZombieToken.java rename to Mage/src/main/java/mage/game/permanent/token/ZombieToken.java index 90b93810049..28d1e5b4ce7 100644 --- a/Mage/src/mage/game/permanent/token/ZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java @@ -43,7 +43,7 @@ public class ZombieToken extends Token { final static private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "CNS", "MMA", "BNG", "KTK", "DTK", "ORI")); + tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "CNS", "MMA", "BNG", "KTK", "DTK", "ORI")); } public ZombieToken() { diff --git a/Mage/src/mage/game/stack/Spell.java b/Mage/src/main/java/mage/game/stack/Spell.java similarity index 92% rename from Mage/src/mage/game/stack/Spell.java rename to Mage/src/main/java/mage/game/stack/Spell.java index 0b0f22fb45a..5e23cf1f1d1 100644 --- a/Mage/src/mage/game/stack/Spell.java +++ b/Mage/src/main/java/mage/game/stack/Spell.java @@ -36,6 +36,7 @@ import mage.Mana; import mage.ObjectColor; import mage.abilities.Abilities; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.SpellAbility; import mage.abilities.costs.AlternativeSourceCosts; import mage.abilities.costs.Cost; @@ -44,6 +45,7 @@ import mage.abilities.costs.mana.ManaCosts; import mage.abilities.keyword.BestowAbility; import mage.abilities.keyword.MorphAbility; import mage.cards.Card; +import mage.cards.CardsImpl; import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.Rarity; @@ -194,9 +196,9 @@ public class Spell extends StackObjImpl implements Card { if (notTargeted || legalParts) { for (SpellAbility spellAbility : this.spellAbilities) { if (spellAbilityHasLegalParts(spellAbility, game)) { - for (UUID modeId : spellAbility.getModes().getSelectedModes()) { - spellAbility.getModes().setActiveMode(modeId); - if (spellAbility.getTargets().stillLegal(spellAbility, game)) { + for (Mode mode : spellAbility.getModes().getSelectedModes()) { + spellAbility.getModes().setActiveMode(mode); + if (mode.getTargets().stillLegal(spellAbility, game)) { if (!spellAbility.getSpellAbilityType().equals(SpellAbilityType.SPLICE)) { updateOptionalCosts(index); } @@ -207,11 +209,8 @@ public class Spell extends StackObjImpl implements Card { } } if (game.getState().getZone(card.getMainCard().getId()) == Zone.STACK) { - if (isCopy() == card.isCopy()) { - Player player = game.getPlayer(getControllerId()); - if (player != null) { - player.moveCards(card, Zone.STACK, Zone.GRAVEYARD, ability, game); - } + if (!isCopy()) { + controller.moveCards(card, Zone.GRAVEYARD, ability, game); } } return result; @@ -270,9 +269,8 @@ public class Spell extends StackObjImpl implements Card { private boolean hasTargets(SpellAbility spellAbility, Game game) { if (spellAbility.getModes().getSelectedModes().size() > 1) { - for (UUID modeId : spellAbility.getModes().getSelectedModes()) { - spellAbility.getModes().setActiveMode(modeId); - if (!spellAbility.getTargets().isEmpty()) { + for (Mode mode : spellAbility.getModes().getSelectedModes()) { + if (!mode.getTargets().isEmpty()) { return true; } @@ -287,11 +285,10 @@ public class Spell extends StackObjImpl implements Card { if (spellAbility.getModes().getSelectedModes().size() > 1) { boolean targetedMode = false; boolean legalTargetedMode = false; - for (UUID modeId : spellAbility.getModes().getSelectedModes()) { - spellAbility.getModes().setActiveMode(modeId); - if (spellAbility.getTargets().size() > 0) { + for (Mode mode : spellAbility.getModes().getSelectedModes()) { + if (mode.getTargets().size() > 0) { targetedMode = true; - if (spellAbility.getTargets().stillLegal(spellAbility, game)) { + if (mode.getTargets().stillLegal(spellAbility, game)) { legalTargetedMode = true; } } @@ -331,16 +328,32 @@ public class Spell extends StackObjImpl implements Card { @Override public void counter(UUID sourceId, Game game) { + this.counter(sourceId, game, Zone.GRAVEYARD, false, true); + } + + @Override + public void counter(UUID sourceId, Game game, Zone zone, boolean owner, boolean top) { this.countered = true; if (!isCopiedSpell()) { - Player player = game.getPlayer(getControllerId()); + Player player = game.getPlayer(game.getControllerId(sourceId)); + if (player == null) { + player = game.getPlayer(getControllerId()); + } if (player != null) { Ability counteringAbility = null; MageObject counteringObject = game.getObject(sourceId); if (counteringObject instanceof StackObject) { counteringAbility = ((StackObject) counteringObject).getStackAbility(); } - player.moveCards(card, Zone.STACK, Zone.GRAVEYARD, counteringAbility, game); + if (zone.equals(Zone.LIBRARY)) { + if (top) { + player.putCardsOnTopOfLibrary(new CardsImpl(card), game, counteringAbility, false); + } else { + player.putCardsOnBottomOfLibrary(new CardsImpl(card), game, counteringAbility, false); + } + } else { + player.moveCards(card, zone, counteringAbility, game, false, false, owner, null); + } } } } @@ -478,21 +491,8 @@ public class Spell extends StackObjImpl implements Card { if (faceDown) { return 0; } - for (Ability spellAbility : spellAbilities) { - int xMultiplier = 0; - for (String symbolString : spellAbility.getManaCosts().getSymbols()) { - int index = symbolString.indexOf("{X}"); - while (index != -1) { - xMultiplier++; - symbolString = symbolString.substring(index + 3); - index = symbolString.indexOf("{X}"); - } - } - if (this.getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.BASE_ALTERNATE)) { - cmc += spellAbility.getManaCostsToPay().getX() * xMultiplier; - } else { - cmc += spellAbility.getManaCosts().convertedManaCost() + spellAbility.getManaCostsToPay().getX() * xMultiplier; - } + for (SpellAbility spellAbility : spellAbilities) { + cmc += spellAbility.getConvertedManaCost(); } if (this.getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.BASE_ALTERNATE)) { cmc += getCard().getManaCost().convertedManaCost(); @@ -665,11 +665,7 @@ public class Spell extends StackObjImpl implements Card { if (this.isCopiedSpell() && !zone.equals(Zone.STACK)) { return true; } - Card card = game.getCard(getSourceId()); - if (card != null) { - return card.moveToZone(zone, sourceId, game, flag, appliedEffects); - } - throw new UnsupportedOperationException("Unsupported operation"); + return card.moveToZone(zone, sourceId, game, flag, appliedEffects); } @Override diff --git a/Mage/src/mage/game/stack/SpellStack.java b/Mage/src/main/java/mage/game/stack/SpellStack.java similarity index 93% rename from Mage/src/mage/game/stack/SpellStack.java rename to Mage/src/main/java/mage/game/stack/SpellStack.java index c22c449d2b6..cf261770e87 100644 --- a/Mage/src/mage/game/stack/SpellStack.java +++ b/Mage/src/main/java/mage/game/stack/SpellStack.java @@ -82,6 +82,10 @@ public class SpellStack extends ArrayDeque { } public boolean counter(UUID objectId, UUID sourceId, Game game) { + return counter(objectId, sourceId, game, Zone.GRAVEYARD, false, true); + } + + public boolean counter(UUID objectId, UUID sourceId, Game game, Zone zone, boolean owner, boolean onTop) { // the counter logic is copied by some spells to handle replacement effects of the countered spell // so if logic is changed here check those spells for needed changes too // Concerned cards to check: Hinder, Spell Crumple @@ -101,12 +105,10 @@ public class SpellStack extends ArrayDeque { counteredObjectName = "Ability (" + stackObject.getStackAbility().getRule(targetSourceName) + ") of " + targetSourceName; } if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) { - if (stackObject instanceof Spell) { - game.rememberLKI(objectId, Zone.STACK, (Spell) stackObject); - } else { + if (!(stackObject instanceof Spell)) { // spells are removed from stack by the card movement this.remove(stackObject); } - stackObject.counter(sourceId, game); + stackObject.counter(sourceId, game, zone, owner, onTop); if (!game.isSimulation()) { game.informPlayers(counteredObjectName + " is countered by " + sourceObject.getLogName()); } diff --git a/Mage/src/mage/game/stack/StackAbility.java b/Mage/src/main/java/mage/game/stack/StackAbility.java similarity index 96% rename from Mage/src/mage/game/stack/StackAbility.java rename to Mage/src/main/java/mage/game/stack/StackAbility.java index b23de503454..7215000ee43 100644 --- a/Mage/src/mage/game/stack/StackAbility.java +++ b/Mage/src/main/java/mage/game/stack/StackAbility.java @@ -86,14 +86,14 @@ public class StackAbility extends StackObjImpl implements Ability { public StackAbility(Ability ability, UUID controllerId) { this.ability = ability; this.controllerId = controllerId; - this.name = new StringBuilder("stack ability (").append(ability.getRule()).append(")").toString(); + this.name = "stack ability (" + ability.getRule() + ")"; } - public StackAbility(final StackAbility spell) { - this.ability = spell.ability.copy(); - this.controllerId = spell.controllerId; - this.name = spell.name; - this.expansionSetCode = spell.expansionSetCode; + public StackAbility(final StackAbility stackAbility) { + this.ability = stackAbility.ability.copy(); + this.controllerId = stackAbility.controllerId; + this.name = stackAbility.name; + this.expansionSetCode = stackAbility.expansionSetCode; } @Override @@ -122,6 +122,12 @@ public class StackAbility extends StackObjImpl implements Ability { @Override public void counter(UUID sourceId, Game game) { + // zone, owner, top ignored + this.counter(sourceId, game, Zone.GRAVEYARD, true, true); + } + + @Override + public void counter(UUID sourceId, Game game, Zone zone, boolean owner, boolean top) { //20100716 - 603.8 if (ability instanceof StateTriggeredAbility) { ((StateTriggeredAbility) ability).counter(game); diff --git a/Mage/src/mage/game/stack/StackObjImpl.java b/Mage/src/main/java/mage/game/stack/StackObjImpl.java similarity index 97% rename from Mage/src/mage/game/stack/StackObjImpl.java rename to Mage/src/main/java/mage/game/stack/StackObjImpl.java index 6cf33e65ea5..447b1a00c5e 100644 --- a/Mage/src/mage/game/stack/StackObjImpl.java +++ b/Mage/src/main/java/mage/game/stack/StackObjImpl.java @@ -117,8 +117,8 @@ public abstract class StackObjImpl implements StackObject { } for (Ability ability : objectAbilities) { // Some spells can have more than one mode - for (UUID modeId : ability.getModes().getSelectedModes()) { - Mode mode = ability.getModes().get(modeId); + for (Mode mode : ability.getModes().getSelectedModes()) { + ability.getModes().setActiveMode(mode); oldTargetDescription.append(ability.getTargetDescription(mode.getTargets(), game)); for (Target target : mode.getTargets()) { Target newTarget = chooseNewTarget(targetController, ability, mode, target, forceChange, filterNewTarget, game); diff --git a/Mage/src/main/java/mage/game/stack/StackObject.java b/Mage/src/main/java/mage/game/stack/StackObject.java new file mode 100644 index 00000000000..c1540d9138f --- /dev/null +++ b/Mage/src/main/java/mage/game/stack/StackObject.java @@ -0,0 +1,56 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.stack; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Controllable; +import mage.game.Game; + +public interface StackObject extends MageObject, Controllable { + + boolean resolve(Game game); + + UUID getSourceId(); + + void counter(UUID sourceId, Game game); + + void counter(UUID sourceId, Game game, Zone zone, boolean owner, boolean top); + + Ability getStackAbility(); + + int getConvertedManaCost(); + + boolean chooseNewTargets(Game game, UUID playerId, boolean forceChange, boolean onlyOneTarget, FilterPermanent filterNewTarget); + + @Override + StackObject copy(); +} diff --git a/Mage/src/mage/game/tournament/LimitedOptions.java b/Mage/src/main/java/mage/game/tournament/LimitedOptions.java similarity index 100% rename from Mage/src/mage/game/tournament/LimitedOptions.java rename to Mage/src/main/java/mage/game/tournament/LimitedOptions.java diff --git a/Mage/src/mage/game/tournament/Round.java b/Mage/src/main/java/mage/game/tournament/Round.java similarity index 100% rename from Mage/src/mage/game/tournament/Round.java rename to Mage/src/main/java/mage/game/tournament/Round.java diff --git a/Mage/src/mage/game/tournament/Tournament.java b/Mage/src/main/java/mage/game/tournament/Tournament.java similarity index 100% rename from Mage/src/mage/game/tournament/Tournament.java rename to Mage/src/main/java/mage/game/tournament/Tournament.java diff --git a/Mage/src/mage/game/tournament/TournamentImpl.java b/Mage/src/main/java/mage/game/tournament/TournamentImpl.java similarity index 100% rename from Mage/src/mage/game/tournament/TournamentImpl.java rename to Mage/src/main/java/mage/game/tournament/TournamentImpl.java diff --git a/Mage/src/mage/game/tournament/TournamentOptions.java b/Mage/src/main/java/mage/game/tournament/TournamentOptions.java similarity index 100% rename from Mage/src/mage/game/tournament/TournamentOptions.java rename to Mage/src/main/java/mage/game/tournament/TournamentOptions.java diff --git a/Mage/src/mage/game/tournament/TournamentPairing.java b/Mage/src/main/java/mage/game/tournament/TournamentPairing.java similarity index 100% rename from Mage/src/mage/game/tournament/TournamentPairing.java rename to Mage/src/main/java/mage/game/tournament/TournamentPairing.java diff --git a/Mage/src/mage/game/tournament/TournamentPlayer.java b/Mage/src/main/java/mage/game/tournament/TournamentPlayer.java similarity index 100% rename from Mage/src/mage/game/tournament/TournamentPlayer.java rename to Mage/src/main/java/mage/game/tournament/TournamentPlayer.java diff --git a/Mage/src/mage/game/tournament/TournamentSealedOptions.java b/Mage/src/main/java/mage/game/tournament/TournamentSealedOptions.java similarity index 100% rename from Mage/src/mage/game/tournament/TournamentSealedOptions.java rename to Mage/src/main/java/mage/game/tournament/TournamentSealedOptions.java diff --git a/Mage/src/mage/game/tournament/TournamentSingleElimination.java b/Mage/src/main/java/mage/game/tournament/TournamentSingleElimination.java similarity index 100% rename from Mage/src/mage/game/tournament/TournamentSingleElimination.java rename to Mage/src/main/java/mage/game/tournament/TournamentSingleElimination.java diff --git a/Mage/src/main/java/mage/game/tournament/TournamentSwiss.java b/Mage/src/main/java/mage/game/tournament/TournamentSwiss.java new file mode 100644 index 00000000000..e755d47a6f0 --- /dev/null +++ b/Mage/src/main/java/mage/game/tournament/TournamentSwiss.java @@ -0,0 +1,102 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.tournament; + +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import mage.constants.TournamentPlayerState; +import mage.game.events.TableEvent; +import mage.game.tournament.pairing.RoundPairings; +import mage.game.tournament.pairing.SwissPairingMinimalWeightMatching; +import mage.game.tournament.pairing.SwissPairingSimple; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public abstract class TournamentSwiss extends TournamentImpl { + + public TournamentSwiss(TournamentOptions options) { + super(options); + } + + @Override + protected void runTournament() { + for (Map.Entry entry : players.entrySet()) { + if (entry.getValue().getPlayer().autoLoseGame()) { + entry.getValue().setEliminated(); + entry.getValue().setResults("Auto Eliminated"); + } + } + + while (this.getActivePlayers().size() > 1 && this.getNumberRounds() > this.getRounds().size()) { + // check if some player got killed / disconnected meanwhile and update their state + tableEventSource.fireTableEvent(TableEvent.EventType.CHECK_STATE_PLAYERS); + // Swiss pairing + Round round = createRoundSwiss(); + playRound(round); + } + nextStep(); + } + + protected Round createRoundSwiss() { + List roundPlayers = getActivePlayers(); + boolean isLastRound = (rounds.size() + 1 == getNumberRounds()); + + RoundPairings roundPairings; + if (roundPlayers.size() <= 16) { + SwissPairingMinimalWeightMatching swissPairing = new SwissPairingMinimalWeightMatching(roundPlayers, rounds, isLastRound); + roundPairings = swissPairing.getRoundPairings(); + } else { + SwissPairingSimple swissPairing = new SwissPairingSimple(roundPlayers, rounds); + roundPairings = swissPairing.getRoundPairings(); + } + + Round round = new Round(rounds.size() + 1, this); + rounds.add(round); + for (TournamentPairing pairing : roundPairings.getPairings()) { + round.addPairing(pairing); + } + for (TournamentPlayer playerBye : roundPairings.getPlayerByes()) { + // player free round - add to bye players of this round + round.getPlayerByes().add(playerBye); + if (isLastRound) { + playerBye.setState(TournamentPlayerState.FINISHED); + } else { + playerBye.setState(TournamentPlayerState.WAITING); + } + playerBye.setStateInfo("Round Bye"); + updateResults(); + } + + return round; + } + +} diff --git a/Mage/src/mage/game/tournament/TournamentType.java b/Mage/src/main/java/mage/game/tournament/TournamentType.java similarity index 100% rename from Mage/src/mage/game/tournament/TournamentType.java rename to Mage/src/main/java/mage/game/tournament/TournamentType.java diff --git a/Mage/src/main/java/mage/game/tournament/pairing/RoundPairings.java b/Mage/src/main/java/mage/game/tournament/pairing/RoundPairings.java new file mode 100644 index 00000000000..b6c77874e18 --- /dev/null +++ b/Mage/src/main/java/mage/game/tournament/pairing/RoundPairings.java @@ -0,0 +1,64 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.tournament.pairing; + +import mage.game.tournament.TournamentPairing; +import mage.game.tournament.TournamentPlayer; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author Quercitron + */ +public class RoundPairings { + + public RoundPairings() { + this(new ArrayList(), new ArrayList()); + } + + public RoundPairings(List pairings, List playerByes) { + this.pairings = pairings; + this.playerByes = playerByes; + } + + private final List pairings; + + private final List playerByes; + + public List getPairings() { + return pairings; + } + + public List getPlayerByes() { + return playerByes; + } + +} diff --git a/Mage/src/main/java/mage/game/tournament/pairing/SwissPairingMinimalWeightMatching.java b/Mage/src/main/java/mage/game/tournament/pairing/SwissPairingMinimalWeightMatching.java new file mode 100644 index 00000000000..22040ac3a17 --- /dev/null +++ b/Mage/src/main/java/mage/game/tournament/pairing/SwissPairingMinimalWeightMatching.java @@ -0,0 +1,303 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.tournament.pairing; + +import mage.game.tournament.Round; +import mage.game.tournament.TournamentPairing; +import mage.game.tournament.TournamentPlayer; + +import java.util.*; + +/** + * + * @author Quercitron + */ + +// SwissPairingMinimalWeightMatching creates round pairings for swiss tournament. +// It assigns weight to each possible pair and searches perfect matching with minimal weight +// for more details see https://www.leaguevine.com/blog/18/swiss-tournament-scheduling-leaguevines-new-algorithm/ +// This implementation don't use fast minimum weight maximum matching algorithm, +// it uses brute-force search, so it works reasonably fast only up to 16 players. + +public class SwissPairingMinimalWeightMatching { + + private final int playersCount; + + List swissPlayers; + + // number of vertexes in graph + private final int n; + + // weight of pairings + private final int[][] w; + + public SwissPairingMinimalWeightMatching(List players, List rounds, boolean isLastRound) { + playersCount = players.size(); + + swissPlayers = new ArrayList(); + for (TournamentPlayer tournamentPlayer : players) { + PlayerInfo swissPlayer = new PlayerInfo(); + swissPlayer.tournamentPlayer = tournamentPlayer; + swissPlayer.points = tournamentPlayer.getPoints(); + swissPlayers.add(swissPlayer); + } + + // shuffle players first to add some randomness + Collections.shuffle(swissPlayers); + Map map = new HashMap<>(); + for (int i = 0; i < playersCount; i++) { + swissPlayers.get(i).id = i; + map.put(swissPlayers.get(i).tournamentPlayer, i); + } + + // calculate Tie Breaker points -- Sum of Opponents' Scores (SOS) + // see http://senseis.xmp.net/?SOS + for (Round round : rounds) { + for (TournamentPairing pairing : round.getPairs()) { + TournamentPlayer player1 = pairing.getPlayer1(); + TournamentPlayer player2 = pairing.getPlayer2(); + + Integer id1 = map.get(player1); + Integer id2 = map.get(player2); + + // a player could have left the tournament, so we should check if id is not null + if (id1 != null) { + swissPlayers.get(id1).sosPoints += player2.getPoints(); + } + if (id2 != null) { + swissPlayers.get(id2).sosPoints += player1.getPoints(); + } + // todo: sos points for byes? maybe add player points? + } + } + + // sort by points and then by sos points + Collections.sort(swissPlayers, new Comparator() { + @Override + public int compare(PlayerInfo p1, PlayerInfo p2) { + int result = p2.points - p1.points; + if (result != 0) { + return result; + } + return p2.sosPoints - p1.sosPoints; + } + }); + + // order could be changed, update ids and mapping + map.clear(); + for (int i = 0; i < playersCount; i++) { + swissPlayers.get(i).id = i; + map.put(swissPlayers.get(i).tournamentPlayer, i); + } + + // count ties and matches between players + int[][] duels = new int[playersCount][playersCount]; + int[] byes = new int[playersCount]; + for (Round round : rounds) { + for (TournamentPairing pairing : round.getPairs()) { + TournamentPlayer player1 = pairing.getPlayer1(); + TournamentPlayer player2 = pairing.getPlayer2(); + + Integer id1 = map.get(player1); + Integer id2 = map.get(player2); + + if (id1 != null && id2 != null) { + duels[id1][id2]++; + duels[id2][id1]++; + } + } + for (TournamentPlayer playerBye : round.getPlayerByes()) { + Integer id = map.get(playerBye); + if (id != null) { + byes[id]++; + } + } + } + + // set vertex count + // add vertex for bye if we have odd number of players + n = (playersCount % 2 == 1 ? playersCount + 1 : playersCount); + + // calculate weight + // try to pair players with equal scores + w = new int[n][n]; + int pointsDiffMultiplier = 10; + if (isLastRound) { + // for the last round, for each unpaired player starting with the first place, pair + // against the highest ranked player they haven't played against + for (int i = 0; i < playersCount; i++) { + for (int j = 0; j < i; j++) { + w[i][j] = Math.abs(i - j) + + pointsDiffMultiplier * Math.abs(swissPlayers.get(i).points - swissPlayers.get(j).points); + w[j][i] = w[i][j]; + } + } + } else { + for (int i = 0; i < playersCount; i++) { + PlayerInfo player = swissPlayers.get(i); + for (int p = player.points; p >= 0; p--) { + int first = -1; + int last = -1; + for (int j = 0; j < playersCount; j++) { + if (swissPlayers.get(j).points == p) { + if (first < 0) { + first = j; + } + last = j; + } + } + if (first < 0) { + continue; + } + int self = (p == player.points ? i : first - 1); + int diff = pointsDiffMultiplier * (player.points - p); + for (int j = Math.max(first, i); j <= last; j++) { + w[i][j] = Math.abs(j - (last + first - self)) + diff; + w[j][i] = w[i][j]; + } + } + } + } + + // avoid pairing players that have played each other already + for (int i = 0; i < playersCount; i++) { + for (int j = 0; j < i; j++) { + w[i][j] += duels[i][j] * 500; + w[j][i] = w[i][j]; + } + } + + // try to give bye to a player with a low score + // try to avoid giving the same person multiple byes + if (n > playersCount) { + for (int i = 0; i < playersCount; i++) { + w[i][n - 1] = 10 * (swissPlayers.get(i).points - swissPlayers.get(playersCount - 1).points) + (playersCount - i - 1); + w[i][n - 1] += byes[i] * 2000; + w[n - 1][i] = w[i][n - 1]; + } + } + + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + w[i][j] *= w[i][j]; + } + } + + // initialize variables for backtrack + used = new boolean[n]; + pairs = new int[n]; + Arrays.fill(pairs, -1); + result = new int[n]; + weight = 0; + minCost = -1; + makePairings(0); + } + + public RoundPairings getRoundPairings() { + // return round pairings with minimal weight + List pairings = new ArrayList<>(); + List playerByes = new ArrayList<>(); + + Map map = new HashMap<>(); + for (PlayerInfo player : swissPlayers) { + map.put(player.id, player.tournamentPlayer); + } + + if (n > playersCount) { + // last vertex -- bye + playerByes.add(map.get(result[n - 1])); + result[result[n - 1]] = -1; + result[n - 1] = -1; + } + + for (int i = 0; i < playersCount; i++) { + if (result[i] >= 0) { + pairings.add(new TournamentPairing(map.get(i), map.get(result[i]))); + result[result[i]] = -1; + result[i] = -1; + } + } + + return new RoundPairings(pairings, playerByes); + } + + boolean[] used; + + // current pairs + int[] pairs; + // current weight + int weight; + + int[] result; + int minCost; + + // backtrack all possible pairings and choose one with minimal weight + private void makePairings(int t) { + if (t >= n) { + if (minCost < 0 || minCost > weight) { + minCost = weight; + System.arraycopy(pairs, 0, result, 0, n); + } + return; + } + + if (!used[t]) { + for (int i = t + 1; i < n; i++) { + if (!used[i]) { + pairs[t] = i; + pairs[i] = t; + used[t] = true; + used[i] = true; + weight += w[t][i]; + + makePairings(t + 1); + + pairs[t] = -1; + pairs[i] = -1; + used[t] = false; + used[i] = false; + weight -= w[t][i]; + } + } + } else { + makePairings(t + 1); + } + } + + class PlayerInfo { + public int id; + + public TournamentPlayer tournamentPlayer; + + public int points; + + public int sosPoints; + } +} + diff --git a/Mage/src/mage/game/tournament/TournamentSwiss.java b/Mage/src/main/java/mage/game/tournament/pairing/SwissPairingSimple.java similarity index 58% rename from Mage/src/mage/game/tournament/TournamentSwiss.java rename to Mage/src/main/java/mage/game/tournament/pairing/SwissPairingSimple.java index 6855e57eb01..0af702e22c2 100644 --- a/Mage/src/mage/game/tournament/TournamentSwiss.java +++ b/Mage/src/main/java/mage/game/tournament/pairing/SwissPairingSimple.java @@ -25,51 +25,41 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ -package mage.game.tournament; +package mage.game.tournament.pairing; + +import mage.game.tournament.Round; +import mage.game.tournament.TournamentPairing; +import mage.game.tournament.TournamentPlayer; + +import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; -import java.util.Map; -import java.util.UUID; -import mage.constants.TournamentPlayerState; -import mage.game.events.TableEvent; /** * * @author BetaSteward_at_googlemail.com + * @author Quercitron */ -public abstract class TournamentSwiss extends TournamentImpl { +public class SwissPairingSimple { - public TournamentSwiss(TournamentOptions options) { - super(options); + private final RoundPairings roundPairings; + + public SwissPairingSimple(List players, List rounds) { + roundPairings = getPairingsSimple(players, rounds); } - @Override - protected void runTournament() { - for (Map.Entry entry : players.entrySet()) { - if (entry.getValue().getPlayer().autoLoseGame()) { - entry.getValue().setEliminated(); - entry.getValue().setResults("Auto Eliminated"); - } - } - - while (this.getActivePlayers().size() > 1 && this.getNumberRounds() > this.getRounds().size()) { - // check if some player got killed / disconnected meanwhile and update their state - tableEventSource.fireTableEvent(TableEvent.EventType.CHECK_STATE_PLAYERS); - // Swiss pairing - Round round = createRoundSwiss(); - playRound(round); - } - nextStep(); + public RoundPairings getRoundPairings() { + return roundPairings; } - protected Round createRoundSwiss() { - Round round = new Round(rounds.size() + 1, this); - rounds.add(round); - List roundPlayers = getActivePlayers(); + private RoundPairings getPairingsSimple(List players, List rounds) { + List pairings = new ArrayList<>(); + List playerByes = new ArrayList<>(); + // sort players by tournament points - Collections.sort(roundPlayers, new Comparator() { + Collections.sort(players, new Comparator() { @Override public int compare(TournamentPlayer p1, TournamentPlayer p2) { return p2.getPoints() - p1.getPoints(); @@ -77,12 +67,12 @@ public abstract class TournamentSwiss extends TournamentImpl { }); // create pairings - while (roundPlayers.size() > 0) { - TournamentPlayer player1 = roundPlayers.get(0); - roundPlayers.remove(0); + while (players.size() > 0) { + TournamentPlayer player1 = players.get(0); + players.remove(0); TournamentPlayer playerForPossibleSecondPairing = null; - for (TournamentPlayer player2 : roundPlayers) { - if (alreadyPaired(player1, player2)) { + for (TournamentPlayer player2 : players) { + if (alreadyPaired(rounds, player1, player2)) { // if already paired but equal points -> remember if second pairing is needed if (playerForPossibleSecondPairing == null) { playerForPossibleSecondPairing = player2; @@ -90,14 +80,14 @@ public abstract class TournamentSwiss extends TournamentImpl { } else { if (player2.getPoints() < player1.getPoints() && playerForPossibleSecondPairing != null) { // pair again with a player - round.addPairing(new TournamentPairing(player1, playerForPossibleSecondPairing)); - roundPlayers.remove(playerForPossibleSecondPairing); + pairings.add(new TournamentPairing(player1, playerForPossibleSecondPairing)); + players.remove(playerForPossibleSecondPairing); player1 = null; break; } else { // pair agains the next not paired before - round.addPairing(new TournamentPairing(player1, player2)); - roundPlayers.remove(player2); + pairings.add(new TournamentPairing(player1, player2)); + players.remove(player2); player1 = null; break; } @@ -107,25 +97,19 @@ public abstract class TournamentSwiss extends TournamentImpl { // no pairing done yet if (playerForPossibleSecondPairing != null) { // pair again with a player - round.addPairing(new TournamentPairing(player1, playerForPossibleSecondPairing)); - roundPlayers.remove(playerForPossibleSecondPairing); + pairings.add(new TournamentPairing(player1, playerForPossibleSecondPairing)); + players.remove(playerForPossibleSecondPairing); } else { // player free round - add to bye players of this round - round.getPlayerByes().add(player1); - if (round.getRoundNumber() == getNumberRounds()) { - player1.setState(TournamentPlayerState.FINISHED); - } else { - player1.setState(TournamentPlayerState.WAITING); - } - player1.setStateInfo("Round Bye"); - updateResults(); + playerByes.add(player1); } } } - return round; + + return new RoundPairings(pairings, playerByes); } - protected boolean alreadyPaired(TournamentPlayer player1, TournamentPlayer player2) { + private boolean alreadyPaired(List rounds, TournamentPlayer player1, TournamentPlayer player2) { for (Round round : rounds) { for (TournamentPairing pairing : round.getPairs()) { if (pairing.getPlayer1().equals(player1) || pairing.getPlayer2().equals(player1)) { diff --git a/Mage/src/mage/game/turn/BeginCombatStep.java b/Mage/src/main/java/mage/game/turn/BeginCombatStep.java similarity index 100% rename from Mage/src/mage/game/turn/BeginCombatStep.java rename to Mage/src/main/java/mage/game/turn/BeginCombatStep.java diff --git a/Mage/src/mage/game/turn/BeginningPhase.java b/Mage/src/main/java/mage/game/turn/BeginningPhase.java similarity index 100% rename from Mage/src/mage/game/turn/BeginningPhase.java rename to Mage/src/main/java/mage/game/turn/BeginningPhase.java diff --git a/Mage/src/mage/game/turn/CleanupStep.java b/Mage/src/main/java/mage/game/turn/CleanupStep.java similarity index 100% rename from Mage/src/mage/game/turn/CleanupStep.java rename to Mage/src/main/java/mage/game/turn/CleanupStep.java diff --git a/Mage/src/mage/game/turn/CombatDamageStep.java b/Mage/src/main/java/mage/game/turn/CombatDamageStep.java similarity index 100% rename from Mage/src/mage/game/turn/CombatDamageStep.java rename to Mage/src/main/java/mage/game/turn/CombatDamageStep.java diff --git a/Mage/src/mage/game/turn/CombatPhase.java b/Mage/src/main/java/mage/game/turn/CombatPhase.java similarity index 100% rename from Mage/src/mage/game/turn/CombatPhase.java rename to Mage/src/main/java/mage/game/turn/CombatPhase.java diff --git a/Mage/src/mage/game/turn/DeclareAttackersStep.java b/Mage/src/main/java/mage/game/turn/DeclareAttackersStep.java similarity index 100% rename from Mage/src/mage/game/turn/DeclareAttackersStep.java rename to Mage/src/main/java/mage/game/turn/DeclareAttackersStep.java diff --git a/Mage/src/mage/game/turn/DeclareBlockersStep.java b/Mage/src/main/java/mage/game/turn/DeclareBlockersStep.java similarity index 100% rename from Mage/src/mage/game/turn/DeclareBlockersStep.java rename to Mage/src/main/java/mage/game/turn/DeclareBlockersStep.java diff --git a/Mage/src/mage/game/turn/DrawStep.java b/Mage/src/main/java/mage/game/turn/DrawStep.java similarity index 100% rename from Mage/src/mage/game/turn/DrawStep.java rename to Mage/src/main/java/mage/game/turn/DrawStep.java diff --git a/Mage/src/mage/game/turn/EndOfCombatStep.java b/Mage/src/main/java/mage/game/turn/EndOfCombatStep.java similarity index 100% rename from Mage/src/mage/game/turn/EndOfCombatStep.java rename to Mage/src/main/java/mage/game/turn/EndOfCombatStep.java diff --git a/Mage/src/mage/game/turn/EndPhase.java b/Mage/src/main/java/mage/game/turn/EndPhase.java similarity index 100% rename from Mage/src/mage/game/turn/EndPhase.java rename to Mage/src/main/java/mage/game/turn/EndPhase.java diff --git a/Mage/src/mage/game/turn/EndStep.java b/Mage/src/main/java/mage/game/turn/EndStep.java similarity index 100% rename from Mage/src/mage/game/turn/EndStep.java rename to Mage/src/main/java/mage/game/turn/EndStep.java diff --git a/Mage/src/mage/game/turn/FirstCombatDamageStep.java b/Mage/src/main/java/mage/game/turn/FirstCombatDamageStep.java similarity index 100% rename from Mage/src/mage/game/turn/FirstCombatDamageStep.java rename to Mage/src/main/java/mage/game/turn/FirstCombatDamageStep.java diff --git a/Mage/src/mage/game/turn/Phase.java b/Mage/src/main/java/mage/game/turn/Phase.java similarity index 100% rename from Mage/src/mage/game/turn/Phase.java rename to Mage/src/main/java/mage/game/turn/Phase.java diff --git a/Mage/src/mage/game/turn/PostCombatMainPhase.java b/Mage/src/main/java/mage/game/turn/PostCombatMainPhase.java similarity index 100% rename from Mage/src/mage/game/turn/PostCombatMainPhase.java rename to Mage/src/main/java/mage/game/turn/PostCombatMainPhase.java diff --git a/Mage/src/mage/game/turn/PostCombatMainStep.java b/Mage/src/main/java/mage/game/turn/PostCombatMainStep.java similarity index 100% rename from Mage/src/mage/game/turn/PostCombatMainStep.java rename to Mage/src/main/java/mage/game/turn/PostCombatMainStep.java diff --git a/Mage/src/mage/game/turn/PreCombatMainPhase.java b/Mage/src/main/java/mage/game/turn/PreCombatMainPhase.java similarity index 100% rename from Mage/src/mage/game/turn/PreCombatMainPhase.java rename to Mage/src/main/java/mage/game/turn/PreCombatMainPhase.java diff --git a/Mage/src/mage/game/turn/PreCombatMainStep.java b/Mage/src/main/java/mage/game/turn/PreCombatMainStep.java similarity index 100% rename from Mage/src/mage/game/turn/PreCombatMainStep.java rename to Mage/src/main/java/mage/game/turn/PreCombatMainStep.java diff --git a/Mage/src/mage/game/turn/Step.java b/Mage/src/main/java/mage/game/turn/Step.java similarity index 100% rename from Mage/src/mage/game/turn/Step.java rename to Mage/src/main/java/mage/game/turn/Step.java diff --git a/Mage/src/mage/game/turn/Turn.java b/Mage/src/main/java/mage/game/turn/Turn.java similarity index 99% rename from Mage/src/mage/game/turn/Turn.java rename to Mage/src/main/java/mage/game/turn/Turn.java index 30a367814ca..9239e55e8b6 100644 --- a/Mage/src/mage/game/turn/Turn.java +++ b/Mage/src/main/java/mage/game/turn/Turn.java @@ -49,7 +49,7 @@ import mage.util.ThreadLocalStringBuilder; */ public class Turn implements Serializable { - private static final transient ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(50); + private static final ThreadLocalStringBuilder threadLocalBuilder = new ThreadLocalStringBuilder(50); private Phase currentPhase; private UUID activePlayerId; diff --git a/Mage/src/mage/game/turn/TurnMod.java b/Mage/src/main/java/mage/game/turn/TurnMod.java similarity index 100% rename from Mage/src/mage/game/turn/TurnMod.java rename to Mage/src/main/java/mage/game/turn/TurnMod.java diff --git a/Mage/src/mage/game/turn/TurnMods.java b/Mage/src/main/java/mage/game/turn/TurnMods.java similarity index 100% rename from Mage/src/mage/game/turn/TurnMods.java rename to Mage/src/main/java/mage/game/turn/TurnMods.java diff --git a/Mage/src/mage/game/turn/UntapStep.java b/Mage/src/main/java/mage/game/turn/UntapStep.java similarity index 100% rename from Mage/src/mage/game/turn/UntapStep.java rename to Mage/src/main/java/mage/game/turn/UntapStep.java diff --git a/Mage/src/mage/game/turn/UpkeepStep.java b/Mage/src/main/java/mage/game/turn/UpkeepStep.java similarity index 100% rename from Mage/src/mage/game/turn/UpkeepStep.java rename to Mage/src/main/java/mage/game/turn/UpkeepStep.java diff --git a/Mage/src/mage/players/Library.java b/Mage/src/main/java/mage/players/Library.java similarity index 96% rename from Mage/src/mage/players/Library.java rename to Mage/src/main/java/mage/players/Library.java index ec7cfc1942a..1b72dd544a3 100644 --- a/Mage/src/mage/players/Library.java +++ b/Mage/src/main/java/mage/players/Library.java @@ -128,6 +128,17 @@ public class Library implements Serializable { return game.getCard(library.peekFirst()); } + /** + * Returns the bottommost card of the Library without removing it + * + * @param game + * @return Card + * @see Card + */ + public Card getFromBottom(Game game) { + return game.getCard(library.pollLast()); + } + public void putOnTop(Card card, Game game) { if (card.getOwnerId().equals(playerId)) { card.setZone(Zone.LIBRARY, game); diff --git a/Mage/src/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java similarity index 100% rename from Mage/src/mage/players/ManaPool.java rename to Mage/src/main/java/mage/players/ManaPool.java diff --git a/Mage/src/mage/players/ManaPoolItem.java b/Mage/src/main/java/mage/players/ManaPoolItem.java similarity index 100% rename from Mage/src/mage/players/ManaPoolItem.java rename to Mage/src/main/java/mage/players/ManaPoolItem.java diff --git a/Mage/src/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java similarity index 93% rename from Mage/src/mage/players/Player.java rename to Mage/src/main/java/mage/players/Player.java index 7cfa4444370..d2565bd84a1 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -44,6 +44,8 @@ import mage.abilities.Modes; import mage.abilities.SpellAbility; import mage.abilities.TriggeredAbility; import mage.abilities.costs.AlternativeSourceCosts; +import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; import mage.abilities.costs.VariableCost; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; @@ -366,7 +368,29 @@ public interface Player extends MageItem, Copyable { boolean canPlayLand(); - boolean playLand(Card card, Game game); + /** + * Plays a card if possible + * + * @param card the card that can be cast + * @param game + * @param noMana if it's a spell i can be cast without paying mana + * @param ignoreTiming if it's cast during the resolution of another spell + * no sorcery or play land timing restriction are checked. For a land it has + * to be the turn of the player playing that card. + * @return + */ + boolean playCard(Card card, Game game, boolean noMana, boolean ignoreTiming); + + /** + * + * @param card the land card to play + * @param game + * @param ignoreTiming false - it won't be checked if the stack is empty and + * you are able to play a Sorcery. It's still checked, if you are able to + * play a land concerning the numner of lands you already played. + * @return + */ + boolean playLand(Card card, Game game, boolean ignoreTiming); boolean activateAbility(ActivatedAbility ability, Game game); @@ -647,7 +671,7 @@ public interface Player extends MageItem, Copyable { boolean moveCards(Set cards, Zone toZone, Ability source, Game game); /** - * Iniversal method to move cards from one zone to another. Do not mix + * Universal method to move cards from one zone to another. Do not mix * objects from different from zones to move. * * @param cards @@ -657,7 +681,7 @@ public interface Player extends MageItem, Copyable { * @param tapped tha cards are tapped on the battlefield * @param faceDown the cards are face down in the to zone * @param byOwner the card is moved (or put onto battlefield) by the owner - * of the card and if target zone is battlefield controlls the permanent + * of the card and if target zone is battlefield controls the permanent * (instead of the controller of the source) * @param appliedEffects * @return @@ -756,19 +780,23 @@ public interface Player extends MageItem, Copyable { void cleanUpOnMatchEnd(); /** - * If the next cast spell has the set sourceId, the spell will be cast - * without mana. + * If the next spell cast has the set sourceId, the spell will be cast + * without mana (null) or the mana set to manaCosts instead of its normal + * mana costs. * * @param sourceId the source that can be cast without mana * @param manaCosts alternate ManaCost, null if it can be cast without mana * cost + * @param costs alternate other costs you need to pay */ - void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts); + void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts, mage.abilities.costs.Costs costs); UUID getCastSourceIdWithAlternateMana(); ManaCosts getCastSourceIdManaCosts(); + Costs getCastSourceIdCosts(); + // permission handling to show hand cards void addPermissionToShowHandCards(UUID watcherUserId); @@ -787,4 +815,13 @@ public interface Player extends MageItem, Copyable { MatchPlayer getMatchPlayer(); boolean scry(int value, Ability source, Game game); + + /** + * Only used for test player for pre-setting targets + * + * @param ability + * @param game + * @return + */ + boolean addTargets(Ability ability, Game game); } diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java similarity index 95% rename from Mage/src/mage/players/PlayerImpl.java rename to Mage/src/main/java/mage/players/PlayerImpl.java index cdeb49c91a4..8c180e2fec5 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -61,6 +61,7 @@ import mage.abilities.costs.AlternativeCost; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.AlternativeSourceCosts; import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; import mage.abilities.costs.OptionalAdditionalSourceCosts; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; @@ -135,7 +136,7 @@ import org.apache.log4j.Logger; public abstract class PlayerImpl implements Player, Serializable { - private static final transient Logger logger = Logger.getLogger(PlayerImpl.class); + private static final Logger logger = Logger.getLogger(PlayerImpl.class); private static Random rnd = new Random(); @@ -222,7 +223,8 @@ public abstract class PlayerImpl implements Player, Serializable { // indicates that the spell with the set sourceId can be cast with an alternate mana costs (can also be no mana costs) protected UUID castSourceIdWithAlternateMana; - protected ManaCosts castSourceIdManaCosts; + protected ManaCosts castSourceIdManaCosts; + protected Costs castSourceIdCosts; // indicates that the player is in mana payment phase protected boolean payManaMode = false; @@ -326,6 +328,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.castSourceIdWithAlternateMana = player.castSourceIdWithAlternateMana; this.castSourceIdManaCosts = player.castSourceIdManaCosts; + this.castSourceIdCosts = player.castSourceIdCosts; this.payManaMode = player.payManaMode; } @@ -388,6 +391,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.reachedNextTurnAfterLeaving = player.hasReachedNextTurnAfterLeaving(); this.castSourceIdWithAlternateMana = player.getCastSourceIdWithAlternateMana(); this.castSourceIdManaCosts = player.getCastSourceIdManaCosts(); + this.castSourceIdCosts = player.getCastSourceIdCosts(); // Don't restore! // this.storedBookmark @@ -453,6 +457,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.castSourceIdWithAlternateMana = null; this.castSourceIdManaCosts = null; + this.castSourceIdCosts = null; } /** @@ -476,6 +481,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.alternativeSourceCosts.clear(); this.castSourceIdWithAlternateMana = null; this.castSourceIdManaCosts = null; + this.castSourceIdCosts = null; this.getManaPool().clearEmptyManaPoolRules(); } @@ -684,6 +690,12 @@ public abstract class PlayerImpl implements Player, Serializable { return true; } + /** + * + * @param amount + * @param source + * @param game + */ @Override public void discard(int amount, Ability source, Game game) { discard(amount, false, source, game); @@ -917,9 +929,10 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts) { + public void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts, mage.abilities.costs.Costs costs) { castSourceIdWithAlternateMana = sourceId; castSourceIdManaCosts = manaCosts; + castSourceIdCosts = costs; } @Override @@ -927,6 +940,11 @@ public abstract class PlayerImpl implements Player, Serializable { return castSourceIdWithAlternateMana; } + @Override + public Costs getCastSourceIdCosts() { + return castSourceIdCosts; + } + @Override public ManaCosts getCastSourceIdManaCosts() { return castSourceIdManaCosts; @@ -937,6 +955,23 @@ public abstract class PlayerImpl implements Player, Serializable { return payManaMode; } + @Override + public boolean playCard(Card card, Game game, boolean noMana, boolean ignoreTiming) { + if (card == null) { + return false; + } + boolean result; + if (card.getCardType().contains(CardType.LAND)) { + result = playLand(card, game, ignoreTiming); + } else { + result = cast(card.getSpellAbility(), game, noMana); + } + if (result == false) { + game.informPlayer(this, "You can't play " + card.getIdName() + "."); + } + return result; + } + @Override public boolean cast(SpellAbility ability, Game game, boolean noMana) { if (!ability.getSpellAbilityType().equals(SpellAbilityType.BASE)) { @@ -945,25 +980,30 @@ public abstract class PlayerImpl implements Player, Serializable { //20091005 - 601.2a Card card = game.getCard(ability.getSourceId()); if (card != null) { - if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), ability.getSourceId(), playerId))) { + if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), ability.getSourceId(), playerId), ability)) { int bookmark = game.bookmarkState(); Zone fromZone = game.getState().getZone(card.getMainCard().getId()); card.cast(game, fromZone, ability, playerId); Spell spell = game.getStack().getSpell(ability.getId()); - // some effects set sourceId to cast without paying mana costs + // some effects set sourceId to cast without paying mana costs or other costs if (ability.getSourceId().equals(getCastSourceIdWithAlternateMana())) { - ManaCosts alternateCosts = getCastSourceIdManaCosts(); Ability spellAbility = spell.getSpellAbility(); + ManaCosts alternateCosts = getCastSourceIdManaCosts(); + Costs costs = getCastSourceIdCosts(); if (alternateCosts == null) { noMana = true; } else { spellAbility.getManaCosts().clear(); - spellAbility.getManaCosts().add(alternateCosts.copy()); spellAbility.getManaCostsToPay().clear(); + spellAbility.getManaCosts().add(alternateCosts.copy()); spellAbility.getManaCostsToPay().add(alternateCosts.copy()); } + spellAbility.getCosts().clear(); + if (costs != null) { + spellAbility.getCosts().addAll(costs); + } } - setCastSourceIdWithAlternateMana(null, null); + setCastSourceIdWithAlternateMana(null, null, null); GameEvent event = GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, spell.getSpellAbility().getId(), spell.getSpellAbility().getSourceId(), playerId); game.fireEvent(event); if (spell.activate(game, noMana)) { @@ -989,7 +1029,7 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public boolean playLand(Card card, Game game) { + public boolean playLand(Card card, Game game, boolean ignoreTiming) { // Check for alternate casting possibilities: e.g. land with Morph ActivatedAbility playLandAbility = null; boolean found = false; @@ -1013,9 +1053,13 @@ public abstract class PlayerImpl implements Player, Serializable { if (playLandAbility == null) { return false; } + //20091005 - 114.2a if (!playLandAbility.canActivate(this.playerId, game)) { return false; } + if (!ignoreTiming && !game.canPlaySorcery(playerId)) { + return false; + } //20091005 - 305.1 if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.PLAY_LAND, card.getId(), card.getId(), playerId))) { // int bookmark = game.bookmarkState(); @@ -1032,7 +1076,8 @@ public abstract class PlayerImpl implements Player, Serializable { // what makes no real sense. So it makes no sense to generally do a restorState here. // restoreState(bookmark, card.getName(), game); } - return false; + // if the to play the land is replaced (e.g. Kjeldoran Outpos and don't sacrificing a Plains) it's a valid satte so returning true here + return true; } protected boolean playManaAbility(ManaAbility ability, Game game) { @@ -1121,9 +1166,8 @@ public abstract class PlayerImpl implements Player, Serializable { return true; } if (ability instanceof PlayLandAbility) { - Card card = game.getCard(ability.getSourceId()); - result = playLand(card, game); + result = playLand(card, game, false); } else { if (!ability.canActivate(this.playerId, game)) { return false; @@ -1224,8 +1268,11 @@ public abstract class PlayerImpl implements Player, Serializable { if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { if (ability.getZone().match(zone)) { if (ability instanceof ActivatedAbility) { - if (canPlay(((ActivatedAbility) ability), availableMana, object, game)) { -// if (((ActivatedAbility) ability).canActivate(playerId, game)) { + if (ability instanceof ManaAbility) { + if (((ActivatedAbility) ability).canActivate(playerId, game)) { + useable.put(ability.getId(), (ActivatedAbility) ability); + } + } else if (canPlay(((ActivatedAbility) ability), availableMana, object, game)) { useable.put(ability.getId(), (ActivatedAbility) ability); } } else if (ability instanceof AlternativeSourceCosts) { @@ -1461,7 +1508,7 @@ public abstract class PlayerImpl implements Player, Serializable { StringBuilder sb = new StringBuilder(message).append(" to untap").append(" (").append(Math.min(leftForUntap.size(), numberToUntap)).append(" in total"); MageObject effectSource = game.getObject(ability.getSourceId()); if (effectSource != null) { - sb.append(" from ").append(effectSource.getLogName()).toString(); + sb.append(" from ").append(effectSource.getLogName()); } sb.append(")"); filter.setMessage(sb.toString()); @@ -2703,7 +2750,8 @@ public abstract class PlayerImpl implements Player, Serializable { for (Mode mode : option.getModes().values()) { Ability newOption = option.copy(); newOption.getModes().getSelectedModes().clear(); - newOption.getModes().setMode(mode); + newOption.getModes().getSelectedModes().add(mode); + newOption.getModes().setActiveMode(mode); if (newOption.getTargets().getUnchosen().size() > 0) { if (newOption.getManaCosts().getVariableCosts().size() > 0) { addVariableXOptions(options, newOption, 0, game); @@ -3046,7 +3094,7 @@ public abstract class PlayerImpl implements Player, Serializable { case GRAVEYARD: fromZone = game.getState().getZone(cards.iterator().next().getId()); successfulMovedCards = moveCardsToGraveyardWithInfo(cards, source, game, fromZone); - break; + return successfulMovedCards.size() > 0; case BATTLEFIELD: // new logic that does not yet add the permanents to battlefield while replacement effects are handled List permanents = new ArrayList<>(); List permanentsEntered = new ArrayList<>(); @@ -3073,9 +3121,13 @@ public abstract class PlayerImpl implements Player, Serializable { game.setScopeRelevant(true); for (Permanent permanent : permanents) { fromZone = game.getState().getZone(permanent.getId()); + // make sure the controller of all continuous effects of this card are switched to the current controller + game.getContinuousEffects().setController(permanent.getId(), permanent.getControllerId()); if (permanent.entersBattlefield(source.getSourceId(), game, fromZone, true)) { permanentsEntered.add(permanent); } else { + // revert controller to owner if permanent does not enter + game.getContinuousEffects().setController(permanent.getId(), permanent.getOwnerId()); game.getPermanentsEntering().remove(permanent.getId()); } } @@ -3084,12 +3136,9 @@ public abstract class PlayerImpl implements Player, Serializable { fromZone = game.getState().getZone(permanent.getId()); if (((Card) permanent).removeFromZone(game, fromZone, source.getSourceId())) { permanent.updateZoneChangeCounter(game); - // make sure the controller of all continuous effects of this card are switched to the current controller - game.getContinuousEffects().setController(permanent.getId(), permanent.getControllerId()); game.addPermanent(permanent); permanent.setZone(Zone.BATTLEFIELD, game); game.getPermanentsEntering().remove(permanent.getId()); - game.setScopeRelevant(true); successfulMovedCards.add(permanent); game.addSimultaneousEvent(new ZoneChangeEvent(permanent, permanent.getControllerId(), fromZone, Zone.BATTLEFIELD)); if (!game.isSimulation()) { @@ -3137,8 +3186,9 @@ public abstract class PlayerImpl implements Player, Serializable { default: throw new UnsupportedOperationException("to Zone" + toZone.toString() + " not supported yet"); } - - game.fireEvent(new ZoneChangeGroupEvent(successfulMovedCards, source == null ? null : source.getSourceId(), this.getId(), fromZone, toZone)); + if (!successfulMovedCards.isEmpty()) { + game.fireEvent(new ZoneChangeGroupEvent(successfulMovedCards, source == null ? null : source.getSourceId(), this.getId(), fromZone, toZone)); + } return successfulMovedCards.size() > 0; } @@ -3255,6 +3305,7 @@ public abstract class PlayerImpl implements Player, Serializable { } } } + game.fireEvent(new ZoneChangeGroupEvent(movedCards, source == null ? null : source.getSourceId(), this.getId(), fromZone, Zone.GRAVEYARD)); return movedCards; } @@ -3268,7 +3319,7 @@ public abstract class PlayerImpl implements Player, Serializable { card = game.getCard(card.getId()); } StringBuilder sb = new StringBuilder(this.getLogName()) - .append(" puts ").append(card.getLogName()).append(" ") + .append(" puts ").append(card.getLogName()).append(" ").append(card.isCopy() ? "(Copy) " : "") .append(fromZone != null ? "from " + fromZone.toString().toLowerCase(Locale.ENGLISH) + " " : ""); if (card.getOwnerId().equals(getId())) { sb.append("into his or her graveyard"); @@ -3444,4 +3495,10 @@ public abstract class PlayerImpl implements Player, Serializable { return true; } + @Override + public boolean addTargets(Ability ability, Game game) { + // only used for TestPlayer to preSet Targets + return true; + } + } diff --git a/Mage/src/mage/players/PlayerList.java b/Mage/src/main/java/mage/players/PlayerList.java similarity index 100% rename from Mage/src/mage/players/PlayerList.java rename to Mage/src/main/java/mage/players/PlayerList.java diff --git a/Mage/src/mage/players/Players.java b/Mage/src/main/java/mage/players/Players.java similarity index 100% rename from Mage/src/mage/players/Players.java rename to Mage/src/main/java/mage/players/Players.java diff --git a/Mage/src/mage/players/net/SkipPrioritySteps.java b/Mage/src/main/java/mage/players/net/SkipPrioritySteps.java similarity index 100% rename from Mage/src/mage/players/net/SkipPrioritySteps.java rename to Mage/src/main/java/mage/players/net/SkipPrioritySteps.java diff --git a/Mage/src/mage/players/net/UserData.java b/Mage/src/main/java/mage/players/net/UserData.java similarity index 94% rename from Mage/src/mage/players/net/UserData.java rename to Mage/src/main/java/mage/players/net/UserData.java index 0e6e4017334..c2c3b2a3bb4 100644 --- a/Mage/src/mage/players/net/UserData.java +++ b/Mage/src/main/java/mage/players/net/UserData.java @@ -59,7 +59,7 @@ public class UserData implements Serializable { } public static UserData getDefaultUserDataView() { - return new UserData(UserGroup.DEFAULT, 0, false, false, true, null, "world.png", false, true, true, false, false, false); + return new UserData(UserGroup.DEFAULT, 0, false, false, true, null, getDefaultFlagName(), false, true, true, false, false, false); } public void setGroupId(int groupId) { @@ -166,4 +166,7 @@ public class UserData implements Serializable { this.autoOrderTrigger = autoOrderTrigger; } + public static String getDefaultFlagName() { + return "world.png"; + } } diff --git a/Mage/src/mage/players/net/UserGroup.java b/Mage/src/main/java/mage/players/net/UserGroup.java similarity index 100% rename from Mage/src/mage/players/net/UserGroup.java rename to Mage/src/main/java/mage/players/net/UserGroup.java diff --git a/Mage/src/mage/players/net/UserSkipPrioritySteps.java b/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java similarity index 100% rename from Mage/src/mage/players/net/UserSkipPrioritySteps.java rename to Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java diff --git a/Mage/src/mage/target/Target.java b/Mage/src/main/java/mage/target/Target.java similarity index 100% rename from Mage/src/mage/target/Target.java rename to Mage/src/main/java/mage/target/Target.java diff --git a/Mage/src/mage/target/TargetAmount.java b/Mage/src/main/java/mage/target/TargetAmount.java similarity index 100% rename from Mage/src/mage/target/TargetAmount.java rename to Mage/src/main/java/mage/target/TargetAmount.java diff --git a/Mage/src/mage/target/TargetCard.java b/Mage/src/main/java/mage/target/TargetCard.java similarity index 100% rename from Mage/src/mage/target/TargetCard.java rename to Mage/src/main/java/mage/target/TargetCard.java diff --git a/Mage/src/mage/target/TargetImpl.java b/Mage/src/main/java/mage/target/TargetImpl.java similarity index 100% rename from Mage/src/mage/target/TargetImpl.java rename to Mage/src/main/java/mage/target/TargetImpl.java diff --git a/Mage/src/mage/target/TargetObject.java b/Mage/src/main/java/mage/target/TargetObject.java similarity index 100% rename from Mage/src/mage/target/TargetObject.java rename to Mage/src/main/java/mage/target/TargetObject.java diff --git a/Mage/src/mage/target/TargetPermanent.java b/Mage/src/main/java/mage/target/TargetPermanent.java similarity index 100% rename from Mage/src/mage/target/TargetPermanent.java rename to Mage/src/main/java/mage/target/TargetPermanent.java diff --git a/Mage/src/mage/target/TargetPlayer.java b/Mage/src/main/java/mage/target/TargetPlayer.java similarity index 100% rename from Mage/src/mage/target/TargetPlayer.java rename to Mage/src/main/java/mage/target/TargetPlayer.java diff --git a/Mage/src/mage/target/TargetSource.java b/Mage/src/main/java/mage/target/TargetSource.java similarity index 100% rename from Mage/src/mage/target/TargetSource.java rename to Mage/src/main/java/mage/target/TargetSource.java diff --git a/Mage/src/mage/target/TargetSpell.java b/Mage/src/main/java/mage/target/TargetSpell.java similarity index 100% rename from Mage/src/mage/target/TargetSpell.java rename to Mage/src/main/java/mage/target/TargetSpell.java diff --git a/Mage/src/mage/target/TargetStackObject.java b/Mage/src/main/java/mage/target/TargetStackObject.java similarity index 100% rename from Mage/src/mage/target/TargetStackObject.java rename to Mage/src/main/java/mage/target/TargetStackObject.java diff --git a/Mage/src/mage/target/Targets.java b/Mage/src/main/java/mage/target/Targets.java similarity index 100% rename from Mage/src/mage/target/Targets.java rename to Mage/src/main/java/mage/target/Targets.java diff --git a/Mage/src/mage/target/common/TargetActivatedAbility.java b/Mage/src/main/java/mage/target/common/TargetActivatedAbility.java similarity index 100% rename from Mage/src/mage/target/common/TargetActivatedAbility.java rename to Mage/src/main/java/mage/target/common/TargetActivatedAbility.java diff --git a/Mage/src/mage/target/common/TargetActivatedOrTriggeredAbility.java b/Mage/src/main/java/mage/target/common/TargetActivatedOrTriggeredAbility.java similarity index 100% rename from Mage/src/mage/target/common/TargetActivatedOrTriggeredAbility.java rename to Mage/src/main/java/mage/target/common/TargetActivatedOrTriggeredAbility.java diff --git a/Mage/src/mage/target/common/TargetArtifactPermanent.java b/Mage/src/main/java/mage/target/common/TargetArtifactPermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetArtifactPermanent.java rename to Mage/src/main/java/mage/target/common/TargetArtifactPermanent.java diff --git a/Mage/src/mage/target/common/TargetAttackingCreature.java b/Mage/src/main/java/mage/target/common/TargetAttackingCreature.java similarity index 100% rename from Mage/src/mage/target/common/TargetAttackingCreature.java rename to Mage/src/main/java/mage/target/common/TargetAttackingCreature.java diff --git a/Mage/src/mage/target/common/TargetAttackingOrBlockingCreature.java b/Mage/src/main/java/mage/target/common/TargetAttackingOrBlockingCreature.java similarity index 100% rename from Mage/src/mage/target/common/TargetAttackingOrBlockingCreature.java rename to Mage/src/main/java/mage/target/common/TargetAttackingOrBlockingCreature.java diff --git a/Mage/src/mage/target/common/TargetBasicLandCard.java b/Mage/src/main/java/mage/target/common/TargetBasicLandCard.java similarity index 100% rename from Mage/src/mage/target/common/TargetBasicLandCard.java rename to Mage/src/main/java/mage/target/common/TargetBasicLandCard.java diff --git a/Mage/src/mage/target/common/TargetCardInASingleGraveyard.java b/Mage/src/main/java/mage/target/common/TargetCardInASingleGraveyard.java similarity index 100% rename from Mage/src/mage/target/common/TargetCardInASingleGraveyard.java rename to Mage/src/main/java/mage/target/common/TargetCardInASingleGraveyard.java diff --git a/Mage/src/mage/target/common/TargetCardInExile.java b/Mage/src/main/java/mage/target/common/TargetCardInExile.java similarity index 100% rename from Mage/src/mage/target/common/TargetCardInExile.java rename to Mage/src/main/java/mage/target/common/TargetCardInExile.java diff --git a/Mage/src/mage/target/common/TargetCardInGraveyard.java b/Mage/src/main/java/mage/target/common/TargetCardInGraveyard.java similarity index 100% rename from Mage/src/mage/target/common/TargetCardInGraveyard.java rename to Mage/src/main/java/mage/target/common/TargetCardInGraveyard.java diff --git a/Mage/src/mage/target/common/TargetCardInHand.java b/Mage/src/main/java/mage/target/common/TargetCardInHand.java similarity index 100% rename from Mage/src/mage/target/common/TargetCardInHand.java rename to Mage/src/main/java/mage/target/common/TargetCardInHand.java diff --git a/Mage/src/mage/target/common/TargetCardInLibrary.java b/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java similarity index 100% rename from Mage/src/mage/target/common/TargetCardInLibrary.java rename to Mage/src/main/java/mage/target/common/TargetCardInLibrary.java diff --git a/Mage/src/mage/target/common/TargetCardInOpponentsGraveyard.java b/Mage/src/main/java/mage/target/common/TargetCardInOpponentsGraveyard.java similarity index 100% rename from Mage/src/mage/target/common/TargetCardInOpponentsGraveyard.java rename to Mage/src/main/java/mage/target/common/TargetCardInOpponentsGraveyard.java diff --git a/Mage/src/mage/target/common/TargetCardInYourGraveyard.java b/Mage/src/main/java/mage/target/common/TargetCardInYourGraveyard.java similarity index 100% rename from Mage/src/mage/target/common/TargetCardInYourGraveyard.java rename to Mage/src/main/java/mage/target/common/TargetCardInYourGraveyard.java diff --git a/Mage/src/mage/target/common/TargetControlledCreaturePermanent.java b/Mage/src/main/java/mage/target/common/TargetControlledCreaturePermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetControlledCreaturePermanent.java rename to Mage/src/main/java/mage/target/common/TargetControlledCreaturePermanent.java diff --git a/Mage/src/mage/target/common/TargetControlledPermanent.java b/Mage/src/main/java/mage/target/common/TargetControlledPermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetControlledPermanent.java rename to Mage/src/main/java/mage/target/common/TargetControlledPermanent.java diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlaneswalker.java b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalker.java similarity index 100% rename from Mage/src/mage/target/common/TargetCreatureOrPlaneswalker.java rename to Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalker.java diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java similarity index 100% rename from Mage/src/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java rename to Mage/src/main/java/mage/target/common/TargetCreatureOrPlaneswalkerAmount.java diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlayer.java b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayer.java similarity index 100% rename from Mage/src/mage/target/common/TargetCreatureOrPlayer.java rename to Mage/src/main/java/mage/target/common/TargetCreatureOrPlayer.java diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java similarity index 100% rename from Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java rename to Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java diff --git a/Mage/src/mage/target/common/TargetCreaturePermanent.java b/Mage/src/main/java/mage/target/common/TargetCreaturePermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetCreaturePermanent.java rename to Mage/src/main/java/mage/target/common/TargetCreaturePermanent.java diff --git a/Mage/src/mage/target/common/TargetCreaturePermanentAmount.java b/Mage/src/main/java/mage/target/common/TargetCreaturePermanentAmount.java similarity index 100% rename from Mage/src/mage/target/common/TargetCreaturePermanentAmount.java rename to Mage/src/main/java/mage/target/common/TargetCreaturePermanentAmount.java diff --git a/Mage/src/mage/target/common/TargetDefender.java b/Mage/src/main/java/mage/target/common/TargetDefender.java similarity index 100% rename from Mage/src/mage/target/common/TargetDefender.java rename to Mage/src/main/java/mage/target/common/TargetDefender.java diff --git a/Mage/src/mage/target/common/TargetDiscard.java b/Mage/src/main/java/mage/target/common/TargetDiscard.java similarity index 100% rename from Mage/src/mage/target/common/TargetDiscard.java rename to Mage/src/main/java/mage/target/common/TargetDiscard.java diff --git a/Mage/src/mage/target/common/TargetEnchantmentPermanent.java b/Mage/src/main/java/mage/target/common/TargetEnchantmentPermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetEnchantmentPermanent.java rename to Mage/src/main/java/mage/target/common/TargetEnchantmentPermanent.java diff --git a/Mage/src/mage/target/common/TargetLandPermanent.java b/Mage/src/main/java/mage/target/common/TargetLandPermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetLandPermanent.java rename to Mage/src/main/java/mage/target/common/TargetLandPermanent.java diff --git a/Mage/src/mage/target/common/TargetNonBasicLandPermanent.java b/Mage/src/main/java/mage/target/common/TargetNonBasicLandPermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetNonBasicLandPermanent.java rename to Mage/src/main/java/mage/target/common/TargetNonBasicLandPermanent.java diff --git a/Mage/src/mage/target/common/TargetNonlandPermanent.java b/Mage/src/main/java/mage/target/common/TargetNonlandPermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetNonlandPermanent.java rename to Mage/src/main/java/mage/target/common/TargetNonlandPermanent.java diff --git a/Mage/src/mage/target/common/TargetOpponent.java b/Mage/src/main/java/mage/target/common/TargetOpponent.java similarity index 100% rename from Mage/src/mage/target/common/TargetOpponent.java rename to Mage/src/main/java/mage/target/common/TargetOpponent.java diff --git a/Mage/src/mage/target/common/TargetOpponentsChoicePermanent.java b/Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetOpponentsChoicePermanent.java rename to Mage/src/main/java/mage/target/common/TargetOpponentsChoicePermanent.java diff --git a/Mage/src/mage/target/common/TargetPermanentOrPlayer.java b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java similarity index 100% rename from Mage/src/mage/target/common/TargetPermanentOrPlayer.java rename to Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java diff --git a/Mage/src/mage/target/common/TargetPermanentOrPlayerWithCounter.java b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayerWithCounter.java similarity index 100% rename from Mage/src/mage/target/common/TargetPermanentOrPlayerWithCounter.java rename to Mage/src/main/java/mage/target/common/TargetPermanentOrPlayerWithCounter.java diff --git a/Mage/src/mage/target/common/TargetSpellOrPermanent.java b/Mage/src/main/java/mage/target/common/TargetSpellOrPermanent.java similarity index 100% rename from Mage/src/mage/target/common/TargetSpellOrPermanent.java rename to Mage/src/main/java/mage/target/common/TargetSpellOrPermanent.java diff --git a/Mage/src/mage/target/targetpointer/FirstTargetPointer.java b/Mage/src/main/java/mage/target/targetpointer/FirstTargetPointer.java similarity index 100% rename from Mage/src/mage/target/targetpointer/FirstTargetPointer.java rename to Mage/src/main/java/mage/target/targetpointer/FirstTargetPointer.java diff --git a/Mage/src/mage/target/targetpointer/FixedTarget.java b/Mage/src/main/java/mage/target/targetpointer/FixedTarget.java similarity index 100% rename from Mage/src/mage/target/targetpointer/FixedTarget.java rename to Mage/src/main/java/mage/target/targetpointer/FixedTarget.java diff --git a/Mage/src/mage/target/targetpointer/SecondTargetPointer.java b/Mage/src/main/java/mage/target/targetpointer/SecondTargetPointer.java similarity index 100% rename from Mage/src/mage/target/targetpointer/SecondTargetPointer.java rename to Mage/src/main/java/mage/target/targetpointer/SecondTargetPointer.java diff --git a/Mage/src/mage/target/targetpointer/TargetPointer.java b/Mage/src/main/java/mage/target/targetpointer/TargetPointer.java similarity index 100% rename from Mage/src/mage/target/targetpointer/TargetPointer.java rename to Mage/src/main/java/mage/target/targetpointer/TargetPointer.java diff --git a/Mage/src/mage/util/CardUtil.java b/Mage/src/main/java/mage/util/CardUtil.java similarity index 97% rename from Mage/src/mage/util/CardUtil.java rename to Mage/src/main/java/mage/util/CardUtil.java index 9c6f45db5b8..807c515c911 100644 --- a/Mage/src/mage/util/CardUtil.java +++ b/Mage/src/main/java/mage/util/CardUtil.java @@ -225,10 +225,11 @@ public class CardUtil { for (ManaCost manaCost : manaCosts) { Mana mana = manaCost.getOptions().get(0); int colorless = mana != null ? mana.getColorless() : 0; - if (!updated && restToReduce != 0 && colorless > 0) { + if (restToReduce != 0 && colorless > 0) { if ((colorless - restToReduce) > 0) { int newColorless = colorless - restToReduce; adjustedCost.add(new GenericManaCost(newColorless)); + restToReduce = 0; } else { restToReduce -= colorless; } diff --git a/Mage/src/mage/util/CircularList.java b/Mage/src/main/java/mage/util/CircularList.java similarity index 100% rename from Mage/src/mage/util/CircularList.java rename to Mage/src/main/java/mage/util/CircularList.java diff --git a/Mage/src/mage/util/ClassScanner.java b/Mage/src/main/java/mage/util/ClassScanner.java similarity index 100% rename from Mage/src/mage/util/ClassScanner.java rename to Mage/src/main/java/mage/util/ClassScanner.java diff --git a/Mage/src/mage/util/Copier.java b/Mage/src/main/java/mage/util/Copier.java similarity index 100% rename from Mage/src/mage/util/Copier.java rename to Mage/src/main/java/mage/util/Copier.java diff --git a/Mage/src/mage/util/CopierObjectInputStream.java b/Mage/src/main/java/mage/util/CopierObjectInputStream.java similarity index 100% rename from Mage/src/mage/util/CopierObjectInputStream.java rename to Mage/src/main/java/mage/util/CopierObjectInputStream.java diff --git a/Mage/src/mage/util/Copyable.java b/Mage/src/main/java/mage/util/Copyable.java similarity index 100% rename from Mage/src/mage/util/Copyable.java rename to Mage/src/main/java/mage/util/Copyable.java diff --git a/Mage/src/mage/util/DateFormat.java b/Mage/src/main/java/mage/util/DateFormat.java similarity index 100% rename from Mage/src/mage/util/DateFormat.java rename to Mage/src/main/java/mage/util/DateFormat.java diff --git a/Mage/src/mage/util/DeckUtil.java b/Mage/src/main/java/mage/util/DeckUtil.java similarity index 100% rename from Mage/src/mage/util/DeckUtil.java rename to Mage/src/main/java/mage/util/DeckUtil.java diff --git a/Mage/src/mage/util/FastByteArrayInputStream.java b/Mage/src/main/java/mage/util/FastByteArrayInputStream.java similarity index 100% rename from Mage/src/mage/util/FastByteArrayInputStream.java rename to Mage/src/main/java/mage/util/FastByteArrayInputStream.java diff --git a/Mage/src/mage/util/FastByteArrayOutputStream.java b/Mage/src/main/java/mage/util/FastByteArrayOutputStream.java similarity index 100% rename from Mage/src/mage/util/FastByteArrayOutputStream.java rename to Mage/src/main/java/mage/util/FastByteArrayOutputStream.java diff --git a/Mage/src/mage/util/GameLog.java b/Mage/src/main/java/mage/util/GameLog.java similarity index 100% rename from Mage/src/mage/util/GameLog.java rename to Mage/src/main/java/mage/util/GameLog.java diff --git a/Mage/src/mage/util/ManaUtil.java b/Mage/src/main/java/mage/util/ManaUtil.java similarity index 99% rename from Mage/src/mage/util/ManaUtil.java rename to Mage/src/main/java/mage/util/ManaUtil.java index 6ff41cc3f4f..b3d3f3a1b13 100644 --- a/Mage/src/mage/util/ManaUtil.java +++ b/Mage/src/main/java/mage/util/ManaUtil.java @@ -351,23 +351,23 @@ public class ManaUtil { int countColorless = 0; ManaAbility chosenManaAbility = null; for (ManaAbility ability : useableAbilities.values()) { - if (ability instanceof RedManaAbility && mana.contains(Mana.RedMana)) { + if (ability instanceof RedManaAbility && mana.contains(Mana.RedMana(1))) { chosenManaAbility = ability; countColorfull++; } - if (ability instanceof BlackManaAbility && mana.contains(Mana.BlackMana)) { + if (ability instanceof BlackManaAbility && mana.contains(Mana.BlackMana(1))) { chosenManaAbility = ability; countColorfull++; } - if (ability instanceof BlueManaAbility && mana.contains(Mana.BlueMana)) { + if (ability instanceof BlueManaAbility && mana.contains(Mana.BlueMana(1))) { chosenManaAbility = ability; countColorfull++; } - if (ability instanceof WhiteManaAbility && mana.contains(Mana.WhiteMana)) { + if (ability instanceof WhiteManaAbility && mana.contains(Mana.WhiteMana(1))) { chosenManaAbility = ability; countColorfull++; } - if (ability instanceof GreenManaAbility && mana.contains(Mana.GreenMana)) { + if (ability instanceof GreenManaAbility && mana.contains(Mana.GreenMana(1))) { chosenManaAbility = ability; countColorfull++; } diff --git a/Mage/src/mage/util/MessageToClient.java b/Mage/src/main/java/mage/util/MessageToClient.java similarity index 100% rename from Mage/src/mage/util/MessageToClient.java rename to Mage/src/main/java/mage/util/MessageToClient.java diff --git a/Mage/src/mage/util/TargetAddress.java b/Mage/src/main/java/mage/util/TargetAddress.java similarity index 94% rename from Mage/src/mage/util/TargetAddress.java rename to Mage/src/main/java/mage/util/TargetAddress.java index 4774fe21e1b..e4e89d18325 100644 --- a/Mage/src/mage/util/TargetAddress.java +++ b/Mage/src/main/java/mage/util/TargetAddress.java @@ -36,11 +36,11 @@ import mage.cards.Card; import mage.game.stack.Spell; import mage.target.Target; - /** * @author duncant */ public class TargetAddress { + protected int spellAbilityIndex; protected UUID mode; protected int targetIndex; @@ -52,8 +52,9 @@ public class TargetAddress { } protected static class TargetAddressIterable implements Iterable { + protected final Card card; - + public TargetAddressIterable(Card card) { this.card = card; } @@ -64,9 +65,10 @@ public class TargetAddress { } protected static class TargetAddressIterator implements Iterator { + protected Iterator spellAbilityIterator; protected Integer lastSpellAbilityIndex = null; - protected Iterator modeIterator = null; + protected Iterator modeIterator = null; protected Modes modes = null; protected UUID lastMode = null; protected Iterator targetIterator = null; @@ -88,14 +90,14 @@ public class TargetAddress { public boolean hasNext() { return lastTargetIndex != null; } - + public TargetAddress next() { TargetAddress ret = new TargetAddress(lastSpellAbilityIndex, - lastMode, - lastTargetIndex); + lastMode, + lastTargetIndex); calcNext(); return ret; - + } public void remove() { @@ -118,9 +120,9 @@ public class TargetAddress { return; } } - + if (modeIterator != null && modeIterator.hasNext()) { - lastMode = modeIterator.next(); + lastMode = modeIterator.next().getId(); targetIterator = modes.get(lastMode).getTargets().iterator(); } else { lastMode = null; @@ -145,7 +147,6 @@ public class TargetAddress { } } - public static Iterable walk(Card card) { return new TargetAddressIterable(card); } @@ -179,8 +180,8 @@ public class TargetAddress { public boolean equals(TargetAddress other) { return spellAbilityIndex == other.spellAbilityIndex - && mode.equals(other.mode) - && targetIndex == other.targetIndex; + && mode.equals(other.mode) + && targetIndex == other.targetIndex; } @Override diff --git a/Mage/src/mage/util/ThreadLocalStringBuilder.java b/Mage/src/main/java/mage/util/ThreadLocalStringBuilder.java similarity index 100% rename from Mage/src/mage/util/ThreadLocalStringBuilder.java rename to Mage/src/main/java/mage/util/ThreadLocalStringBuilder.java diff --git a/Mage/src/mage/util/TournamentUtil.java b/Mage/src/main/java/mage/util/TournamentUtil.java similarity index 83% rename from Mage/src/mage/util/TournamentUtil.java rename to Mage/src/main/java/mage/util/TournamentUtil.java index 8d3ae3aaca9..09497b410ff 100644 --- a/Mage/src/mage/util/TournamentUtil.java +++ b/Mage/src/main/java/mage/util/TournamentUtil.java @@ -7,10 +7,12 @@ package mage.util; import java.util.ArrayList; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Random; import java.util.Set; + import mage.cards.Card; import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; @@ -32,44 +34,44 @@ public class TournamentUtil { * @return setCode for lands */ - public static Set getLandSetCodeForDeckSets(Set setCodesDeck) { + public static Set getLandSetCodeForDeckSets(Collection setCodesDeck) { - Set setCodesland = new HashSet<>(); + Set landSetCodes = new HashSet<>(); // decide from which sets basic lands are taken from for (String setCode :setCodesDeck) { ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); if (expansionInfo.hasBasicLands()) { - setCodesland.add(expansionInfo.getCode()); + landSetCodes.add(expansionInfo.getCode()); } } // if sets have no basic land, take land from block - if (setCodesland.isEmpty()) { + if (landSetCodes.isEmpty()) { for (String setCode :setCodesDeck) { ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); List blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName()); for (ExpansionInfo blockSet: blockSets) { if (blockSet.hasBasicLands()) { - setCodesland.add(blockSet.getCode()); + landSetCodes.add(blockSet.getCode()); } } } } // if still no set with lands found, take one by random - if (setCodesland.isEmpty()) { + if (landSetCodes.isEmpty()) { // if sets have no basic lands and also it has no parent or parent has no lands get last set with lands // select a set with basic lands by random Random generator = new Random(); List basicLandSets = ExpansionRepository.instance.getSetsWithBasicLandsByReleaseDate(); if (basicLandSets.size() > 0) { - setCodesland.add(basicLandSets.get(generator.nextInt(basicLandSets.size())).getCode()); + landSetCodes.add(basicLandSets.get(generator.nextInt(basicLandSets.size())).getCode()); } } - if (setCodesland.isEmpty()) { + if (landSetCodes.isEmpty()) { throw new IllegalArgumentException("No set with basic land was found"); } - return setCodesland; + return landSetCodes; } public static List getLands(String landName, int number, Set landSets) { diff --git a/Mage/src/mage/util/TreeNode.java b/Mage/src/main/java/mage/util/TreeNode.java similarity index 100% rename from Mage/src/mage/util/TreeNode.java rename to Mage/src/main/java/mage/util/TreeNode.java diff --git a/Mage/src/mage/util/functions/AbilityApplier.java b/Mage/src/main/java/mage/util/functions/AbilityApplier.java similarity index 100% rename from Mage/src/mage/util/functions/AbilityApplier.java rename to Mage/src/main/java/mage/util/functions/AbilityApplier.java diff --git a/Mage/src/mage/util/functions/AddSubtypeApplier.java b/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java similarity index 100% rename from Mage/src/mage/util/functions/AddSubtypeApplier.java rename to Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java diff --git a/Mage/src/mage/util/functions/ApplyToMageObject.java b/Mage/src/main/java/mage/util/functions/ApplyToMageObject.java similarity index 100% rename from Mage/src/mage/util/functions/ApplyToMageObject.java rename to Mage/src/main/java/mage/util/functions/ApplyToMageObject.java diff --git a/Mage/src/mage/util/functions/ApplyToPermanent.java b/Mage/src/main/java/mage/util/functions/ApplyToPermanent.java similarity index 100% rename from Mage/src/mage/util/functions/ApplyToPermanent.java rename to Mage/src/main/java/mage/util/functions/ApplyToPermanent.java diff --git a/Mage/src/mage/util/functions/CardTypeApplier.java b/Mage/src/main/java/mage/util/functions/CardTypeApplier.java similarity index 100% rename from Mage/src/mage/util/functions/CardTypeApplier.java rename to Mage/src/main/java/mage/util/functions/CardTypeApplier.java diff --git a/Mage/src/mage/util/functions/CopyTokenFunction.java b/Mage/src/main/java/mage/util/functions/CopyTokenFunction.java similarity index 100% rename from Mage/src/mage/util/functions/CopyTokenFunction.java rename to Mage/src/main/java/mage/util/functions/CopyTokenFunction.java diff --git a/Mage/src/mage/util/functions/EmptyApplyToPermanent.java b/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java similarity index 100% rename from Mage/src/mage/util/functions/EmptyApplyToPermanent.java rename to Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java diff --git a/Mage/src/mage/util/functions/Function.java b/Mage/src/main/java/mage/util/functions/Function.java similarity index 100% rename from Mage/src/mage/util/functions/Function.java rename to Mage/src/main/java/mage/util/functions/Function.java diff --git a/Mage/src/mage/util/trace/TraceUtil.java b/Mage/src/main/java/mage/util/trace/TraceUtil.java similarity index 100% rename from Mage/src/mage/util/trace/TraceUtil.java rename to Mage/src/main/java/mage/util/trace/TraceUtil.java diff --git a/Mage/src/mage/watchers/Watcher.java b/Mage/src/main/java/mage/watchers/Watcher.java similarity index 100% rename from Mage/src/mage/watchers/Watcher.java rename to Mage/src/main/java/mage/watchers/Watcher.java diff --git a/Mage/src/mage/watchers/Watchers.java b/Mage/src/main/java/mage/watchers/Watchers.java similarity index 100% rename from Mage/src/mage/watchers/Watchers.java rename to Mage/src/main/java/mage/watchers/Watchers.java diff --git a/Mage/src/mage/watchers/common/AmountOfDamageAPlayerReceivedThisTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/AmountOfDamageAPlayerReceivedThisTurnWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/AmountOfDamageAPlayerReceivedThisTurnWatcher.java rename to Mage/src/main/java/mage/watchers/common/AmountOfDamageAPlayerReceivedThisTurnWatcher.java diff --git a/Mage/src/mage/watchers/common/AttackedThisCombatWatcher.java b/Mage/src/main/java/mage/watchers/common/AttackedThisCombatWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/AttackedThisCombatWatcher.java rename to Mage/src/main/java/mage/watchers/common/AttackedThisCombatWatcher.java diff --git a/Mage/src/mage/watchers/common/AttackedThisTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/AttackedThisTurnWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/AttackedThisTurnWatcher.java rename to Mage/src/main/java/mage/watchers/common/AttackedThisTurnWatcher.java diff --git a/Mage/src/mage/watchers/common/BlockedAttackerWatcher.java b/Mage/src/main/java/mage/watchers/common/BlockedAttackerWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/BlockedAttackerWatcher.java rename to Mage/src/main/java/mage/watchers/common/BlockedAttackerWatcher.java diff --git a/Mage/src/mage/watchers/common/BloodthirstWatcher.java b/Mage/src/main/java/mage/watchers/common/BloodthirstWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/BloodthirstWatcher.java rename to Mage/src/main/java/mage/watchers/common/BloodthirstWatcher.java diff --git a/Mage/src/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java b/Mage/src/main/java/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java rename to Mage/src/main/java/mage/watchers/common/CardsDrawnDuringDrawStepWatcher.java diff --git a/Mage/src/mage/watchers/common/CardsPutIntoGraveyardWatcher.java b/Mage/src/main/java/mage/watchers/common/CardsPutIntoGraveyardWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/CardsPutIntoGraveyardWatcher.java rename to Mage/src/main/java/mage/watchers/common/CardsPutIntoGraveyardWatcher.java diff --git a/Mage/src/mage/watchers/common/CastFromHandWatcher.java b/Mage/src/main/java/mage/watchers/common/CastFromHandWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/CastFromHandWatcher.java rename to Mage/src/main/java/mage/watchers/common/CastFromHandWatcher.java diff --git a/Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/CastSpellLastTurnWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/CastSpellLastTurnWatcher.java rename to Mage/src/main/java/mage/watchers/common/CastSpellLastTurnWatcher.java diff --git a/Mage/src/mage/watchers/common/CommanderInfoWatcher.java b/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/CommanderInfoWatcher.java rename to Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java diff --git a/Mage/src/mage/watchers/common/CreatureWasCastWatcher.java b/Mage/src/main/java/mage/watchers/common/CreatureWasCastWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/CreatureWasCastWatcher.java rename to Mage/src/main/java/mage/watchers/common/CreatureWasCastWatcher.java diff --git a/Mage/src/mage/watchers/common/CreaturesDiedWatcher.java b/Mage/src/main/java/mage/watchers/common/CreaturesDiedWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/CreaturesDiedWatcher.java rename to Mage/src/main/java/mage/watchers/common/CreaturesDiedWatcher.java diff --git a/Mage/src/mage/watchers/common/DamageDoneWatcher.java b/Mage/src/main/java/mage/watchers/common/DamageDoneWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/DamageDoneWatcher.java rename to Mage/src/main/java/mage/watchers/common/DamageDoneWatcher.java diff --git a/Mage/src/mage/watchers/common/DamagedByWatcher.java b/Mage/src/main/java/mage/watchers/common/DamagedByWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/DamagedByWatcher.java rename to Mage/src/main/java/mage/watchers/common/DamagedByWatcher.java diff --git a/Mage/src/mage/watchers/common/DragonOnTheBattlefieldWhileSpellWasCastWatcher.java b/Mage/src/main/java/mage/watchers/common/DragonOnTheBattlefieldWhileSpellWasCastWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/DragonOnTheBattlefieldWhileSpellWasCastWatcher.java rename to Mage/src/main/java/mage/watchers/common/DragonOnTheBattlefieldWhileSpellWasCastWatcher.java diff --git a/Mage/src/mage/watchers/common/FirstTimeStepWatcher.java b/Mage/src/main/java/mage/watchers/common/FirstTimeStepWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/FirstTimeStepWatcher.java rename to Mage/src/main/java/mage/watchers/common/FirstTimeStepWatcher.java diff --git a/Mage/src/mage/watchers/common/GravestormWatcher.java b/Mage/src/main/java/mage/watchers/common/GravestormWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/GravestormWatcher.java rename to Mage/src/main/java/mage/watchers/common/GravestormWatcher.java diff --git a/Mage/src/mage/watchers/common/LandfallWatcher.java b/Mage/src/main/java/mage/watchers/common/LandfallWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/LandfallWatcher.java rename to Mage/src/main/java/mage/watchers/common/LandfallWatcher.java diff --git a/Mage/src/mage/watchers/common/ManaSpentToCastWatcher.java b/Mage/src/main/java/mage/watchers/common/ManaSpentToCastWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/ManaSpentToCastWatcher.java rename to Mage/src/main/java/mage/watchers/common/ManaSpentToCastWatcher.java diff --git a/Mage/src/mage/watchers/common/MiracleWatcher.java b/Mage/src/main/java/mage/watchers/common/MiracleWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/MiracleWatcher.java rename to Mage/src/main/java/mage/watchers/common/MiracleWatcher.java diff --git a/Mage/src/mage/watchers/common/MorbidWatcher.java b/Mage/src/main/java/mage/watchers/common/MorbidWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/MorbidWatcher.java rename to Mage/src/main/java/mage/watchers/common/MorbidWatcher.java diff --git a/Mage/src/mage/watchers/common/PlayerAttackedWatcher.java b/Mage/src/main/java/mage/watchers/common/PlayerAttackedWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/PlayerAttackedWatcher.java rename to Mage/src/main/java/mage/watchers/common/PlayerAttackedWatcher.java diff --git a/Mage/src/mage/watchers/common/PlayerCastCreatureWatcher.java b/Mage/src/main/java/mage/watchers/common/PlayerCastCreatureWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/PlayerCastCreatureWatcher.java rename to Mage/src/main/java/mage/watchers/common/PlayerCastCreatureWatcher.java diff --git a/Mage/src/mage/watchers/common/PlayerDamagedBySourceWatcher.java b/Mage/src/main/java/mage/watchers/common/PlayerDamagedBySourceWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/PlayerDamagedBySourceWatcher.java rename to Mage/src/main/java/mage/watchers/common/PlayerDamagedBySourceWatcher.java diff --git a/Mage/src/mage/watchers/common/PlayerGainedLifeWatcher.java b/Mage/src/main/java/mage/watchers/common/PlayerGainedLifeWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/PlayerGainedLifeWatcher.java rename to Mage/src/main/java/mage/watchers/common/PlayerGainedLifeWatcher.java diff --git a/Mage/src/mage/watchers/common/PlayerLostLifeWatcher.java b/Mage/src/main/java/mage/watchers/common/PlayerLostLifeWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/PlayerLostLifeWatcher.java rename to Mage/src/main/java/mage/watchers/common/PlayerLostLifeWatcher.java diff --git a/Mage/src/mage/watchers/common/ProwlWatcher.java b/Mage/src/main/java/mage/watchers/common/ProwlWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/ProwlWatcher.java rename to Mage/src/main/java/mage/watchers/common/ProwlWatcher.java diff --git a/Mage/src/mage/watchers/common/SoulbondWatcher.java b/Mage/src/main/java/mage/watchers/common/SoulbondWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/SoulbondWatcher.java rename to Mage/src/main/java/mage/watchers/common/SoulbondWatcher.java diff --git a/Mage/src/mage/watchers/common/SourceDidDamageWatcher.java b/Mage/src/main/java/mage/watchers/common/SourceDidDamageWatcher.java similarity index 100% rename from Mage/src/mage/watchers/common/SourceDidDamageWatcher.java rename to Mage/src/main/java/mage/watchers/common/SourceDidDamageWatcher.java diff --git a/Mage/src/test/java/mage/ManaSymbolTest.java b/Mage/src/test/java/mage/ManaSymbolTest.java new file mode 100644 index 00000000000..6d12ac4de4b --- /dev/null +++ b/Mage/src/test/java/mage/ManaSymbolTest.java @@ -0,0 +1,818 @@ +package mage; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Custom unit tests for {@link ManaSymbol} + */ +public class ManaSymbolTest { + @Test + public void shouldCreateWhiteManaSymbol() { + // given + + // when + ManaSymbol w = mage.ManaSymbol.W; + + // then + assertEquals("{W}", w.toString()); + assertFalse(w.isBlack()); + assertFalse(w.isBlue()); + assertFalse(w.isRed()); + assertFalse(w.isGreen()); + assertFalse(w.isColorless()); + assertFalse(w.isSnow()); + assertFalse(w.isPhyrexian()); + assertFalse(w.isGeneric()); + assertFalse(w.isHybrid()); + + assertTrue(w.isColored()); + assertTrue(w.isWhite()); + assertTrue(w.isPrimary()); + assertTrue(w.isMonocolored()); + + assertEquals(null, w.getManaSymbol1()); + assertEquals(null, w.getManaSymbol2()); + } + + @Test + public void shouldCreateBlueManaSymbol() { + // given + + // when + ManaSymbol u = ManaSymbol.U; + + // then + assertEquals("{U}", u.toString()); + assertFalse(u.isBlack()); + assertFalse(u.isWhite()); + assertFalse(u.isRed()); + assertFalse(u.isGreen()); + assertFalse(u.isColorless()); + assertFalse(u.isSnow()); + assertFalse(u.isPhyrexian()); + assertFalse(u.isGeneric()); + assertFalse(u.isHybrid()); + + assertTrue(u.isColored()); + assertTrue(u.isBlue()); + assertTrue(u.isPrimary()); + assertTrue(u.isMonocolored()); + + assertEquals(null, u.getManaSymbol1()); + assertEquals(null, u.getManaSymbol2()); + } + + + @Test + public void shouldCreateBlackManaSymbol() { + // given + + // when + ManaSymbol b = ManaSymbol.B; + + // then + assertEquals("{B}", b.toString()); + assertFalse(b.isBlue()); + assertFalse(b.isWhite()); + assertFalse(b.isRed()); + assertFalse(b.isGreen()); + assertFalse(b.isColorless()); + assertFalse(b.isSnow()); + assertFalse(b.isPhyrexian()); + assertFalse(b.isGeneric()); + assertFalse(b.isHybrid()); + + assertTrue(b.isColored()); + assertTrue(b.isBlack()); + assertTrue(b.isPrimary()); + assertTrue(b.isMonocolored()); + + assertEquals(null, b.getManaSymbol1()); + assertEquals(null, b.getManaSymbol2()); + } + + @Test + public void shouldCreateRedManaSymbol() { + // given + + // when + ManaSymbol r = ManaSymbol.R; + + // then + assertEquals("{R}", r.toString()); + assertFalse(r.isBlue()); + assertFalse(r.isWhite()); + assertFalse(r.isBlack()); + assertFalse(r.isGreen()); + assertFalse(r.isColorless()); + assertFalse(r.isSnow()); + assertFalse(r.isPhyrexian()); + assertFalse(r.isGeneric()); + assertFalse(r.isHybrid()); + + assertTrue(r.isColored()); + assertTrue(r.isRed()); + assertTrue(r.isPrimary()); + assertTrue(r.isMonocolored()); + + assertEquals(null, r.getManaSymbol1()); + assertEquals(null, r.getManaSymbol2()); + } + + + @Test + public void shouldCreateGreenManaSymbol() { + // given + + // when + ManaSymbol g = ManaSymbol.G; + + // then + assertEquals("{G}", g.toString()); + assertFalse(g.isBlue()); + assertFalse(g.isWhite()); + assertFalse(g.isBlack()); + assertFalse(g.isRed()); + assertFalse(g.isColorless()); + assertFalse(g.isSnow()); + assertFalse(g.isPhyrexian()); + assertFalse(g.isGeneric()); + assertFalse(g.isHybrid()); + + assertTrue(g.isColored()); + assertTrue(g.isGreen()); + assertTrue(g.isPrimary()); + assertTrue(g.isMonocolored()); + + assertEquals(null, g.getManaSymbol1()); + assertEquals(null, g.getManaSymbol2()); + } + + @Test + public void shouldCreateGenericManaSymbol() { + // given + + // when + ManaSymbol x = ManaSymbol.X; + + // then + assertEquals("{X}", x.toString()); + assertFalse(x.isBlue()); + assertFalse(x.isWhite()); + assertFalse(x.isBlack()); + assertFalse(x.isRed()); + assertFalse(x.isGreen()); + assertFalse(x.isColored()); + assertFalse(x.isSnow()); + assertFalse(x.isPhyrexian()); + assertFalse(x.isHybrid()); + assertFalse(x.isPrimary()); + assertFalse(x.isMonocolored()); + + assertTrue(x.isGeneric()); + assertTrue(x.isColorless()); + + assertEquals(null, x.getManaSymbol1()); + assertEquals(null, x.getManaSymbol2()); + } + + + @Test + public void shouldCreateNumericManaSymbol() { + // given + + // when + ManaSymbol numeric = ManaSymbol.NUMERIC; + + // then + assertEquals("{N/A}", numeric.toString()); + assertFalse(numeric.isBlue()); + assertFalse(numeric.isWhite()); + assertFalse(numeric.isBlack()); + assertFalse(numeric.isRed()); + assertFalse(numeric.isGreen()); + assertFalse(numeric.isColored()); + assertFalse(numeric.isSnow()); + assertFalse(numeric.isPhyrexian()); + assertFalse(numeric.isHybrid()); + assertFalse(numeric.isPrimary()); + assertFalse(numeric.isMonocolored()); + + assertTrue(numeric.isGeneric()); + assertTrue(numeric.isColorless()); + + assertEquals(null, numeric.getManaSymbol1()); + assertEquals(null, numeric.getManaSymbol2()); + } + + + @Test + public void shouldCreateMonoColoredHybridWManaSymbol() { + // given + + // when + ManaSymbol monoHybridW = ManaSymbol.MONOCOLORED_HYBRID_W; + + // then + assertEquals("{2/W}", monoHybridW.toString()); + assertFalse(monoHybridW.isBlue()); + assertFalse(monoHybridW.isBlack()); + assertFalse(monoHybridW.isRed()); + assertFalse(monoHybridW.isGreen()); + assertFalse(monoHybridW.isSnow()); + assertFalse(monoHybridW.isPhyrexian()); + assertFalse(monoHybridW.isPrimary()); + assertFalse(monoHybridW.isGeneric()); + assertFalse(monoHybridW.isColorless()); + + assertTrue(monoHybridW.isMonocolored()); + assertTrue(monoHybridW.isHybrid()); + assertTrue(monoHybridW.isWhite()); + assertTrue(monoHybridW.isColored()); + + assertEquals(ManaSymbol.W, monoHybridW.getManaSymbol1()); + assertEquals(null, monoHybridW.getManaSymbol2()); + } + + + @Test + public void shouldCreateMonoColoredHybridUManaSymbol() { + // given + + // when + ManaSymbol monoHybridU = ManaSymbol.MONOCOLORED_HYBRID_U; + + // then + assertEquals("{2/U}", monoHybridU.toString()); + assertFalse(monoHybridU.isWhite()); + assertFalse(monoHybridU.isBlack()); + assertFalse(monoHybridU.isRed()); + assertFalse(monoHybridU.isGreen()); + assertFalse(monoHybridU.isSnow()); + assertFalse(monoHybridU.isPhyrexian()); + assertFalse(monoHybridU.isPrimary()); + assertFalse(monoHybridU.isGeneric()); + assertFalse(monoHybridU.isColorless()); + + assertTrue(monoHybridU.isMonocolored()); + assertTrue(monoHybridU.isHybrid()); + assertTrue(monoHybridU.isBlue()); + assertTrue(monoHybridU.isColored()); + + assertEquals(ManaSymbol.U, monoHybridU.getManaSymbol1()); + assertEquals(null, monoHybridU.getManaSymbol2()); + } + + + @Test + public void shouldCreateMonoColoredHybridBManaSymbol() { + // given + + // when + ManaSymbol monoHybridB = ManaSymbol.MONOCOLORED_HYBRID_B; + + // then + assertEquals("{2/B}", monoHybridB.toString()); + assertFalse(monoHybridB.isBlue()); + assertFalse(monoHybridB.isWhite()); + assertFalse(monoHybridB.isRed()); + assertFalse(monoHybridB.isGreen()); + assertFalse(monoHybridB.isSnow()); + assertFalse(monoHybridB.isPhyrexian()); + assertFalse(monoHybridB.isPrimary()); + assertFalse(monoHybridB.isGeneric()); + assertFalse(monoHybridB.isColorless()); + + assertTrue(monoHybridB.isMonocolored()); + assertTrue(monoHybridB.isHybrid()); + assertTrue(monoHybridB.isBlack()); + assertTrue(monoHybridB.isColored()); + + assertEquals(ManaSymbol.B, monoHybridB.getManaSymbol1()); + assertEquals(null, monoHybridB.getManaSymbol2()); + } + + + @Test + public void shouldCreateMonoColoredHybridRManaSymbol() { + // given + + // when + ManaSymbol monoHybridR = ManaSymbol.MONOCOLORED_HYBRID_R; + + // then + assertEquals("{2/R}", monoHybridR.toString()); + assertFalse(monoHybridR.isBlack()); + assertFalse(monoHybridR.isBlue()); + assertFalse(monoHybridR.isWhite()); + assertFalse(monoHybridR.isGreen()); + assertFalse(monoHybridR.isSnow()); + assertFalse(monoHybridR.isPhyrexian()); + assertFalse(monoHybridR.isPrimary()); + assertFalse(monoHybridR.isGeneric()); + assertFalse(monoHybridR.isColorless()); + + assertTrue(monoHybridR.isMonocolored()); + assertTrue(monoHybridR.isHybrid()); + assertTrue(monoHybridR.isRed()); + assertTrue(monoHybridR.isColored()); + + assertEquals(ManaSymbol.R, monoHybridR.getManaSymbol1()); + assertEquals(null, monoHybridR.getManaSymbol2()); + } + + + @Test + public void shouldCreateMonoColoredHybridGManaSymbol() { + // given + + // when + ManaSymbol monoHybridG = ManaSymbol.MONOCOLORED_HYBRID_G; + + // then + assertEquals("{2/G}", monoHybridG.toString()); + assertFalse(monoHybridG.isBlack()); + assertFalse(monoHybridG.isBlue()); + assertFalse(monoHybridG.isWhite()); + assertFalse(monoHybridG.isRed()); + assertFalse(monoHybridG.isSnow()); + assertFalse(monoHybridG.isPhyrexian()); + assertFalse(monoHybridG.isPrimary()); + assertFalse(monoHybridG.isGeneric()); + assertFalse(monoHybridG.isColorless()); + + assertTrue(monoHybridG.isMonocolored()); + assertTrue(monoHybridG.isHybrid()); + assertTrue(monoHybridG.isGreen()); + assertTrue(monoHybridG.isColored()); + + assertEquals(ManaSymbol.G, monoHybridG.getManaSymbol1()); + assertEquals(null, monoHybridG.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridWUManaSymbol() { + // given + + // when + ManaSymbol hybridWU = ManaSymbol.HYBRID_WU; + + // then + assertEquals("{W/U}", hybridWU.toString()); + assertFalse(hybridWU.isGreen()); + assertFalse(hybridWU.isBlack()); + assertFalse(hybridWU.isRed()); + assertFalse(hybridWU.isSnow()); + assertFalse(hybridWU.isPhyrexian()); + assertFalse(hybridWU.isPrimary()); + assertFalse(hybridWU.isGeneric()); + assertFalse(hybridWU.isColorless()); + assertFalse(hybridWU.isMonocolored()); + + assertTrue(hybridWU.isWhite()); + assertTrue(hybridWU.isBlue()); + assertTrue(hybridWU.isHybrid()); + assertTrue(hybridWU.isColored()); + + assertEquals(ManaSymbol.W, hybridWU.getManaSymbol1()); + assertEquals(ManaSymbol.U, hybridWU.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridWBManaSymbol() { + // given + + // when + ManaSymbol hybridWB = ManaSymbol.HYBRID_WB; + + // then + assertEquals("{W/B}", hybridWB.toString()); + assertFalse(hybridWB.isBlue()); + assertFalse(hybridWB.isGreen()); + assertFalse(hybridWB.isRed()); + assertFalse(hybridWB.isSnow()); + assertFalse(hybridWB.isPhyrexian()); + assertFalse(hybridWB.isPrimary()); + assertFalse(hybridWB.isGeneric()); + assertFalse(hybridWB.isColorless()); + assertFalse(hybridWB.isMonocolored()); + + assertTrue(hybridWB.isWhite()); + assertTrue(hybridWB.isBlack()); + assertTrue(hybridWB.isHybrid()); + assertTrue(hybridWB.isColored()); + + assertEquals(ManaSymbol.W, hybridWB.getManaSymbol1()); + assertEquals(ManaSymbol.B, hybridWB.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridUBManaSymbol() { + // given + + // when + ManaSymbol hybridUB = ManaSymbol.HYBRID_UB; + + // then + assertEquals("{U/B}", hybridUB.toString()); + assertFalse(hybridUB.isWhite()); + assertFalse(hybridUB.isGreen()); + assertFalse(hybridUB.isRed()); + assertFalse(hybridUB.isSnow()); + assertFalse(hybridUB.isPhyrexian()); + assertFalse(hybridUB.isPrimary()); + assertFalse(hybridUB.isGeneric()); + assertFalse(hybridUB.isColorless()); + assertFalse(hybridUB.isMonocolored()); + + assertTrue(hybridUB.isBlue()); + assertTrue(hybridUB.isBlack()); + assertTrue(hybridUB.isHybrid()); + assertTrue(hybridUB.isColored()); + + assertEquals(ManaSymbol.U, hybridUB.getManaSymbol1()); + assertEquals(ManaSymbol.B, hybridUB.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridURManaSymbol() { + // given + + // when + ManaSymbol hybridUR = ManaSymbol.HYBRID_UR; + + // then + assertEquals("{U/R}", hybridUR.toString()); + assertFalse(hybridUR.isBlack()); + assertFalse(hybridUR.isWhite()); + assertFalse(hybridUR.isGreen()); + assertFalse(hybridUR.isSnow()); + assertFalse(hybridUR.isPhyrexian()); + assertFalse(hybridUR.isPrimary()); + assertFalse(hybridUR.isGeneric()); + assertFalse(hybridUR.isColorless()); + assertFalse(hybridUR.isMonocolored()); + + assertTrue(hybridUR.isBlue()); + assertTrue(hybridUR.isRed()); + assertTrue(hybridUR.isHybrid()); + assertTrue(hybridUR.isColored()); + + assertEquals(ManaSymbol.U, hybridUR.getManaSymbol1()); + assertEquals(ManaSymbol.R, hybridUR.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridBRManaSymbol() { + // given + + // when + ManaSymbol hybridBR = ManaSymbol.HYBRID_BR; + + // then + assertEquals("{B/R}", hybridBR.toString()); + assertFalse(hybridBR.isBlue()); + assertFalse(hybridBR.isWhite()); + assertFalse(hybridBR.isGreen()); + assertFalse(hybridBR.isSnow()); + assertFalse(hybridBR.isPhyrexian()); + assertFalse(hybridBR.isPrimary()); + assertFalse(hybridBR.isGeneric()); + assertFalse(hybridBR.isColorless()); + assertFalse(hybridBR.isMonocolored()); + + assertTrue(hybridBR.isBlack()); + assertTrue(hybridBR.isRed()); + assertTrue(hybridBR.isHybrid()); + assertTrue(hybridBR.isColored()); + + assertEquals(ManaSymbol.B, hybridBR.getManaSymbol1()); + assertEquals(ManaSymbol.R, hybridBR.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridBGManaSymbol() { + // given + + // when + ManaSymbol hybridBG = ManaSymbol.HYBRID_BG; + + // then + assertEquals("{B/G}", hybridBG.toString()); + assertFalse(hybridBG.isRed()); + assertFalse(hybridBG.isBlue()); + assertFalse(hybridBG.isWhite()); + assertFalse(hybridBG.isSnow()); + assertFalse(hybridBG.isPhyrexian()); + assertFalse(hybridBG.isPrimary()); + assertFalse(hybridBG.isGeneric()); + assertFalse(hybridBG.isColorless()); + assertFalse(hybridBG.isMonocolored()); + + assertTrue(hybridBG.isBlack()); + assertTrue(hybridBG.isGreen()); + assertTrue(hybridBG.isHybrid()); + assertTrue(hybridBG.isColored()); + + assertEquals(ManaSymbol.B, hybridBG.getManaSymbol1()); + assertEquals(ManaSymbol.G, hybridBG.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridRGManaSymbol() { + // given + + // when + ManaSymbol hybridRG = ManaSymbol.HYBRID_RG; + + // then + assertEquals("{R/G}", hybridRG.toString()); + assertFalse(hybridRG.isBlack()); + assertFalse(hybridRG.isBlue()); + assertFalse(hybridRG.isWhite()); + assertFalse(hybridRG.isSnow()); + assertFalse(hybridRG.isPhyrexian()); + assertFalse(hybridRG.isPrimary()); + assertFalse(hybridRG.isGeneric()); + assertFalse(hybridRG.isColorless()); + assertFalse(hybridRG.isMonocolored()); + + assertTrue(hybridRG.isRed()); + assertTrue(hybridRG.isGreen()); + assertTrue(hybridRG.isHybrid()); + assertTrue(hybridRG.isColored()); + + assertEquals(ManaSymbol.R, hybridRG.getManaSymbol1()); + assertEquals(ManaSymbol.G, hybridRG.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridRWManaSymbol() { + // given + + // when + ManaSymbol hybridRW = ManaSymbol.HYBRID_RW; + + // then + assertEquals("{R/W}", hybridRW.toString()); + assertFalse(hybridRW.isGreen()); + assertFalse(hybridRW.isBlack()); + assertFalse(hybridRW.isBlue()); + assertFalse(hybridRW.isSnow()); + assertFalse(hybridRW.isPhyrexian()); + assertFalse(hybridRW.isPrimary()); + assertFalse(hybridRW.isGeneric()); + assertFalse(hybridRW.isColorless()); + assertFalse(hybridRW.isMonocolored()); + + assertTrue(hybridRW.isRed()); + assertTrue(hybridRW.isWhite()); + assertTrue(hybridRW.isHybrid()); + assertTrue(hybridRW.isColored()); + + assertEquals(ManaSymbol.R, hybridRW.getManaSymbol1()); + assertEquals(ManaSymbol.W, hybridRW.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridGWManaSymbol() { + // given + + // when + ManaSymbol hybridGW = ManaSymbol.HYBRID_GW; + + // then + assertEquals("{G/W}", hybridGW.toString()); + assertFalse(hybridGW.isRed()); + assertFalse(hybridGW.isBlack()); + assertFalse(hybridGW.isBlue()); + assertFalse(hybridGW.isSnow()); + assertFalse(hybridGW.isPhyrexian()); + assertFalse(hybridGW.isPrimary()); + assertFalse(hybridGW.isGeneric()); + assertFalse(hybridGW.isColorless()); + assertFalse(hybridGW.isMonocolored()); + + assertTrue(hybridGW.isGreen()); + assertTrue(hybridGW.isWhite()); + assertTrue(hybridGW.isHybrid()); + assertTrue(hybridGW.isColored()); + + assertEquals(ManaSymbol.G, hybridGW.getManaSymbol1()); + assertEquals(ManaSymbol.W, hybridGW.getManaSymbol2()); + } + + + @Test + public void shouldCreateHybridGUManaSymbol() { + // given + + // when + ManaSymbol hybridGU = ManaSymbol.HYBRID_GU; + + // then + assertEquals("{G/U}", hybridGU.toString()); + assertFalse(hybridGU.isWhite()); + assertFalse(hybridGU.isRed()); + assertFalse(hybridGU.isBlack()); + assertFalse(hybridGU.isSnow()); + assertFalse(hybridGU.isPhyrexian()); + assertFalse(hybridGU.isPrimary()); + assertFalse(hybridGU.isGeneric()); + assertFalse(hybridGU.isColorless()); + assertFalse(hybridGU.isMonocolored()); + + assertTrue(hybridGU.isGreen()); + assertTrue(hybridGU.isBlue()); + assertTrue(hybridGU.isHybrid()); + assertTrue(hybridGU.isColored()); + + assertEquals(ManaSymbol.G, hybridGU.getManaSymbol1()); + assertEquals(ManaSymbol.U, hybridGU.getManaSymbol2()); + } + + + @Test + public void shouldCreateWPhyrexianMana() { + // given + + // when + ManaSymbol phyW = ManaSymbol.PHYREXIAN_W; + + // then + assertEquals("{W/P}", phyW.toString()); + assertFalse(phyW.isGreen()); + assertFalse(phyW.isBlue()); + assertFalse(phyW.isRed()); + assertFalse(phyW.isBlack()); + assertFalse(phyW.isPrimary()); + assertFalse(phyW.isGeneric()); + assertFalse(phyW.isColorless()); + assertFalse(phyW.isHybrid()); + assertFalse(phyW.isSnow()); + + assertTrue(phyW.isWhite()); + assertTrue(phyW.isPhyrexian()); + assertTrue(phyW.isColored()); + assertTrue(phyW.isMonocolored()); + + assertEquals(ManaSymbol.W, phyW.getManaSymbol1()); + assertEquals(null, phyW.getManaSymbol2()); + } + + + @Test + public void shouldCreateGPhyrexianMana() { + // given + + // when + ManaSymbol phyG = ManaSymbol.PHYREXIAN_G; + + // then + assertEquals("{G/P}", phyG.toString()); + assertFalse(phyG.isWhite()); + assertFalse(phyG.isBlue()); + assertFalse(phyG.isRed()); + assertFalse(phyG.isBlack()); + assertFalse(phyG.isPrimary()); + assertFalse(phyG.isGeneric()); + assertFalse(phyG.isColorless()); + assertFalse(phyG.isHybrid()); + assertFalse(phyG.isSnow()); + + assertTrue(phyG.isGreen()); + assertTrue(phyG.isPhyrexian()); + assertTrue(phyG.isColored()); + assertTrue(phyG.isMonocolored()); + + assertEquals(ManaSymbol.G, phyG.getManaSymbol1()); + assertEquals(null, phyG.getManaSymbol2()); + } + + + @Test + public void shouldCreateRPhyrexianMana() { + // given + + // when + ManaSymbol phyR = ManaSymbol.PHYREXIAN_R; + + // then + assertEquals("{R/P}", phyR.toString()); + assertFalse(phyR.isGreen()); + assertFalse(phyR.isWhite()); + assertFalse(phyR.isBlue()); + assertFalse(phyR.isBlack()); + assertFalse(phyR.isPrimary()); + assertFalse(phyR.isGeneric()); + assertFalse(phyR.isColorless()); + assertFalse(phyR.isHybrid()); + assertFalse(phyR.isSnow()); + + assertTrue(phyR.isRed()); + assertTrue(phyR.isPhyrexian()); + assertTrue(phyR.isColored()); + assertTrue(phyR.isMonocolored()); + + assertEquals(ManaSymbol.R, phyR.getManaSymbol1()); + assertEquals(null, phyR.getManaSymbol2()); + } + + + @Test + public void shouldCreateBPhyrexianMana() { + // given + + // when + ManaSymbol phyB = ManaSymbol.PHYREXIAN_B; + + // then + assertEquals("{B/P}", phyB.toString()); + assertFalse(phyB.isRed()); + assertFalse(phyB.isGreen()); + assertFalse(phyB.isWhite()); + assertFalse(phyB.isBlue()); + assertFalse(phyB.isPrimary()); + assertFalse(phyB.isGeneric()); + assertFalse(phyB.isColorless()); + assertFalse(phyB.isHybrid()); + assertFalse(phyB.isSnow()); + + assertTrue(phyB.isBlack()); + assertTrue(phyB.isPhyrexian()); + assertTrue(phyB.isColored()); + assertTrue(phyB.isMonocolored()); + + assertEquals(ManaSymbol.B, phyB.getManaSymbol1()); + assertEquals(null, phyB.getManaSymbol2()); + } + + + @Test + public void shouldCreateUPhyrexianMana() { + // given + + // when + ManaSymbol phyU = ManaSymbol.PHYREXIAN_U; + + // then + assertEquals("{U/P}", phyU.toString()); + assertFalse(phyU.isBlack()); + assertFalse(phyU.isRed()); + assertFalse(phyU.isGreen()); + assertFalse(phyU.isWhite()); + assertFalse(phyU.isPrimary()); + assertFalse(phyU.isGeneric()); + assertFalse(phyU.isColorless()); + assertFalse(phyU.isHybrid()); + assertFalse(phyU.isSnow()); + + assertTrue(phyU.isBlue()); + assertTrue(phyU.isPhyrexian()); + assertTrue(phyU.isColored()); + assertTrue(phyU.isMonocolored()); + + assertEquals(ManaSymbol.U, phyU.getManaSymbol1()); + assertEquals(null, phyU.getManaSymbol2()); + } + + + @Test + public void shouldCreateSnowMana() { + // given + + // when + ManaSymbol snow = ManaSymbol.SNOW; + + // then + assertEquals("{S}", snow.toString()); + assertFalse(snow.isGreen()); + assertFalse(snow.isBlue()); + assertFalse(snow.isWhite()); + assertFalse(snow.isRed()); + assertFalse(snow.isBlack()); + assertFalse(snow.isPhyrexian()); + assertFalse(snow.isPrimary()); + assertFalse(snow.isGeneric()); + assertFalse(snow.isColorless()); + assertFalse(snow.isMonocolored()); + assertFalse(snow.isHybrid()); + assertFalse(snow.isColored()); + + assertTrue(snow.isSnow()); + + assertEquals(null, snow.getManaSymbol1()); + assertEquals(null, snow.getManaSymbol2()); + } +} \ No newline at end of file diff --git a/Mage/src/test/java/mage/ManaTest.java b/Mage/src/test/java/mage/ManaTest.java new file mode 100644 index 00000000000..796c3c55d79 --- /dev/null +++ b/Mage/src/test/java/mage/ManaTest.java @@ -0,0 +1,647 @@ +package mage; + +import static junit.framework.TestCase.assertFalse; +import mage.constants.ColoredManaSymbol; +import mage.constants.ManaType; +import mage.filter.FilterMana; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +/** + * Custom unit tests for {link Mana}. + * + * @author githubpoixen@github.com + */ +public class ManaTest { + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + + @Test + public void shouldNotAllowNullCopyConstructor() { + // given + expectedException.expect(NullPointerException.class); + expectedException.expectMessage("The passed in mana can not be null"); + + // when + Mana nullMana = null; + new Mana(nullMana); + } + + @Test + public void shouldCreateManaFromCopy() { + // given + Mana original = new Mana(); + original.increaseBlack(); + + // when + Mana copy = new Mana(original); + + // then + assertEquals(0, copy.getGreen()); + assertEquals(0, copy.getRed()); + assertEquals(1, copy.getBlack()); + assertEquals(0, copy.getBlue()); + assertEquals(0, copy.getWhite()); + } + + @Test + public void shouldCreateManaFromGreenColoredManaSymbol() { + // given + ColoredManaSymbol symbol = ColoredManaSymbol.G; + + // when + Mana mana = new Mana(symbol); + + // then + assertEquals(1, mana.getGreen()); + assertEquals(0, mana.getRed()); + assertEquals(0, mana.getBlack()); + assertEquals(0, mana.getBlue()); + assertEquals(0, mana.getWhite()); + } + + @Test + public void shouldCreateManaFromRedColoredManaSymbol() { + // given + ColoredManaSymbol symbol = ColoredManaSymbol.R; + + // when + Mana mana = new Mana(symbol); + + // then + assertEquals(0, mana.getGreen()); + assertEquals(1, mana.getRed()); + assertEquals(0, mana.getBlack()); + assertEquals(0, mana.getBlue()); + assertEquals(0, mana.getWhite()); + } + + @Test + public void shouldCreateManaFromBlackColoredManaSymbol() { + // given + ColoredManaSymbol symbol = ColoredManaSymbol.B; + + // when + Mana mana = new Mana(symbol); + + // then + assertEquals(0, mana.getGreen()); + assertEquals(0, mana.getRed()); + assertEquals(1, mana.getBlack()); + assertEquals(0, mana.getBlue()); + assertEquals(0, mana.getWhite()); + } + + @Test + public void shouldCreateManaFromBlueColoredManaSymbol() { + // given + ColoredManaSymbol symbol = ColoredManaSymbol.U; + + // when + Mana mana = new Mana(symbol); + + // then + assertEquals(0, mana.getGreen()); + assertEquals(0, mana.getRed()); + assertEquals(0, mana.getBlack()); + assertEquals(1, mana.getBlue()); + assertEquals(0, mana.getWhite()); + } + + @Test + public void shouldCreateManaFromWhiteColoredManaSymbol() { + // given + ColoredManaSymbol symbol = ColoredManaSymbol.W; + + // when + Mana mana = new Mana(symbol); + + // then + assertEquals(0, mana.getGreen()); + assertEquals(0, mana.getRed()); + assertEquals(0, mana.getBlack()); + assertEquals(0, mana.getBlue()); + assertEquals(1, mana.getWhite()); + } + + @Test + public void shouldNotCreateManaFromNullColoredManaSymbol() { + // given + ColoredManaSymbol nullSymbol = null; + + expectedException.expect(NullPointerException.class); + expectedException.expectMessage("The passed in ColoredManaSymbol can not be null"); + + // when + new Mana(nullSymbol); + } + + @Test + public void shouldCreateManaFromIntegers() { + + // when + Mana mana = new Mana(1, 2, 3, 4, 5, 6, 7); + + // then + assertEquals(1, mana.getRed()); + assertEquals(2, mana.getGreen()); + assertEquals(3, mana.getBlue()); + assertEquals(4, mana.getWhite()); + assertEquals(5, mana.getBlack()); + assertEquals(6, mana.getColorless()); + assertEquals(7, mana.getAny()); + } + + @Test + public void shouldNotAllowNegativeIntegers() { + // given + + // when + Mana mana = new Mana(-1, 2, 3, 4, 5, 6, 7); + + // then + assertEquals(0, mana.getRed()); + } + + @Test + public void shouldCreateRedMana() { + + // when + Mana mana = Mana.RedMana(1); + + // then + assertEquals(1, mana.getRed()); + } + + @Test + public void shouldCreateGreenMana() { + + // when + Mana mana = Mana.GreenMana(1); + + // then + assertEquals(1, mana.getGreen()); + } + + @Test + public void shouldCreateBlueMana() { + + // when + Mana mana = Mana.BlueMana(1); + + // then + assertEquals(1, mana.getBlue()); + } + + @Test + public void shouldCreateWhiteMana() { + + // when + Mana mana = Mana.WhiteMana(1); + + // then + assertEquals(1, mana.getWhite()); + } + + @Test + public void shouldCreateBlackMana() { + + // when + Mana mana = Mana.BlackMana(1); + + // then + assertEquals(1, mana.getBlack()); + } + + @Test + public void shouldCreateColorlessMana() { + + // when + Mana mana = Mana.ColorlessMana(1); + + // then + assertEquals(1, mana.getColorless()); + } + + @Test + public void shouldNotAllowNegativeRedMana() { + // given + + // when + Mana mana = Mana.RedMana(-1); + + //then + assertEquals(0, mana.getRed()); + } + + @Test + public void shouldNotAllowNegativeGreenMana() { + // given + + // when + Mana mana = Mana.GreenMana(-1); + + //then + assertEquals(0, mana.getGreen()); + } + + @Test + public void shouldNotAllowNegativeBlueMana() { + // given + + // when + Mana mana = Mana.BlueMana(-1); + + //then + assertEquals(0, mana.getBlue()); + } + + @Test + public void shouldNotAllowNegativeWhiteMana() { + // given + + // when + Mana mana = Mana.WhiteMana(-1); + + //then + assertEquals(0, mana.getWhite()); + } + + @Test + public void shouldNotAllowNegativeBlackMana() { + // given + + // when + Mana mana = Mana.BlackMana(-1); + + //then + assertEquals(0, mana.getBlack()); + } + + @Test + public void shouldNotAllowNegativeColorlessMana() { + // given + + // when + Mana mana = Mana.ColorlessMana(-1); + + //then + assertEquals(0, mana.getColorless()); + } + + @Test + public void shouldAddMana() { + // given + Mana thisMana = new Mana(1, 2, 3, 4, 5, 6, 7); + Mana thatMana = new Mana(1, 2, 3, 4, 5, 6, 7); + + // when + thisMana.add(thatMana); + + // then + assertEquals(2, thisMana.getRed()); + assertEquals(4, thisMana.getGreen()); + assertEquals(6, thisMana.getBlue()); + assertEquals(8, thisMana.getWhite()); + assertEquals(10, thisMana.getBlack()); + assertEquals(12, thisMana.getColorless()); + assertEquals(14, thisMana.getAny()); + } + + @Test + public void shouldIncreaseRedMana() { + // given + Mana mana = new Mana(); + + // when + mana.increaseRed(); + + // then + assertEquals(1, mana.getRed()); + } + + @Test + public void shouldIncreaseGreenMana() { + // given + Mana mana = new Mana(); + + // when + mana.increaseGreen(); + + // then + assertEquals(1, mana.getGreen()); + } + + @Test + public void shouldIncreaseBlueMana() { + // given + Mana mana = new Mana(); + + // when + mana.increaseBlue(); + + // then + assertEquals(1, mana.getBlue()); + } + + @Test + public void shouldIncreaseWhiteMana() { + // given + Mana mana = new Mana(); + + // when + mana.increaseWhite(); + + // then + assertEquals(1, mana.getWhite()); + } + + @Test + public void shouldIncreaseBlackMana() { + // given + Mana mana = new Mana(); + + // when + mana.increaseBlack(); + + // then + assertEquals(1, mana.getBlack()); + } + + @Test + public void shouldIncreaseColorlessMana() { + // given + Mana mana = new Mana(); + + // when + mana.increaseColorless(); + + // then + assertEquals(1, mana.getColorless()); + } + + @Test + public void shouldSubtractMana() { + // given + Mana thisMana = new Mana(2, 2, 2, 2, 2, 2, 2); + Mana thatMana = new Mana(1, 1, 1, 1, 1, 1, 1); + + // when + thisMana.subtract(thatMana); + + // then + assertEquals(1, thisMana.getRed()); + assertEquals(1, thisMana.getGreen()); + assertEquals(1, thisMana.getBlue()); + assertEquals(1, thisMana.getWhite()); + assertEquals(1, thisMana.getBlack()); + assertEquals(1, thisMana.getColorless()); + assertEquals(1, thisMana.getAny()); + } + + @Test + public void shouldSubtractCost() { + // given + Mana thisMana = new Mana(2, 2, 2, 2, 2, 2, 2); + Mana thatMana = new Mana(10, 1, 1, 1, 10, 1, 1); + + // when + thisMana.subtractCost(thatMana); + + // then + assertEquals(-8, thisMana.getRed()); + assertEquals(1, thisMana.getGreen()); + assertEquals(1, thisMana.getBlue()); + assertEquals(1, thisMana.getWhite()); + assertEquals(-8, thisMana.getBlack()); + assertEquals(1, thisMana.getColorless()); + assertEquals(1, thisMana.getAny()); + } + + @Test + public void shouldUseExistingManaToPayColorless() { + // given + Mana available = new Mana(); + available.setRed(7); + + Mana cost = new Mana(); + cost.setRed(4); + cost.setColorless(2); + + // when + available.subtractCost(cost); + + // then + assertEquals(1, available.getRed()); + } + + @Test + public void shouldThrowExceptionOnUnavailableColorless() { + // given + expectedException.expect(ArithmeticException.class); + expectedException.expectMessage("Not enough mana to pay colorless"); + Mana available = new Mana(); + available.setRed(4); + + Mana cost = new Mana(); + cost.setRed(4); + cost.setColorless(2); + + // when + available.subtractCost(cost); + } + + @Test + public void shouldReturnCount() { + // given + Mana mana = new Mana(1, 2, 3, 4, 5, 6, 7); + FilterMana filter = new FilterMana(); + filter.setBlack(true); + + // when + int totalCount = mana.count(); + int coloredCount = mana.countColored(); + int filteredMana = mana.count(filter); + + // then + assertEquals(28, totalCount); + assertEquals(22, coloredCount); + assertEquals(5, filteredMana); + } + + @Test + public void shouldReturnString() { + // given + Mana mana = new Mana(1, 2, 3, 0, 3, 6, 2); + + // when + String ret = mana.toString(); + + // then + assertEquals("{6}{R}{G}{G}{U}{U}{U}{B}{B}{B}{Any}{Any}", ret); + } + + @Test + public void shouldClearMana() { + // given + Mana mana = new Mana(1, 2, 3, 4, 5, 6, 7); + + // when + mana.clear(); + + // then + assertEquals(0, mana.getRed()); + assertEquals(0, mana.getGreen()); + assertEquals(0, mana.getBlue()); + assertEquals(0, mana.getWhite()); + assertEquals(0, mana.getBlack()); + assertEquals(0, mana.getColorless()); + assertEquals(0, mana.getAny()); + } + + @Test + public void shouldReturnCopy() { + // given + Mana mana = new Mana(1, 2, 3, 4, 5, 6, 7); + + // when + Mana copy = mana.copy(); + + // then + assertEquals(mana, copy); // are equal + assertFalse(mana == copy); // are not the same object + } + + @Test + public void shouldGetColorByColoredManaSymbol() { + // given + Mana mana = new Mana(1, 1, 1, 1, 1, 1, 1); + + // when + int redMana = mana.getColor(ColoredManaSymbol.R); + int greenMana = mana.getColor(ColoredManaSymbol.G); + int blueMana = mana.getColor(ColoredManaSymbol.U); + int blackMana = mana.getColor(ColoredManaSymbol.B); + int whiteMana = mana.getColor(ColoredManaSymbol.W); + + // then + assertEquals(1, redMana); + assertEquals(1, greenMana); + assertEquals(1, blueMana); + assertEquals(1, blackMana); + assertEquals(1, whiteMana); + } + + @Test + public void shouldGetColorByManaType() { + // given + Mana mana = new Mana(1, 1, 1, 1, 1, 1, 1); + + // when + int redMana = mana.get(ManaType.RED); + int greenMana = mana.get(ManaType.GREEN); + int blueMana = mana.get(ManaType.BLUE); + int blackMana = mana.get(ManaType.BLACK); + int whiteMana = mana.get(ManaType.WHITE); + int colorlessMana = mana.get(ManaType.COLORLESS); + + // then + assertEquals(1, redMana); + assertEquals(1, greenMana); + assertEquals(1, blueMana); + assertEquals(1, blackMana); + assertEquals(1, whiteMana); + assertEquals(1, colorlessMana); + } + + @Test + public void shouldSetManaFromType() { + // given + Mana mana = new Mana(); + + // when + mana.set(ManaType.BLACK, 3); + mana.set(ManaType.BLUE, 4); + mana.set(ManaType.RED, 5); + mana.set(ManaType.GREEN, 6); + mana.set(ManaType.WHITE, 7); + mana.set(ManaType.COLORLESS, 8); + + // then + assertEquals(3, mana.getBlack()); + assertEquals(4, mana.getBlue()); + assertEquals(5, mana.getRed()); + assertEquals(6, mana.getGreen()); + assertEquals(7, mana.getWhite()); + assertEquals(8, mana.getColorless()); + } + + @Test + public void shouldSetToMana() { + // given + Mana mana = new Mana(); + Mana newMana = new Mana(1, 2, 3, 4, 5, 6, 7); + + // when + mana.setToMana(newMana); + + // then + assertEquals(mana, newMana); + assertFalse(mana == newMana); + } + + @Test + public void shouldHaveEqualManaValue() { + // given + Mana mana = new Mana(1, 2, 3, 4, 5, 6, 7); + Mana newMana = new Mana(1, 2, 3, 4, 5, 6, 7); + + // when + boolean equalMana = mana.equalManaValue(newMana); + + // then + assertTrue(equalMana); + } + + @Test + public void shouldGetDifferentColors() { + // given + Mana mana = new Mana(); + mana.setRed(3); + mana.setGreen(2); + + // when + int colors = mana.getDifferentColors(); + + // then + assertEquals(2, colors); + } + + @Test + public void shouldNotSetManaLessThanZero() { + // given + Mana mana = new Mana(); + + // when + mana.setRed(-4); + mana.setGreen(-4); + mana.setBlue(-4); + mana.setWhite(-4); + mana.setBlack(-4); + mana.setColorless(-4); + mana.setAny(-4); + + // then + assertEquals(0, mana.getRed()); + assertEquals(0, mana.getGreen()); + assertEquals(0, mana.getBlue()); + assertEquals(0, mana.getWhite()); + assertEquals(0, mana.getBlack()); + assertEquals(0, mana.getColorless()); + assertEquals(0, mana.getAny()); + } +} diff --git a/Mage/src/test/java/mage/counters/CounterTest.java b/Mage/src/test/java/mage/counters/CounterTest.java new file mode 100644 index 00000000000..77bb39cf010 --- /dev/null +++ b/Mage/src/test/java/mage/counters/CounterTest.java @@ -0,0 +1,135 @@ +package mage.counters; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Custom unit tests for {@link Counter} + */ +public class CounterTest { + + private Counter counter; + + @Before + public void setUp() { + counter = new Counter("test", 1); + } + + + @Test + public void shouldIncreaseCounter() { + // given + + // when + counter.increase(); + + // then + assertEquals(2, counter.getCount()); + assertEquals("test", counter.getName()); + } + + + @Test + public void shouldAddMana() { + // given + + // when + counter.add(5); + + // then + assertEquals(6, counter.getCount()); + } + + + @Test + public void shouldDecreaseCounter() { + // given + + + // when + counter.decrease(); + + // then + assertEquals(0, counter.getCount()); + } + + + @Test + public void shouldNotDecreaseToLessThanZero() { + // given + + // when + counter.decrease(); + counter.decrease(); + + // then + assertEquals(0, counter.getCount()); + } + + + @Test + public void shouldRemoveCounters() { + // given + + + // when + counter.remove(1); + + // then + assertEquals(0, counter.getCount()); + } + + + @Test + public void shouldNotRemoveMoreCountersThanAvailable() { + // given + + // when + counter.remove(10); + + // then + assertEquals(0, counter.getCount()); + } + + + @Test + public void shouldReturnCopy() { + // given + + // when + Counter copy = counter.copy(); + + // then + assertEquals(copy, counter); + assertFalse(copy == counter); + } + + + @Test + public void shouldCreateCounterFromCounter() { + // given + + // when + Counter copy = new Counter(counter); + + // then + assertEquals(1, copy.getCount()); + assertEquals("test", copy.getName()); + } + + + @Test + public void shouldCreatDefaultCounter() { + // given + + + // when + Counter defaultCounter = new Counter("default"); + + // then + assertEquals(1, defaultCounter.getCount()); + assertEquals("default", defaultCounter.getName()); + } +} \ No newline at end of file diff --git a/Utils/keywords.txt b/Utils/keywords.txt index dd3fd7f5942..72f53816774 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -44,6 +44,7 @@ Miracle|cost| Mountaincycling|cost| Mountainwalk|new| Morph|card, cost| +Myriad|new| Outlast|cost| Persist|new| Phasing|instance| diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index a63078e0d91..c3690d3d626 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -4,17 +4,22 @@ Antiquities|antiquities| Apocalypse|apocalypse| Archenemy|archenemy| Arabian Nights|arabiannights| +Arena League|arenaleague| +Asia Pacific Land Program|asiapacificlandprogram| Avacyn Restored|avacynrestored| Battle for Zendikar|battleforzendikar| Betrayers of Kamigawa|betrayersofkamigawa| Born of the Gods|bornofthegods| Champions of Kamigawa|championsofkamigawa| +Champs|champs| +Chronicles|chronicles| Clash Pack|clashpack| Classic Sixth Edition|classicsixthedition| Coldsnap|coldsnap| Commander 2013 Edition|commander2013| Commander 2014 Edition|commander2014| Commander 2015|commander2015| +Commander's Arsenal|commandersarsenal| Conflux|conflux| Dark Ascension|darkascension| Darksteel|darksteel| @@ -42,6 +47,7 @@ Duel Decks: Speed vs. Cunning|speedvscunning| Duel Decks: Venser vs. Koth|venservskoth| Duel Decks: Zendikar vs. Eldrazi|zendikarvseldrazi| Eighth Edition|eighthedition| +European Land Program|europeanlandprogram| Eventide|eventide| Exodus|exodus| Fallen Empires|fallenempires| @@ -130,6 +136,7 @@ Shards of Alara|shardsofalara| Starter 1999|starter1999| Starter 2000|starter2000| Stronghold|stronghold| +Super Series|superseries| Tempest|tempest| Tempest Remastered|tempestremastered| Tenth Edition|tenthedition| @@ -138,6 +145,7 @@ Theros|theros| Time Spiral "Timeshifted"|timeshifted| Time Spiral|timespiral| Torment|torment| +Ugin's Fate|uginsfate| Unlimited Edition|unlimitededition| Urza's Destiny|urzasdestiny| Urza's Legacy|urzaslegacy| diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 5845fd2d74b..434f6a364bc 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -5895,6 +5895,8 @@ Orator of Ojutai|Friday Night Magic|184|U|{1}{W}|Creature - Bird Monk|0|4|Defned Ultimate Price|Friday Night Magic|185|U|{1}{B}|Instant|||Destroy target monocolored creature.| Roast|Friday Night Magic|186|U|{1}{R}|Sorcery|||Roast deals 5 damage to target creature without flying.| Anticipate|Friday Night Magic|186|C|{1}{U}|Instant|||Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.| +Nissa's Pilgrimage|Friday Night Magic|187|C|{2}{G}|Sorcery|||Search your library for up to two basic Forest cards, reveal those cards, and put one onto the battlefield tapped and the rest into your hand. Then shuffle your library.$Spell Mastery — If there are two or more instant and/or sorcery cards in your graveyard, search your library for up to three basic Forest cards instead of two.| +Clash of Wills|Friday Night Magic|188|U|{X}{U}|Instant|||Counter target spell unless its controller pays {X}.| Angel of Salvation|Future Sight|1|R|{6}{W}{W}|Creature - Angel|5|5|Flash; convoke (Each creature you tap while casting this spell reduces its cost by {1} or by one mana of that creature's color.)$Flying$When Angel of Salvation enters the battlefield, prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.| Knight of Sursi|Future Sight|10|C|{3}{W}|Creature - Human Knight|2|2|Flying; flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.)$Suspend 3-{W} (Rather than cast this card from your hand, you may pay {W} and exile it with three time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.)| Haze of Rage|Future Sight|100|U|{1}{R}|Sorcery|||Buyback {2} (You may pay an additional {2} as you cast this spell. If you do, put this card into your hand as it resolves.)$Creatures you control get +1/+0 until end of turn.$Storm (When you cast this spell, copy it for each spell cast before it this turn.)| @@ -7813,11 +7815,14 @@ Island|Judge Promo|90|L||Land|||({T}: Add {U} to your mana pool.)| Swamp|Judge Promo|91|L||Land|||({T}: Add {B} to your mana pool.)| Mountain|Judge Promo|92|L||Land|||({T}: Add {R} to your mana pool.)| Forest|Judge Promo|93|L||Land|||({T}: Add {G} to your mana pool.)| -Damnation|Judge Promo|94|R|{2}{B}{B}|Sorcery|||Destroy all creatures. They can't be regenerated.| -Dualcaster Mage|Judge Promo|95|R|{1}{R}{R}|Creature - Human Wizard|2|2|Flash$When Dualcaster Mage enters the battlefield, copy target instant or sorcery spell. You may choose new targets for the copy.| -Feldon of the Third Path|Judge Promo|96|M|{1}{R}{R}|Legendary Creature - Human Artificer|2|3|{2}{R}, {tap}: Put a token onto the battlefield 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.| +Temporal Manipulation|94|R|{3}{U}{U}|Sorcery|||Take an extra turn after this one.| +Shardless Agent|Judge Promo|95|U|{1}{G}{U}|Artifact Creature - Human Rogue|2|2|Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)| +Rishadan Port|Judge Promo|96|R||Land|||{tap}: Add {1} to your mana pool.$${1}, {tap}: Tap target land.| Ravages of War|Judge Promo|97|R|{3}{W}|Sorcery|||Destroy all lands.| -Rishadan Port|Judge Promo|98|R||Land|||{tap}: Add {1} to your mana pool.$${1}, {tap}: Tap target land.| +Damnation|Judge Promo|98|R|{2}{B}{B}|Sorcery|||Destroy all creatures. They can't be regenerated.| +Dualcaster Mage|Judge Promo|99|R|{1}{R}{R}|Creature - Human Wizard|2|2|Flash$When Dualcaster Mage enters the battlefield, copy target instant or sorcery spell. You may choose new targets for the copy.| +Feldon of the Third Path|Judge Promo|100|M|{1}{R}{R}|Legendary Creature - Human Artificer|2|3|{2}{R}, {tap}: Put a token onto the battlefield 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.| +Wasteland|Judge Promo|101|U||Land|||{T}: Add {1} to your mana pool.${T}, Sacrifice Wasteland: Destroy target nonbasic land.| Ancestor's Chosen|Judgment|1|U|{5}{W}{W}|Creature - Human Cleric|4|4|First strike (This creature deals combat damage before creatures without first strike.)$When Ancestor's Chosen enters the battlefield, you gain 1 life for each card in your graveyard.| Funeral Pyre|Judgment|10|C|{W}|Instant|||Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield.| Spellgorger Barbarian|Judgment|100|C|{3}{R}|Creature - Human Nightmare Barbarian|3|1|When Spellgorger Barbarian enters the battlefield, discard a card at random.$When Spellgorger Barbarian leaves the battlefield, draw a card.| @@ -14899,117 +14904,188 @@ Cavern Harpy|Planeshift|97|C|{U}{B}|Creature - Harpy Beast|2|1|Flying$When Caver Cloud Cover|Planeshift|98|R|{2}{W}{U}|Enchantment|||Whenever another permanent you control becomes the target of a spell or ability an opponent controls, you may return that permanent to its owner's hand.| Crosis's Charm|Planeshift|99|U|{U}{B}{R}|Instant|||Choose one - Return target permanent to its owner's hand; or destroy target nonblack creature, and it can't be regenerated; or destroy target artifact.| Arrogant Vampire|Portal|1|U|{3}{B}{B}|Creature - Vampire|4|3|Flying| +Assassin's Blade|Portal|2|U|{1}{B}|Instant|||Cast Assassin's Blade only during the declare attackers step and only if you've been attacked this step.$Destroy target nonblack attacking creature.| +Bog Imp|Portal|3|C|{1}{B}|Creature - Imp|1|1|Flying (This creature can't be blocked except by creatures with flying or reach.)| +Bog Raiders|Portal|4|C|{2}{B}|Creature - Zombie|2|2|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| +Bog Wraith|Portal|5|U|{3}{B}|Creature - Wraith|3|3|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| +Charging Bandits|Portal|6|U|{4}{B}|Creature - Human Rogue|3|3|Whenever Charging Bandits attacks, it gets +2/+0 until end of turn.| +Craven Knight|Portal|7|C|{1}{B}|Creature - Human Knight|2|2|Craven Knight can't block.| +Cruel Bargain|Portal|8|R|{B}{B}{B}|Sorcery|||Draw four cards. You lose half your life, rounded up.| +Cruel Tutor|Portal|9|R|{2}{B}|Sorcery|||Search your library for a card, then shuffle your library and put that card on top of it. You lose 2 life.| Dread Charge|Portal|10|R|{3}{B}|Sorcery|||Until end of turn, black creatures you control can be blocked only by black creatures.| +Dread Reaper|Portal|11|R|{3}{B}{B}{B}|Creature - Horror|6|5|Flying$When Dread Reaper enters the battlefield, you lose 5 life.| +Dry Spell|Portal|12|U|{1}{B}|Sorcery|||Dry Spell deals 1 damage to each creature and each player.| +Ebon Dragon|Portal|13|R|{5}{B}{B}|Creature - Dragon|5|4|Flying$When Ebon Dragon enters the battlefield, you may have target opponent discard a card.| +Endless Cockroaches|Portal|14|R|{1}{B}{B}|Creature - Insect|1|1|When Endless Cockroaches dies, return it to its owner's hand.| +Feral Shadow|Portal|15|C|{2}{B}|Creature - Nightstalker|2|1|Flying| +Final Strike|Portal|16|R|{2}{B}{B}|Sorcery|||As an additional cost to cast Final Strike, sacrifice a creature.$Final Strike deals damage to target opponent equal to the sacrificed creature's power.| +Gravedigger|Portal|17|U|{3}{B}|Creature - Zombie|2|2|When Gravedigger enters the battlefield, you may return target creature card from your graveyard to your hand.| +Hand of Death|Portal|18|C|{2}{B}|Sorcery|||Destroy target nonblack creature.| +Hand of Death|Portal|19|C|{2}{B}|Sorcery|||Destroy target nonblack creature.| +Howling Fury|Portal|20|C|{2}{B}|Sorcery|||Target creature gets +4/+0 until end of turn.| +King's Assassin|Portal|21|R|{1}{B}{B}|Creature - Human Assassin|1|1|{tap}: Destroy target tapped creature. Activate this ability only during your turn, before attackers are declared.| +Mercenary Knight|Portal|22|R|{2}{B}|Creature - Human Mercenary Knight|4|4|When Mercenary Knight enters the battlefield, sacrifice it unless you discard a creature card.| +Mind Knives|Portal|23|C|{1}{B}|Sorcery|||Target opponent discards a card at random.| +Mind Rot|Portal|24|C|{2}{B}|Sorcery|||Target player discards two cards.| +Muck Rats|Portal|25|C|{B}|Creature - Rat|1|1|| +Nature's Ruin|Portal|26|U|{2}{B}|Sorcery|||Destroy all green creatures.| +Noxious Toad|Portal|27|U|{2}{B}|Creature - Frog|1|1|When Noxious Toad dies, each opponent discards a card.| +Python|Portal|28|C|{1}{B}{B}|Creature - Snake|3|2|| +Rain of Tears|Portal|29|U|{1}{B}{B}|Sorcery|||Destroy target land.| +Raise Dead|Portal|30|C|{B}|Sorcery|||Return target creature card from your graveyard to your hand.| +Serpent Assassin|Portal|31|R|{3}{B}{B}|Creature - Snake Assassin|2|2|When Serpent Assassin enters the battlefield, you may destroy target nonblack creature.| +Serpent Warrior|Portal|32|C|{2}{B}|Creature - Snake Warrior|3|3|When Serpent Warrior enters the battlefield, you lose 3 life.| +Skeletal Crocodile|Portal|33|C|{3}{B}|Creature - Crocodile Skeleton|5|1|| +Skeletal Snake|Portal|34|C|{1}{B}|Creature - Snake Skeleton|2|1|| +Soul Shred|Portal|35|C|{3}{B}{B}|Sorcery|||Soul Shred deals 3 damage to target nonblack creature. You gain 3 life.| +Undying Beast|Portal|36|C|{3}{B}|Creature - Beast|3|2|When Undying Beast dies, put it on top of its owner's library.| +Vampiric Feast|Portal|37|U|{5}{B}{B}|Sorcery|||Vampiric Feast deals 4 damage to target creature or player and you gain 4 life.| +Vampiric Touch|Portal|38|C|{2}{B}|Sorcery|||Vampiric Touch deals 2 damage to target opponent and you gain 2 life.| +Virtue's Ruin|Portal|39|U|{2}{B}|Sorcery|||Destroy all white creatures.| +Wicked Pact|Portal|40|R|{1}{B}{B}|Sorcery|||Destroy two target nonblack creatures. You lose 5 life.| +Ancestral Memories|Portal|41|R|{2}{U}{U}{U}|Sorcery|||Look at the top seven cards of your library. Put two of them into your hand and the rest into your graveyard.| +Balance of Power|Portal|42|R|{3}{U}{U}|Sorcery|||If target opponent has more cards in hand than you, draw cards equal to the difference.| +Baleful Stare|Portal|43|U|{2}{U}|Sorcery|||Target opponent reveals his or her hand. You draw a card for each Mountain and red card in it.| +Capricious Sorcerer|Portal|44|R|{2}{U}|Creature - Human Wizard|1|1|{tap}: Capricious Sorcerer deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared.| +Cloak of Feathers|Portal|45|C|{U}|Sorcery|||Target creature gains flying until end of turn.$$Draw a card.| +Cloud Dragon|Portal|46|R|{5}{U}|Creature - Illusion Dragon|5|4|Flying$Cloud Dragon can block only creatures with flying.| +Cloud Pirates|Portal|47|C|{U}|Creature - Human Pirate|1|1|Flying$Cloud Pirates can block only creatures with flying.| +Cloud Spirit|Portal|48|U|{2}{U}|Creature - Spirit|3|1|Flying$Cloud Spirit can block only creatures with flying.| +Command of Unsummoning|Portal|49|U|{2}{U}|Instant|||Cast Command of Unsummoning only during the declare attackers step and only if you've been attacked this step.$Return one or two target attacking creatures to their owner's hand.| +Coral Eel|Portal|50|C|{1}{U}|Creature - Fish|2|1|| +Cruel Fate|Portal|51|R|{4}{U}|Sorcery|||Look at the top five cards of target opponent's library. Put one of those cards into that player's graveyard and the rest on top of his or her library in any order.| +Deep-Sea Serpent|Portal|52|U|{4}{U}{U}|Creature - Serpent|5|5|Deep-Sea Serpent can't attack unless defending player controls an Island.| +Deja Vu|Portal|53|C|{2}{U}|Sorcery|||Return target sorcery card from your graveyard to your hand.| +Djinn of the Lamp|Portal|54|R|{5}{U}{U}|Creature - Djinn|5|6|Flying| +Exhaustion|Portal|55|R|{2}{U}|Sorcery|||Creatures and lands target opponent controls don't untap during his or her next untap step.| +Flux|Portal|56|U|{2}{U}|Sorcery|||Each player discards any number of cards, then draws that many cards.$Draw a card.| +Giant Octopus|Portal|57|C|{3}{U}|Creature - Octopus|3|3|| +Horned Turtle|Portal|58|C|{2}{U}|Creature - Turtle|1|4|| +Ingenious Thief|Portal|59|U|{1}{U}|Creature - Human Rogue|1|1|Flying$When Ingenious Thief enters the battlefield, look at target player's hand.| +Man-o'-War|Portal|60|U|{2}{U}|Creature - Jellyfish|2|2|When Man-o'-War enters the battlefield, return target creature to its owner's hand.| +Merfolk of the Pearl Trident|Portal|61|C|{U}|Creature - Merfolk|1|1|| +Mystic Denial|Portal|62|U|{1}{U}{U}|Instant|||Counter target creature or sorcery spell.| +Omen|Portal|63|C|{1}{U}|Sorcery|||Look at the top three cards of your library, then put them back in any order. You may shuffle your library.$Draw a card.| +Owl Familiar|Portal|64|C|{1}{U}|Creature - Bird|1|1|Flying$When Owl Familiar enters the battlefield, draw a card, then discard a card.| +Personal Tutor|Portal|65|U|{U}|Sorcery|||Search your library for a sorcery card and reveal that card. Shuffle your library, then put the card on top of it.| +Phantom Warrior|Portal|66|R|{1}{U}{U}|Creature - Illusion Warrior|2|2|Phantom Warrior is unblockable.| +Prosperity|Portal|67|R|{X}{U}|Sorcery|||Each player draws X cards.| +Snapping Drake|Portal|68|C|{3}{U}|Creature - Drake|3|2|Flying| +Sorcerous Sight|Portal|69|C|{U}|Sorcery|||Look at target opponent's hand.$$Draw a card.| +Storm Crow|Portal|70|C|{1}{U}|Creature - Bird|1|2|Flying (This creature can't be blocked except by creatures with flying or reach.)| +Symbol of Unsummoning|Portal|71|C|{2}{U}|Sorcery|||Return target creature to its owner's hand.$$Draw a card.| +Taunt|Portal|72|R|{U}|Sorcery|||During target player's next turn, creatures that player controls attack you if able.| +Theft of Dreams|Portal|73|U|{2}{U}|Sorcery|||Draw a card for each tapped creature target opponent controls.| +Thing from the Deep|Portal|74|R|{6}{U}{U}{U}|Creature - Leviathan|9|9|Whenever Thing from the Deep attacks, sacrifice it unless you sacrifice an Island.| +Tidal Surge|Portal|75|C|{1}{U}|Sorcery|||Tap up to three target creatures without flying.| +Time Ebb|Portal|76|C|{2}{U}|Sorcery|||Put target creature on top of its owner's library.| +Touch of Brilliance|Portal|77|C|{3}{U}|Sorcery|||Draw two cards.| +Wind Drake|Portal|78|C|{2}{U}|Creature - Drake|2|2|Flying| +Withering Gaze|Portal|79|U|{2}{U}|Sorcery|||Target opponent reveals his or her hand. You draw a card for each Forest and green card in it.| +Alluring Scent|Portal|80|R|{1}{G}{G}|Sorcery|||All creatures able to block target creature this turn do so.| +Anaconda|Portal|81|U|{3}{G}|Creature - Snake|3|3|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| +Anaconda|Portal|82|U|{3}{G}|Creature - Snake|3|3|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| +Bee Sting|Portal|83|U|{3}{G}|Sorcery|||Bee Sting deals 2 damage to target creature or player.| +Bull Hippo|Portal|84|U|{3}{G}|Creature - Hippo|3|3|Islandwalk| +Charging Rhino|Portal|85|R|{3}{G}{G}|Creature - Rhino|4|4|Charging Rhino can't be blocked by more than one creature.| +Deep Wood|Portal|86|U|{1}{G}|Instant|||Cast Deep Wood only during the declare attackers step and only if you've been attacked this step.$Prevent all damage that would be dealt to you this turn by attacking creatures.| +Elite Cat Warrior|Portal|87|C|{2}{G}|Creature - Cat Warrior|2|3|Forestwalk| +Elite Cat Warrior|Portal|88|C|{2}{G}|Creature - Cat Warrior|2|3|Forestwalk| +Elven Cache|Portal|89|C|{2}{G}{G}|Sorcery|||Return target card from your graveyard to your hand.| +Elvish Ranger|Portal|90|C|{2}{G}|Creature - Elf|4|1|| +Fruition|Portal|91|C|{G}|Sorcery|||You gain 1 life for each Forest on the battlefield.| +Giant Spider|Portal|92|C|{3}{G}|Creature - Spider|2|4|Reach (This creature can block creatures with flying.)| +Gorilla Warrior|Portal|93|C|{2}{G}|Creature - Ape Warrior|3|2|| +Grizzly Bears|Portal|94|C|{1}{G}|Creature - Bear|2|2|| +Hurricane|Portal|95|R|{X}{G}|Sorcery|||Hurricane deals X damage to each creature with flying and each player.| +Jungle Lion|Portal|96|C|{G}|Creature - Cat|2|1|Jungle Lion can't block.| +Mobilize|Portal|97|C|{G}|Sorcery|||Untap all creatures you control.| +Monstrous Growth|Portal|98|C|{1}{G}|Sorcery|||Target creature gets +4/+4 until end of turn.| +Monstrous Growth|Portal|99|C|{1}{G}|Sorcery|||Target creature gets +4/+4 until end of turn.| Moon Sprite|Portal|100|U|{1}{G}|Creature - Faerie|1|1|Flying| Natural Order|Portal|101|R|{2}{G}{G}|Sorcery|||As an additional cost to cast Natural Order, sacrifice a green creature.$Search your library for a green creature card and put it onto the battlefield. Then shuffle your library.| -Mountain|Portal|101|L||Basic Land - Mountain|||R| -Mountain|Portal|101|L||Basic Land - Mountain|||R| -Mountain|Portal|101|L||Basic Land - Mountain|||R| -Mountain|Portal|101|L||Basic Land - Mountain|||R| -Blaze|Portal|102|U|{X}{R}|Sorcery|||Blaze deals X damage to target creature or player.| -Blaze|Portal|102|U|{X}{R}|Sorcery|||Blaze deals X damage to target creature or player.| +Natural Spring|Portal|102|U|{3}{G}{G}|Sorcery|||Target player gains 8 life.| Nature's Cloak|Portal|103|R|{2}{G}|Sorcery|||Green creatures you control gain forestwalk until end of turn.| +Nature's Lore|Portal|104|C|{1}{G}|Sorcery|||Search your library for a Forest card and put that card onto the battlefield. Then shuffle your library.| Needle Storm|Portal|105|U|{2}{G}|Sorcery|||Needle Storm deals 4 damage to each creature with flying.| Panther Warriors|Portal|106|C|{4}{G}|Creature - Cat Warrior|6|3|| Plant Elemental|Portal|107|U|{1}{G}|Creature - Plant Elemental|3|4|When Plant Elemental enters the battlefield, sacrifice it unless you sacrifice a Forest.| -Lava Axe|Portal|107|C|{4}{R}|Sorcery|||Lava Axe deals 5 damage to target player.| Primeval Force|Portal|108|R|{2}{G}{G}{G}|Creature - Elemental|8|8|When Primeval Force enters the battlefield, sacrifice it unless you sacrifice three Forests.| Redwood Treefolk|Portal|109|C|{4}{G}|Creature - Treefolk|3|6|| -Dread Reaper|Portal|11|R|{3}{B}{B}{B}|Creature - Horror|6|5|Flying$When Dread Reaper enters the battlefield, you lose 5 life.| Rowan Treefolk|Portal|110|C|{3}{G}|Creature - Treefolk|3|4|| Spined Wurm|Portal|111|C|{4}{G}|Creature - Wurm|5|4|| +Stalking Tiger|Portal|112|C|{3}{G}|Creature - Cat|3|3|Stalking Tiger can't be blocked by more than one creature.| Summer Bloom|Portal|113|R|{1}{G}|Sorcery|||You may play up to three additional lands this turn.| Sylvan Tutor|Portal|114|R|{G}|Sorcery|||Search your library for a creature card and reveal that card. Shuffle your library, then put the card on top of it.| -Raging Goblin|Portal|114|C|{R}|Creature - Goblin Berserker|1|1|Haste (This creature can attack and {tap} as soon as it comes under your control.)| -Raging Goblin|Portal|114|C|{R}|Creature - Goblin Berserker|1|1|Haste (This creature can attack and {tap} as soon as it comes under your control.)| Thundering Wurm|Portal|115|R|{2}{G}|Creature - Wurm|4|4|When Thundering Wurm enters the battlefield, sacrifice it unless you discard a land card.| Treetop Defense|Portal|116|R|{1}{G}|Instant|||Cast Treetop Defense only during the declare attackers step and only if you've been attacked this step.$Creatures you control gain reach until end of turn. (They can block creatures with flying.)| -Spitting Earth|Portal|116|C|{1}{R}|Sorcery|||Spitting Earth deals damage to target creature equal to the number of Mountains you control.| +Untamed Wilds|Portal|117|U|{2}{G}|Sorcery|||Search your library for a basic land card and put that card onto the battlefield. Then shuffle your library.| Whiptail Wurm|Portal|118|U|{6}{G}|Creature - Wurm|8|5|| Willow Dryad|Portal|119|C|{G}|Creature - Dryad|1|1|Forestwalk| -Volcanic Hammer|Portal|119|C|{1}{R}|Sorcery|||Volcanic Hammer deals 3 damage to target creature or player.| -Dry Spell|Portal|12|U|{1}{B}|Sorcery|||Dry Spell deals 1 damage to each creature and each player.| Winter's Grasp|Portal|120|U|{1}{G}{G}|Sorcery|||Destroy target land.| Wood Elves|Portal|121|R|{2}{G}|Creature - Elf Scout|1|1|When Wood Elves enters the battlefield, search your library for a Forest card and put that card onto the battlefield. Then shuffle your library.| -Stone Rain|Portal|123|C|{2}{R}|Sorcery|||Destroy target land.| +Blaze|Portal|122|U|{X}{R}|Sorcery|||Blaze deals X damage to target creature or player.| +Blaze|Portal|123|U|{X}{R}|Sorcery|||Blaze deals X damage to target creature or player.| Boiling Seas|Portal|124|U|{3}{R}|Sorcery|||Destroy all Islands.| Burning Cloak|Portal|125|C|{R}|Sorcery|||Target creature gets +2/+0 until end of turn. Burning Cloak deals 2 damage to that creature.| Craven Giant|Portal|126|C|{2}{R}|Creature - Giant|4|1|Craven Giant can't block.| Desert Drake|Portal|127|U|{3}{R}|Creature - Drake|2|2|Flying| Devastation|Portal|128|R|{5}{R}{R}|Sorcery|||Destroy all creatures and lands.| -Fire Dragon|Portal|129|R|{6}{R}{R}{R}|Creature - Dragon|6|6|Flying$When Fire Dragon enters the battlefield, it deals damage equal to the number of Mountains you control to target creature.| -Angelic Blessing|Portal|129|C|{2}{W}|Sorcery|||Target creature gets +3/+3 and gains flying until end of turn. (It can't be blocked except by creatures with flying or reach.)| -Ebon Dragon|Portal|13|R|{5}{B}{B}|Creature - Dragon|5|4|Flying$When Ebon Dragon enters the battlefield, you may have target opponent discard a card.| +Earthquake|Portal|129|R|{X}{R}|Sorcery|||Earthquake deals X damage to each creature without flying and each player.| +Fire Dragon|Portal|130|R|{6}{R}{R}{R}|Creature - Dragon|6|6|Flying$When Fire Dragon enters the battlefield, it deals damage equal to the number of Mountains you control to target creature.| Fire Imp|Portal|131|U|{2}{R}|Creature - Imp|2|1|When Fire Imp enters the battlefield, it deals 2 damage to target creature.| -Archangel|Portal|131|R|{5}{W}{W}|Creature - Angel|5|5|Flying, vigilance| Fire Snake|Portal|132|C|{4}{R}|Creature - Snake|3|1|When Fire Snake dies, destroy target land.| -Armageddon|Portal|132|R|{3}{W}|Sorcery|||Destroy all lands.| Fire Tempest|Portal|133|R|{5}{R}{R}|Sorcery|||Fire Tempest deals 6 damage to each creature and each player.| Flashfires|Portal|134|U|{3}{R}|Sorcery|||Destroy all Plains.| Forked Lightning|Portal|135|R|{3}{R}|Sorcery|||Forked Lightning deals 4 damage divided as you choose among one, two, or three target creatures.| -Breath of Life|Portal|135|C|{3}{W}|Sorcery|||Return target creature card from your graveyard to the battlefield.| Goblin Bully|Portal|136|C|{1}{R}|Creature - Goblin|2|1|| Highland Giant|Portal|137|C|{2}{R}{R}|Creature - Giant|3|4|| Hill Giant|Portal|138|C|{3}{R}|Creature - Giant|3|3|| -Path of Peace|Portal|138|C|{3}{W}|Sorcery|||Destroy target creature. Its owner gains 4 life.| Hulking Cyclops|Portal|139|U|{3}{R}{R}|Creature - Cyclops|5|5|Hulking Cyclops can't block.| -Endless Cockroaches|Portal|14|R|{1}{B}{B}|Creature - Insect|1|1|When Endless Cockroaches dies, return it to its owner's hand.| -Hand of Death|Portal|14|C|{2}{B}|Sorcery|||Destroy target nonblack creature.| -Hand of Death|Portal|14|C|{2}{B}|Sorcery|||Destroy target nonblack creature.| Hulking Goblin|Portal|140|C|{1}{R}|Creature - Goblin|2|2|Hulking Goblin can't block.| Last Chance|Portal|141|R|{R}{R}|Sorcery|||Take an extra turn after this one. At the beginning of that turn's end step, you lose the game.| +Lava Axe|Portal|142|C|{4}{R}|Sorcery|||Lava Axe deals 5 damage to target player.| Lava Flow|Portal|143|U|{3}{R}{R}|Sorcery|||Destroy target creature or land.| Lizard Warrior|Portal|144|C|{3}{R}|Creature - Lizard Warrior|4|2|| Minotaur Warrior|Portal|145|C|{2}{R}|Creature - Minotaur Warrior|2|3|| Mountain Goat|Portal|146|U|{R}|Creature - Goat|1|1|Mountainwalk| Pillaging Horde|Portal|147|R|{2}{R}{R}|Creature - Human Barbarian|5|5|When Pillaging Horde enters the battlefield, sacrifice it unless you discard a card at random.| Pyroclasm|Portal|148|R|{1}{R}|Sorcery|||Pyroclasm deals 2 damage to each creature.| -Stalking Tiger|Portal|149|C|{3}{G}|Creature - Cat|3|3|Stalking Tiger can't be blocked by more than one creature.| Raging Cougar|Portal|149|C|{2}{R}|Creature - Cat|2|2|Haste| -Feral Shadow|Portal|15|C|{2}{B}|Creature - Nightstalker|2|1|Flying| +Raging Goblin|Portal|150|C|{R}|Creature - Goblin Berserker|1|1|Haste (This creature can attack and {tap} as soon as it comes under your control.)| +Raging Goblin|Portal|151|C|{R}|Creature - Goblin Berserker|1|1|Haste (This creature can attack and {tap} as soon as it comes under your control.)| Raging Minotaur|Portal|152|C|{2}{R}{R}|Creature - Minotaur Berserker|3|3|Haste| Rain of Salt|Portal|153|U|{4}{R}{R}|Sorcery|||Destroy two target lands.| Scorching Spear|Portal|154|C|{R}|Sorcery|||Scorching Spear deals 1 damage to target creature or player.| Scorching Winds|Portal|155|U|{R}|Instant|||Cast Scorching Winds only during the declare attackers step and only if you've been attacked this step.$Scorching Winds deals 1 damage to each attacking creature.| +Spitting Earth|Portal|156|C|{1}{R}|Sorcery|||Spitting Earth deals damage to target creature equal to the number of Mountains you control.| +Stone Rain|Portal|157|C|{2}{R}|Sorcery|||Destroy target land.| Thundermare|Portal|158|R|{5}{R}|Creature - Elemental Horse|5|5|Haste (This creature can attack the turn it comes under your control.)$When Thundermare enters the battlefield, tap all other creatures.| Volcanic Dragon|Portal|159|R|{4}{R}{R}|Creature - Dragon|4|4|Flying$Haste (This creature can attack and {tap} as soon as it comes under your control.)| -Final Strike|Portal|16|R|{2}{B}{B}|Sorcery|||As an additional cost to cast Final Strike, sacrifice a creature.$Final Strike deals damage to target opponent equal to the sacrificed creature's power.| +Volcanic Hammer|Portal|160|C|{1}{R}|Sorcery|||Volcanic Hammer deals 3 damage to target creature or player.| Wall of Granite|Portal|161|U|{2}{R}|Creature - Wall|0|7|Defender (This creature can't attack.)| Winds of Change|Portal|162|R|{R}|Sorcery|||Each player shuffles the cards from his or her hand into his or her library, then draws that many cards.| Alabaster Dragon|Portal|163|R|{4}{W}{W}|Creature - Dragon|4|4|Flying$When Alabaster Dragon dies, shuffle it into its owner's library.| +Angelic Blessing|Portal|164|C|{2}{W}|Sorcery|||Target creature gets +3/+3 and gains flying until end of turn. (It can't be blocked except by creatures with flying or reach.)| +Archangel|Portal|165|R|{5}{W}{W}|Creature - Angel|5|5|Flying, vigilance| Ardent Militia|Portal|166|U|{4}{W}|Creature - Human Soldier|2|5|Vigilance| -Plains|Portal|166|L||Basic Land - Plains|||W| -Plains|Portal|166|L||Basic Land - Plains|||W| -Plains|Portal|166|L||Basic Land - Plains|||W| -Plains|Portal|166|L||Basic Land - Plains|||W| +Armageddon|Portal|167|R|{3}{W}|Sorcery|||Destroy all lands.| Armored Pegasus|Portal|168|C|{1}{W}|Creature - Pegasus|1|2|Flying| Blessed Reversal|Portal|169|R|{1}{W}|Instant|||You gain 3 life for each creature attacking you.| -Island|Portal|169|L||Basic Land - Island|||U| -Island|Portal|169|L||Basic Land - Island|||U| -Island|Portal|169|L||Basic Land - Island|||U| -Island|Portal|169|L||Basic Land - Island|||U| -Gravedigger|Portal|17|U|{3}{B}|Creature - Zombie|2|2|When Gravedigger enters the battlefield, you may return target creature card from your graveyard to your hand.| Blinding Light|Portal|170|R|{2}{W}|Sorcery|||Tap all nonwhite creatures.| Border Guard|Portal|171|C|{2}{W}|Creature - Human Soldier|1|4|| -Swamp|Portal|172|L||Basic Land - Swamp|||B| -Swamp|Portal|172|L||Basic Land - Swamp|||B| -Swamp|Portal|172|L||Basic Land - Swamp|||B| -Swamp|Portal|172|L||Basic Land - Swamp|||B| +Breath of Life|Portal|172|C|{3}{W}|Sorcery|||Return target creature card from your graveyard to the battlefield.| Charging Paladin|Portal|173|U|{2}{W}|Creature - Human Knight|2|2|Whenever Charging Paladin attacks, it gets +0/+3 until end of turn.| Defiant Stand|Portal|174|U|{1}{W}|Instant|||Cast Defiant Stand only during the declare attackers step and only if you've been attacked this step.$Target creature gets +1/+3 until end of turn. Untap that creature.| Devoted Hero|Portal|175|C|{W}|Creature - Elf Soldier|1|2|| False Peace|Portal|176|C|{W}|Sorcery|||Target player skips all combat phases of his or her next turn.| Fleet-Footed Monk|Portal|177|C|{1}{W}|Creature - Human Monk|1|1|Fleet-Footed Monk can't be blocked by creatures with power 2 or greater.| Foot Soldiers|Portal|178|C|{3}{W}|Creature - Human Soldier|2|4|| -Forest|Portal|178|L||Basic Land - Forest|||G| -Forest|Portal|178|L||Basic Land - Forest|||G| -Forest|Portal|178|L||Basic Land - Forest|||G| -Forest|Portal|178|L||Basic Land - Forest|||G| Gift of Estates|Portal|179|R|{1}{W}|Sorcery|||If an opponent controls more lands than you, search your library for up to three Plains cards, reveal them, and put them into your hand. Then shuffle your library.| -Mind Rot|Portal|18|C|{2}{B}|Sorcery|||Target player discards two cards.| Harsh Justice|Portal|180|R|{2}{W}|Instant|||Cast Harsh Justice only during the declare attackers step and only if you've been attacked this step.$This turn, whenever an attacking creature deals combat damage to you, it deals that much damage to its controller.| Keen-Eyed Archers|Portal|181|C|{2}{W}|Creature - Elf Archer|2|2|Reach (This creature can block creatures with flying.)| Knight Errant|Portal|182|C|{1}{W}|Creature - Human Knight|2|2|| +Path of Peace|Portal|183|C|{3}{W}|Sorcery|||Destroy target creature. Its owner gains 4 life.| Regal Unicorn|Portal|184|C|{2}{W}|Creature - Unicorn|2|3|| Renewing Dawn|Portal|185|U|{1}{W}|Sorcery|||You gain 2 life for each Mountain target opponent controls.| Sacred Knight|Portal|186|C|{3}{W}|Creature - Human Knight|3|2|Sacred Knight can't be blocked by black and/or red creatures.| @@ -15024,102 +15100,31 @@ Stern Marshal|Portal|194|R|{2}{W}|Creature - Human Soldier|2|2|{tap}: Target cre Temporary Truce|Portal|195|R|{1}{W}|Sorcery|||Each player may draw up to two cards. For each card less than two a player draws this way, that player gains 2 life.| Valorous Charge|Portal|196|U|{1}{W}{W}|Sorcery|||White creatures get +2/+0 until end of turn.| Venerable Monk|Portal|197|U|{2}{W}|Creature - Human Monk Cleric|2|2|When Venerable Monk enters the battlefield, you gain 2 life.| +Vengeance|Portal|198|U|{3}{W}|Sorcery|||Destroy target tapped creature.| Wall of Swords|Portal|199|U|{3}{W}|Creature - Wall|3|5|Defender, flying (This creature can't attack, and it can block creatures with flying.)| -Assassin's Blade|Portal|2|U|{1}{B}|Instant|||Cast Assassin's Blade only during the declare attackers step and only if you've been attacked this step.$Destroy target nonblack attacking creature.| -Howling Fury|Portal|20|C|{2}{B}|Sorcery|||Target creature gets +4/+0 until end of turn.| -Muck Rats|Portal|20|C|{B}|Creature - Rat|1|1|| -Warrior's Charge|Portal|200|C|{2}{W}|Sorcery|||Creatures you control get +1/+1 until end of turn.| Warrior's Charge|Portal|200|C|{2}{W}|Sorcery|||Creatures you control get +1/+1 until end of turn.| +Warrior's Charge|Portal|201|C|{2}{W}|Sorcery|||Creatures you control get +1/+1 until end of turn.| Wrath of God|Portal|202|R|{2}{W}{W}|Sorcery|||Destroy all creatures. They can't be regenerated.| -King's Assassin|Portal|21|R|{1}{B}{B}|Creature - Human Assassin|1|1|{tap}: Destroy target tapped creature. Activate this ability only during your turn, before attackers are declared.| -Mercenary Knight|Portal|22|R|{2}{B}|Creature - Human Mercenary Knight|4|4|When Mercenary Knight enters the battlefield, sacrifice it unless you discard a creature card.| -Mind Knives|Portal|23|C|{1}{B}|Sorcery|||Target opponent discards a card at random.| -Nature's Ruin|Portal|26|U|{2}{B}|Sorcery|||Destroy all green creatures.| -Raise Dead|Portal|26|C|{B}|Sorcery|||Return target creature card from your graveyard to your hand.| -Noxious Toad|Portal|27|U|{2}{B}|Creature - Frog|1|1|When Noxious Toad dies, each opponent discards a card.| -Python|Portal|28|C|{1}{B}{B}|Creature - Snake|3|2|| -Vengeance|Portal|28|U|{3}{W}|Sorcery|||Destroy target tapped creature.| -Rain of Tears|Portal|29|U|{1}{B}{B}|Sorcery|||Destroy target land.| -Bog Imp|Portal|3|C|{1}{B}|Creature - Imp|1|1|Flying (This creature can't be blocked except by creatures with flying or reach.)| -Cloud Pirates|Portal|3|C|{U}|Creature - Human Pirate|1|1|Flying$Cloud Pirates can block only creatures with flying.| -Serpent Assassin|Portal|31|R|{3}{B}{B}|Creature - Snake Assassin|2|2|When Serpent Assassin enters the battlefield, you may destroy target nonblack creature.| -Serpent Warrior|Portal|32|C|{2}{B}|Creature - Snake Warrior|3|3|When Serpent Warrior enters the battlefield, you lose 3 life.| -Skeletal Crocodile|Portal|33|C|{3}{B}|Creature - Crocodile Skeleton|5|1|| -Skeletal Snake|Portal|34|C|{1}{B}|Creature - Snake Skeleton|2|1|| -Balance of Power|Portal|34|R|{3}{U}{U}|Sorcery|||If target opponent has more cards in hand than you, draw cards equal to the difference.| -Soul Shred|Portal|35|C|{3}{B}{B}|Sorcery|||Soul Shred deals 3 damage to target nonblack creature. You gain 3 life.| -Undying Beast|Portal|36|C|{3}{B}|Creature - Beast|3|2|When Undying Beast dies, put it on top of its owner's library.| -Vampiric Feast|Portal|37|U|{5}{B}{B}|Sorcery|||Vampiric Feast deals 4 damage to target creature or player and you gain 4 life.| -Vampiric Touch|Portal|38|C|{2}{B}|Sorcery|||Vampiric Touch deals 2 damage to target opponent and you gain 2 life.| -Virtue's Ruin|Portal|39|U|{2}{B}|Sorcery|||Destroy all white creatures.| -Bog Raiders|Portal|4|C|{2}{B}|Creature - Zombie|2|2|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| -Wicked Pact|Portal|40|R|{1}{B}{B}|Sorcery|||Destroy two target nonblack creatures. You lose 5 life.| -Ancestral Memories|Portal|41|R|{2}{U}{U}{U}|Sorcery|||Look at the top seven cards of your library. Put two of them into your hand and the rest into your graveyard.| -Mystic Denial|Portal|41|U|{1}{U}{U}|Instant|||Counter target creature or sorcery spell.| -Exhaustion|Portal|42|R|{2}{U}|Sorcery|||Creatures and lands target opponent controls don't untap during his or her next untap step.| -Baleful Stare|Portal|43|U|{2}{U}|Sorcery|||Target opponent reveals his or her hand. You draw a card for each Mountain and red card in it.| -Capricious Sorcerer|Portal|44|R|{2}{U}|Creature - Human Wizard|1|1|{tap}: Capricious Sorcerer deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared.| -Cloak of Feathers|Portal|45|C|{U}|Sorcery|||Target creature gains flying until end of turn.$$Draw a card.| -Cloud Dragon|Portal|46|R|{5}{U}|Creature - Illusion Dragon|5|4|Flying$Cloud Dragon can block only creatures with flying.| -Cloud Spirit|Portal|48|U|{2}{U}|Creature - Spirit|3|1|Flying$Cloud Spirit can block only creatures with flying.| -Command of Unsummoning|Portal|49|U|{2}{U}|Instant|||Cast Command of Unsummoning only during the declare attackers step and only if you've been attacked this step.$Return one or two target attacking creatures to their owner's hand.| -Bog Wraith|Portal|5|U|{3}{B}|Creature - Wraith|3|3|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| -Coral Eel|Portal|50|C|{1}{U}|Creature - Fish|2|1|| -Cruel Fate|Portal|51|R|{4}{U}|Sorcery|||Look at the top five cards of target opponent's library. Put one of those cards into that player's graveyard and the rest on top of his or her library in any order.| -Deep-Sea Serpent|Portal|52|U|{4}{U}{U}|Creature - Serpent|5|5|Deep-Sea Serpent can't attack unless defending player controls an Island.| -Dej Vu|Portal|53|C|{2}{U}|Sorcery|||Return target sorcery card from your graveyard to your hand.| -Djinn of the Lamp|Portal|54|R|{5}{U}{U}|Creature - Djinn|5|6|Flying| -Flux|Portal|56|U|{2}{U}|Sorcery|||Each player discards any number of cards, then draws that many cards.$Draw a card.| -Tidal Surge|Portal|56|C|{1}{U}|Sorcery|||Tap up to three target creatures without flying.| -Giant Octopus|Portal|57|C|{3}{U}|Creature - Octopus|3|3|| -Time Ebb|Portal|57|C|{2}{U}|Sorcery|||Put target creature on top of its owner's library.| -Horned Turtle|Portal|58|C|{2}{U}|Creature - Turtle|1|4|| -Touch of Brilliance|Portal|58|C|{3}{U}|Sorcery|||Draw two cards.| -Ingenious Thief|Portal|59|U|{1}{U}|Creature - Human Rogue|1|1|Flying$When Ingenious Thief enters the battlefield, look at target player's hand.| -Charging Bandits|Portal|6|U|{4}{B}|Creature - Human Rogue|3|3|Whenever Charging Bandits attacks, it gets +2/+0 until end of turn.| -Man-o'-War|Portal|60|U|{2}{U}|Creature - Jellyfish|2|2|When Man-o'-War enters the battlefield, return target creature to its owner's hand.| -Merfolk of the Pearl Trident|Portal|61|C|{U}|Creature - Merfolk|1|1|| -Alluring Scent|Portal|61|R|{1}{G}{G}|Sorcery|||All creatures able to block target creature this turn do so.| -Owl Familiar|Portal|64|C|{1}{U}|Creature - Bird|1|1|Flying$When Owl Familiar enters the battlefield, draw a card, then discard a card.| -Personal Tutor|Portal|65|U|{U}|Sorcery|||Search your library for a sorcery card and reveal that card. Shuffle your library, then put the card on top of it.| -Phantom Warrior|Portal|66|R|{1}{U}{U}|Creature - Illusion Warrior|2|2|Phantom Warrior is unblockable.| -Fruition|Portal|66|C|{G}|Sorcery|||You gain 1 life for each Forest on the battlefield.| -Prosperity|Portal|67|R|{X}{U}|Sorcery|||Each player draws X cards.| -Snapping Drake|Portal|68|C|{3}{U}|Creature - Drake|3|2|Flying| -Sorcerous Sight|Portal|69|C|{U}|Sorcery|||Look at target opponent's hand.$$Draw a card.| -Hurricane|Portal|69|R|{X}{G}|Sorcery|||Hurricane deals X damage to each creature with flying and each player.| -Craven Knight|Portal|7|C|{1}{B}|Creature - Human Knight|2|2|Craven Knight can't block.| -Storm Crow|Portal|70|C|{1}{U}|Creature - Bird|1|2|Flying (This creature can't be blocked except by creatures with flying or reach.)| -Symbol of Unsummoning|Portal|71|C|{2}{U}|Sorcery|||Return target creature to its owner's hand.$$Draw a card.| -Theft of Dreams|Portal|73|U|{2}{U}|Sorcery|||Draw a card for each tapped creature target opponent controls.| -Monstrous Growth|Portal|73|C|{1}{G}|Sorcery|||Target creature gets +4/+4 until end of turn.| -Monstrous Growth|Portal|73|C|{1}{G}|Sorcery|||Target creature gets +4/+4 until end of turn.| -Thing from the Deep|Portal|74|R|{6}{U}{U}{U}|Creature - Leviathan|9|9|Whenever Thing from the Deep attacks, sacrifice it unless you sacrifice an Island.| -Natural Spring|Portal|74|U|{3}{G}{G}|Sorcery|||Target player gains 8 life.| -Nature's Lore|Portal|75|C|{1}{G}|Sorcery|||Search your library for a Forest card and put that card onto the battlefield. Then shuffle your library.| -Wind Drake|Portal|78|C|{2}{U}|Creature - Drake|2|2|Flying| -Withering Gaze|Portal|79|U|{2}{U}|Sorcery|||Target opponent reveals his or her hand. You draw a card for each Forest and green card in it.| -Cruel Bargain|Portal|8|R|{B}{B}{B}|Sorcery|||Draw four cards. You lose half your life, rounded up.| -Anaconda|Portal|81|U|{3}{G}|Creature - Snake|3|3|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| -Anaconda|Portal|81|U|{3}{G}|Creature - Snake|3|3|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| -Bee Sting|Portal|83|U|{3}{G}|Sorcery|||Bee Sting deals 2 damage to target creature or player.| -Bull Hippo|Portal|84|U|{3}{G}|Creature - Hippo|3|3|Islandwalk| -Charging Rhino|Portal|85|R|{3}{G}{G}|Creature - Rhino|4|4|Charging Rhino can't be blocked by more than one creature.| -Deep Wood|Portal|86|U|{1}{G}|Instant|||Cast Deep Wood only during the declare attackers step and only if you've been attacked this step.$Prevent all damage that would be dealt to you this turn by attacking creatures.| -Elite Cat Warrior|Portal|87|C|{2}{G}|Creature - Cat Warrior|2|3|Forestwalk| -Elite Cat Warrior|Portal|87|C|{2}{G}|Creature - Cat Warrior|2|3|Forestwalk| -Elven Cache|Portal|89|C|{2}{G}{G}|Sorcery|||Return target card from your graveyard to your hand.| -Untamed Wilds|Portal|89|U|{2}{G}|Sorcery|||Search your library for a basic land card and put that card onto the battlefield. Then shuffle your library.| -Cruel Tutor|Portal|9|R|{2}{B}|Sorcery|||Search your library for a card, then shuffle your library and put that card on top of it. You lose 2 life.| -Elvish Ranger|Portal|90|C|{2}{G}|Creature - Elf|4|1|| -Giant Spider|Portal|92|C|{3}{G}|Creature - Spider|2|4|Reach (This creature can block creatures with flying.)| -Gorilla Warrior|Portal|93|C|{2}{G}|Creature - Ape Warrior|3|2|| -Taunt|Portal|94|R|{U}|Sorcery|||During target player's next turn, creatures that player controls attack you if able.| -Grizzly Bears|Portal|94|C|{1}{G}|Creature - Bear|2|2|| -Earthquake|Portal|94|R|{X}{R}|Sorcery|||Earthquake deals X damage to each creature without flying and each player.| -Omen|Portal|96|C|{1}{U}|Sorcery|||Look at the top three cards of your library, then put them back in any order. You may shuffle your library.$Draw a card.| -Jungle Lion|Portal|96|C|{G}|Creature - Cat|2|1|Jungle Lion can't block.| -Mobilize|Portal|97|C|{G}|Sorcery|||Untap all creatures you control.| +Forest|Portal|203|L||Basic Land - Forest|||G| +Forest|Portal|204|L||Basic Land - Forest|||G| +Forest|Portal|205|L||Basic Land - Forest|||G| +Forest|Portal|206|L||Basic Land - Forest|||G| +Island|Portal|207|L||Basic Land - Island|||U| +Island|Portal|208|L||Basic Land - Island|||U| +Island|Portal|209|L||Basic Land - Island|||U| +Island|Portal|210|L||Basic Land - Island|||U| +Mountain|Portal|211|L||Basic Land - Mountain|||R| +Mountain|Portal|212|L||Basic Land - Mountain|||R| +Mountain|Portal|213|L||Basic Land - Mountain|||R| +Mountain|Portal|214|L||Basic Land - Mountain|||R| +Plains|Portal|215|L||Basic Land - Plains|||W| +Plains|Portal|216|L||Basic Land - Plains|||W| +Plains|Portal|217|L||Basic Land - Plains|||W| +Plains|Portal|218|L||Basic Land - Plains|||W| +Swamp|Portal|219|L||Basic Land - Swamp|||B| +Swamp|Portal|220|L||Basic Land - Swamp|||B| +Swamp|Portal|221|L||Basic Land - Swamp|||B| +Swamp|Portal|222|L||Basic Land - Swamp|||B| Abyssal Nightstalker|Portal Second Age|1|U|{3}{B}|Creature - Nightstalker|2|2|Whenever Abyssal Nightstalker attacks and isn't blocked, defending player discards a card.| Dakmor Scorpion|Portal Second Age|10|C|{1}{B}|Creature - Scorpion|2|1|| Goblin Matron|Portal Second Age|100|U|{2}{R}|Creature - Goblin|1|1|When Goblin Matron enters the battlefield, you may search your library for a Goblin card, reveal that card, and put it into your hand. If you do, shuffle your library.| @@ -23284,7 +23289,7 @@ Fated Return|Born of the Gods|69|R|{4}{B}{B}{B}|Instant|||Put target creature ca Felhide Brawler|Born of the Gods|70|C|{1}{B}|Creature Minotaur|2|2|Felhide Brawler can't block unless you control another Minotaur.| Forlorn Pseudamma|Born of the Gods|71|U|{3}{B}|Creature Zombie|2|1|Intimidate$Inspired - Whenever Forlorn Pseudamma becomes untapped, you may pay {2}{B}. If you do, put a 2/2 black Zombie enchantment creature token onto the battlefield.| Forsaken Drifters|Born of the Gods|72|C|{3}{B}|Creature - Zombie|4|2|When Forsaken Drifters dies, put the top four cards of your library into your graveyard.| -Gild|Born of the Gods|73|R|{3}{B}|Sorcery|||Exile target creature. Put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool."| +Gild|Born of the Gods|73|R|{3}{B}|Enchantment Creature Hag|3|4|Whenever an opponent draws a card, Fate Unraveler deals 1 damage to that player.| Grisly Transformation|Born of the Gods|74|C|{2}{B}|Enchantment - Aura|||Enchant creature$When Grisly Transformation enters the battlefield, draw a card.$Enchanted creature has intimidate.| Herald of Torment|Born of the Gods|75|R|{1}{B}{B}|Enchantment Creature Demon|3|3|Bestow {3}{B}{B}$Flying$At the beginning of your upkeep, you lose 1 life.$Enchanted creature gets +3/+3 and has flying.| Marshmist Titan|Born of the Gods|76|C|{6}{B}|Creature Giant|4|5|Marshmist Titan costs {X} less to cast, where X is your devotion to black.| @@ -24041,7 +24046,7 @@ Ludevic's Abomination|Launch Party|16b|R||Creature - Lizard Horror|13|13|Trample Mondronen Shaman|Launch Party|17a|R|{3}{R}|Creature - Human Werewolf Shaman|3|2|At the beginning of each upkeep, if no spells were cast last turn, transform Mondronen Shaman.| Tovolar's Magehunter|Launch Party|17b|R||Creature - Werewolf|5|5|Whenever an opponent casts a spell, Tovolar's Magehunter deals 2 damage to that player.$At the beginning of each upkeep, if a player cast two or more spells last turn, transform Tovolar's Magehunter.| Restoration Angel|Launch Party|18|R|{3}{W}|Creature - Angel|3|4|Flash$Flying$When Restoration Angel enters the battlefield, you may exile target non-Angel creature you control, then return that card to the battlefield under your control.| -Staff of Nin|Launch Party|19|R|{6}|{6}|Artifact|||At the beginning of your upkeep, draw a card.${T}: Staff of Nin deals 1 damage to target creature or player.| +Staff of Nin|Launch Party|19|R|{6}|Artifact|||At the beginning of your upkeep, draw a card.${T}: Staff of Nin deals 1 damage to target creature or player.| Deadbridge Goliath|Launch Party|20|R|{2}{G}{G}|Creature - Insect|5|5|Scavenge {4}{G}{G} ({4}{G}{G}, Exile this card from your graveyard: Put a number of +1/+1 counters equal to this card's power on target creature. Scavenge only as a sorcery.)| Skarrg Goliath|Launch Party|21|R|{6}{G}{G}|Creature - Beast|9|9|Trample$Bloodrush {5}{G}{G}, Discard Skarrg Goliath: Target attacking creature gets +9/+9 and gains trample until end of turn.| Breaking|Launch Party|22a|R|{U}{B}|Sorcery|||Target player puts the top eight cards of his or her library into his or her graveyard.$Fuse (You may cast one or both halves of this card from your hand.)| @@ -25402,18 +25407,35 @@ Dragonlord's Servant|Media Inserts|120|Special|{1}{R}|Creature - Goblin Shaman|1 Evolving Wilds|Media Inserts|121|C||Land|||{tap}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library.| Foe-Razer Regent|Media Inserts|122|Special|{5}{G}{G}|Creature - Dragon|4|5|Flying$When Foe-Razer Regent enters the battlefield, you may have it fight target creature you don't control.$Whenever a creature you control fights, put two +1/+1 counters on it at the beginning of the next end step.| Relic Seeker|Media Inserts|123|Special|{1}{W}|Creature - Human Soldier|2|2|Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.)$When Relic Seeker becomes renowned, you may search your library for an Equipment card, reveal it, put it into your hand, then shuffle your library.| -Kytheon, Hero of Akros|Media Inserts|124|Special|{W}|Legendary Creature - Human Soldier|2|1|At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon, then return him to the battlefield transformed under his owner's control.${2}{W}: Kytheon gains indestructible until end of turn.| -Gideon, Battle-Forged|Media Inserts|124|Special||Planeswalker - Gideon|3|+2: Up to one target creature an opponent controls attacks Gideon, Battle-Forged during its controller's next turn if able.$+1: Until your next turn, target creature gains indestructible. Untap that creature.$0: Until end of turn, Gideon, Battle-Forged becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.| -Jace, Vryn's Prodigy|Media Inserts|125|Special|{1}{U}|Legendary Creature - Human Wizard|0|2|{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. | -Jace, Telepath Unbound|Media Inserts|125|Special||Planeswalker - Jace|5|+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". | -Liliana, Heretical Healer|Media Inserts|126|Special|{1}{B}{B}|Legendary Creature - Human Cleric|2|3|Lifelink$Whenever another nontoken creature you control dies, exile Liliana Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield.| -Liliana, Defiant Necromancer|Media Inserts|126|Special||Planeswalker - Liliana|3|+2: Each player discards a card.$-X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield.$-8: You get an emblem with "Whenever a creature you control dies, return it to the battlefield under your control at the beginning of the next end step."| -Chandra, Fire of Kaladesh|Media Inserts|127|Special|{1}{R}{R}|Legendary Creature - Human Shaman|2|2|Whenever you cast a red spell, untap Chandra, Fire of Kaladesh.${T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control.| -Chandra, Roaring Flame|Media Inserts|127|Special||Planeswalker - Chandra|4|+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."| -Nissa, Vastwood Seer|Media Inserts|128|Special|{2}{G}|Legendary Creature - Elf Scout|2|2|When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.| -Nissa, Sage Animist|Media Inserts|128|Special||Planeswalker - Nissa|3|+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.| -Ruinous Path|Media Inserts|129|Special|{1}{B}{B}|Sorcery|||Destroy target creature or planeswalker.$Awaken 4-{5}{B}{B} (If you cast this spell for {5}{B}{B}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| -Scythe Leopard|Media Inserts|130|Special|{G}|Creature - Cat|1|1|Landfall-Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn.| +Alhammarret, High Arbiter|Media Inserts|124|Special|{5}{U}{U}|Legendary Creature - Sphinx|5|5|Flying$As Alhammarret, High Arbiter enters the battlefield, each opponent reveals his or her hand. You choose the name of a nonland card revealed this way.$Your opponents can't cast spells with the chosen name (as long as this creature is on the battlefield).| +Dwynen, Gilt-Leaf Daen|Media Inserts|125|Special|{2}{G}{G}|Legendary Creature - Elf Warrior|3|4|Reach$Other Elf creatures you control get +1/+1.$Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control.| +Hixus, Prison Warden|Media Inserts|126|Special|{3}{W}{W}|Legendary Creature - Human Soldier|4|4|Flash$Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield.| +Kothophed, Soul Hoarder|Media Inserts|127|Special|{4}{B}{B}|Legendary Creature - Demon|6|6|Flying$Whenever a permanent owned by another player is put into the graveyard from the battlefield, you draw one card and lose 1 life.| +Pia and Kiran Nalaar|Media Inserts|128|Special|{2}{R}{R}|Legendary Creature - Human Artificer|2|2|When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield.${2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player.| +Honored Hierarch|Media Inserts|129|Special|{G}|Creature - Human Druid|1|1|Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.)$As long as Honored Hierarch is renowned, it has vigilance and "{t}: Add one mana of any color to your mana pool."| +Seeker of the Way|Media Inserts|130|Special|{1}{W}|Creature - Human Warrior|2|2|Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)$Whenever you cast a noncreature spell, Seeker of the Way gains lifelink until end of turn.| +Valorous Stance|Media Inserts|131|Special|{1}{W}|Instant|||Choose one -$ Target creature gains indestructible until end of turn.$ Destroy target creature with toughness 4 or greater.| +Dromoka, the Eternal|Media Inserts|132|Special|{3}{G}{W}|Legendary Creature - Dragon|5|5|Flying$Whenever a Dragon you control attacks, bolster 2. (Choose a creature with the least toughness among creatures you control and put two +1/+1 counters on it.)| +Siege Rhino|Media Inserts|133|Special|{1}{W}{B}{G}|Creature - Rhino|4|5|Trample$When Siege Rhino enters the battlefield, each opponent loses 3 life and you gain 3 life.| +Sandsteppe Citadel|Media Inserts|134|Special||Land|||Sandsteppe Citadel enters the battlefield tapped.${tap}: Add {W}, {B}, or {G} to your mana pool.| +Ruinous Path|Media Inserts|135|Special|{1}{B}{B}|Sorcery|||Destroy target creature or planeswalker.$Awaken 4-{5}{B}{B} (If you cast this spell for {5}{B}{B}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Hero of Goma Fada|Media Inserts|136|Special|{4}{W}|Creature - Human Knight Ally|4|3|Rally — Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn.| +Drowner of Hope|Media Inserts|137|Special|{5}{U}|Creature - Eldrazi|5|5|Devoid (This card has no color.)$When Drowner of Hope enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."$Sacrifice an Eldrazi Scion: Tap Target creature.| +Defiant Bloodlord|Media Inserts|138|Special|{5}{B}{B}|Creature - Vampire|4|5|Flying$Whenever you gain life, target opponent loses that much life.| +Barrage Tyrant|Media Inserts|139|Special|{4}{R}|Creature - Eldrazi|5|3|Devoid (This card has no color.)${2}{R}, Sacrifice another colorless creature: Barrage Tyrant deals damage equal to the sacrificed creature's power to target creature or player.| +Oran-Rief Hydra|Media Inserts|140|Special|{4}{G}{G}|Creature - Hydra|5|5|Trample$Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead.| +Scythe Leopard|Media Inserts|141|Special|{G}|Creature - Cat|1|1|Landfall-Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn.| +Genesis Hydra|Media Inserts|142|Special|{X}{G}{G}|Creature - Plant Hydra|0|0|When you cast Genesis Hydra, reveal the top X cards of your library. You may put a nonland permanent card with converted mana cost X or less from among them onto the battlefield. Then shuffle the rest into your library.$Genesis Hydra enters the battlefield with X +1/+1 counters on it.| +Kytheon, Hero of Akros|Media Inserts|994|Special|{W}|Legendary Creature - Human Soldier|2|1|At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon, then return him to the battlefield transformed under his owner's control.${2}{W}: Kytheon gains indestructible until end of turn.| +Gideon, Battle-Forged|Media Inserts|994|Special||Planeswalker - Gideon|3|+2: Up to one target creature an opponent controls attacks Gideon, Battle-Forged during its controller's next turn if able.$+1: Until your next turn, target creature gains indestructible. Untap that creature.$0: Until end of turn, Gideon, Battle-Forged becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.| +Jace, Vryn's Prodigy|Media Inserts|995|Special|{1}{U}|Legendary Creature - Human Wizard|0|2|{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. | +Jace, Telepath Unbound|Media Inserts|995|Special||Planeswalker - Jace|5|+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". | +Liliana, Heretical Healer|Media Inserts|996|Special|{1}{B}{B}|Legendary Creature - Human Cleric|2|3|Lifelink$Whenever another nontoken creature you control dies, exile Liliana Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield.| +Liliana, Defiant Necromancer|Media Inserts|996|Special||Planeswalker - Liliana|3|+2: Each player discards a card.$-X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield.$-8: You get an emblem with "Whenever a creature you control dies, return it to the battlefield under your control at the beginning of the next end step."| +Chandra, Fire of Kaladesh|Media Inserts|997|Special|{1}{R}{R}|Legendary Creature - Human Shaman|2|2|Whenever you cast a red spell, untap Chandra, Fire of Kaladesh.${T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control.| +Chandra, Roaring Flame|Media Inserts|997|Special||Planeswalker - Chandra|4|+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."| +Nissa, Vastwood Seer|Media Inserts|998|Special|{2}{G}|Legendary Creature - Elf Scout|2|2|When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.| +Nissa, Sage Animist|Media Inserts|998|Special||Planeswalker - Nissa|3|+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.| Sultai|Media Inserts|999|Special|{{U}{B}{G}|Legendary Creature - Placeholder|2|2|| Wood Elves|WPN Gateway|1|Special|{2}{G}|Creature — Elf Scout|1|1|When Wood Elves enters the battlefield, search your library for a Forest card and put that card onto the battlefield. Then shuffle your library.| Icatian Javelineers|WPN Gateway|2|Special|{W}|Creature — Human Soldier|1|1|Icatian Javelineers enters the battlefield with a javelin counter on it.${T}, Remove a javelin counter from Icatian Javelineers: Icatian Javelineers deals 1 damage to target creature or player.| @@ -26681,7 +26703,7 @@ Standing Troops|Duel Decks: Elspeth vs. Kiora|25|C|{2}{W}|Creature - Human Soldi Sunlance|Duel Decks: Elspeth vs. Kiora|26|C|{W}|Sorcery|||Sunlance deals 3 damage to target nonwhite creature.| Veteran Armorsmith|Duel Decks: Elspeth vs. Kiora|27|C|{W}{W}|Creature - Human Soldier|2|3|Other Soldier creatures you control get +0/+1.| Veteran Swordsmith|Duel Decks: Elspeth vs. Kiora|28|C|{2}{W}|Creature - Human Soldier|3|2|Other Soldier creatures you control get +1/+0.| -Secluded Steppe|Duel Decks: Elspeth vs. Kiora|29|C|Land|||Secluded Steppe enters the battlefield tapped.${T}: Add {W} to your mana pool.$Cycling {W} ({W}, Discard this card: Draw a card.)| +Secluded Steppe|Duel Decks: Elspeth vs. Kiora|29|C||Land|||Secluded Steppe enters the battlefield tapped.${T}: Add {W} to your mana pool.$Cycling {W} ({W}, Discard this card: Draw a card.)| Plains|Duel Decks: Elspeth vs. Kiora|30|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| Plains|Duel Decks: Elspeth vs. Kiora|31|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| Plains|Duel Decks: Elspeth vs. Kiora|32|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| @@ -27631,5 +27653,550 @@ Swamp|Battle for Zendikar|262|L||Basic Land - Swamp|||({t}: Add {B} to your m Swamp|Battle for Zendikar|264|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| Swamp|Battle for Zendikar|260|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| Swamp|Battle for Zendikar|261|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| +Bastion Protector|Commander 2015|1|R|{2}{W}|Creature - Human Soldier|3|3|Commander creatures you control get +2/+2 and have indestructible.| +Broodbirth Viper|Commander 2015|10|U|{4}{U}|Creature - Snake|3|3|Myriad (Whenever this creature attacks, for each opponent other than defending player, you may put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile the tokens at end of combat.)$Whenever Broodbirth Viper deals combat damage to a player, you may draw a card.| +Plaxmanta|Commander 2015|100|U|{1}{U}|Creature - Beast|2|2|Flash$When Plaxmanta enters the battlefield, creatures you control gain shroud until end of turn. (They can't be the targets of spells or abilities.)$When Plaxmanta enters the battlefield, sacrifice it unless {G} was spent to cast it.| +Preordain|Commander 2015|101|C|{U}|Sorcery|||Scry 2, then draw a card. (To scry 2, look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)| +Rapid Hybridization|Commander 2015|102|U|{U}|Instant|||Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Frog Lizard creature token onto the battlefield.| +Reins of Power|Commander 2015|103|R|{2}{U}{U}|Instant|||Untap all creatures you control and all creatures target opponent controls. You and that opponent each gain control of all creatures the other controls until end of turn. Those creatures gain haste until end of turn.| +Repeal|Commander 2015|104|C|{X}{U}|Instant|||Return target nonland permanent with converted mana cost X to its owner's hand.$Draw a card.| +Rite of Replication|Commander 2015|105|R|{2}{U}{U}|Sorcery|||Kicker {5} (You may pay an additional {5} as you cast this spell.)$Put a token onto the battlefield that's a copy of target creature. If Rite of Replication was kicked, put five of those tokens onto the battlefield instead.| +Sleep|Commander 2015|106|U|{2}{U}{U}|Sorcery|||Tap all creatures target player controls. Those creatures don't untap during that player's next untap step.| +Stolen Goods|Commander 2015|107|R|{3}{U}|Sorcery|||Target opponent exiles cards from the top of his or her library until he or she exiles a nonland card. Until end of turn, you may cast that card without paying its mana cost.| +Stroke of Genius|Commander 2015|108|R|{X}{2}{U}|Instant|||Target player draws X cards.| +Talrand, Sky Summoner|Commander 2015|109|R|{2}{U}{U}|Legendary Creature - Merfolk Wizard|2|2|Whenever you cast an instant or sorcery spell, put a 2/2 blue Drake creature token with flying onto the battlefield.| +Gigantoplasm|Commander 2015|11|R|{3}{U}|Creature - Shapeshifter|0|0|You may have Gigantoplasm enter the battlefield as a copy of any creature on the battlefield except it gains "{X}: This creature has base power and toughness X/X."| +Thought Reflection|Commander 2015|110|R|{4}{U}{U}{U}|Enchantment|||If you would draw a card, draw two cards instead.| +Windfall|Commander 2015|111|U|{2}{U}|Sorcery|||Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way.| +Altar's Reap|Commander 2015|112|C|{1}{B}|Instant|||As an additional cost to cast Altar's Reap, sacrifice a creature.$Draw two cards.| +Ambition's Cost|Commander 2015|113|U|{3}{B}|Sorcery|||You draw three cards and you lose 3 life.| +Ancient Craving|Commander 2015|114|R|{3}{B}|Sorcery|||You draw three cards and you lose 3 life.| +Barter in Blood|Commander 2015|115|U|{2}{B}{B}|Sorcery|||Each player sacrifices two creatures.| +Black Market|Commander 2015|116|R|{3}{B}{B}|Enchantment|||Whenever a creature dies, put a charge counter on Black Market.$At the beginning of your precombat main phase, add {B} to your mana pool for each charge counter on Black Market.| +Blood Bairn|Commander 2015|117|C|{2}{B}|Creature - Vampire|2|2|Sacrifice another creature: Blood Bairn gets +2/+2 until end of turn.| +Butcher of Malakir|Commander 2015|118|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.| +Champion of Stray Souls|Commander 2015|119|M|{4}{B}{B}|Creature - Skeleton Warrior|4|4|{3}{B}{B}, {tap}, Sacrifice X other creatures: Return X target creature cards from your graveyard to the battlefield.${5}{B}{B}: Put Champion of Stray Souls on top of your library from your graveyard.| +Illusory Ambusher|Commander 2015|12|U|{4}{U}|Creature - Cat Illusion|4|1|Flash (You may cast this spell any time you could cast an instant.)$Whenever Illusory Ambusher is dealt damage, draw that many cards.| +Diabolic Servitude|Commander 2015|120|U|{3}{B}|Enchantment|||When Diabolic Servitude enters the battlefield, return target creature card from your graveyard to the battlefield.$When the creature put onto the battlefield with Diabolic Servitude dies, exile it and return Diabolic Servitude to its owner's hand.$When Diabolic Servitude leaves the battlefield, exile the creature put onto the battlefield with Diabolic Servitude.| +Doomwake Giant|Commander 2015|121|R|{4}{B}|Enchantment Creature - Giant|4|6|Constellation - Whenever Doomwake Giant or another enchantment enters the battlefield under your control, creatures your opponents control get -1/-1 until end of turn.| +Dreadbringer Lampads|Commander 2015|122|C|{4}{B}|Enchantment Creature - Nymph|4|2|Constellation - Whenever Dreadbringer Lampads or another enchantment enters the battlefield under your control, target creature gains intimidate until end of turn. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.)| +Eater of Hope|Commander 2015|123|R|{5}{B}{B}|Creature - Demon|6|4|Flying${B}, Sacrifice another creature: Regenerate Eater of Hope.${2}{B}, Sacrifice two other creatures: Destroy target creature.| +Extractor Demon|Commander 2015|124|R|{4}{B}{B}|Creature - Demon|5|5|Flying$Whenever another creature leaves the battlefield, you may have target player put the top two cards of his or her library into his or her graveyard.$Unearth {2}{B} ({2}{B}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.)| +Fallen Ideal|Commander 2015|125|U|{2}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature has flying and "Sacrifice a creature: This creature gets +2/+1 until end of turn."$When Fallen Ideal is put into a graveyard from the battlefield, return Fallen Ideal to its owner's hand.| +Fate Unraveler|Commander 2015|126|R|{3}{B}|Enchantment Creature - Hag|3|4|Whenever an opponent draws a card, Fate Unraveler deals 1 damage to that player.| +Gild|Commander 2015|127|R|{3}{B}|Sorcery|||Exile target creature. Put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool."| +Grave Peril|Commander 2015|128|C|{1}{B}|Enchantment|||When a nonblack creature enters the battlefield, sacrifice Grave Peril. If you do, destroy that creature.| +Nighthowler|Commander 2015|129|R|{1}{B}{B}|Enchantment Creature - Horror|0|0|Bestow {2}{B}{B} (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.)$Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.| +Mirror Match|Commander 2015|13|U|{4}{U}{U}|Instant|||Cast Mirror Match only during the declare blockers step.$For each creature attacking you or a planeswalker you control, put a token that's a copy of that creature onto the battlefield blocking that creature. Exile those tokens at end of combat.| +Phyrexian Arena|Commander 2015|130|R|{1}{B}{B}|Enchantment|||At the beginning of your upkeep, you draw a card and you lose 1 life.| +Phyrexian Plaguelord|Commander 2015|131|R|{3}{B}{B}|Creature - Carrier|4|4|{tap}, Sacrifice Phyrexian Plaguelord: Target creature gets -4/-4 until end of turn.$Sacrifice a creature: Target creature gets -1/-1 until end of turn.| +Phyrexian Rager|Commander 2015|132|C|{2}{B}|Creature - Horror|2|2|When Phyrexian Rager enters the battlefield, you draw a card and you lose 1 life.| +Phyrexian Reclamation|Commander 2015|133|U|{B}|Enchantment|||{1}{B}, Pay 2 life: Return target creature card from your graveyard to your hand.| +Rise from the Grave|Commander 2015|134|U|{4}{B}|Sorcery|||Put target creature card from a graveyard onto the battlefield under your control. That creature is a black Zombie in addition to its other colors and types.| +Seal of Doom|Commander 2015|135|C|{2}{B}|Enchantment|||Sacrifice Seal of Doom: Destroy target nonblack creature. It can't be regenerated.| +Sever the Bloodline|Commander 2015|136|R|{3}{B}|Sorcery|||Exile target creature and all other creatures with the same name as that creature.$Flashback {5}{B}{B} (You may cast this card from your graveyard for its flashback cost. Then exile it.)| +Shriekmaw|Commander 2015|137|U|{4}{B}|Creature - Elemental|3|2|Fear (This creature can't be blocked except by artifact creatures and/or black creatures.)$When Shriekmaw enters the battlefield, destroy target nonartifact, nonblack creature.$Evoke {1}{B} (You may cast this spell for its evoke cost. If you do, it's sacrificed when it enters the battlefield.)| +Underworld Connections|Commander 2015|138|R|{1}{B}{B}|Enchantment - Aura|||Enchant land$Enchanted land has "{tap}, Pay 1 life: Draw a card."| +Victimize|Commander 2015|139|U|{2}{B}|Sorcery|||Choose two target creature cards in your graveyard. Sacrifice a creature. If you do, return the chosen cards to the battlefield tapped.| +Mystic Confluence|Commander 2015|14|R|{3}{U}{U}|Instant|||Choose three. You may choose the same mode more than once.$• Counter target spell unless its controller pays {3}.$• Return target creature to its owner's hand.$• Draw a card.| +Vow of Malice|Commander 2015|140|U|{2}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+2, has intimidate, and can't attack you or a planeswalker you control. (A creature with intimidate can't be blocked except by artifact creatures and/or creatures that share a color with it.)| +Act of Aggression|Commander 2015|141|U|{3}{RP}{RP}|Instant|||({RP} can be paid with either {R} or 2 life.)$Gain control of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn.| +Borderland Behemoth|Commander 2015|142|R|{5}{R}{R}|Creature - Giant Warrior|4|4|Trample$Borderland Behemoth gets +4/+4 for each other Giant you control.| +Breath of Darigaaz|Commander 2015|143|U|{1}{R}|Sorcery|||Kicker {2} (You may pay an additional {2} as you cast this spell.)$Breath of Darigaaz deals 1 damage to each creature without flying and each player. If Breath of Darigaaz was kicked, it deals 4 damage to each creature without flying and each player instead.| +Chain Reaction|Commander 2015|144|R|{2}{R}{R}|Sorcery|||Chain Reaction deals X damage to each creature, where X is the number of creatures on the battlefield.| +Charmbreaker Devils|Commander 2015|145|R|{5}{R}|Creature - Devil|4|4|At the beginning of your upkeep, return an instant or sorcery card at random from your graveyard to your hand.$Whenever you cast an instant or sorcery spell, Charmbreaker Devils gets +4/+0 until end of turn.| +Comet Storm|Commander 2015|146|M|{X}{R}{R}|Instant|||Multikicker {1} (You may pay an additional {1} any number of times as you cast this spell.)$Choose target creature or player, then choose another target creature or player for each time Comet Storm was kicked. Comet Storm deals X damage to each of them.| +Curse of the Nightly Hunt|Commander 2015|147|U|{2}{R}|Enchantment - Aura Curse|||Enchant player$Creatures enchanted player controls attack each turn if able.| +Desolation Giant|Commander 2015|148|R|{2}{R}{R}|Creature - Giant|3|3|Kicker {W}{W} (You may pay an additional {W}{W} as you cast this spell.)$When Desolation Giant enters the battlefield, destroy all other creatures you control. If it was kicked, destroy all other creatures instead.| +Desperate Ravings|Commander 2015|149|U|{1}{R}|Instant|||Draw two cards, then discard a card at random.$Flashback {2}{U} (You may cast this card from your graveyard for its flashback cost. Then exile it.)| +Synthetic Destiny|Commander 2015|15|R|{4}{U}{U}|Instant|||Exile all creatures you control. At the beginning of the next end step, reveal cards from the top of your library until you reveal that many creature cards, put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library.| +Disaster Radius|Commander 2015|150|R|{5}{R}{R}|Sorcery|||As an additional cost to cast Disaster Radius, reveal a creature card from your hand.$Disaster Radius deals X damage to each creature your opponents control, where X is the revealed card's converted mana cost.| +Dragon Mage|Commander 2015|151|R|{5}{R}{R}|Creature - Dragon Wizard|5|5|Flying$Whenever Dragon Mage deals combat damage to a player, each player discards his or her hand, then draws seven cards.| +Earthquake|Commander 2015|152|R|{X}{R}|Sorcery|||Earthquake deals X damage to each creature without flying and each player.| +Faithless Looting|Commander 2015|153|C|{R}|Sorcery|||Draw two cards, then discard two cards.$Flashback {2}{R} (You may cast this card from your graveyard for its flashback cost. Then exile it.)| +Fall of the Hammer|Commander 2015|154|C|{1}{R}|Instant|||Target creature you control deals damage equal to its power to another target creature.| +Fumiko the Lowblood|Commander 2015|155|R|{2}{R}{R}|Legendary Creature - Human Samurai|3|2|Fumiko the Lowblood has bushido X, where X is the number of attacking creatures. (Whenever this creature blocks or becomes blocked, it gets +X/+X until end of turn.)$Creatures your opponents control attack each turn if able.| +Hamletback Goliath|Commander 2015|156|R|{6}{R}|Creature - Giant Warrior|6|6|Whenever another creature enters the battlefield, you may put X +1/+1 counters on Hamletback Goliath, where X is that creature's power.| +Hammerfist Giant|Commander 2015|157|R|{4}{R}{R}|Creature - Giant Warrior|5|4|{tap}: Hammerfist Giant deals 4 damage to each creature without flying and each player.| +Hostility|Commander 2015|158|R|{3}{R}{R}{R}|Creature - Elemental Incarnation|6|6|Haste$If a spell you control would deal damage to an opponent, prevent that damage. Put a 3/1 red Elemental Shaman creature token with haste onto the battlefield for each 1 damage prevented this way.$When Hostility is put into a graveyard from anywhere, shuffle it into its owner's library.| +Hunted Dragon|Commander 2015|159|R|{3}{R}{R}|Creature - Dragon|6|6|Flying, haste$When Hunted Dragon enters the battlefield, target opponent puts three 2/2 white Knight creature tokens with first strike onto the battlefield.| +Banshee of the Dread Choir|Commander 2015|16|U|{3}{B}{B}|Creature - Spirit|4|4|Myriad (Whenever this creature attacks, for each opponent other than defending player, you may put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile the tokens at end of combat.)$Whenever Banshee of the Dread Choir deals combat damage to a player, that player discards a card.| +Inferno Titan|Commander 2015|160|M|{4}{R}{R}|Creature - Giant|6|6|{R}: Inferno Titan gets +1/+0 until end of turn.$Whenever Inferno Titan enters the battlefield or attacks, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players.| +Magma Giant|Commander 2015|161|R|{5}{R}{R}|Creature - Giant|5|5|When Magma Giant enters the battlefield, it deals 2 damage to each creature and each player.| +Magmaquake|Commander 2015|162|R|{X}{R}{R}|Instant|||Magmaquake deals X damage to each creature without flying and each planeswalker.| +Mizzium Mortars|Commander 2015|163|R|{1}{R}|Sorcery|||Mizzium Mortars deals 4 damage to target creature you don't control.$Overload {3}{R}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")| +Stinkdrinker Daredevil|Commander 2015|164|C|{2}{R}|Creature - Goblin Rogue|1|3|Giant spells you cast cost {2} less to cast.| +Stoneshock Giant|Commander 2015|165|U|{3}{R}{R}|Creature - Giant|5|4|{6}{R}{R}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.)$When Stoneshock Giant becomes monstrous, creatures without flying your opponents control can't block this turn.| +Sunrise Sovereign|Commander 2015|166|R|{5}{R}|Creature - Giant Warrior|5|5|Other Giant creatures you control get +2/+2 and have trample.| +Taurean Mauler|Commander 2015|167|R|{2}{R}|Creature - Shapeshifter|2|2|Changeling (This card is every creature type at all times.)$Whenever an opponent casts a spell, you may put a +1/+1 counter on Taurean Mauler.| +Thundercloud Shaman|Commander 2015|168|U|{3}{R}{R}|Creature - Giant Shaman|4|4|When Thundercloud Shaman enters the battlefield, it deals damage equal to the number of Giants you control to each non-Giant creature.| +Urza's Rage|Commander 2015|169|R|{2}{R}|Instant|||Kicker {8}{R} (You may pay an additional {8}{R} as you cast this spell.)$Urza's Rage can't be countered by spells or abilities.$Urza's Rage deals 3 damage to target creature or player. If Urza's Rage was kicked, instead it deals 10 damage to that creature or player and the damage can't be prevented.| +Corpse Augur|Commander 2015|17|U|{3}{B}|Creature - Zombie Wizard|4|2|When Corpse Augur dies, you draw X cards and you lose X life, where X is the number of creature cards in target player's graveyard.| +Vandalblast|Commander 2015|170|U|{R}|Sorcery|||Destroy target artifact you don't control.$Overload {4}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")| +Warstorm Surge|Commander 2015|171|R|{5}{R}|Enchantment|||Whenever a creature enters the battlefield under your control, it deals damage equal to its power to target creature or player.| +Word of Seizing|Commander 2015|172|R|{3}{R}{R}|Instant|||Split second (As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.)$Untap target permanent and gain control of it until end of turn. It gains haste until end of turn.| +Acidic Slime|Commander 2015|173|U|{3}{G}{G}|Creature - Ooze|2|2|Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)$When Acidic Slime enters the battlefield, destroy target artifact, enchantment, or land.| +Arbor Colossus|Commander 2015|174|R|{2}{G}{G}{G}|Creature - Giant|6|6|Reach${3}{G}{G}{G}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.)$When Arbor Colossus becomes monstrous, destroy target creature with flying an opponent controls.| +Bane of Progress|Commander 2015|175|R|{4}{G}{G}|Creature - Elemental|2|2|When Bane of Progress enters the battlefield, destroy all artifacts and enchantments. Put a +1/+1 counter on Bane of Progress for each permanent destroyed this way.| +Beastmaster Ascension|Commander 2015|176|R|{2}{G}|Enchantment|||Whenever a creature you control attacks, you may put a quest counter on Beastmaster Ascension.$As long as Beastmaster Ascension has seven or more quest counters on it, creatures you control get +5/+5.| +Caller of the Claw|Commander 2015|177|R|{2}{G}|Creature - Elf|2|2|Flash$When Caller of the Claw enters the battlefield, put a 2/2 green Bear creature token onto the battlefield for each nontoken creature put into your graveyard from the battlefield this turn.| +Chameleon Colossus|Commander 2015|178|R|{2}{G}{G}|Creature - Shapeshifter|4|4|Changeling (This card is every creature type at all times.)$Protection from black${2}{G}{G}: Chameleon Colossus gets +X/+X until end of turn, where X is its power.| +Cloudthresher|Commander 2015|179|R|{2}{G}{G}{G}{G}|Creature - Elemental|7|7|Flash$Reach$When Cloudthresher enters the battlefield, it deals 2 damage to each creature with flying and each player.$Evoke {2}{G}{G} (You may cast this spell for its evoke cost. If you do, it's sacrificed when it enters the battlefield.)| +Daxos's Torment|Commander 2015|18|R|{3}{B}|Enchantment|||Constellation - Whenever Daxos's Torment or another enchantment enters the battlefield under your control, Daxos's Torment becomes a 5/5 Demon creature with flying and haste in addition to its other types until end of turn.| +Cobra Trap|Commander 2015|180|U|{4}{G}{G}|Instant - Trap|||If a noncreature permanent under your control was destroyed this turn by a spell or ability an opponent controlled, you may pay {G} rather than pay Cobra Trap's mana cost.$Put four 1/1 green Snake creature tokens onto the battlefield.| +Desert Twister|Commander 2015|181|U|{4}{G}{G}|Sorcery|||Destroy target permanent.| +Elvish Visionary|Commander 2015|182|C|{1}{G}|Creature - Elf Shaman|1|1|When Elvish Visionary enters the battlefield, draw a card.| Eternal Witness|Commander 2015|183|U|{1}{G}{G}|Creature - Human Shaman|2|1|When Eternal Witness enters the battlefield, you may return target card from your graveyard to your hand.| -Kalemne, Disciple of Iroas|Commander 2015|999|M|{2}{R}{W}|Legendary Creature - Giant Soldier|3|3|Double strike, vigilance$Whenever you cast a creature spell with converted mana cost 5 or greater, you get an experience counter.$Kalemne, Disciple of Iroas gets +1/+1 for each experience counter you have.| \ No newline at end of file +Experiment One|Commander 2015|184|U|{G}|Creature - Human Ooze|1|1|Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.)$Remove two +1/+1 counters from Experiment One: Regenerate Experiment One.| +Forgotten Ancient|Commander 2015|185|R|{3}{G}|Creature - Elemental|0|3|Whenever a player casts a spell, you may put a +1/+1 counter on Forgotten Ancient.$At the beginning of your upkeep, you may move any number of +1/+1 counters from Forgotten Ancient onto other creatures.| +Indrik Stomphowler|Commander 2015|186|U|{4}{G}|Creature - Beast|4|4|When Indrik Stomphowler enters the battlefield, destroy target artifact or enchantment.| +Kessig Cagebreakers|Commander 2015|187|R|{4}{G}|Creature - Human Rogue|3|4|Whenever Kessig Cagebreakers attacks, put a 2/2 green Wolf creature token onto the battlefield tapped and attacking for each creature card in your graveyard.| +Kodama's Reach|Commander 2015|188|C|{2}{G}|Sorcery - Arcane|||Search your library for up to two basic land cards, reveal those cards, and put one onto the battlefield tapped and the other into your hand. Then shuffle your library.| +Krosan Grip|Commander 2015|189|U|{2}{G}|Instant|||Split second (As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.)$Destroy target artifact or enchantment.| +Deadly Tempest|Commander 2015|19|R|{4}{B}{B}|Sorcery|||Destroy all creatures. Each player loses life equal to the number of creatures he or she controlled that were destroyed this way.| +Loaming Shaman|Commander 2015|190|R|{2}{G}|Creature - Centaur Shaman|3|2|When Loaming Shaman enters the battlefield, target player shuffles any number of target cards from his or her graveyard into his or her library.| +Mulch|Commander 2015|191|C|{1}{G}|Sorcery|||Reveal the top four cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard.| +Mycoloth|Commander 2015|192|R|{3}{G}{G}|Creature - Fungus|4|4|Devour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with twice that many +1/+1 counters on it.)$At the beginning of your upkeep, put a 1/1 green Saproling creature token onto the battlefield for each +1/+1 counter on Mycoloth.| +Noble Quarry|Commander 2015|193|U|{2}{G}|Enchantment Creature - Unicorn|1|1|Bestow {5}{G} (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.)$All creatures able to block Noble Quarry or enchanted creature do so.$Enchanted creature gets +1/+1.| +Ohran Viper|Commander 2015|194|R|{1}{G}{G}|Snow Creature - Snake|1|3|Whenever Ohran Viper deals combat damage to a creature, destroy that creature at end of combat.$Whenever Ohran Viper deals combat damage to a player, you may draw a card.| +Overrun|Commander 2015|195|U|{2}{G}{G}{G}|Sorcery|||Creatures you control get +3/+3 and gain trample until end of turn.| +Overwhelming Stampede|Commander 2015|196|R|{3}{G}{G}|Sorcery|||Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control.| +Patagia Viper|Commander 2015|197|U|{3}{G}|Creature - Snake|2|1|Flying$When Patagia Viper enters the battlefield, put two 1/1 green and blue Snake creature tokens onto the battlefield.$When Patagia Viper enters the battlefield, sacrifice it unless {U} was spent to cast it.| +Primal Growth|Commander 2015|198|C|{2}{G}|Sorcery|||Kicker-Sacrifice a creature. (You may sacrifice a creature in addition to any other costs as you cast this spell.)$Search your library for a basic land card, put that card onto the battlefield, then shuffle your library. If Primal Growth was kicked, instead search your library for up to two basic land cards, put them onto the battlefield, then shuffle your library.| +Rampant Growth|Commander 2015|199|C|{1}{G}|Sorcery|||Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library.| +Dawnbreak Reclaimer|Commander 2015|2|R|{4}{W}{W}|Creature - Angel|5|5|Flying$At the beginning of your end step, choose a creature card in an opponent's graveyard, then that player chooses a creature card in your graveyard. You may return those cards to the battlefield under their owners' control.| +Dread Summons|Commander 2015|20|R|{X}{B}{B}|Sorcery|||Each player puts the top X cards of his or her library into his or her graveyard. For each creature card put into a graveyard this way, you put a 2/2 black Zombie creature token onto the battlefield tapped.| +Sakura-Tribe Elder|Commander 2015|200|C|{1}{G}|Creature - Snake Shaman|1|1|Sacrifice Sakura-Tribe Elder: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library.| +Satyr Wayfinder|Commander 2015|201|C|{1}{G}|Creature - Satyr|1|1|When Satyr Wayfinder enters the battlefield, reveal the top four cards of your library. You may put a land card from among them into your hand. Put the rest into your graveyard.| +Spider Spawning|Commander 2015|202|U|{4}{G}|Sorcery|||Put a 1/2 green Spider creature token with reach onto the battlefield for each creature card in your graveyard.$Flashback {6}{B} (You may cast this card from your graveyard for its flashback cost. Then exile it.)| +Stingerfling Spider|Commander 2015|203|U|{4}{G}|Creature - Spider|2|5|Reach$When Stingerfling Spider enters the battlefield, you may destroy target creature with flying.| +Terastodon|Commander 2015|204|R|{6}{G}{G}|Creature - Elephant|9|9|When Terastodon enters the battlefield, you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield.| +Thelonite Hermit|Commander 2015|205|R|{3}{G}|Creature - Elf Shaman|1|1|Saproling creatures get +1/+1.$Morph {3}{G}{G} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Thelonite Hermit is turned face up, put four 1/1 green Saproling creature tokens onto the battlefield.| +Tribute to the Wild|Commander 2015|206|U|{1}{G}|Instant|||Each opponent sacrifices an artifact or enchantment.| +Verdant Force|Commander 2015|207|R|{5}{G}{G}{G}|Creature - Elemental|7|7|At the beginning of each upkeep, put a 1/1 green Saproling creature token onto the battlefield.| +Viridian Emissary|Commander 2015|208|C|{1}{G}|Creature - Elf Scout|2|1|When Viridian Emissary dies, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.| +Viridian Shaman|Commander 2015|209|U|{2}{G}|Creature - Elf Shaman|2|2|When Viridian Shaman enters the battlefield, destroy target artifact.| +Scourge of Nel Toth|Commander 2015|21|R|{5}{B}{B}|Creature - Zombie Dragon|6|6|Flying$You may cast Scourge of Nel Toth from your graveyard by paying {B}{B} and sacrificing two creatures rather than paying its mana cost.| +Viridian Zealot|Commander 2015|210|R|{G}{G}|Creature - Elf Warrior|2|1|{1}{G}, Sacrifice Viridian Zealot: Destroy target artifact or enchantment.| +Wall of Blossoms|Commander 2015|211|U|{1}{G}|Creature - Plant Wall|0|4|Defender$When Wall of Blossoms enters the battlefield, draw a card.| +Wood Elves|Commander 2015|212|C|{2}{G}|Creature - Elf Scout|1|1|When Wood Elves enters the battlefield, search your library for a Forest card and put that card onto the battlefield. Then shuffle your library.| +Coiling Oracle|Commander 2015|213|C|{G}{U}|Creature - Snake Elf Druid|1|1|When Coiling Oracle enters the battlefield, reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put that card into your hand.| +Counterflux|Commander 2015|214|R|{U}{U}{R}|Instant|||Counterflux can't be countered by spells or abilities.$Counter target spell you don't control.$Overload {1}{U}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")| +Death Grasp|Commander 2015|215|R|{X}{W}{B}|Sorcery|||Death Grasp deals X damage to target creature or player. You gain X life.| +Epic Experiment|Commander 2015|216|M|{X}{U}{R}|Sorcery|||Exile the top X cards of your library. For each instant and sorcery card with converted mana cost X or less among them, you may cast that card without paying its mana cost. Then put all cards exiled this way that weren't cast into your graveyard.| +Etherium-Horn Sorcerer|Commander 2015|217|R|{4}{U}{R}|Artifact Creature - Minotaur Wizard|3|6|{1}{U}{R}: Return Etherium-Horn Sorcerer to its owner's hand.$Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)| +Firemind's Foresight|Commander 2015|218|R|{5}{U}{R}|Instant|||Search your library for an instant card with converted mana cost 3, reveal it, and put it into your hand. Then repeat this process for instant cards with converted mana costs 2 and 1. Then shuffle your library.| +Gisela, Blade of Goldnight|Commander 2015|219|M|{4}{R}{W}{W}|Legendary Creature - Angel|5|5|Flying, first strike$If a source would deal damage to an opponent or a permanent an opponent controls, that source deals double that damage to that player or permanent instead.$If a source would deal damage to you or a permanent you control, prevent half that damage, rounded up.| +Thief of Blood|Commander 2015|22|U|{4}{B}{B}|Creature - Vampire|1|1|Flying$As Thief of Blood enters the battlefield, remove all counters from all permanents. Thief of Blood enters the battlefield with a +1/+1 counter on it for each counter removed this way.| +Goblin Electromancer|Commander 2015|220|C|{U}{R}|Creature - Goblin Wizard|2|2|Instant and sorcery spells you cast cost {1} less to cast.| +Golgari Charm|Commander 2015|221|U|{B}{G}|Instant|||Choose one -$• All creatures get -1/-1 until end of turn.$• Destroy target enchantment.$• Regenerate each creature you control.| +Grisly Salvage|Commander 2015|222|C|{B}{G}|Instant|||Reveal the top five cards of your library. You may put a creature or land card from among them into your hand. Put the rest into your graveyard.| +Jarad, Golgari Lich Lord|Commander 2015|223|M|{B}{B}{G}{G}|Legendary Creature - Zombie Elf|2|2|Jarad, Golgari Lich Lord gets +1/+1 for each creature card in your graveyard.${1}{B}{G}, Sacrifice another creature: Each opponent loses life equal to the sacrificed creature's power.$Sacrifice a Swamp and a Forest: Return Jarad from your graveyard to your hand.| +Korozda Guildmage|Commander 2015|224|U|{B}{G}|Creature - Elf Shaman|2|2|{1}{B}{G}: Target creature gets +1/+1 and gains intimidate until end of turn. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.)${2}{B}{G}, Sacrifice a nontoken creature: Put X 1/1 green Saproling creature tokens onto the battlefield, where X is the sacrificed creature's toughness.| +Lorescale Coatl|Commander 2015|225|U|{1}{G}{U}|Creature - Snake|2|2|Whenever you draw a card, you may put a +1/+1 counter on Lorescale Coatl.| +Lotleth Troll|Commander 2015|226|R|{B}{G}|Creature - Zombie Troll|2|1|Trample$Discard a creature card: Put a +1/+1 counter on Lotleth Troll.${B}: Regenerate Lotleth Troll.| +Melek, Izzet Paragon|Commander 2015|227|R|{4}{U}{R}|Legendary Creature - Weird Wizard|2|4|Play with the top card of your library revealed.$You may cast the top card of your library if it's an instant or sorcery card.$Whenever you cast an instant or sorcery spell from your library, copy it. You may choose new targets for the copy.| +Mystic Snake|Commander 2015|228|R|{1}{G}{U}{U}|Creature - Snake|2|2|Flash$When Mystic Snake enters the battlefield, counter target spell.| +Necromancer's Covenant|Commander 2015|229|R|{3}{W}{B}{B}|Enchantment|||When Necromancer's Covenant enters the battlefield, exile all creature cards from target player's graveyard, then put a 2/2 black Zombie creature token onto the battlefield for each card exiled this way.$Zombies you control have lifelink.| +Wretched Confluence|Commander 2015|23|R|{3}{B}{B}|Instant|||Choose three. You may choose the same mode more than once.$• Target player draws a card and loses 1 life.$• Target creature gets -2/-2 until end of turn.$• Return target creature card from your graveyard to your hand.| +Prime Speaker Zegana|Commander 2015|230|M|{2}{G}{G}{U}{U}|Legendary Creature - Merfolk Wizard|1|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.$When Prime Speaker Zegana enters the battlefield, draw cards equal to its power.| +Prophetic Bolt|Commander 2015|231|R|{3}{U}{R}|Instant|||Prophetic Bolt deals 4 damage to target creature or player. Look at the top four cards of your library. Put one of those cards into your hand and the rest on the bottom of your library in any order.| +Putrefy|Commander 2015|232|U|{1}{B}{G}|Instant|||Destroy target artifact or creature. It can't be regenerated.| +Steam Augury|Commander 2015|233|R|{2}{U}{R}|Instant|||Reveal the top five cards of your library and separate them into two piles. An opponent chooses one of those piles. Put that pile into your hand and the other into your graveyard.| +Teysa, Envoy of Ghosts|Commander 2015|234|R|{5}{W}{B}|Legendary Creature - Human Advisor|4|4|Vigilance, protection from creatures$Whenever a creature deals combat damage to you, destroy that creature. Put a 1/1 white and black Spirit creature token with flying onto the battlefield.| +Treasury Thrull|Commander 2015|235|R|{4}{W}{B}|Creature - Thrull|4|4|Extort (Whenever you cast a spell, you may pay {WB}. If you do, each opponent loses 1 life and you gain that much life.)$Whenever Treasury Thrull attacks, you may return target artifact, creature, or enchantment card from your graveyard to your hand.| +Trygon Predator|Commander 2015|236|U|{1}{G}{U}|Creature - Beast|2|3|Flying$Whenever Trygon Predator deals combat damage to a player, you may destroy target artifact or enchantment that player controls.| +Underworld Coinsmith|Commander 2015|237|U|{W}{B}|Enchantment Creature - Human Cleric|2|2|Constellation - Whenever Underworld Coinsmith or another enchantment enters the battlefield under your control, you gain 1 life.${W}{B}, Pay 1 life: Each opponent loses 1 life.| +Vulturous Zombie|Commander 2015|238|R|{3}{B}{G}|Creature - Plant Zombie|3|3|Flying$Whenever a card is put into an opponent's graveyard from anywhere, put a +1/+1 counter on Vulturous Zombie.| +Biomantic Mastery|Commander 2015|239|R|{4}{GU}{GU}{GU}|Sorcery|||Draw a card for each creature target player controls, then draw a card for each creature another target player controls.| +Awaken the Sky Tyrant|Commander 2015|24|R|{3}{R}|Enchantment|||When a source an opponent controls deals damage to you, sacrifice Awaken the Sky Tyrant. If you do, put a 5/5 red Dragon creature token with flying onto the battlefield.| +Call the Skybreaker|Commander 2015|240|R|{5}{UR}{UR}|Sorcery|||Put a 5/5 blue and red Elemental creature token with flying onto the battlefield.$Retrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.)| +Cold-Eyed Selkie|Commander 2015|241|R|{1}{GU}{GU}|Creature - Merfolk Rogue|1|1|Islandwalk (This creature can't be blocked as long as defending player controls an Island.)$Whenever Cold-Eyed Selkie deals combat damage to a player, you may draw that many cards.| +Snakeform|Commander 2015|242|C|{2}{GU}|Instant|||Until end of turn, target creature loses all abilities and becomes a green Snake with base power and toughness 1/1.$Draw a card.| +Wistful Selkie|Commander 2015|243|U|{GU}{GU}{GU}|Creature - Merfolk Wizard|2|2|When Wistful Selkie enters the battlefield, draw a card.| +Basalt Monolith|Commander 2015|244|U|{3}|Artifact|||Basalt Monolith doesn't untap during your untap step.${tap}: Add {3} to your mana pool.${3}: Untap Basalt Monolith.| +Bonehoard|Commander 2015|245|R|{4}|Artifact - Equipment|||Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.)$Equipped creature gets +X/+X, where X is the number of creature cards in all graveyards.$Equip {2}| +Boros Cluestone|Commander 2015|246|C|{3}|Artifact|||{tap}: Add {R} or {W} to your mana pool.${R}{W}, {tap}, Sacrifice Boros Cluestone: Draw a card.| +Boros Signet|Commander 2015|247|C|{2}|Artifact|||{1}, {tap}: Add {R}{W} to your mana pool.| +Burnished Hart|Commander 2015|248|U|{3}|Artifact Creature - Elk|2|2|{3}, Sacrifice Burnished Hart: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library.| +Coldsteel Heart|Commander 2015|249|U|{2}|Snow Artifact|||Coldsteel Heart enters the battlefield tapped.$As Coldsteel Heart enters the battlefield, choose a color.${tap}: Add one mana of the chosen color to your mana pool.| +Dream Pillager|Commander 2015|25|R|{5}{R}{R}|Creature - Dragon|4|4|Flying$Whenever Dream Pillager deals combat damage to a player, exile that many cards from the top of your library. Until end of turn, you may cast nonland cards exiled this way.| +Crystal Chimes|Commander 2015|250|U|{3}|Artifact|||{3}, {tap}, Sacrifice Crystal Chimes: Return all enchantment cards from your graveyard to your hand.| +Darksteel Ingot|Commander 2015|251|U|{3}|Artifact|||Indestructible${tap}: Add one mana of any color to your mana pool.| +Dreamstone Hedron|Commander 2015|252|U|{6}|Artifact|||{tap}: Add {3} to your mana pool.${3}, {tap}, Sacrifice Dreamstone Hedron: Draw three cards.| +Eldrazi Monument|Commander 2015|253|M|{5}|Artifact|||Creatures you control get +1/+1 and have flying and indestructible.$At the beginning of your upkeep, sacrifice a creature. If you can't, sacrifice Eldrazi Monument.| +Fellwar Stone|Commander 2015|254|U|{2}|Artifact|||{tap}: Add to your mana pool one mana of any color that a land an opponent controls could produce.| +Golgari Signet|Commander 2015|255|C|{2}|Artifact|||{1}, {tap}: Add {B}{G} to your mana pool.| +Izzet Signet|Commander 2015|256|C|{2}|Artifact|||{1}, {tap}: Add {U}{R} to your mana pool.| +Lightning Greaves|Commander 2015|257|U|{2}|Artifact - Equipment|||Equipped creature has haste and shroud. (It can't be the target of spells or abilities.)$Equip {0}| +Loxodon Warhammer|Commander 2015|258|R|{3}|Artifact - Equipment|||Equipped creature gets +3/+0 and has trample and lifelink.$Equip {3}| +Mind Stone|Commander 2015|259|U|{2}|Artifact|||{tap}: Add {1} to your mana pool.${1}, {tap}, Sacrifice Mind Stone: Draw a card.| +Fiery Confluence|Commander 2015|26|R|{2}{R}{R}|Sorcery|||Choose three. You may choose the same mode more than once.$• Fiery Confluence deals 1 damage to each creature.$• Fiery Confluence deals 2 damage to each opponent.$• Destroy target artifact.| +Orochi Hatchery|Commander 2015|260|R|{X}{X}|Artifact|||Orochi Hatchery enters the battlefield with X charge counters on it.${5}, {tap}: Put a 1/1 green Snake creature token onto the battlefield for each charge counter on Orochi Hatchery.| +Orzhov Cluestone|Commander 2015|261|C|{3}|Artifact|||{tap}: Add {W} or {B} to your mana pool.${W}{B}, {tap}, Sacrifice Orzhov Cluestone: Draw a card.| +Orzhov Signet|Commander 2015|262|C|{2}|Artifact|||{1}, {tap}: Add {W}{B} to your mana pool.| +Psychosis Crawler|Commander 2015|263|R|{5}|Artifact Creature - Horror|*|*|Psychosis Crawler's power and toughness are each equal to the number of cards in your hand.$Whenever you draw a card, each opponent loses 1 life.| +Seer's Sundial|Commander 2015|264|R|{4}|Artifact|||Landfall - Whenever a land enters the battlefield under your control, you may pay {2}. If you do, draw a card.| +Simic Keyrune|Commander 2015|265|U|{3}|Artifact|||{tap}: Add {G} or {U} to your mana pool.${G}{U}: Simic Keyrune becomes a 2/3 green and blue Crab artifact creature with hexproof until end of turn. (It can't be the target of spells or abilities your opponents control.)| +Simic Signet|Commander 2015|266|C|{2}|Artifact|||{1}, {tap}: Add {G}{U} to your mana pool.| +Skullclamp|Commander 2015|267|U|{1}|Artifact - Equipment|||Equipped creature gets +1/-1.$Whenever equipped creature dies, draw two cards.$Equip {1}| +Sol Ring|Commander 2015|268|U|{1}|Artifact|||{tap}: Add {2} to your mana pool.| +Solemn Simulacrum|Commander 2015|269|R|{4}|Artifact Creature - Golem|2|2|When Solemn Simulacrum enters the battlefield, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library.$When Solemn Simulacrum dies, you may draw a card.| +Magus of the Wheel|Commander 2015|27|R|{2}{R}|Creature - Human Wizard|3|3|{1}{R}, {tap}, Sacrifice Magus of the Wheel: Each player discards his or her hand, then draws seven cards.| +Staff of Nin|Commander 2015|270|R|{6}|Artifact|||At the beginning of your upkeep, draw a card.${tap}: Staff of Nin deals 1 damage to target creature or player.| +Swiftfoot Boots|Commander 2015|271|U|{2}|Artifact - Equipment|||Equipped creature has hexproof and haste.$Equip {1}| +Sword of Vengeance|Commander 2015|272|R|{3}|Artifact - Equipment|||Equipped creature gets +2/+0 and has first strike, vigilance, trample, and haste.$Equip {3}| +Urza's Incubator|Commander 2015|273|R|{3}|Artifact|||As Urza's Incubator enters the battlefield, choose a creature type.$Creature spells of the chosen type cost {2} less to cast.| +Wayfarer's Bauble|Commander 2015|274|C|{1}|Artifact|||{2}, {tap}, Sacrifice Wayfarer's Bauble: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library.| +Worn Powerstone|Commander 2015|275|U|{3}|Artifact|||Worn Powerstone enters the battlefield tapped.${tap}: Add {2} to your mana pool.| +Ancient Amphitheater|Commander 2015|276|R||Land|||As Ancient Amphitheater enters the battlefield, you may reveal a Giant card from your hand. If you don't, Ancient Amphitheater enters the battlefield tapped.${tap}: Add {R} or {W} to your mana pool.| +Barren Moor|Commander 2015|277|C||Land|||Barren Moor enters the battlefield tapped.${tap}: Add {B} to your mana pool.$Cycling {B} ({B}, Discard this card: Draw a card.)| +Blasted Landscape|Commander 2015|278|U||Land|||{tap}: Add {1} to your mana pool.$Cycling {2} ({2}, Discard this card: Draw a card.)| +Boros Garrison|Commander 2015|279|C||Land|||Boros Garrison enters the battlefield tapped.$When Boros Garrison enters the battlefield, return a land you control to its owner's hand.${tap}: Add {R}{W} to your mana pool.| +Meteor Blast|Commander 2015|28|U|{X}{R}{R}{R}|Sorcery|||Meteor Blast deals 4 damage to each of X target creatures and/or players.| +Boros Guildgate|Commander 2015|280|C||Land - Gate|||Boros Guildgate enters the battlefield tapped.${tap}: Add {R} or {W} to your mana pool.| +Command Tower|Commander 2015|281|C||Land|||{tap}: Add to your mana pool one mana of any color in your commander's color identity.| +Drifting Meadow|Commander 2015|282|C||Land|||Drifting Meadow enters the battlefield tapped.${tap}: Add {W} to your mana pool.$Cycling {2} ({2}, Discard this card: Draw a card.)| +Evolving Wilds|Commander 2015|283|C||Land|||{tap}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library.| +Forgotten Cave|Commander 2015|284|C||Land|||Forgotten Cave enters the battlefield tapped.${tap}: Add {R} to your mana pool.$Cycling {R} ({R}, Discard this card: Draw a card.)| +Ghost Quarter|Commander 2015|285|U||Land|||{tap}: Add {1} to your mana pool.${tap}, Sacrifice Ghost Quarter: Destroy target land. Its controller may search his or her library for a basic land card, put it onto the battlefield, then shuffle his or her library.| +Golgari Guildgate|Commander 2015|286|C||Land - Gate|||Golgari Guildgate enters the battlefield tapped.${tap}: Add {B} or {G} to your mana pool.| +Golgari Rot Farm|Commander 2015|287|C||Land|||Golgari Rot Farm enters the battlefield tapped.$When Golgari Rot Farm enters the battlefield, return a land you control to its owner's hand.${tap}: Add {B}{G} to your mana pool.| +Grim Backwoods|Commander 2015|288|R||Land|||{tap}: Add {1} to your mana pool.${2}{B}{G}, {tap}, Sacrifice a creature: Draw a card.| +High Market|Commander 2015|289|R||Land|||{tap}: Add {1} to your mana pool.${tap}, Sacrifice a creature: You gain 1 life.| +Mizzix's Mastery|Commander 2015|29|R|{3}{R}|Sorcery|||Exile target card that's an instant or sorcery from your graveyard. For each card exiled this way, copy it, and you may cast the copy without paying its mana cost. Exile Mizzix's Mastery.$Overload {5}{R}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")| +Izzet Boilerworks|Commander 2015|290|C||Land|||Izzet Boilerworks enters the battlefield tapped.$When Izzet Boilerworks enters the battlefield, return a land you control to its owner's hand.${tap}: Add {U}{R} to your mana pool.| +Izzet Guildgate|Commander 2015|291|C||Land - Gate|||Izzet Guildgate enters the battlefield tapped.${tap}: Add {U} or {R} to your mana pool.| +Jungle Hollow|Commander 2015|292|C||Land|||Jungle Hollow enters the battlefield tapped.$When Jungle Hollow enters the battlefield, you gain 1 life.${tap}: Add {B} or {G} to your mana pool.| +Llanowar Reborn|Commander 2015|293|U||Land|||Llanowar Reborn enters the battlefield tapped.${tap}: Add {G} to your mana pool.$Graft 1 (This land enters the battlefield with a +1/+1 counter on it. Whenever a creature enters the battlefield, you may move a +1/+1 counter from this land onto it.)| +Mosswort Bridge|Commander 2015|294|R||Land|||Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.)${tap}: Add {G} to your mana pool.${G}, {tap}: You may play the exiled card without paying its mana cost if creatures you control have total power 10 or greater.| +New Benalia|Commander 2015|295|U||Land|||New Benalia enters the battlefield tapped.$When New Benalia enters the battlefield, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)${tap}: Add {W} to your mana pool.| +Novijen, Heart of Progress|Commander 2015|296|U||Land|||{tap}: Add {1} to your mana pool.${G}{U}, {tap}: Put a +1/+1 counter on each creature that entered the battlefield this turn.| +Oran-Rief, the Vastwood|Commander 2015|297|R||Land|||Oran-Rief, the Vastwood enters the battlefield tapped.${tap}: Add {G} to your mana pool.${tap}: Put a +1/+1 counter on each green creature that entered the battlefield this turn.| +Orzhov Basilica|Commander 2015|298|C||Land|||Orzhov Basilica enters the battlefield tapped.$When Orzhov Basilica enters the battlefield, return a land you control to its owner's hand.${tap}: Add {W}{B} to your mana pool.| +Orzhov Guildgate|Commander 2015|299|C||Land - Gate|||Orzhov Guildgate enters the battlefield tapped.${tap}: Add {W} or {B} to your mana pool.| +Grasp of Fate|Commander 2015|3|R|{1}{W}{W}|Enchantment|||When Grasp of Fate enters the battlefield, for each opponent, exile up to one target nonland permanent that player controls until Grasp of Fate leaves the battlefield. (Those permanents return under their owners' control.)| +Rite of the Raging Storm|Commander 2015|30|U|{3}{R}{R}|Enchantment|||Creatures named Lightning Rager can't attack you or planeswalkers you control.$At the beginning of each player's upkeep, that player puts a 5/1 red Elemental creature token named Lightning Rager onto the battlefield. It has trample, haste, and "At the beginning of the end step, sacrifice this creature."| +Polluted Mire|Commander 2015|300|C||Land|||Polluted Mire enters the battlefield tapped.${tap}: Add {B} to your mana pool.$Cycling {2} ({2}, Discard this card: Draw a card.)| +Reliquary Tower|Commander 2015|301|U||Land|||You have no maximum hand size.${tap}: Add {1} to your mana pool.| +Rogue's Passage|Commander 2015|302|U||Land|||{tap}: Add {1} to your mana pool.${4}, {tap}: Target creature can't be blocked this turn.| +Scoured Barrens|Commander 2015|303|C||Land|||Scoured Barrens enters the battlefield tapped.$When Scoured Barrens enters the battlefield, you gain 1 life.${tap}: Add {W} or {B} to your mana pool.| +Secluded Steppe|Commander 2015|304|C||Land|||Secluded Steppe enters the battlefield tapped.${tap}: Add {W} to your mana pool.$Cycling {W} ({W}, Discard this card: Draw a card.)| +Simic Growth Chamber|Commander 2015|305|C||Land|||Simic Growth Chamber enters the battlefield tapped.$When Simic Growth Chamber enters the battlefield, return a land you control to its owner's hand.${tap}: Add {G}{U} to your mana pool.| +Simic Guildgate|Commander 2015|306|C||Land - Gate|||Simic Guildgate enters the battlefield tapped.${tap}: Add {G} or {U} to your mana pool.| +Slippery Karst|Commander 2015|307|C||Land|||Slippery Karst enters the battlefield tapped.${tap}: Add {G} to your mana pool.$Cycling {2} ({2}, Discard this card: Draw a card.)| +Smoldering Crater|Commander 2015|308|C||Land|||Smoldering Crater enters the battlefield tapped.${tap}: Add {R} to your mana pool.$Cycling {2} ({2}, Discard this card: Draw a card.)| +Spinerock Knoll|Commander 2015|309|R||Land|||Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.)${tap}: Add {R} to your mana pool.${R}, {tap}: You may play the exiled card without paying its mana cost if an opponent was dealt 7 or more damage this turn.| +Warchief Giant|Commander 2015|31|U|{3}{R}{R}|Creature - Giant Warrior|5|3|Haste$Myriad (Whenever this creature attacks, for each opponent other than defending player, you may put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile the tokens at end of combat.)| +Swiftwater Cliffs|Commander 2015|310|C||Land|||Swiftwater Cliffs enters the battlefield tapped.$When Swiftwater Cliffs enters the battlefield, you gain 1 life.${tap}: Add {U} or {R} to your mana pool.| +Tainted Field|Commander 2015|311|U||Land|||{tap}: Add {1} to your mana pool.${tap}: Add {W} or {B} to your mana pool. Activate this ability only if you control a Swamp.| +Tainted Wood|Commander 2015|312|U||Land|||{tap}: Add {1} to your mana pool.${tap}: Add {B} or {G} to your mana pool. Activate this ability only if you control a Swamp.| +Temple of the False God|Commander 2015|313|U||Land|||{tap}: Add {2} to your mana pool. Activate this ability only if you control five or more lands.| +Terramorphic Expanse|Commander 2015|314|C||Land|||{tap}, Sacrifice Terramorphic Expanse: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library.| +Thornwood Falls|Commander 2015|315|C||Land|||Thornwood Falls enters the battlefield tapped.$When Thornwood Falls enters the battlefield, you gain 1 life.${tap}: Add {G} or {U} to your mana pool.| +Vivid Crag|Commander 2015|316|U||Land|||Vivid Crag enters the battlefield tapped with two charge counters on it.${tap}: Add {R} to your mana pool.${tap}, Remove a charge counter from Vivid Crag: Add one mana of any color to your mana pool.| +Vivid Creek|Commander 2015|317|U||Land|||Vivid Creek enters the battlefield tapped with two charge counters on it.${tap}: Add {U} to your mana pool.${tap}, Remove a charge counter from Vivid Creek: Add one mana of any color to your mana pool.| +Vivid Grove|Commander 2015|318|U||Land|||Vivid Grove enters the battlefield tapped with two charge counters on it.${tap}: Add {G} to your mana pool.${tap}, Remove a charge counter from Vivid Grove: Add one mana of any color to your mana pool.| +Vivid Marsh|Commander 2015|319|U||Land|||Vivid Marsh enters the battlefield tapped with two charge counters on it.${tap}: Add {B} to your mana pool.${tap}, Remove a charge counter from Vivid Marsh: Add one mana of any color to your mana pool.| +Arachnogenesis|Commander 2015|32|R|{2}{G}|Instant|||Put X 1/2 green Spider creature tokens with reach onto the battlefield, where X is the number of creatures attacking you. Prevent all combat damage that would be dealt this turn by non-Spider creatures.| +Vivid Meadow|Commander 2015|320|U||Land|||Vivid Meadow enters the battlefield tapped with two charge counters on it.${tap}: Add {W} to your mana pool.${tap}, Remove a charge counter from Vivid Meadow: Add one mana of any color to your mana pool.| +Wind-Scarred Crag|Commander 2015|321|C||Land|||Wind-Scarred Crag enters the battlefield tapped.$When Wind-Scarred Crag enters the battlefield, you gain 1 life.${tap}: Add {R} or {W} to your mana pool.| +Zoetic Cavern|Commander 2015|322|U||Land|||{tap}: Add {1} to your mana pool.$Morph {2} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)| +Plains|Commander 2015|323|L||Basic Land - Plains|||W| +Plains|Commander 2015|324|L||Basic Land - Plains|||W| +Plains|Commander 2015|325|L||Basic Land - Plains|||W| +Plains|Commander 2015|326|L||Basic Land - Plains|||W| +Island|Commander 2015|327|L||Basic Land - Island|||U| +Island|Commander 2015|328|L||Basic Land - Island|||U| +Island|Commander 2015|329|L||Basic Land - Island|||U| +Bloodspore Thrinax|Commander 2015|33|R|{2}{G}{G}|Creature - Lizard|2|2|Devour 1 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with that many +1/+1 counters on it.)$Each other creature you control enters the battlefield with an additional X +1/+1 counters on it, where X is the number of +1/+1 counters on Bloodspore Thrinax.| +Island|Commander 2015|330|L||Basic Land - Island|||U| +Swamp|Commander 2015|331|L||Basic Land - Swamp|||B| +Swamp|Commander 2015|332|L||Basic Land - Swamp|||B| +Swamp|Commander 2015|333|L||Basic Land - Swamp|||B| +Swamp|Commander 2015|334|L||Basic Land - Swamp|||B| +Mountain|Commander 2015|335|L||Basic Land - Mountain|||R| +Mountain|Commander 2015|336|L||Basic Land - Mountain|||R| +Mountain|Commander 2015|337|L||Basic Land - Mountain|||R| +Mountain|Commander 2015|338|L||Basic Land - Mountain|||R| +Forest|Commander 2015|339|L||Basic Land - Forest|||G| +Caller of the Pack|Commander 2015|34|U|{5}{G}{G}|Creature - Beast|8|6|Trample$Myriad (Whenever this creature attacks, for each opponent other than defending player, you may put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile the tokens at end of combat.)| +Forest|Commander 2015|340|L||Basic Land - Forest|||G| +Forest|Commander 2015|341|L||Basic Land - Forest|||G| +Forest|Commander 2015|342|L||Basic Land - Forest|||G| +Centaur Vinecrasher|Commander 2015|35|R|{3}{G}|Creature - Plant Centaur|1|1|Trample$Centaur Vinecrasher enters the battlefield with a number of +1/+1 counters on it equal to the number of land cards in all graveyards.$Whenever a land card is put into a graveyard from anywhere, you may pay {G}{G}. If you do, return Centaur Vinecrasher from your graveyard to your hand.| +Ezuri's Predation|Commander 2015|36|R|{5}{G}{G}{G}|Sorcery|||For each creature your opponents control, put a 4/4 green Beast creature token onto the battlefield. Each of those Beasts fights a different one of those creatures.| +Great Oak Guardian|Commander 2015|37|U|{5}{G}|Creature - Treefolk|4|5|Flash (You may cast this spell any time you could cast an instant.)$Reach$When Great Oak Guardian enters the battlefield, creatures target player controls get +2/+2 until end of turn. Untap them.| +Pathbreaker Ibex|Commander 2015|38|R|{4}{G}{G}|Creature - Goat|3|3|Whenever Pathbreaker Ibex attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control.| +Skullwinder|Commander 2015|39|U|{2}{G}|Creature - Snake|1|3|Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)$When Skullwinder enters the battlefield, return target card from your graveyard to your hand, then choose an opponent. That player returns a card from his or her graveyard to his or her hand.| +Herald of the Host|Commander 2015|4|U|{3}{W}{W}|Creature - Angel|4|4|Flying, vigilance$Myriad (Whenever this creature attacks, for each opponent other than defending player, you may put a token that's a copy of this creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile the tokens at end of combat.)| +Verdant Confluence|Commander 2015|40|R|{4}{G}{G}|Sorcery|||Choose three. You may choose the same mode more than once.$• Put two +1/+1 counters on target creature.$• Return target permanent card from your graveyard to your hand.$• Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.| +Anya, Merciless Angel|Commander 2015|41|M|{3}{R}{W}|Legendary Creature - Angel|4|4|Flying$Anya, Merciless Angel gets +3/+3 for each opponent whose life total is less than half his or her starting life total.$As long as an opponent's life total is less than half his or her starting life total, Anya has indestructible.| +Arjun, the Shifting Flame|Commander 2015|42|M|{4}{U}{R}|Legendary Creature - Sphinx Wizard|5|5|Flying$Whenever you cast a spell, put the cards in your hand on the bottom of your library in any order, then draw that many cards.| +Daxos the Returned|Commander 2015|43|M|{1}{W}{B}|Legendary Creature - Zombie Soldier|2|2|Whenever you cast an enchantment spell, you get an experience counter.${1}{W}{B}: Put a white and black Spirit enchantment creature token onto the battlefield. It has "This creature's power and toughness are each equal to the number of experience counters you have."| +Ezuri, Claw of Progress|Commander 2015|44|M|{2}{G}{U}|Legendary Creature - Elf Warrior|3|3|Whenever a creature with power 2 or less enters the battlefield under your control, you get an experience counter.$At the beginning of combat on your turn, put X +1/+1 counters on another target creature you control, where X is the number of experience counters you have.| +Kalemne, Disciple of Iroas|Commander 2015|45|M|{2}{R}{W}|Legendary Creature - Giant Soldier|3|3|Double strike, vigilance$Whenever you cast a creature spell with converted mana cost 5 or greater, you get an experience counter.$Kalemne, Disciple of Iroas gets +1/+1 for each experience counter you have.| +Karlov of the Ghost Council|Commander 2015|46|M|{W}{B}|Legendary Creature - Spirit Advisor|2|2|Whenever you gain life, put two +1/+1 counters on Karlov of the Ghost Council.${W}{B}, Remove six +1/+1 counters from Karlov of the Ghost Council: Exile target creature.| +Kaseto, Orochi Archmage|Commander 2015|47|M|{1}{G}{U}|Legendary Creature - Snake Wizard|2|2|{G}{U}: Target creature can't be blocked this turn. If that creature is a Snake, it gets +2/+2 until end of turn.| +Mazirek, Kraul Death Priest|Commander 2015|48|M|{3}{B}{G}|Legendary Creature - Insect Shaman|2|2|Flying$Whenever a player sacrifices another permanent, put a +1/+1 counter on each creature you control.| +Meren of Clan Nel Toth|Commander 2015|49|M|{2}{B}{G}|Legendary Creature - Human Shaman|3|4|Whenever another creature you control dies, you get an experience counter.$At the beginning of your end step, choose target creature card in your graveyard. If that card's converted mana cost is less than or equal to the number of experience counters you have, return it to the battlefield. Otherwise, put it into your hand.| +Kalemne's Captain|Commander 2015|5|R|{3}{W}{W}|Creature - Giant Soldier|5|5|Vigilance${5}{W}{W}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.)$When Kalemne's Captain becomes monstrous, exile all artifacts and enchantments.| +Mizzix of the Izmagnus|Commander 2015|50|M|{2}{U}{R}|Legendary Creature - Goblin Wizard|2|2|Whenever you cast an instant or sorcery spell with converted mana cost greater than the number of experience counters you have, you get an experience counter.$Instant and sorcery spells you cast cost {1} less to cast for each experience counter you have.| +Blade of Selves|Commander 2015|51|R|{2}|Artifact - Equipment|||Equipped creature has myriad. (Whenever it attacks, for each opponent other than defending player, you may put a token that's a copy of that creature onto the battlefield tapped and attacking that player or a planeswalker he or she controls. Exile the tokens at end of combat.)$Equip {4}| +Sandstone Oracle|Commander 2015|52|U|{7}|Artifact Creature - Sphinx|4|4|Flying$When Sandstone Oracle enters the battlefield, choose an opponent. If that player has more cards in hand than you, draw cards equal to the difference.| +Scytheclaw|Commander 2015|53|R|{5}|Artifact - Equipment|||Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.)$Equipped creature gets +1/+1.$Whenever equipped creature deals combat damage to a player, that player loses half his or her life, rounded up.$Equip {3}| +Seal of the Guildpact|Commander 2015|54|R|{5}|Artifact|||As Seal of the Guildpact enters the battlefield, choose two colors.$Each spell you cast costs {1} less to cast for each of the chosen colors it is.| +Thought Vessel|Commander 2015|55|C|{2}|Artifact|||You have no maximum hand size.${tap}: Add {1} to your mana pool.| +Command Beacon|Commander 2015|56|R||Land|||{tap}: Add {1} to your mana pool.${tap}, Sacrifice Command Beacon: Put your commander into your hand from the command zone.| +Ajani's Chosen|Commander 2015|57|R|{2}{W}{W}|Creature - Cat Soldier|3|3|Whenever an enchantment enters the battlefield under your control, put a 2/2 white Cat creature token onto the battlefield. If that enchantment is an Aura, you may attach it to the token.| +Angel of Serenity|Commander 2015|58|M|{4}{W}{W}{W}|Creature - Angel|5|6|Flying$When Angel of Serenity enters the battlefield, you may exile up to three other target creatures from the battlefield and/or creature cards from graveyards.$When Angel of Serenity leaves the battlefield, return the exiled cards to their owners' hands.| +Arbiter of Knollridge|Commander 2015|59|R|{6}{W}|Creature - Giant Wizard|5|5|Vigilance$When Arbiter of Knollridge enters the battlefield, each player's life total becomes the highest life total among all players.| +Oreskos Explorer|Commander 2015|6|U|{1}{W}|Creature - Cat Scout|2|2|When Oreskos Explorer enters the battlefield, search your library for up to X Plains cards, where X is the number of players who control more lands than you. Reveal those cards, put them into your hand, then shuffle your library.| +Aura of Silence|Commander 2015|60|U|{1}{W}{W}|Enchantment|||Artifact and enchantment spells your opponents cast cost {2} more to cast.$Sacrifice Aura of Silence: Destroy target artifact or enchantment.| +Banishing Light|Commander 2015|61|U|{2}{W}|Enchantment|||When Banishing Light enters the battlefield, exile target nonland permanent an opponent controls until Banishing Light leaves the battlefield. (That permanent returns under its owner's control.)| +Cage of Hands|Commander 2015|62|C|{2}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature can't attack or block.${1}{W}: Return Cage of Hands to its owner's hand.| +Celestial Ancient|Commander 2015|63|R|{3}{W}{W}|Creature - Elemental|3|3|Flying$Whenever you cast an enchantment spell, put a +1/+1 counter on each creature you control.| +Celestial Archon|Commander 2015|64|R|{3}{W}{W}|Enchantment Creature - Archon|4|4|Bestow {5}{W}{W} (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.)$Flying, first strike$Enchanted creature gets +4/+4 and has flying and first strike.| +Crib Swap|Commander 2015|65|U|{2}{W}|Tribal Instant - Shapeshifter|||Changeling (This card is every creature type at all times.)$Exile target creature. Its controller puts a 1/1 colorless Shapeshifter creature token with changeling onto the battlefield.| +Dawn to Dusk|Commander 2015|66|U|{2}{W}{W}|Sorcery|||Choose one or both -$• Return target enchantment card from your graveyard to your hand.$• Destroy target enchantment.| +Dawnglare Invoker|Commander 2015|67|C|{2}{W}|Creature - Kor Wizard|2|1|Flying${8}: Tap all creatures target player controls.| +Dictate of Heliod|Commander 2015|68|R|{3}{W}{W}|Enchantment|||Flash$Creatures you control get +2/+2.| +Faith's Fetters|Commander 2015|69|C|{3}{W}|Enchantment - Aura|||Enchant permanent$When Faith's Fetters enters the battlefield, you gain 4 life.$Enchanted permanent's activated abilities can't be activated unless they're mana abilities. If enchanted permanent is a creature, it can't attack or block.| +Righteous Confluence|Commander 2015|7|R|{3}{W}{W}|Sorcery|||Choose three. You may choose the same mode more than once.$• Put a 2/2 white Knight creature token with vigilance onto the battlefield.$• Exile target enchantment.$• You gain 5 life.| +Ghostblade Eidolon|Commander 2015|70|U|{2}{W}|Enchantment Creature - Spirit|1|1|Bestow {5}{W} (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.)$Double strike (This creature deals both first-strike and regular combat damage.)$Enchanted creature gets +1/+1 and has double strike.| +Jareth, Leonine Titan|Commander 2015|71|R|{3}{W}{W}{W}|Legendary Creature - Cat Giant|4|7|Whenever Jareth, Leonine Titan blocks, it gets +7/+7 until end of turn.${W}: Jareth gains protection from the color of your choice until end of turn.| +Karmic Justice|Commander 2015|72|R|{2}{W}|Enchantment|||Whenever a spell or ability an opponent controls destroys a noncreature permanent you control, you may destroy target permanent that opponent controls.| +Kor Sanctifiers|Commander 2015|73|C|{2}{W}|Creature - Kor Cleric|2|3|Kicker {W} (You may pay an additional {W} as you cast this spell.)$When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment.| +Marshal's Anthem|Commander 2015|74|R|{2}{W}{W}|Enchantment|||Multikicker {1}{W} (You may pay an additional {1}{W} any number of times as you cast this spell.)$Creatures you control get +1/+1.$When Marshal's Anthem enters the battlefield, return up to X target creature cards from your graveyard to the battlefield, where X is the number of times Marshal's Anthem was kicked.| +Mesa Enchantress|Commander 2015|75|R|{1}{W}{W}|Creature - Human Druid|0|2|Whenever you cast an enchantment spell, you may draw a card.| +Monk Idealist|Commander 2015|76|U|{2}{W}|Creature - Human Monk Cleric|2|2|When Monk Idealist enters the battlefield, return target enchantment card from your graveyard to your hand.| +Open the Vaults|Commander 2015|77|R|{4}{W}{W}|Sorcery|||Return all artifact and enchantment cards from all graveyards to the battlefield under their owners' control. (Auras with nothing to enchant remain in graveyards.)| +Orim's Thunder|Commander 2015|78|C|{2}{W}|Instant|||Kicker {R} (You may pay an additional {R} as you cast this spell.)$Destroy target artifact or enchantment. If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature.| +Seal of Cleansing|Commander 2015|79|C|{1}{W}|Enchantment|||Sacrifice Seal of Cleansing: Destroy target artifact or enchantment.| +Shielded by Faith|Commander 2015|8|R|{1}{W}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature has indestructible.$Whenever a creature enters the battlefield, you may attach Shielded by Faith to that creature.| +Sigil of the Empty Throne|Commander 2015|80|R|{3}{W}{W}|Enchantment|||Whenever you cast an enchantment spell, put a 4/4 white Angel creature token with flying onto the battlefield.| +Silent Sentinel|Commander 2015|81|R|{5}{W}{W}|Creature - Archon|4|6|Flying$Whenever Silent Sentinel attacks, you may return target enchantment card from your graveyard to the battlefield.| +Sun Titan|Commander 2015|82|M|{4}{W}{W}|Creature - Giant|6|6|Vigilance$Whenever Sun Titan enters the battlefield or attacks, you may return target permanent card with converted mana cost 3 or less from your graveyard to the battlefield.| +Victory's Herald|Commander 2015|83|R|{3}{W}{W}{W}|Creature - Angel|4|4|Flying$Whenever Victory's Herald attacks, attacking creatures gain flying and lifelink until end of turn.| +Vow of Duty|Commander 2015|84|U|{2}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+2, has vigilance, and can't attack you or a planeswalker you control.| +AEtherize|Commander 2015|85|U|{3}{U}|Instant|||Return all attacking creatures to their owner's hand.| +Bident of Thassa|Commander 2015|86|R|{2}{U}{U}|Legendary Enchantment Artifact|||Whenever a creature you control deals combat damage to a player, you may draw a card.${1}{U}, {tap}: Creatures your opponents control attack this turn if able.| +Blatant Thievery|Commander 2015|87|R|{4}{U}{U}{U}|Sorcery|||For each opponent, gain control of target permanent that player controls.| +Blue Sun's Zenith|Commander 2015|88|R|{X}{U}{U}{U}|Instant|||Target player draws X cards. Shuffle Blue Sun's Zenith into its owner's library.| +Blustersquall|Commander 2015|89|U|{U}|Instant|||Tap target creature you don't control.$Overload {3}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")| +AEthersnatch|Commander 2015|9|R|{4}{U}{U}|Instant|||Gain control of target spell. You may choose new targets for it. (If that spell becomes a permanent, it enters the battlefield under your control.)| +Brainstorm|Commander 2015|90|C|{U}|Instant|||Draw three cards, then put two cards from your hand on top of your library in any order.| +Day of the Dragons|Commander 2015|91|R|{4}{U}{U}{U}|Enchantment|||When Day of the Dragons enters the battlefield, exile all creatures you control. Then put that many 5/5 red Dragon creature tokens with flying onto the battlefield.$When Day of the Dragons leaves the battlefield, sacrifice all Dragons you control. Then return the exiled cards to the battlefield under your control.| +Dominate|Commander 2015|92|U|{X}{1}{U}{U}|Instant|||Gain control of target creature with converted mana cost X or less.| +Echoing Truth|Commander 2015|93|C|{1}{U}|Instant|||Return target nonland permanent and all other permanents with the same name as that permanent to their owners' hands.| +Fact or Fiction|Commander 2015|94|U|{3}{U}|Instant|||Reveal the top five cards of your library. An opponent separates those cards into two piles. Put one pile into your hand and the other into your graveyard.| +Jace's Archivist|Commander 2015|95|R|{1}{U}{U}|Creature - Vedalken Wizard|2|2|{U}, {tap}: Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way.| +Lone Revenant|Commander 2015|96|R|{3}{U}{U}|Creature - Spirit|4|4|Hexproof (This creature can't be the target of spells or abilities your opponents control.)$Whenever Lone Revenant deals combat damage to a player, if you control no other creatures, look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.| +Mulldrifter|Commander 2015|97|U|{4}{U}|Creature - Elemental|2|2|Flying$When Mulldrifter enters the battlefield, draw two cards.$Evoke {2}{U} (You may cast this spell for its evoke cost. If you do, it's sacrificed when it enters the battlefield.)| +Mystic Retrieval|Commander 2015|98|U|{3}{U}|Sorcery|||Return target instant or sorcery card from your graveyard to your hand.$Flashback {2}{R} (You may cast this card from your graveyard for its flashback cost. Then exile it.)| +Ninja of the Deep Hours|Commander 2015|99|C|{3}{U}|Creature - Human Ninja|2|2|Ninjutsu {1}{U} ({1}{U}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.)$Whenever Ninja of the Deep Hours deals combat damage to a player, you may draw a card.| +Ugin, the Spirit Dragon|Ugin's Fate|1|M|{8}|Planeswalker - Ugin|||+2: Ugin, the Spirit Dragon deals 3 damage to target creature or player.$?X: Exile each permanent with converted mana cost X or less that's one or more colors.$?10: You gain 7 life, draw seven cards, then put up to seven permanent cards from your hand onto the battlefield.| +Mastery of the Unseen|Ugin's Fate|19|R|{1}{W}|Enchantment|||Whenever a permanent you control is turned face up, you gain 1 life for each creature you control.${3}{W}: Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Smite the Monstrous|Ugin's Fate|24|C|{3}{W}|Instant|||Destroy target creature with power 4 or greater.| +Soul Summons|Ugin's Fate|26|C|{1}{W}|Sorcery|||Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Watcher of the Roost|Ugin's Fate|30|U|{2}{W}|Creature - Bird Soldier|2|1|Flying$Morph-Reveal a white card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Watcher of the Roost is turned face up, you gain 2 life.| +Jeskai Infiltrator|Ugin's Fate|36|R|{2}{U}|Creature - Human Monk|2|3|Jeskai Infiltrator can't be blocked as long as you control no other creatures.$When Jeskai Infiltrator deals combat damage to a player, exile it and the top card of your library in a face-down pile, shuffle that pile, then manifest those cards. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Reality Shift|Ugin's Fate|46|U|{1}{U}|Instant|||Exile target creature. Its controller manifests the top card of his or her library. (That player puts the top card of his or her library onto the battlefield face down as a 2/2 creature. If it's a creature card, it can be turned face up any time for its mana cost.)| +Mystic of the Hidden Way|Ugin's Fate|48|C|{4}{U}|Creature - Human Monk|3|2|Mystic of the Hidden Way can't be blocked.$Morph {2}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)| +Write into Being|Ugin's Fate|59|C|{2}{U}|Sorcery|||Look at the top two cards of your library. Manifest one of those cards, then put the other on the top or bottom of your library. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Debilitating Injury|Ugin's Fate|68|C|{1}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets -2/-2.| +Grim Haruspex|Ugin's Fate|73|R|{2}{B}|Creature - Human Wizard|3|2|Morph {B} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$Whenever another nontoken creature you control dies, draw a card.| +Sultai Emissary|Ugin's Fate|85|C|{1}{B}|Creature - Zombie Warrior|1|1|When Sultai Emissary dies, manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Ruthless Ripper|Ugin's Fate|88|U|{B}|Creature - Human Assassin|1|1|Deathtouch$Morph-Reveal a black card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Ruthless Ripper is turned face up, target player loses 2 life.| +Ainok Tracker|Ugin's Fate|96|C|{5}{R}|Creature - Hound Scout|3|3|First strike$Morph {4}{R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)| +Arc Lightning|Ugin's Fate|97|U|{2}{R}|Sorcery|||Arc Lightning deals 3 damage divided as you choose among one, two, or three target creatures and/or players.| +Fierce Invocation|Ugin's Fate|98|C|{4}{R}|Sorcery|||Manifest the top card of your library, then put two +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Jeering Instigator|Ugin's Fate|113|R|{1}{R}|Creature - Goblin Rogue|2|1|Morph {2}{R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Jeering Instigator is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn.| +Arashin War Beast|Ugin's Fate|123|U|{5}{G}{G}|Creature - Beast|6|6|Whenever Arashin War Beast deals combat damage to one or more blocking creatures, manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Formless Nurturing|Ugin's Fate|129|C|{3}{G}|Sorcery|||Manifest the top card of your library, then put a +1/+1 counter on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Dragonscale Boon|Ugin's Fate|131|C|{3}{G}|Instant|||Put two +1/+1 counters on target creature and untap it.| +Wildcall|Ugin's Fate|146|R|{X}{G}{G}|Sorcery|||Manifest the top card of your library, then put X +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)| +Hewed Stone Retainers|Ugin's Fate|161|U|{3}|Artifact Creature - Golem|4|4|Cast Hewed Stone Retainers only if you've cast another spell this turn.| +Ugin's Construct|Ugin's Fate|164|U|{4}|Artifact Creature - Construct|4|5|When Ugin's Construct enters the battlefield, sacrifice a permanent that's one or more colors.| +Altar of the Brood|Ugin's Fate|216|R|{1}|Artifact|||Whenever another permanent enters the battlefield under your control, each opponent puts the top card of his or her library into his or her graveyard.| +Briber's Purse|Ugin's Fate|217|U|{X}|Artifact|||Briber's Purse enters the battlefield with X gem counters on it.${1}, {tap}, Remove a gem counter from Briber's Purse: Target creature can't attack or block this turn.| +Ghostfire Blade|Ugin's Fate|220|R|{1}|Artifact - Equipment|||Equipped creature gets +2/+2.$Equip {3}$Ghostfire Blade's equip ability costs {2} less to activate if it targets a colorless creature.| +Forest|Asia Pacific Land Program|1|L||Basic Land - Forest|||G| +Island|Asia Pacific Land Program|2|L||Basic Land - Island|||U| +Mountain|Asia Pacific Land Program|3|L||Basic Land - Mountain|||R| +Plains|Asia Pacific Land Program|4|L||Basic Land - Plains|||W| +Swamp|Asia Pacific Land Program|5|L||Basic Land - Swamp|||B| +Forest|Asia Pacific Land Program|6|L||Basic Land - Forest|||G| +Island|Asia Pacific Land Program|7|L||Basic Land - Island|||U| +Mountain|Asia Pacific Land Program|8|L||Basic Land - Mountain|||R| +Plains|Asia Pacific Land Program|9|L||Basic Land - Plains|||W| +Swamp|Asia Pacific Land Program|10|L||Basic Land - Swamp|||B| +Forest|Asia Pacific Land Program|11|L||Basic Land - Forest|||G| +Island|Asia Pacific Land Program|12|L||Basic Land - Island|||U| +Mountain|Asia Pacific Land Program|13|L||Basic Land - Mountain|||R| +Plains|Asia Pacific Land Program|14|L||Basic Land - Plains|||W| +Swamp|Asia Pacific Land Program|15|L||Basic Land - Swamp|||B| +Forest|European Land Program|1|L||Basic Land - Forest|||G| +Island|European Land Program|2|L||Basic Land - Island|||U| +Mountain|European Land Program|3|L||Basic Land - Mountain|||R| +Plains|European Land Program|4|L||Basic Land - Plains|||W| +Swamp|European Land Program|5|L||Basic Land - Swamp|||B| +Forest|European Land Program|6|L||Basic Land - Forest|||G| +Island|European Land Program|7|L||Basic Land - Island|||U| +Mountain|European Land Program|8|L||Basic Land - Mountain|||R| +Plains|European Land Program|9|L||Basic Land - Plains|||W| +Swamp|European Land Program|10|L||Basic Land - Swamp|||B| +Forest|European Land Program|11|L||Basic Land - Forest|||G| +Island|European Land Program|12|L||Basic Land - Island|||U| +Mountain|European Land Program|13|L||Basic Land - Mountain|||R| +Plains|European Land Program|14|L||Basic Land - Plains|||W| +Swamp|European Land Program|15|L||Basic Land - Swamp|||B| +Thran Quarry|Super Series|1|Special||Land|||At the beginning of the end step, if you control no creatures, sacrifice Thran Quarry.${tap}: Add one mana of any color to your mana pool.| +Serra Avatar|Super Series|2|Special|{4}{W}{W}{W}|Creature - Avatar|*|*|Serra Avatar's power and toughness are each equal to your life total.$When Serra Avatar is put into a graveyard from anywhere, shuffle it into its owner's library.| +Lord of Atlantis|Super Series|3|Special|{U}{U}|Creature - Merfolk|2|2|Other Merfolk creatures get +1/+1 and have islandwalk.| +Crusade|Super Series|4|Special|{W}{W}|Enchantment|||White creatures get +1/+1.| +Elvish Lyrist|Super Series|5|C|{G}|Creature - Elf|1|1|{G}, {tap}, Sacrifice Elvish Lyrist: Destroy target enchantment.| +City of Brass|Super Series|6|Special||Land|||Whenever City of Brass becomes tapped, it deals 1 damage to you.${tap}: Add one mana of any color to your mana pool.| +Volcanic Hammer|Super Series|7|C|{1}{R}|Sorcery|||Volcanic Hammer deals 3 damage to target creature or player.| +Giant Growth|Super Series|8|C|{G}|Instant|||Target creature gets +3/+3 until end of turn.| +Two-Headed Dragon|Super Series|9|Special|{4}{R}{R}|Creature - Dragon|4|4|Flying${1}{R}: Two-Headed Dragon gets +2/+0 until end of turn.$Two-Headed Dragon can't be blocked except by two or more creatures.$Two-Headed Dragon can block an additional creature.| +Slith Firewalker|Super Series|10|Special|{R}{R}|Creature - Slith|1|1|Haste$Whenever Slith Firewalker deals combat damage to a player, put a +1/+1 counter on it.| +Royal Assassin|Super Series|11|Special|{1}{B}{B}|Creature - Human Assassin|1|1|{tap}: Destroy target tapped creature.| +Sakura-Tribe Elder|Super Series|12|C|{1}{G}|Creature - Snake Shaman|1|1|Sacrifice Sakura-Tribe Elder: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library.| +Shard Phoenix|Super Series|13|Special|{4}{R}|Creature - Phoenix|2|2|Flying$Sacrifice Shard Phoenix: Shard Phoenix deals 2 damage to each creature without flying.${R}{R}{R}: Return Shard Phoenix from your graveyard to your hand. Activate this ability only during your upkeep.| +Soltari Priest|Super Series|14|Special|{W}{W}|Creature - Soltari Cleric|2|1|Protection from red$Shadow (This creature can block or be blocked by only creatures with shadow.)| +Whirling Dervish|Super Series|15|Special|{G}{G}|Creature - Human Monk|1|1|Protection from black$At the beginning of each end step, if Whirling Dervish dealt damage to an opponent this turn, put a +1/+1 counter on it.| +Glorious Anthem|Super Series|16|Special|{1}{W}{W}|Enchantment|||Creatures you control get +1/+1.| +Elvish Champion|Super Series|17|Special|{1}{G}{G}|Creature - Elf|2|2|Other Elf creatures get +1/+1 and have forestwalk. (They're unblockable as long as defending player controls a Forest.)| +Mad Auntie|Super Series|18|Special|{2}{B}|Creature - Goblin Shaman|2|2|Other Goblin creatures you control get +1/+1.${tap}: Regenerate another target Goblin.| +Slith Firewalker|Super Series|19|Special|{R}{R}|Creature - Slith|1|1|Haste$Whenever Slith Firewalker deals combat damage to a player, put a +1/+1 counter on it.| +Royal Assassin|Super Series|20|Special|{1}{B}{B}|Creature - Human Assassin|1|1|{tap}: Destroy target tapped creature.| +Sakura-Tribe Elder|Super Series|21|C|{1}{G}|Creature - Snake Shaman|1|1|Sacrifice Sakura-Tribe Elder: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library.| +Shard Phoenix|Super Series|22|Special|{4}{R}|Creature - Phoenix|2|2|Flying$Sacrifice Shard Phoenix: Shard Phoenix deals 2 damage to each creature without flying.${R}{R}{R}: Return Shard Phoenix from your graveyard to your hand. Activate this ability only during your upkeep.| +Soltari Priest|Super Series|23|Special|{W}{W}|Creature - Soltari Cleric|2|1|Protection from red$Shadow (This creature can block or be blocked by only creatures with shadow.)| +Whirling Dervish|Super Series|24|Special|{G}{G}|Creature - Human Monk|1|1|Protection from black$At the beginning of each end step, if Whirling Dervish dealt damage to an opponent this turn, put a +1/+1 counter on it.| +Glorious Anthem|Super Series|25|Special|{1}{W}{W}|Enchantment|||Creatures you control get +1/+1.| +Elvish Champion|Super Series|26|Special|{1}{G}{G}|Creature - Elf|2|2|Other Elf creatures get +1/+1 and have forestwalk. (They're unblockable as long as defending player controls a Forest.)| +Sakura-Tribe Elder|Super Series|27|C|{1}{G}|Creature - Snake Shaman|1|1|Sacrifice Sakura-Tribe Elder: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library.| +Shard Phoenix|Super Series|28|Special|{4}{R}|Creature - Phoenix|2|2|Flying$Sacrifice Shard Phoenix: Shard Phoenix deals 2 damage to each creature without flying.${R}{R}{R}: Return Shard Phoenix from your graveyard to your hand. Activate this ability only during your upkeep.| +Soltari Priest|Super Series|29|Special|{W}{W}|Creature - Soltari Cleric|2|1|Protection from red$Shadow (This creature can block or be blocked by only creatures with shadow.)| +Whirling Dervish|Super Series|30|Special|{G}{G}|Creature - Human Monk|1|1|Protection from black$At the beginning of each end step, if Whirling Dervish dealt damage to an opponent this turn, put a +1/+1 counter on it.| +Glorious Anthem|Super Series|31|Special|{1}{W}{W}|Enchantment|||Creatures you control get +1/+1.| +Elvish Champion|Super Series|32|Special|{1}{G}{G}|Creature - Elf|2|2|Other Elf creatures get +1/+1 and have forestwalk. (They're unblockable as long as defending player controls a Forest.)| +Plains|Arena League|1|Special||Basic Land - Plains|||W| +Island|Arena League|2|Special||Basic Land - Island|||U| +Swamp|Arena League|3|Special||Basic Land - Swamp|||B| +Mountain|Arena League|4|Special||Basic Land - Mountain|||R| +Forest|Arena League|5|Special||Basic Land - Forest|||G| +Disenchant|Arena League|6|C|{1}{W}|Instant|||Destroy target artifact or enchantment.| +Fireball|Arena League|7|Special|{X}{R}|Sorcery|||Fireball deals X damage divided evenly, rounded down, among any number of target creatures and/or players.$Fireball costs {1} more to cast for each target beyond the first.| +Plains|Arena League|8|Special||Basic Land - Plains|||W| +Island|Arena League|9|Special||Basic Land - Island|||U| +Swamp|Arena League|10|Special||Basic Land - Swamp|||B| +Mountain|Arena League|11|Special||Basic Land - Mountain|||R| +Forest|Arena League|12|Special||Basic Land - Forest|||G| +Pouncing Jaguar|Arena League|13|C|{G}|Creature - Cat|2|2|Echo {G} (At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.)| +Skittering Skirge|Arena League|14|C|{B}{B}|Creature - Imp|3|2|Flying$When you cast a creature spell, sacrifice Skittering Skirge.| +Rewind|Arena League|15|C|{2}{U}{U}|Instant|||Counter target spell. Untap up to four lands.| +Karn, Silver Golem|Arena League|16|Special|{5}|Legendary Artifact Creature - Golem|4|4|Whenever Karn, Silver Golem blocks or becomes blocked, it gets -4/+4 until end of turn.${1}: Target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost until end of turn.| +Duress|Arena League|17|C|{B}|Sorcery|||Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card.| +Uktabi Orangutan|Arena League|18|Special|{2}{G}|Creature - Ape|2|2|When Uktabi Orangutan enters the battlefield, destroy target artifact.| +Chill|Arena League|19|Special|{1}{U}|Enchantment|||Red spells cost {2} more to cast.| +Pillage|Arena League|20|Special|{1}{R}{R}|Sorcery|||Destroy target artifact or land. It can't be regenerated.| +Enlightened Tutor|Arena League|21|Special|{W}|Instant|||Search your library for an artifact or enchantment card and reveal that card. Shuffle your library, then put the card on top of it.| +Stupor|Arena League|22|Special|{2}{B}|Sorcery|||Target opponent discards a card at random, then discards a card.| +Plains|Arena League|23|Special||Basic Land - Plains|||W| +Island|Arena League|24|Special||Basic Land - Island|||U| +Swamp|Arena League|25|Special||Basic Land - Swamp|||B| +Mountain|Arena League|26|Special||Basic Land - Mountain|||R| +Forest|Arena League|27|Special||Basic Land - Forest|||G| +Creeping Mold|Arena League|28|Special|{2}{G}{G}|Sorcery|||Destroy target artifact, enchantment, or land.| +Dismiss|Arena League|29|Special|{2}{U}{U}|Instant|||Counter target spell.$Draw a card.| +Fling|Arena League|30|C|{1}{R}|Instant|||As an additional cost to cast Fling, sacrifice a creature.$Fling deals damage equal to the sacrificed creature's power to target creature or player.| +Empyrial Armor|Arena League|31|Special|{1}{W}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +1/+1 for each card in your hand.| +Plains|Arena League|32|Special||Basic Land - Plains|||W| +Island|Arena League|33|Special||Basic Land - Island|||U| +Swamp|Arena League|34|Special||Basic Land - Swamp|||B| +Mountain|Arena League|35|Special||Basic Land - Mountain|||R| +Forest|Arena League|36|Special||Basic Land - Forest|||G| +Diabolic Edict|Arena League|37|C|{1}{B}|Instant|||Target player sacrifices a creature.| +Gaea's Blessing|Arena League|38|Special|{1}{G}|Sorcery|||Target player shuffles up to three target cards from his or her graveyard into his or her library.$Draw a card.$When Gaea's Blessing is put into your graveyard from your library, shuffle your graveyard into your library.| +Island|Arena League|39|Special||Basic Land - Island|||U| +Forest|Arena League|40|Special||Basic Land - Forest|||G| +Man-o'-War|Arena League|41|C|{2}{U}|Creature - Jellyfish|2|2|When Man-o'-War enters the battlefield, return target creature to its owner's hand.| +Arc Lightning|Arena League|42|C|{2}{R}|Sorcery|||Arc Lightning deals 3 damage divided as you choose among one, two, or three target creatures and/or players.| +Dauthi Slayer|Arena League|43|Special|{B}{B}|Creature - Dauthi Soldier|2|2|Shadow (This creature can block or be blocked by only creatures with shadow.)$Dauthi Slayer attacks each turn if able.| +Mana Leak|Arena League|44|C|{1}{U}|Instant|||Counter target spell unless its controller pays {3}.| +Plains|Arena League|45|Special||Basic Land - Plains|||W| +Island|Arena League|46|Special||Basic Land - Island|||U| +Swamp|Arena League|47|Special||Basic Land - Swamp|||B| +Mountain|Arena League|48|Special||Basic Land - Mountain|||R| +Forest|Arena League|49|Special||Basic Land - Forest|||G| +Skirk Marauder|Arena League|50|C|{1}{R}|Creature - Goblin|2|1|Morph {2}{R} You may cast this card face downn as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Skirk Marauder is turned face up, it deals 2 damage to target creature or player.| +Elvish Aberration|Arena League|51|C|{5}{G}|Creature - Elf Mutant|4|5|{tap}: Add {G}{G}{G} to your mana pool.$Forestcycling {2} ({2}, Discard this card: Search your library for a Forest card, reveal it, and put it into your hand. Then shuffle your library.)| +Bonesplitter|Arena League|52|C|{1}|Artifact - Equipment|||Equipped creature gets +2/+0.$Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.)| +Plains|Arena League|53|Special||Basic Land - Plains|||W| +Island|Arena League|54|Special||Basic Land - Island|||U| +Swamp|Arena League|55|Special||Basic Land - Swamp|||B| +Mountain|Arena League|56|Special||Basic Land - Mountain|||R| +Forest|Arena League|57|Special||Basic Land - Forest|||G| +Darksteel Ingot|Arena League|58|C|{3}|Artifact|||Indestructible${T}: Add one mana of any color to your mana pool.| +Serum Visions|Arena League|59|C|{U}|Sorcery|||Draw a card.$Scry 2. (To scry 2, look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)| +Glacial Ray|Arena League|60|C|{1}{R}|Instant - Arcane|||Glacial Ray deals 2 damage to target creature or player.$Splice onto Arcane {1}{R} (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.)| +Circle of Protection: Art|Arena League|61|C|{1}{W}|Enchantment|||As Circle of Protection: Art comes into play, choose an artist.${1}{W}: The next time a source of your choice by the chosen artist would deal damage to you this turn, prevent that damage.${1}{W}: Return Circle of Protection: Art to its owner's hand.| +Mise|Arena League|62|Special|{U}|Instant|||Name a nonland card, then reveal the top card of your library. If that card is the named card, draw three cards.| +Booster Tutor|Arena League|63|Special|{B}|Instant|||Open a sealed Magic booster pack, reveal the cards, and put one of those cards into your hand. (Remove that card from your deck before beginning a new game.)| +Goblin Mime|Arena League|64|C|{1}{R}|Creature - Goblin Mime|2|2|When you speak, sacrifice Goblin Mime.| +Granny's Payback|Arena League|65|Special|{7}{G}|Sorcery|||You gain life equal to your age.| +Ashnod's Coupon|Arena League|66|Special|{0}|Artifact|||{T}, Sacrifice Ashnod's Coupon: Target player gets you target drink.| +Plains|Arena League|67|Special||Basic Land - Plains|||W| +Island|Arena League|68|Special||Basic Land - Island|||U| +Swamp|Arena League|69|Special||Basic Land - Swamp|||B| +Mountain|Arena League|70|Special||Basic Land - Mountain|||R| +Forest|Arena League|71|Special||Basic Land - Forest|||G| +Genju of the Spires|Arena League|72|Special|{R}|Enchantment - Aura|||Enchant Mountain${2}: Enchanted Mountain becomes a 6/1 red Spirit creature until end of turn. It's still a land.$When enchanted Mountain is put into a graveyard, you may return Genju of the Spires from your graveyard to your hand.| +Okina Nightwatch|Arena League|73|C|{4}{G}|Creature - Human Monk|4|3|As long as you have more cards in hand than each opponent, Okina Nightwatch gets +3/+3.| +Skyknight Legionnaire|Arena League|74|C|{1}{R}{W}|Creature - Human Knight|2|2|Flying, haste| +Plains|Arena League|75|Special||Basic Land - Plains|||W| +Island|Arena League|76|Special||Basic Land - Island|||U| +Swamp|Arena League|77|Special||Basic Land - Swamp|||B| +Mountain|Arena League|78|Special||Basic Land - Mountain|||R| +Forest|Arena League|79|Special||Basic Land - Forest|||G| +Castigate|Arena League|80|C|{W}{B}|Sorcery|||Target opponent reveals his or her hand. You choose a nonland card from it and exile that card.| +Wee Dragonauts|Arena League|81|C|{1}{U}{R}|Creature - Faerie Wizard|1|3|Flying$Whenever you cast an instant or sorcery spell, Wee Dragonauts gets +2/+0 until end of turn.| +Coiling Oracle|Arena League|82|C|{G}{U}|Creature - Snake Elf Druid|1|1|When Coiling Oracle enters the battlefield, reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put that card into your hand.| +Surging Flame|Arena League|83|C|{1}{R}|Instant|||Ripple 4 (When you cast this spell, you may reveal the top four 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.)$Surging Flame deals 2 damage to target creature or player.| +Electrolyze|Champs|1|Special|{1}{U}{R}|Instant|||Electrolyze deals 2 damage divided as you choose among one or two target creatures and/or players.$Draw a card.| +Niv-Mizzet, the Firemind|Champs|2|Special|{2}{U}{U}{R}{R}|Legendary Creature - Dragon Wizard|4|4|Flying$Whenever you draw a card, Niv-Mizzet, the Firemind deals 1 damage to target creature or player.${T}: Draw a card.| +Rakdos Guildmage|Champs|3|Special|{BR}{BR}|Creature - Zombie Shaman|2|2|({BR} can be paid with either {B} or {R}.)${3}{B}, Discard a card: Target creature gets -2/-2 until end of turn.${3}{R}: Put a 2/1 red Goblin creature token with haste onto the battlefield. Exile it at the beginning of the next end step.| +Voidslime|Champs|4|Special|{G}{U}{U}|Instant|||Counter target spell, activated ability, or triggered ability. (Mana abilities can't be targeted.)| +Urza's Factory|Champs|5|Special||Land - Urza s|||{tap}: Add {1} to your mana pool.${7}, {tap}: Put a 2/2 colorless Assembly-Worker artifact creature token onto the battlefield.| +Serra Avenger|Champs|6|Special|{W}{W}|Creature - Angel|3|3|You can't cast Serra Avenger during your first, second, or third turns of the game.$Flying$Vigilance (Attacking doesn't cause this creature to tap.)| +Blood Knight|Champs|7|Special|{R}{R}|Creature - Human Knight|2|2|First strike, protection from white| +Groundbreaker|Champs|8|Special|{G}{G}{G}|Creature - Elemental|6|1|Trample, haste$At the beginning of the end step, sacrifice Groundbreaker.| +Imperious Perfect|Champs|9|Special|{2}{G}|Creature - Elf Warrior|2|2|Other Elf creatures you control get +1/+1.${G}, {tap}: Put a 1/1 green Elf Warrior creature token onto the battlefield.| +Doran, the Siege Tower|Champs|10|Special|{W}{B}{G}|Legendary Creature - Treefolk Shaman|0|5|Each creature assigns combat damage equal to its toughness rather than its power.| +Bramblewood Paragon|Champs|11|Special|{1}{G}|Creature - Elf Warrior|2|2|Each other Warrior creature you control enters the battlefield with an additional +1/+1 counter on it.$Each creature you control with a +1/+1 counter on it has trample.| +Mutavault|Champs|12|Special||Land|||{T}: Add {1} to your mana pool.${1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land.| +Chaos Warp|Commander's Arsenal|1|Special|{2}{R}|Instant|||The owner of target permanent shuffles it into his or her library, then reveals the top card of his or her library. If it's a permanent card, he or she puts it onto the battlefield.| +Command Tower|Commander's Arsenal|2|C||Land|||{tap}: Add to your mana pool one mana of any color in your commander's color identity.| +Decree of Pain|Commander's Arsenal|3|Special|{6}{B}{B}|Sorcery|||Destroy all creatures. They can't be regenerated. Draw a card for each creature destroyed this way.$Cycling {3}{B}{B} ({3}{B}{B}, Discard this card: Draw a card.)$When you cycle Decree of Pain, all creatures get -2/-2 until end of turn.| +Desertion|Commander's Arsenal|4|Special|{3}{U}{U}|Instant|||Counter target spell. If an artifact or creature spell is countered this way, put that card onto the battlefield under your control instead of into its owner's graveyard.| +Diaochan, Artful Beauty|Commander's Arsenal|5|Special|{3}{R}|Legendary Creature - Human Advisor|1|1|{tap}: Destroy target creature of your choice, then destroy target creature of an opponent's choice. Activate this ability only during your turn, before attackers are declared.| +Dragonlair Spider|Commander's Arsenal|6|Special|{2}{R}{R}{G}{G}|Creature - Spider|5|6|Reach$Whenever an opponent casts a spell, put a 1/1 green Insect creature token onto the battlefield.| +Duplicant|Commander's Arsenal|7|Special|{6}|Artifact Creature - Shapeshifter|2|4|Imprint - When Duplicant enters the battlefield, you may exile target nontoken creature.$As long as the exiled card is a creature card, Duplicant has that card's power, toughness, and creature types. It's still a Shapeshifter.| +Edric, Spymaster of Trest|Commander's Arsenal|8|Special|{1}{G}{U}|Legendary Creature - Elf Rogue|2|2|Whenever a creature deals combat damage to one of your opponents, its controller may draw a card.| +Kaalia of the Vast|Commander's Arsenal|9|Special|{1}{W}{B}{R}|Legendary Creature - Human Cleric|2|2|Flying$Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent.| +Loyal Retainers|Commander's Arsenal|10|Special|{2}{W}|Creature - Human Advisor|1|1|Sacrifice Loyal Retainers: Return target legendary creature card from your graveyard to the battlefield. Activate this ability only during your turn, before attackers are declared.| +Maelstrom Wanderer|Commander's Arsenal|11|Special|{5}{U}{R}{G}|Legendary Creature - Elemental|7|5|Creatures you control have haste.$Cascade, cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order. Then do it again.)| +The Mimeoplasm|Commander's Arsenal|12|Special|{2}{G}{U}{B}|Legendary Creature - Ooze|0|0|As The Mimeoplasm enters the battlefield, you may exile two creature cards from graveyards. If you do, it enters the battlefield as a copy of one of those cards with a number of additional +1/+1 counters on it equal to the power of the other card.| +Mind's Eye|Commander's Arsenal|13|Special|{5}|Artifact|||Whenever an opponent draws a card, you may pay {1}. If you do, draw a card.| +Mirari's Wake|Commander's Arsenal|14|Special|{3}{G}{W}|Enchantment|||Creatures you control get +1/+1.$Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced.| +Rhystic Study|Commander's Arsenal|15|C|{2}{U}|Enchantment|||Whenever an opponent casts a spell, you may draw a card unless that player pays {1}.| +Scroll Rack|Commander's Arsenal|16|Special|{2}|Artifact|||{1}, {tap}: Exile any number of cards from your hand face down. Put that many cards from the top of your library into your hand. Then look at the exiled cards and put them on top of your library in any order.| +Sylvan Library|Commander's Arsenal|17|Special|{1}{G}|Enchantment|||At the beginning of your draw step, you may draw two additional cards. If you do, choose two cards in your hand drawn this turn. For each of those cards, pay 4 life or put the card on top of your library.| +Vela the Night-Clad|Commander's Arsenal|18|Special|{4}{U}{B}|Legendary Creature - Human Wizard|4|4|Intimidate$Other creatures you control have intimidate.$Whenever Vela the Night-Clad or another creature you control leaves the battlefield, each opponent loses 1 life.| +Kozilek, the Great Distortion|Oath of the Gatewatch|4|M|{8}{D}{D}|Legendary Creature - Eldrazi|12|12|When you cast Kozilek, the Great Distortion, if you have fewer than seven cards in hand, draw cards equal to the difference.$Menace$Discard a card with converted mana cost X: Counter target spell with converted mana cost X.| +Ayli, Eternal Pilgrim|Oath of the Gatewatch|151|R|{W}{B}|Legendary Creature - Kor Cleric|2|3|Deathtouch${1}, Sacrifice another creature: You gain life equal to the sacrificed creature's toughness.${1}{W}{B}, Sacrifice another creature: Exile target nonland permanent. Activate this ability only if you have at least 10 life more than your starting life total.| +Mirrorpool|Oath of the Gatewatch|174|M||Land|||Mirrorpool enters the battlefield tapped.${T}: Add {D} to your mana pool.${2}{D}, {T}, Sacrifice Mirrorpool: Copy target instant or sorcery spell you control. You may choose new targets for the copy.${4}{D}, {T}, Sacrifice Mirrorpool: Put a token onto the battlefield that's a copy of target creature you control.| +Wastes|Oath of the Gatewatch|184|C||Basic Land|||{T}: Add {D} to your mana pool.| \ No newline at end of file diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index 83318ee3973..272c79b4b01 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -8,8 +8,10 @@ Seventh Edition|7ED| Eighth Edition|8ED| Tenth Edition|10E| Alliances|ALL| +Asia Pacific Land Program|APAC| Apocalypse|APC| Alara Reborn|ARB| +Arena League|ARENA| Arabian Nights|ARN| Anthologies|ATH| Antiquities|ATQ| @@ -21,11 +23,13 @@ Battle Royale Box Set|BRB| Beatdown Box Set|BTD| Born of the Gods|BNG| Champions of Kamigawa|CHK| +Champs|CP| Chronicles|CHR| Clash Pack|CLASH| Commander 2013 Edition|C13| Commander 2014 Edition|C14| Commander 2015|C15| +Commander's Arsenal|CMA| Conflux|CON| Coldsnap|CSP| Dark Ascension|DKA| @@ -55,6 +59,7 @@ Duel Decks: Sorin vs. Tibalt|DDK| Duel Decks: Speed vs. Cunning|DDN| Duel Decks: Venser vs. Koth|DDI| Duel Decks: Zendikar vs. Eldrazi|DDP| +European Land Program|EURO| Eventide|EVE| Exodus|EXO| Fallen Empires|FEM| @@ -137,12 +142,14 @@ Saviors of Kamigawa|SOK| Starter 2000|S00| Starter 1999|S99| Stronghold|STH| +Super Series|SUS| Tempest|TMP| Tempest Remastered|TPR| Theros|THS| Torment|TOR| Time Spiral|TSP| Time Spiral "Timeshifted"|TSB| +Ugin's Fate|UGIN| Unglued|UGL| Unhinged|UNH| Urza's Destiny|UDS| diff --git a/Utils/release/getting_implemented_cards.txt b/Utils/release/getting_implemented_cards.txt index bd7cacbd8a5..59fd481cd09 100644 --- a/Utils/release/getting_implemented_cards.txt +++ b/Utils/release/getting_implemented_cards.txt @@ -39,6 +39,12 @@ git log 8c7dc7b2da3630b6dfec1390854fa2be11631c79..head --diff-filter=A --name-st since 1.4.4.v9 git log 1b71f505064b82893003207fc29954de533fbed5..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt +since 1.4.4.v12 +git log a5d7ca83d7ac5e13805bff58f2838384a97beed6..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt + +since 1.4.5.v0 +git log f3019d70fd2ce7c0f2bdaeafafa36ef4d81330c5..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt + 3. Copy added_cards.txt to trunk\Utils folder 4. Run script: > perl extract_in_wiki_format.perl diff --git a/clean_dbs.sh b/clean_dbs.sh old mode 100644 new mode 100755 index 9ccf51fd6d2..48141fedaec --- a/clean_dbs.sh +++ b/clean_dbs.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash # Cleans the DB from Server, Client and Test modules -find . -type f | grep -i cards.h2*.db | xargs rm -v \ No newline at end of file +find . -type f -iname 'cards.h2*.db' -print -delete diff --git a/pom.xml b/pom.xml index 9a9d122797a..ecbd4a47039 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.4 + 1.4.5 pom Mage Root Mage Root POM @@ -83,7 +83,7 @@ - 1.4.4 + 1.4.5 UTF-8