mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge pull request #14 from magefree/master
Merge https://github.com/magefree/mage
This commit is contained in:
commit
ea2f424312
60 changed files with 2347 additions and 279 deletions
|
@ -35,9 +35,9 @@ import mage.game.draft.DraftCube;
|
|||
*/
|
||||
public class AdamStyborskisPauperCube extends DraftCube {
|
||||
|
||||
public AdamStyborskisPauperCube() {
|
||||
public AdamStyborskisPauperCube() {
|
||||
super("Adam Styborkski's Pauper Cube"); // https://docs.google.com/spreadsheets/d/12iQhC4bHqFW7hEWxPBjyC8yBDehFZ0_4DkqzyA8EL3o/edit#gid=0
|
||||
// last updated with Amonkhet 6/12/17
|
||||
// last updated with Hour of Devastation, Iconic Masters and Ixalan 10/18/17
|
||||
cubeCards.add(new CardIdentity("Act of Treason", ""));
|
||||
cubeCards.add(new CardIdentity("Adventuring Gear", ""));
|
||||
cubeCards.add(new CardIdentity("Aerie Ouphes", ""));
|
||||
|
@ -45,6 +45,7 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Aethersnipe", ""));
|
||||
cubeCards.add(new CardIdentity("Agony Warp", ""));
|
||||
cubeCards.add(new CardIdentity("Aim High", ""));
|
||||
cubeCards.add(new CardIdentity("Ambuscade", ""));
|
||||
cubeCards.add(new CardIdentity("Ambush Viper", ""));
|
||||
cubeCards.add(new CardIdentity("Angelic Purge", ""));
|
||||
cubeCards.add(new CardIdentity("Arachnus Web", ""));
|
||||
|
@ -55,18 +56,18 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Ashes to Ashes", ""));
|
||||
cubeCards.add(new CardIdentity("Assault Zeppelid", ""));
|
||||
cubeCards.add(new CardIdentity("Attended Knight", ""));
|
||||
cubeCards.add(new CardIdentity("Augur of Bolas", ""));
|
||||
cubeCards.add(new CardIdentity("Auger Spree", ""));
|
||||
cubeCards.add(new CardIdentity("Augur of Bolas", ""));
|
||||
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("Beneath the Sands", ""));
|
||||
cubeCards.add(new CardIdentity("Blastoderm", ""));
|
||||
cubeCards.add(new CardIdentity("Blazing Torch", ""));
|
||||
cubeCards.add(new CardIdentity("Blightning", ""));
|
||||
|
@ -78,8 +79,9 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Bonesplitter", ""));
|
||||
cubeCards.add(new CardIdentity("Borderland Marauder", ""));
|
||||
cubeCards.add(new CardIdentity("Boros Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Borrowed Grave", ""));
|
||||
cubeCards.add(new CardIdentity("Borrowed Grace", ""));
|
||||
cubeCards.add(new CardIdentity("Branching Bolt", ""));
|
||||
cubeCards.add(new CardIdentity("Brazen Buccaneers", ""));
|
||||
cubeCards.add(new CardIdentity("Brazen Wolves", ""));
|
||||
cubeCards.add(new CardIdentity("Burning-Tree Emissary", ""));
|
||||
cubeCards.add(new CardIdentity("Burst Lightning", ""));
|
||||
|
@ -97,6 +99,7 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Chain Lightning", ""));
|
||||
cubeCards.add(new CardIdentity("Chainer's Edict", ""));
|
||||
cubeCards.add(new CardIdentity("Chatter of the Squirrel", ""));
|
||||
cubeCards.add(new CardIdentity("Cinder Barrens", ""));
|
||||
cubeCards.add(new CardIdentity("Citanul Woodreaders", ""));
|
||||
cubeCards.add(new CardIdentity("Claustrophobia", ""));
|
||||
cubeCards.add(new CardIdentity("Clay Statue", ""));
|
||||
|
@ -108,15 +111,12 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Compulsive Research", ""));
|
||||
cubeCards.add(new CardIdentity("Compulsory Rest", ""));
|
||||
cubeCards.add(new CardIdentity("Consume Strength", ""));
|
||||
cubeCards.add(new CardIdentity("Corpse Churn", ""));
|
||||
cubeCards.add(new CardIdentity("Corrupted Zendikon", ""));
|
||||
cubeCards.add(new CardIdentity("Counterspell", ""));
|
||||
cubeCards.add(new CardIdentity("Crippling Fatigue", ""));
|
||||
cubeCards.add(new CardIdentity("Crow of Dark Tidings", ""));
|
||||
cubeCards.add(new CardIdentity("Crypt Rats", ""));
|
||||
cubeCards.add(new CardIdentity("Crystallization", ""));
|
||||
cubeCards.add(new CardIdentity("Cultist's Staff", ""));
|
||||
cubeCards.add(new CardIdentity("Cultivate", ""));
|
||||
cubeCards.add(new CardIdentity("Cunning Strike", ""));
|
||||
cubeCards.add(new CardIdentity("Curse of Chains", ""));
|
||||
cubeCards.add(new CardIdentity("Custodi Squire", ""));
|
||||
|
@ -124,9 +124,11 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Dauntless Cathar", ""));
|
||||
cubeCards.add(new CardIdentity("Dead Reveler", ""));
|
||||
cubeCards.add(new CardIdentity("Dead Weight", ""));
|
||||
cubeCards.add(new CardIdentity("Deadeye Tormentor", ""));
|
||||
cubeCards.add(new CardIdentity("Death Denied", ""));
|
||||
cubeCards.add(new CardIdentity("Deep Analysis", ""));
|
||||
cubeCards.add(new CardIdentity("Deprive", ""));
|
||||
cubeCards.add(new CardIdentity("Depths of Desire", ""));
|
||||
cubeCards.add(new CardIdentity("Deputy of Acquittals", ""));
|
||||
cubeCards.add(new CardIdentity("Desert", ""));
|
||||
cubeCards.add(new CardIdentity("Desperate Sentry", ""));
|
||||
|
@ -134,6 +136,7 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Diabolic Edict", ""));
|
||||
cubeCards.add(new CardIdentity("Dimir Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Dinrova Horror", ""));
|
||||
cubeCards.add(new CardIdentity("Dire Fleet Hoarder", ""));
|
||||
cubeCards.add(new CardIdentity("Disfigure", ""));
|
||||
cubeCards.add(new CardIdentity("Dismal Backwater", ""));
|
||||
cubeCards.add(new CardIdentity("Disowned Ancestor", ""));
|
||||
|
@ -152,20 +155,21 @@ public AdamStyborskisPauperCube() {
|
|||
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("Evincar's Justice", ""));
|
||||
cubeCards.add(new CardIdentity("Evolving Wilds", ""));
|
||||
cubeCards.add(new CardIdentity("Faceless Butcher", ""));
|
||||
cubeCards.add(new CardIdentity("Faith's Fetters", ""));
|
||||
cubeCards.add(new CardIdentity("Falkenrath Noble", ""));
|
||||
cubeCards.add(new CardIdentity("Feeling of Dread", ""));
|
||||
cubeCards.add(new CardIdentity("Fertile Thicket", ""));
|
||||
cubeCards.add(new CardIdentity("Fervent Cathar", ""));
|
||||
cubeCards.add(new CardIdentity("Firebolt", ""));
|
||||
cubeCards.add(new CardIdentity("Fireslinger", ""));
|
||||
cubeCards.add(new CardIdentity("Flayer Husk", ""));
|
||||
cubeCards.add(new CardIdentity("Flurry of Horns", ""));
|
||||
cubeCards.add(new CardIdentity("Forked Bolt", ""));
|
||||
cubeCards.add(new CardIdentity("Forsaken Sanctuary", ""));
|
||||
cubeCards.add(new CardIdentity("Fortify", ""));
|
||||
cubeCards.add(new CardIdentity("Foul Orchard", ""));
|
||||
cubeCards.add(new CardIdentity("Frilled Oculus", ""));
|
||||
cubeCards.add(new CardIdentity("Frostburn Weird", ""));
|
||||
cubeCards.add(new CardIdentity("Gathan Raiders", ""));
|
||||
|
@ -182,21 +186,22 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Gods Willing", ""));
|
||||
cubeCards.add(new CardIdentity("Goldmeadow Harrier", ""));
|
||||
cubeCards.add(new CardIdentity("Golgari Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Grapple with the Past", ""));
|
||||
cubeCards.add(new CardIdentity("Gravedigger", ""));
|
||||
cubeCards.add(new CardIdentity("Gray Merchant of Asphodel", ""));
|
||||
cubeCards.add(new CardIdentity("Grazing Whiptail", ""));
|
||||
cubeCards.add(new CardIdentity("Grim Contest", ""));
|
||||
cubeCards.add(new CardIdentity("Grisly Salvage", ""));
|
||||
cubeCards.add(new CardIdentity("Grixis Slavedriver", ""));
|
||||
cubeCards.add(new CardIdentity("Gruul Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Gryff Vanguard", ""));
|
||||
cubeCards.add(new CardIdentity("Guardian Automaton", ""));
|
||||
cubeCards.add(new CardIdentity("Guardian Idol", ""));
|
||||
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("Highland Lake", ""));
|
||||
cubeCards.add(new CardIdentity("Hissing Iguanar", ""));
|
||||
cubeCards.add(new CardIdentity("Hooting Mandrills", ""));
|
||||
cubeCards.add(new CardIdentity("Humble", ""));
|
||||
|
@ -206,6 +211,7 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Insolent Neonate", ""));
|
||||
cubeCards.add(new CardIdentity("Into the Roil", ""));
|
||||
cubeCards.add(new CardIdentity("Isolation Zone", ""));
|
||||
cubeCards.add(new CardIdentity("Ivy Elemental", ""));
|
||||
cubeCards.add(new CardIdentity("Izzet Chronarch", ""));
|
||||
cubeCards.add(new CardIdentity("Izzet Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Jilt", ""));
|
||||
|
@ -214,7 +220,6 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Kabuto Moth", ""));
|
||||
cubeCards.add(new CardIdentity("Keldon Marauders", ""));
|
||||
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 Channeler", ""));
|
||||
cubeCards.add(new CardIdentity("Krenko's Command", ""));
|
||||
|
@ -222,25 +227,24 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Kruin Striker", ""));
|
||||
cubeCards.add(new CardIdentity("Lash Out", ""));
|
||||
cubeCards.add(new CardIdentity("Last Gasp", ""));
|
||||
cubeCards.add(new CardIdentity("Lawless Broker", ""));
|
||||
cubeCards.add(new CardIdentity("Leave in the Dust", ""));
|
||||
cubeCards.add(new CardIdentity("Leonin Bola", ""));
|
||||
cubeCards.add(new CardIdentity("Leonin Scimitar", ""));
|
||||
cubeCards.add(new CardIdentity("Lifecraft Cavalry", ""));
|
||||
cubeCards.add(new CardIdentity("Lightning Bolt", ""));
|
||||
cubeCards.add(new CardIdentity("Liliana's Specter", ""));
|
||||
cubeCards.add(new CardIdentity("Looming Spires", ""));
|
||||
cubeCards.add(new CardIdentity("Lotus Path Djinn", ""));
|
||||
cubeCards.add(new CardIdentity("Loyal Pegasus", ""));
|
||||
cubeCards.add(new CardIdentity("Lurking Automaton", ""));
|
||||
cubeCards.add(new CardIdentity("Magma Jet", ""));
|
||||
cubeCards.add(new CardIdentity("Makeshift Mauler", ""));
|
||||
cubeCards.add(new CardIdentity("Man-o'-War", ""));
|
||||
cubeCards.add(new CardIdentity("Mana Leak", ""));
|
||||
cubeCards.add(new CardIdentity("Manticore of the Gauntlet", ""));
|
||||
cubeCards.add(new CardIdentity("Man-o'-War", ""));
|
||||
cubeCards.add(new CardIdentity("Mardu Hordechief", ""));
|
||||
cubeCards.add(new CardIdentity("Mardu Skullhunter", ""));
|
||||
cubeCards.add(new CardIdentity("Maul Splicer", ""));
|
||||
cubeCards.add(new CardIdentity("Maulfist Squad", ""));
|
||||
cubeCards.add(new CardIdentity("Maze of Ith", ""));
|
||||
cubeCards.add(new CardIdentity("Meandering River", ""));
|
||||
cubeCards.add(new CardIdentity("Mental Note", ""));
|
||||
cubeCards.add(new CardIdentity("Midnight Scavengers", ""));
|
||||
cubeCards.add(new CardIdentity("Mind Stone", ""));
|
||||
|
@ -249,6 +253,7 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Mishra's Factory", ""));
|
||||
cubeCards.add(new CardIdentity("Mist Raven", ""));
|
||||
cubeCards.add(new CardIdentity("Mistral Charger", ""));
|
||||
cubeCards.add(new CardIdentity("Mobile Garrison", ""));
|
||||
cubeCards.add(new CardIdentity("Mogg Fanatic", ""));
|
||||
cubeCards.add(new CardIdentity("Mogg Flunkies", ""));
|
||||
cubeCards.add(new CardIdentity("Mogg War Marshal", ""));
|
||||
|
@ -260,17 +265,17 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Narcolepsy", ""));
|
||||
cubeCards.add(new CardIdentity("Necromancer's Assistant", ""));
|
||||
cubeCards.add(new CardIdentity("Nessian Asp", ""));
|
||||
cubeCards.add(new CardIdentity("Nest Robber", ""));
|
||||
cubeCards.add(new CardIdentity("Nezumi Cutthroat", ""));
|
||||
cubeCards.add(new CardIdentity("Night's Whisper", ""));
|
||||
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("Oona's Grace", ""));
|
||||
cubeCards.add(new CardIdentity("Orcish Oriflamme", ""));
|
||||
cubeCards.add(new CardIdentity("Orzhov Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Otherworldly Journey", ""));
|
||||
cubeCards.add(new CardIdentity("Pacifism", ""));
|
||||
cubeCards.add(new CardIdentity("Palace Sentinels", ""));
|
||||
cubeCards.add(new CardIdentity("Paladin of the Bloodstained", ""));
|
||||
cubeCards.add(new CardIdentity("Peema Outrider", ""));
|
||||
cubeCards.add(new CardIdentity("Penumbra Spider", ""));
|
||||
cubeCards.add(new CardIdentity("Peregrine Drake", ""));
|
||||
|
@ -287,7 +292,7 @@ public AdamStyborskisPauperCube() {
|
|||
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("Pounce", ""));
|
||||
cubeCards.add(new CardIdentity("Predatory Nightstalker", ""));
|
||||
cubeCards.add(new CardIdentity("Preordain", ""));
|
||||
cubeCards.add(new CardIdentity("Prey Upon", ""));
|
||||
|
@ -316,27 +321,27 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Renegade Freighter", ""));
|
||||
cubeCards.add(new CardIdentity("Rift Bolt", ""));
|
||||
cubeCards.add(new CardIdentity("Rishadan Airship", ""));
|
||||
cubeCards.add(new CardIdentity("River Serpent", ""));
|
||||
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("Sailor of Means", ""));
|
||||
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("Scion Summoner", ""));
|
||||
cubeCards.add(new CardIdentity("Scion of the Wild", ""));
|
||||
cubeCards.add(new CardIdentity("Scoured Barrens", ""));
|
||||
cubeCards.add(new CardIdentity("Scourge Devil", ""));
|
||||
cubeCards.add(new CardIdentity("Screeching Skaab", ""));
|
||||
cubeCards.add(new CardIdentity("Scuzzback Marauders", ""));
|
||||
cubeCards.add(new CardIdentity("Search for Tomorrow", ""));
|
||||
cubeCards.add(new CardIdentity("Searing Blaze", ""));
|
||||
cubeCards.add(new CardIdentity("Seeker of Insight", ""));
|
||||
cubeCards.add(new CardIdentity("Sejiri Steppe", ""));
|
||||
cubeCards.add(new CardIdentity("Seeker of the Way", ""));
|
||||
cubeCards.add(new CardIdentity("Selesnya Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Sentinel Spider", ""));
|
||||
cubeCards.add(new CardIdentity("Separatist Voidmage", ""));
|
||||
|
@ -349,7 +354,6 @@ public AdamStyborskisPauperCube() {
|
|||
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("Slash Panther", ""));
|
||||
|
@ -362,21 +366,21 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Spined Thopter", ""));
|
||||
cubeCards.add(new CardIdentity("Splatter Thug", ""));
|
||||
cubeCards.add(new CardIdentity("Staggershock", ""));
|
||||
cubeCards.add(new CardIdentity("Stave Off", ""));
|
||||
cubeCards.add(new CardIdentity("Star Compass", ""));
|
||||
cubeCards.add(new CardIdentity("Stitched Drake", ""));
|
||||
cubeCards.add(new CardIdentity("Stone Quarry", ""));
|
||||
cubeCards.add(new CardIdentity("Storm Fleet Pyromancer", ""));
|
||||
cubeCards.add(new CardIdentity("Stormfront Pegasus", ""));
|
||||
cubeCards.add(new CardIdentity("Stormscape Apprentice", ""));
|
||||
cubeCards.add(new CardIdentity("Strip Mine", ""));
|
||||
cubeCards.add(new CardIdentity("Striped Riverwinder", ""));
|
||||
cubeCards.add(new CardIdentity("Submerged Boneyard", ""));
|
||||
cubeCards.add(new CardIdentity("Sultai Scavenger", ""));
|
||||
cubeCards.add(new CardIdentity("Suppression Bonds", ""));
|
||||
cubeCards.add(new CardIdentity("Swift Spinner", ""));
|
||||
cubeCards.add(new CardIdentity("Swiftwater Cliffs", ""));
|
||||
cubeCards.add(new CardIdentity("Sylvan Might", ""));
|
||||
cubeCards.add(new CardIdentity("Sylvok Lifestaff", ""));
|
||||
cubeCards.add(new CardIdentity("Tah-Crop Elite", ""));
|
||||
cubeCards.add(new CardIdentity("Tajuru Pathwarden", ""));
|
||||
cubeCards.add(new CardIdentity("Talruum Minotaur", ""));
|
||||
cubeCards.add(new CardIdentity("Tandem Lookout", ""));
|
||||
cubeCards.add(new CardIdentity("Temporal Isolation", ""));
|
||||
cubeCards.add(new CardIdentity("Tenement Crasher", ""));
|
||||
cubeCards.add(new CardIdentity("Terminate", ""));
|
||||
|
@ -387,25 +391,26 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Thornwood Falls", ""));
|
||||
cubeCards.add(new CardIdentity("Thought Scour", ""));
|
||||
cubeCards.add(new CardIdentity("Thraben Inspector", ""));
|
||||
cubeCards.add(new CardIdentity("Thrill-Kill Assassin", ""));
|
||||
cubeCards.add(new CardIdentity("Thundering Giant", ""));
|
||||
cubeCards.add(new CardIdentity("Thundering Tanadon", ""));
|
||||
cubeCards.add(new CardIdentity("Thunderous Wrath", ""));
|
||||
cubeCards.add(new CardIdentity("Timber Gorge", ""));
|
||||
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("Tranquil Expanse", ""));
|
||||
cubeCards.add(new CardIdentity("Travel Preparations", ""));
|
||||
cubeCards.add(new CardIdentity("Treasure Cruise", ""));
|
||||
cubeCards.add(new CardIdentity("Triplicate Spirits", ""));
|
||||
cubeCards.add(new CardIdentity("Tumble Magnet", ""));
|
||||
cubeCards.add(new CardIdentity("Typhoid Rats", ""));
|
||||
cubeCards.add(new CardIdentity("Ulamog's Crusher", ""));
|
||||
cubeCards.add(new CardIdentity("Ulvenwald Captive", ""));
|
||||
cubeCards.add(new CardIdentity("Undying Rage", ""));
|
||||
cubeCards.add(new CardIdentity("Unearth", ""));
|
||||
cubeCards.add(new CardIdentity("Unmake", ""));
|
||||
cubeCards.add(new CardIdentity("Unnatural Aggression", ""));
|
||||
cubeCards.add(new CardIdentity("Vampire Interloper", ""));
|
||||
cubeCards.add(new CardIdentity("Vault Skirge", ""));
|
||||
cubeCards.add(new CardIdentity("Viashino Firstblade", ""));
|
||||
|
@ -424,7 +429,6 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Wasteland Scorpion", ""));
|
||||
cubeCards.add(new CardIdentity("Wayfarer's Bauble", ""));
|
||||
cubeCards.add(new CardIdentity("Werebear", ""));
|
||||
cubeCards.add(new CardIdentity("Whirlpool Whelm", ""));
|
||||
cubeCards.add(new CardIdentity("Whitemane Lion", ""));
|
||||
cubeCards.add(new CardIdentity("Wild Instincts", ""));
|
||||
cubeCards.add(new CardIdentity("Wild Mongrel", ""));
|
||||
|
@ -435,6 +439,7 @@ public AdamStyborskisPauperCube() {
|
|||
cubeCards.add(new CardIdentity("Winds of Rebuke", ""));
|
||||
cubeCards.add(new CardIdentity("Winged Coatl", ""));
|
||||
cubeCards.add(new CardIdentity("Wojek Halberdiers", ""));
|
||||
cubeCards.add(new CardIdentity("Woodland Stream", ""));
|
||||
cubeCards.add(new CardIdentity("Wrecking Ball", ""));
|
||||
cubeCards.add(new CardIdentity("Wretched Gryff", ""));
|
||||
cubeCards.add(new CardIdentity("Yavimaya Elder", ""));
|
||||
|
|
85
Mage.Sets/src/mage/cards/a/AssassinsBlade.java
Normal file
85
Mage.Sets/src/mage/cards/a/AssassinsBlade.java
Normal file
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class AssassinsBlade extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack attacking creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
filter.add(new AttackingPredicate());
|
||||
}
|
||||
|
||||
public AssassinsBlade(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// Cast Assassin's Blade only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Destroy target nonblack attacking creature.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
}
|
||||
|
||||
public AssassinsBlade(final AssassinsBlade card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssassinsBlade copy() {
|
||||
return new AssassinsBlade(this);
|
||||
}
|
||||
}
|
73
Mage.Sets/src/mage/cards/c/ChampionsVictory.java
Normal file
73
Mage.Sets/src/mage/cards/c/ChampionsVictory.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class ChampionsVictory extends CardImpl {
|
||||
|
||||
public ChampionsVictory(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
|
||||
|
||||
// Cast Champion's Victory only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Return target attacking creature to its owner's hand.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAttackingCreature());
|
||||
}
|
||||
|
||||
public ChampionsVictory(final ChampionsVictory card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChampionsVictory copy() {
|
||||
return new ChampionsVictory(this);
|
||||
}
|
||||
}
|
74
Mage.Sets/src/mage/cards/c/CommandOfUnsummoning.java
Normal file
74
Mage.Sets/src/mage/cards/c/CommandOfUnsummoning.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class CommandOfUnsummoning extends CardImpl {
|
||||
|
||||
public CommandOfUnsummoning(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
|
||||
|
||||
// Cast Command of Unsummoning only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Return one or two target attacking creatures to their owner's hand.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return one or two target attacking creatures to their owner's hand."));
|
||||
this.getSpellAbility().addTarget(new TargetAttackingCreature(1, 2, new FilterAttackingCreature(), false));
|
||||
}
|
||||
|
||||
public CommandOfUnsummoning(final CommandOfUnsummoning card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandOfUnsummoning copy() {
|
||||
return new CommandOfUnsummoning(this);
|
||||
}
|
||||
}
|
|
@ -60,21 +60,25 @@ public class ConfusionInTheRanks extends CardImpl {
|
|||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)
|
||||
));
|
||||
}
|
||||
private final UUID originalId;
|
||||
|
||||
public ConfusionInTheRanks(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}");
|
||||
|
||||
// Whenever an artifact, creature, or enchantment enters the battlefield, its controller chooses target permanent another player controls that shares a card type with it. Exchange control of those permanents.
|
||||
Ability ability = new EntersBattlefieldAllTriggeredAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ExchangeControlTargetEffect(Duration.EndOfGame, "its controller chooses target permanent another player controls that shares a card type with it. Exchange control of those permanents"),
|
||||
filter,
|
||||
false,
|
||||
SetTargetPointer.PERMANENT,
|
||||
null);
|
||||
new ExchangeControlTargetEffect(
|
||||
Duration.EndOfGame,
|
||||
"its controller chooses target permanent "
|
||||
+ "another player controls that shares a card type with it. "
|
||||
+ "Exchange control of those permanents"
|
||||
),
|
||||
filter, false, SetTargetPointer.PERMANENT, null
|
||||
);
|
||||
ability.addTarget(new TargetPermanent());
|
||||
originalId = ability.getOriginalId();
|
||||
this.addAbility(ability);
|
||||
|
@ -92,28 +96,31 @@ public class ConfusionInTheRanks extends CardImpl {
|
|||
for (Effect effect : ability.getEffects()) {
|
||||
enteringPermanentId = effect.getTargetPointer().getFirst(game, ability);
|
||||
}
|
||||
if (enteringPermanentId != null) {
|
||||
Permanent enteringPermanent = game.getPermanent(enteringPermanentId);
|
||||
if (enteringPermanent != null) {
|
||||
ability.setControllerId(enteringPermanent.getControllerId());
|
||||
ability.getTargets().clear();
|
||||
FilterPermanent filterTarget = new FilterPermanent();
|
||||
String message = "";
|
||||
filterTarget.add(Predicates.not(new ControllerIdPredicate(enteringPermanent.getControllerId())));
|
||||
Set<CardTypePredicate> cardTypesPredicates = new HashSet<>(1);
|
||||
for (CardType cardTypeEntering : enteringPermanent.getCardType()) {
|
||||
cardTypesPredicates.add(new CardTypePredicate(cardTypeEntering));
|
||||
if (!message.isEmpty()) {
|
||||
message += "or ";
|
||||
}
|
||||
message += cardTypeEntering.toString().toLowerCase() + ' ';
|
||||
}
|
||||
filterTarget.add(Predicates.or(cardTypesPredicates));
|
||||
message += "you do not control";
|
||||
filterTarget.setMessage(message);
|
||||
ability.getTargets().add(new TargetPermanent(filterTarget));
|
||||
}
|
||||
if (enteringPermanentId == null) {
|
||||
return;
|
||||
}
|
||||
Permanent enteringPermanent = game.getPermanent(enteringPermanentId);
|
||||
if (enteringPermanent == null) {
|
||||
return;
|
||||
}
|
||||
ability.getTargets().clear();
|
||||
FilterPermanent filterTarget = new FilterPermanent();
|
||||
String message = "";
|
||||
filterTarget.add(Predicates.not(new ControllerIdPredicate(enteringPermanent.getControllerId())));
|
||||
Set<CardTypePredicate> cardTypesPredicates = new HashSet<>(1);
|
||||
for (CardType cardTypeEntering : enteringPermanent.getCardType()) {
|
||||
cardTypesPredicates.add(new CardTypePredicate(cardTypeEntering));
|
||||
if (!message.isEmpty()) {
|
||||
message += "or ";
|
||||
}
|
||||
message += cardTypeEntering.toString().toLowerCase() + ' ';
|
||||
}
|
||||
filterTarget.add(Predicates.or(cardTypesPredicates));
|
||||
message += "you don't control";
|
||||
filterTarget.setMessage(message);
|
||||
TargetPermanent target = new TargetPermanent(filterTarget);
|
||||
target.setTargetController(enteringPermanent.getControllerId());
|
||||
ability.getTargets().add(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,9 @@ package mage.cards.c;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
@ -38,6 +40,7 @@ import mage.filter.predicate.mageobject.AnotherTargetPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,17 +49,16 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class ConsumeStrength extends CardImpl {
|
||||
|
||||
public ConsumeStrength(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{G}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}{G}");
|
||||
|
||||
// Target creature gets +2/+2 until end of turn. Another target creature gets -2/-2 until end of turn.
|
||||
this.getSpellAbility().addEffect(new ConsumeStrengthEffect());
|
||||
|
||||
|
||||
FilterCreaturePermanent filter1 = new FilterCreaturePermanent("creature to get +2/+2");
|
||||
TargetCreaturePermanent target1 = new TargetCreaturePermanent(filter1);
|
||||
target1.setTargetTag(1);
|
||||
this.getSpellAbility().addTarget(target1);
|
||||
|
||||
|
||||
FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another creature to get -2/-2");
|
||||
filter2.add(new AnotherTargetPredicate(2));
|
||||
TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter2);
|
||||
|
@ -74,10 +76,10 @@ public class ConsumeStrength extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class ConsumeStrengthEffect extends ContinuousEffectImpl {
|
||||
class ConsumeStrengthEffect extends OneShotEffect {
|
||||
|
||||
public ConsumeStrengthEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "Target creature gets +2/+2 until end of turn. Another target creature gets -2/-2 until end of turn";
|
||||
}
|
||||
|
||||
|
@ -94,14 +96,16 @@ class ConsumeStrengthEffect extends ContinuousEffectImpl {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.addPower(2);
|
||||
permanent.addToughness(2);
|
||||
ContinuousEffect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.addPower(-2);
|
||||
permanent.addToughness(-2);
|
||||
ContinuousEffect effect = new BoostTargetEffect(-2, -2, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
76
Mage.Sets/src/mage/cards/d/DefiantStand.java
Normal file
76
Mage.Sets/src/mage/cards/d/DefiantStand.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DefiantStand extends CardImpl {
|
||||
|
||||
public DefiantStand(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
|
||||
// Cast Defiant Stand only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Target creature gets +1/+3 until end of turn. Untap that creature.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 3, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public DefiantStand(final DefiantStand card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DefiantStand copy() {
|
||||
return new DefiantStand(this);
|
||||
}
|
||||
}
|
73
Mage.Sets/src/mage/cards/e/EightfoldMaze.java
Normal file
73
Mage.Sets/src/mage/cards/e/EightfoldMaze.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class EightfoldMaze extends CardImpl {
|
||||
|
||||
public EightfoldMaze(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
|
||||
// Cast Eightfold Maze only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Destroy target attacking creature.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAttackingCreature());
|
||||
}
|
||||
|
||||
public EightfoldMaze(final EightfoldMaze card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EightfoldMaze copy() {
|
||||
return new EightfoldMaze(this);
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@ import mage.players.Player;
|
|||
public class EnsnaringBridge extends CardImpl {
|
||||
|
||||
public EnsnaringBridge(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// Creatures with power greater than the number of cards in your hand can't attack.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EnsnaringBridgeRestrictionEffect()));
|
||||
|
@ -63,7 +63,6 @@ public class EnsnaringBridge extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class EnsnaringBridgeRestrictionEffect extends RestrictionEffect {
|
||||
|
||||
public EnsnaringBridgeRestrictionEffect() {
|
||||
|
@ -78,10 +77,11 @@ class EnsnaringBridgeRestrictionEffect extends RestrictionEffect {
|
|||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
return permanent.getPower().getValue() > controller.getHand().size();
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return controller.getInRange().contains(permanent.getControllerId())
|
||||
&& permanent.getPower().getValue() > controller.getHand().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,7 @@ package mage.cards.g;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
@ -75,15 +75,17 @@ public class GateToTheAfterlife extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// Whenever a nontoken creature you control dies, you gain 1 life. Then you may draw a card. If you do, discard a card.
|
||||
Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new GainLifeEffect(1), false, filter, false, true);
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false, filter, false);
|
||||
Effect effect = new DrawDiscardControllerEffect(1, 1, true);
|
||||
effect.setText("Then you may draw a card. If you do, discard a card");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}, {T}, Sacrifice Gate to the Afterlife: Search your graveyard, hand, and/or library for a card named God-Pharaoh's Gift and put it onto the battlefield. If you seearch your library this way, shuffle it. Activate this ability only if there are six or more creature cards in your graveyard.
|
||||
ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GateToTheAfterlifeEffect(), new GenericManaCost(2), new CardsInControllerGraveCondition(6, new FilterCreatureCard()));
|
||||
ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new GateToTheAfterlifeEffect(), new GenericManaCost(2),
|
||||
new CardsInControllerGraveCondition(6, new FilterCreatureCard())
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -33,7 +33,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ExileSourceEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -42,11 +41,9 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -55,7 +52,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class GiantTrapDoorSpider extends CardImpl {
|
||||
|
||||
private static final HuntingKavuFilter filter = new HuntingKavuFilter();
|
||||
private static final FilterCreatureAttackingYou filter = new FilterCreatureAttackingYou("creature without flying that's attacking you");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
|
@ -71,7 +68,7 @@ public class GiantTrapDoorSpider extends CardImpl {
|
|||
// {1}{R}{G}, {tap}: Exile Giant Trap Door Spider and target creature without flying that's attacking you.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new ManaCostsImpl("{1}{R}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addEffect(new ExileTargetEffect());
|
||||
ability.addEffect(new ExileTargetEffect().setText("and target creature without flying that's attacking you"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -85,26 +82,3 @@ public class GiantTrapDoorSpider extends CardImpl {
|
|||
return new GiantTrapDoorSpider(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HuntingKavuFilter extends FilterAttackingCreature {
|
||||
|
||||
public HuntingKavuFilter() {
|
||||
super("creature without flying that's attacking you");
|
||||
}
|
||||
|
||||
public HuntingKavuFilter(final HuntingKavuFilter filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HuntingKavuFilter copy() {
|
||||
return new HuntingKavuFilter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
|
||||
return super.match(permanent, sourceId, playerId, game)
|
||||
&& permanent.isAttacking() // to prevent unneccessary combat checking if not attacking
|
||||
&& playerId.equals(game.getCombat().getDefenderId(permanent.getId()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
public class GlenElendraPranksters extends CardImpl {
|
||||
|
||||
public GlenElendraPranksters(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.subtype.add(SubType.FAERIE);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
|
@ -57,8 +57,10 @@ public class GlenElendraPranksters extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever you cast a spell during an opponent's turn, you may return target creature you control to its owner's hand.
|
||||
Ability ability = new ConditionalTriggeredAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandTargetEffect(), true), OnOpponentsTurnCondition.instance,
|
||||
"Whenever you cast a spell during an opponent's turn, you may have target creature get -1/-1 until end of turn.");
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
new SpellCastControllerTriggeredAbility(new ReturnToHandTargetEffect(), true), OnOpponentsTurnCondition.instance,
|
||||
"Whenever you cast a spell during an opponent's turn, you may return target creature you control to its owner's hand."
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ExileSourceEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -42,11 +41,9 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -55,7 +52,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class HuntingKavu extends CardImpl {
|
||||
|
||||
private static final HuntingKavuFilter filter = new HuntingKavuFilter();
|
||||
private static final FilterCreatureAttackingYou filter = new FilterCreatureAttackingYou("creature without flying that's attacking you");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
|
@ -71,7 +68,7 @@ public class HuntingKavu extends CardImpl {
|
|||
// {1}{R}{G}, {tap}: Exile Hunting Kavu and target creature without flying that's attacking you.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new ManaCostsImpl("{1}{R}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addEffect(new ExileTargetEffect());
|
||||
ability.addEffect(new ExileTargetEffect().setText("nd target creature without flying that's attacking you"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -85,26 +82,3 @@ public class HuntingKavu extends CardImpl {
|
|||
return new HuntingKavu(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HuntingKavuFilter extends FilterAttackingCreature {
|
||||
|
||||
public HuntingKavuFilter() {
|
||||
super("creature without flying that's attacking you");
|
||||
}
|
||||
|
||||
public HuntingKavuFilter(final HuntingKavuFilter filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HuntingKavuFilter copy() {
|
||||
return new HuntingKavuFilter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
|
||||
return super.match(permanent, sourceId, playerId, game)
|
||||
&& permanent.isAttacking() // to prevent unneccessary combat checking if not attacking
|
||||
&& playerId.equals(game.getCombat().getDefenderId(permanent.getId()));
|
||||
}
|
||||
}
|
||||
|
|
82
Mage.Sets/src/mage/cards/i/IceFloe.java
Normal file
82
Mage.Sets/src/mage/cards/i/IceFloe.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class IceFloe extends CardImpl {
|
||||
|
||||
private static final FilterCreatureAttackingYou filter = new FilterCreatureAttackingYou("creature without flying that's attacking you");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
}
|
||||
|
||||
public IceFloe(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// You may choose not to untap Ice Floe during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
|
||||
// {tap}: Tap target creature without flying that's attacking you. It doesn't untap during its controller's untap step for as long as Ice Floe remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public IceFloe(final IceFloe card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IceFloe copy() {
|
||||
return new IceFloe(this);
|
||||
}
|
||||
}
|
106
Mage.Sets/src/mage/cards/i/ImperialEdict.java
Normal file
106
Mage.Sets/src/mage/cards/i/ImperialEdict.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class ImperialEdict extends CardImpl {
|
||||
|
||||
public ImperialEdict(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
|
||||
|
||||
// Target opponent chooses a creature he or she controls. Destroy it.
|
||||
this.getSpellAbility().addEffect(new ImperialEdictEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
public ImperialEdict(final ImperialEdict card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImperialEdict copy() {
|
||||
return new ImperialEdict(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ImperialEdictEffect extends OneShotEffect {
|
||||
|
||||
ImperialEdictEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Target opponent chooses a creature he or she controls. Destroy it.";
|
||||
}
|
||||
|
||||
ImperialEdictEffect(final ImperialEdictEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImperialEdictEffect copy() {
|
||||
return new ImperialEdictEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");
|
||||
filter.add(new ControllerIdPredicate(player.getId()));
|
||||
Target target = new TargetPermanent(1, 1, filter, true);
|
||||
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
|
||||
while (!target.isChosen() && target.canChoose(player.getId(), game) && player.canRespond()) {
|
||||
player.chooseTarget(Outcome.DestroyPermanent, target, source, game);
|
||||
}
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
114
Mage.Sets/src/mage/cards/k/KrovikanHorror.java
Normal file
114
Mage.Sets/src/mage/cards/k/KrovikanHorror.java
Normal file
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
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.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class KrovikanHorror extends CardImpl {
|
||||
|
||||
public KrovikanHorror(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// At the beginning of the end step, if Krovikan Horror is in your graveyard with a creature card directly above it, you may return Krovikan Horror to your hand.
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(),
|
||||
TargetController.ANY, KrovikanHorrorCondition.instance, true
|
||||
));
|
||||
|
||||
// {1}, Sacrifice a creature: Krovikan Horror deals 1 damage to target creature or player.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(1));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public KrovikanHorror(final KrovikanHorror card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KrovikanHorror copy() {
|
||||
return new KrovikanHorror(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum KrovikanHorrorCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
boolean nextCard = false;
|
||||
for (Card card : controller.getGraveyard().getCards(game)) {
|
||||
if (nextCard) {
|
||||
return card.isCreature();
|
||||
}
|
||||
if (card.getId().equals(source.getSourceId())) {
|
||||
nextCard = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{this} is in your graveyard with a creature card directly above it";
|
||||
}
|
||||
}
|
|
@ -36,9 +36,7 @@ import mage.abilities.keyword.LeylineAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -48,21 +46,14 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class LeylineOfSingularity extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("nonland permanents");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public LeylineOfSingularity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
|
||||
|
||||
// If Leyline of Singularity is in your opening hand, you may begin the game with it on the battlefield.
|
||||
this.addAbility(LeylineAbility.getInstance());
|
||||
|
||||
// All nonland permanents are legendary.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetSupertypeAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetSupertypeAllEffect()));
|
||||
}
|
||||
|
||||
public LeylineOfSingularity(final LeylineOfSingularity card) {
|
||||
|
@ -75,19 +66,16 @@ public class LeylineOfSingularity extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class SetSupertypeAllEffect extends ContinuousEffectImpl {
|
||||
|
||||
private final FilterPermanent filter;
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
|
||||
|
||||
public SetSupertypeAllEffect(Duration duration, FilterPermanent filter) {
|
||||
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
|
||||
this.filter = filter;
|
||||
public SetSupertypeAllEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
|
||||
}
|
||||
|
||||
public SetSupertypeAllEffect(final SetSupertypeAllEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,9 +85,8 @@ class SetSupertypeAllEffect extends ContinuousEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
permanent.addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
permanent.addSuperType(SuperType.LEGENDARY);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -27,10 +27,15 @@
|
|||
*/
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -49,7 +54,7 @@ import mage.game.permanent.Permanent;
|
|||
public class LightmineField extends CardImpl {
|
||||
|
||||
public LightmineField(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
||||
|
||||
// Whenever one or more creatures attack, Lightmine Field deals damage to each of those creatures equal to the number of attacking creatures.
|
||||
this.addAbility(new LightmineFieldTriggeredAbility());
|
||||
|
@ -87,7 +92,17 @@ class LightmineFieldTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return !game.getCombat().getAttackers().isEmpty();
|
||||
Set<MageObjectReference> attackSet = new HashSet<>();
|
||||
for (UUID attackerId : game.getCombat().getAttackers()) {
|
||||
Permanent attacker = game.getPermanent(attackerId);
|
||||
if (attacker != null) {
|
||||
attackSet.add(new MageObjectReference(attacker, game));
|
||||
}
|
||||
}
|
||||
for (Effect effect : getEffects()) {
|
||||
effect.setValue("Lightmine Field", attackSet);
|
||||
}
|
||||
return !attackSet.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -116,9 +131,11 @@ class LightmineFieldEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
List<UUID> attackers = game.getCombat().getAttackers();
|
||||
int damage = attackers.size();
|
||||
Set<MageObjectReference> attackSet = (Set<MageObjectReference>) getValue("Lightmine Field");
|
||||
if (!attackers.isEmpty()) {
|
||||
for (UUID attacker : attackers) {
|
||||
Permanent creature = game.getPermanent(attacker);
|
||||
for (Iterator<MageObjectReference> it = attackSet.iterator(); it.hasNext();) {
|
||||
MageObjectReference attacker = it.next();
|
||||
Permanent creature = attacker.getPermanent(game);
|
||||
if (creature != null) {
|
||||
creature.damage(damage, source.getSourceId(), game, false, true);
|
||||
}
|
||||
|
|
|
@ -53,11 +53,10 @@ import mage.watchers.Watcher;
|
|||
public class ManaMaze extends CardImpl {
|
||||
|
||||
public ManaMaze(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
// Players can't cast spells that share a color with the spell most recently cast this turn.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ManaMazeEffect()), new LastSpellCastWatcher());
|
||||
|
||||
}
|
||||
|
||||
public ManaMaze(final ManaMaze card) {
|
||||
|
@ -91,9 +90,8 @@ class ManaMazeEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
Card card = game.getCard(event.getSourceId());
|
||||
if (card != null) {
|
||||
LastSpellCastWatcher watcher = (LastSpellCastWatcher) game.getState().getWatchers().get(LastSpellCastWatcher.class.getSimpleName());
|
||||
if (watcher != null
|
||||
&& watcher.lastSpellCast != null) {
|
||||
return card.getColor(game).contains(watcher.lastSpellCast.getColor(game));
|
||||
if (watcher != null && watcher.lastSpellCast != null) {
|
||||
return !card.getColor(game).intersection(watcher.lastSpellCast.getColor(game)).isColorless();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
101
Mage.Sets/src/mage/cards/m/MartyrsCry.java
Normal file
101
Mage.Sets/src/mage/cards/m/MartyrsCry.java
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class MartyrsCry extends CardImpl {
|
||||
|
||||
public MartyrsCry(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}{W}");
|
||||
|
||||
// Exile all white creatures. For each creature exiled this way, its controller draws a card.
|
||||
this.getSpellAbility().addEffect(new MartyrsCryEffect());
|
||||
}
|
||||
|
||||
public MartyrsCry(final MartyrsCry card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MartyrsCry copy() {
|
||||
return new MartyrsCry(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MartyrsCryEffect extends OneShotEffect {
|
||||
|
||||
MartyrsCryEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "Exile all white creatures. For each creature exiled this way, its controller draws a card.";
|
||||
}
|
||||
|
||||
MartyrsCryEffect(final MartyrsCryEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MartyrsCryEffect copy() {
|
||||
return new MartyrsCryEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Map<UUID, Integer> playerCrtCount = new HashMap<>();
|
||||
for (Iterator<Permanent> it = game.getBattlefield().getActivePermanents(source.getControllerId(), game).iterator(); it.hasNext();) {
|
||||
Permanent perm = it.next();
|
||||
if (perm != null && perm.isCreature() && perm.getColor(game).isWhite() && perm.moveToExile(null, null, source.getSourceId(), game)) {
|
||||
playerCrtCount.putIfAbsent(perm.getControllerId(), 0);
|
||||
playerCrtCount.compute(perm.getControllerId(), (p, amount) -> amount + 1);
|
||||
}
|
||||
}
|
||||
for (UUID playerId : game.getPlayerList().toList()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.drawCards(playerCrtCount.getOrDefault(playerId, 0), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
100
Mage.Sets/src/mage/cards/m/Melting.java
Normal file
100
Mage.Sets/src/mage/cards/m/Melting.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Melting extends CardImpl {
|
||||
|
||||
public Melting(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
|
||||
|
||||
// All lands are no longer snow.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MeltingEffect()));
|
||||
}
|
||||
|
||||
public Melting(final Melting card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Melting copy() {
|
||||
return new Melting(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MeltingEffect extends ContinuousEffectImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||
|
||||
public MeltingEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
|
||||
}
|
||||
|
||||
public MeltingEffect(final MeltingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MeltingEffect copy() {
|
||||
return new MeltingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
permanent.getSuperType().remove(SuperType.SNOW);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "All lands are no longer snow";
|
||||
}
|
||||
}
|
83
Mage.Sets/src/mage/cards/m/Momentum.java
Normal file
83
Mage.Sets/src/mage/cards/m/Momentum.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Momentum extends CardImpl {
|
||||
|
||||
public Momentum(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// At the beginning of your upkeep, you may put a growth counter on Momentum.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.GROWTH.createInstance(), true), TargetController.YOU, true));
|
||||
|
||||
// Enchanted creature gets +1/+1 for each growth counter on Momentum.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(new CountersSourceCount(CounterType.GROWTH), new CountersSourceCount(CounterType.GROWTH))));
|
||||
}
|
||||
|
||||
public Momentum(final Momentum card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Momentum copy() {
|
||||
return new Momentum(this);
|
||||
}
|
||||
}
|
|
@ -50,8 +50,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public class PriceOfGlory extends CardImpl {
|
||||
|
||||
public PriceOfGlory(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
|
||||
|
||||
// Whenever a player taps a land for mana, if it's not that player's turn, destroy that land.
|
||||
this.addAbility(new PriceOfGloryAbility());
|
||||
|
@ -86,11 +85,16 @@ class PriceOfGloryAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
|
||||
if (permanent == null) {
|
||||
permanent = (Permanent) game.getLastKnownInformation(event.getSourceId(), Zone.BATTLEFIELD);
|
||||
return false;
|
||||
}
|
||||
if (permanent != null && permanent.isLand()
|
||||
Player player = game.getPlayer(controllerId);
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (permanent.isLand()
|
||||
&& player.getInRange().contains(permanent.getControllerId())
|
||||
&& !permanent.getControllerId().equals(game.getActivePlayerId())) { // intervening if clause
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
return true;
|
||||
|
@ -125,7 +129,7 @@ class PriceOfGloryEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Permanent land = game.getPermanentOrLKIBattlefield(this.targetPointer.getFirst(game, source));
|
||||
if (land != null && !land.getControllerId().equals(game.getActivePlayerId())) { // intervening if clause has to be checked again
|
||||
if (land != null && !land.getControllerId().equals(game.getActivePlayerId())) { // intervening if clause has to be checked again
|
||||
land.destroy(source.getSourceId(), game, false);
|
||||
}
|
||||
return true;
|
||||
|
|
72
Mage.Sets/src/mage/cards/r/RallyTheTroops.java
Normal file
72
Mage.Sets/src/mage/cards/r/RallyTheTroops.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class RallyTheTroops extends CardImpl {
|
||||
|
||||
public RallyTheTroops(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
|
||||
|
||||
// Cast Rally the Troops only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Untap all creatures you control.
|
||||
this.getSpellAbility().addEffect(new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||
}
|
||||
|
||||
public RallyTheTroops(final RallyTheTroops card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RallyTheTroops copy() {
|
||||
return new RallyTheTroops(this);
|
||||
}
|
||||
}
|
73
Mage.Sets/src/mage/cards/r/Remove.java
Normal file
73
Mage.Sets/src/mage/cards/r/Remove.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Remove extends CardImpl {
|
||||
|
||||
public Remove(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
|
||||
|
||||
// Cast Remove only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Return target attacking creature to its owner's hand.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAttackingCreature());
|
||||
}
|
||||
|
||||
public Remove(final Remove card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Remove copy() {
|
||||
return new Remove(this);
|
||||
}
|
||||
}
|
89
Mage.Sets/src/mage/cards/r/RighteousWar.java
Normal file
89
Mage.Sets/src/mage/cards/r/RighteousWar.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class RighteousWar extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent whiteFilter = new FilterCreaturePermanent("white creatures you control");
|
||||
private static final FilterCreaturePermanent blackFilter = new FilterCreaturePermanent("black creatures you control");
|
||||
|
||||
static {
|
||||
whiteFilter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
blackFilter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public RighteousWar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{B}");
|
||||
|
||||
// White creatures you control have protection from black.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(
|
||||
ProtectionAbility.from(ObjectColor.BLACK),
|
||||
Duration.WhileOnBattlefield,
|
||||
whiteFilter
|
||||
)
|
||||
));
|
||||
|
||||
// Black creatures you control have protection from white.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(
|
||||
ProtectionAbility.from(ObjectColor.WHITE),
|
||||
Duration.WhileOnBattlefield,
|
||||
blackFilter
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public RighteousWar(final RighteousWar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RighteousWar copy() {
|
||||
return new RighteousWar(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/cards/s/ScorchingWinds.java
Normal file
72
Mage.Sets/src/mage/cards/s/ScorchingWinds.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class ScorchingWinds extends CardImpl {
|
||||
|
||||
public ScorchingWinds(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
|
||||
// Cast Scorching Winds only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Scorching Winds deals 1 damage to each attacking creature.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(1, new FilterAttackingCreature()));
|
||||
}
|
||||
|
||||
public ScorchingWinds(final ScorchingWinds card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScorchingWinds copy() {
|
||||
return new ScorchingWinds(this);
|
||||
}
|
||||
}
|
96
Mage.Sets/src/mage/cards/s/Shyft.java
Normal file
96
Mage.Sets/src/mage/cards/s/Shyft.java
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesColorOrColorsTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Shyft extends CardImpl {
|
||||
|
||||
public Shyft(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// At the beginning of your upkeep, you may have Shyft become the color or colors of your choice.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ShyftEffect(), TargetController.YOU, true));
|
||||
}
|
||||
|
||||
public Shyft(final Shyft card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Shyft copy() {
|
||||
return new Shyft(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ShyftEffect extends OneShotEffect {
|
||||
|
||||
ShyftEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "have {this} become the color or colors of your choice.";
|
||||
}
|
||||
|
||||
ShyftEffect(final ShyftEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShyftEffect copy() {
|
||||
return new ShyftEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Effect effect = new BecomesColorOrColorsTargetEffect(Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(source.getSourceId(), source.getSourceObjectZoneChangeCounter()));
|
||||
return effect.apply(game, source);
|
||||
}
|
||||
}
|
|
@ -29,14 +29,14 @@ package mage.cards.s;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
@ -44,6 +44,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -76,10 +77,10 @@ public class Skulduggery extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SkulduggeryEffect extends ContinuousEffectImpl {
|
||||
class SkulduggeryEffect extends OneShotEffect {
|
||||
|
||||
public SkulduggeryEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "Until end of turn, target creature you control gets +1/+1 and target creature an opponent controls gets -1/-1";
|
||||
}
|
||||
|
||||
|
@ -96,13 +97,15 @@ class SkulduggeryEffect extends ContinuousEffectImpl {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.addPower(1);
|
||||
permanent.addToughness(1);
|
||||
ContinuousEffect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.addPower(-1);
|
||||
permanent.addToughness(-1);
|
||||
ContinuousEffect effect = new BoostTargetEffect(-1, -1, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -42,12 +42,10 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -55,7 +53,7 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
*/
|
||||
public class SnowFortress extends CardImpl {
|
||||
|
||||
private static final SnowFortressFilter filter = new SnowFortressFilter();
|
||||
private static final FilterCreatureAttackingYou filter = new FilterCreatureAttackingYou("creature without flying that's attacking you");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
|
@ -79,7 +77,7 @@ public class SnowFortress extends CardImpl {
|
|||
|
||||
// {3}: Snow Fortress deals 1 damage to target creature without flying that's attacking you.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(3));
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -92,26 +90,3 @@ public class SnowFortress extends CardImpl {
|
|||
return new SnowFortress(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SnowFortressFilter extends FilterAttackingCreature {
|
||||
|
||||
public SnowFortressFilter() {
|
||||
super("creature without flying that's attacking you");
|
||||
}
|
||||
|
||||
public SnowFortressFilter(final SnowFortressFilter filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SnowFortressFilter copy() {
|
||||
return new SnowFortressFilter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
|
||||
return super.match(permanent, sourceId, playerId, game)
|
||||
&& permanent.isAttacking() // to prevent unneccessary combat checking if not attacking
|
||||
&& playerId.equals(game.getCombat().getDefenderId(permanent.getId()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,9 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -56,7 +54,7 @@ public class SoulSnare extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ExileTargetEffect(), new ManaCostsImpl("{W}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(new SoulSnareFilter()));
|
||||
ability.addTarget(new TargetCreaturePermanent(new FilterCreatureAttackingYou(true)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -69,25 +67,3 @@ public class SoulSnare extends CardImpl {
|
|||
return new SoulSnare(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SoulSnareFilter extends FilterAttackingCreature {
|
||||
|
||||
public SoulSnareFilter() {
|
||||
super("creature that's attacking you or a planeswalker you control");
|
||||
}
|
||||
|
||||
public SoulSnareFilter(final SoulSnareFilter filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulSnareFilter copy() {
|
||||
return new SoulSnareFilter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
|
||||
return super.match(permanent, sourceId, playerId, game)
|
||||
&& playerId.equals(game.getCombat().getDefendingPlayerId(permanent.getId(), game));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,10 +44,10 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.FilterCreatureAttackingYou;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.util.CardUtil;
|
||||
|
@ -72,7 +72,7 @@ public class StalkingLeonin extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new StalkingLeoninChooseOpponent(), false));
|
||||
// Reveal the player you chose: Exile target creature that's attacking you if it's controlled by the chosen player. Activate this ability only once.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new StalkingLeoninEffect(), new StalkingLeoninRevealOpponentCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(new StalkingLeoninFilter()));
|
||||
ability.addTarget(new TargetCreaturePermanent(new FilterCreatureAttackingYou()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -217,25 +217,3 @@ class StalkingLeoninEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class StalkingLeoninFilter extends FilterAttackingCreature {
|
||||
|
||||
public StalkingLeoninFilter() {
|
||||
super("creature that's attacking you");
|
||||
}
|
||||
|
||||
public StalkingLeoninFilter(final StalkingLeoninFilter filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StalkingLeoninFilter copy() {
|
||||
return new StalkingLeoninFilter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
|
||||
return super.match(permanent, sourceId, playerId, game)
|
||||
&& playerId.equals(game.getCombat().getDefenderId(permanent.getId()));
|
||||
}
|
||||
}
|
||||
|
|
81
Mage.Sets/src/mage/cards/s/SuleimansLegacy.java
Normal file
81
Mage.Sets/src/mage/cards/s/SuleimansLegacy.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class SuleimansLegacy extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("Djinns and Efreets");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new SubtypePredicate(SubType.DJINN),
|
||||
new SubtypePredicate(SubType.EFREET)
|
||||
));
|
||||
}
|
||||
|
||||
public SuleimansLegacy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}{W}");
|
||||
|
||||
// When Suleiman's Legacy enters the battlefield, destroy all Djinns and Efreets. They can't be regenerated.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter, true)));
|
||||
|
||||
// Whenever a Djinn or Efreet enters the battlefield, destroy it. It can't be regenerated.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new DestroyTargetEffect(true), filter, false, SetTargetPointer.PERMANENT,
|
||||
"Whenever a Djinn or Efreet enters the battlefield, destroy it. It can't be regenerated."
|
||||
));
|
||||
}
|
||||
|
||||
public SuleimansLegacy(final SuleimansLegacy card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuleimansLegacy copy() {
|
||||
return new SuleimansLegacy(this);
|
||||
}
|
||||
}
|
73
Mage.Sets/src/mage/cards/t/TreetopDefense.java
Normal file
73
Mage.Sets/src/mage/cards/t/TreetopDefense.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class TreetopDefense extends CardImpl {
|
||||
|
||||
public TreetopDefense(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||
|
||||
// Cast Treetop Defense only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new CastOnlyDuringPhaseStepSourceAbility(
|
||||
TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance,
|
||||
"Cast {this} only during the declare attackers step and only if you've been attacked this step."
|
||||
);
|
||||
ability.addWatcher(new PlayerAttackedStepWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Creatures you control gain reach until end of turn.
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn));
|
||||
}
|
||||
|
||||
public TreetopDefense(final TreetopDefense card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TreetopDefense copy() {
|
||||
return new TreetopDefense(this);
|
||||
}
|
||||
}
|
126
Mage.Sets/src/mage/cards/t/TribalGolem.java
Normal file
126
Mage.Sets/src/mage/cards/t/TribalGolem.java
Normal file
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.t;
|
||||
|
||||
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.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
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.TrampleAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class TribalGolem extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter1 = new FilterControlledPermanent("a Beast");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("a Goblin");
|
||||
private static final FilterControlledPermanent filter3 = new FilterControlledPermanent("a Soldier");
|
||||
private static final FilterControlledPermanent filter4 = new FilterControlledPermanent("a Wizard");
|
||||
private static final FilterControlledPermanent filter5 = new FilterControlledPermanent("a Zombie");
|
||||
|
||||
static {
|
||||
filter1.add(new SubtypePredicate(SubType.BEAST));
|
||||
filter2.add(new SubtypePredicate(SubType.GOBLIN));
|
||||
filter3.add(new SubtypePredicate(SubType.SOLDIER));
|
||||
filter4.add(new SubtypePredicate(SubType.WIZARD));
|
||||
filter5.add(new SubtypePredicate(SubType.ZOMBIE));
|
||||
}
|
||||
|
||||
public TribalGolem(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
|
||||
|
||||
this.subtype.add(SubType.GOLEM);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Tribal Golem has trample as long as you control a Beast, haste as long as you control a Goblin, first strike as long as you control a Soldier, flying as long as you control a Wizard, and "{B}: Regenerate Tribal Golem" as long as you control a Zombie.
|
||||
Effect effect1 = new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(TrampleAbility.getInstance()),
|
||||
new PermanentsOnTheBattlefieldCondition(filter1),
|
||||
"{this} has trample as long as you control a Beast,"
|
||||
);
|
||||
Effect effect2 = new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(HasteAbility.getInstance()),
|
||||
new PermanentsOnTheBattlefieldCondition(filter2),
|
||||
"haste as long as you control a Goblin,"
|
||||
);
|
||||
Effect effect3 = new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()),
|
||||
new PermanentsOnTheBattlefieldCondition(filter3),
|
||||
"first strike as long as you control a Soldier,"
|
||||
);
|
||||
Effect effect4 = new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance()),
|
||||
new PermanentsOnTheBattlefieldCondition(filter4),
|
||||
"flying as long as you control a Wizard,"
|
||||
);
|
||||
Effect effect5 = new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new RegenerateSourceEffect(),
|
||||
new ManaCostsImpl("{B}")
|
||||
)),
|
||||
new PermanentsOnTheBattlefieldCondition(filter5),
|
||||
"and \"{B}: Regenerate {this}\" as long as you control a Zombie"
|
||||
);
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1);
|
||||
ability.addEffect(effect2);
|
||||
ability.addEffect(effect3);
|
||||
ability.addEffect(effect4);
|
||||
ability.addEffect(effect5);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public TribalGolem(final TribalGolem card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TribalGolem copy() {
|
||||
return new TribalGolem(this);
|
||||
}
|
||||
}
|
103
Mage.Sets/src/mage/cards/w/Waylay.java
Normal file
103
Mage.Sets/src/mage/cards/w/Waylay.java
Normal file
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.w;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextCleanupDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.WaylayToken;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Waylay extends CardImpl {
|
||||
|
||||
public Waylay(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
|
||||
// Create three 2/2 white Knight creature tokens. Exile them at the beginning of the next cleanup step.
|
||||
this.getSpellAbility().addEffect(new WaylayEffect());
|
||||
}
|
||||
|
||||
public Waylay(final Waylay card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Waylay copy() {
|
||||
return new Waylay(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WaylayEffect extends OneShotEffect {
|
||||
|
||||
public WaylayEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Create three 2/2 white Knight creature tokens. Exile them at the beginning of the next cleanup step.";
|
||||
}
|
||||
|
||||
public WaylayEffect(final WaylayEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaylayEffect copy() {
|
||||
return new WaylayEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Token token = new WaylayToken();
|
||||
token.putOntoBattlefield(3, game, source.getSourceId(), source.getControllerId());
|
||||
List<Permanent> toExile = new ArrayList<>();
|
||||
for (UUID tokenId : token.getLastAddedTokenIds()) {
|
||||
Permanent tokenPermanent = game.getPermanent(tokenId);
|
||||
if (tokenPermanent != null) {
|
||||
toExile.add(tokenPermanent);
|
||||
}
|
||||
}
|
||||
Effect effect = new ExileTargetEffect();
|
||||
effect.setTargetPointer(new FixedTargets(toExile, game));
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(effect), source);
|
||||
return true;
|
||||
}
|
||||
}
|
116
Mage.Sets/src/mage/cards/w/WeiAssassins.java
Normal file
116
Mage.Sets/src/mage/cards/w/WeiAssassins.java
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.w;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class WeiAssassins extends CardImpl {
|
||||
|
||||
public WeiAssassins(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.subtype.add(SubType.ASSASSIN);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Wei Assassins enters the battlefield, target opponent chooses a creature he or she controls. Destroy it.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new WeiAssassinsEffect(), false);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public WeiAssassins(final WeiAssassins card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeiAssassins copy() {
|
||||
return new WeiAssassins(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WeiAssassinsEffect extends OneShotEffect {
|
||||
|
||||
WeiAssassinsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "target opponent chooses a creature he or she controls. Destroy it.";
|
||||
}
|
||||
|
||||
WeiAssassinsEffect(final WeiAssassinsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeiAssassinsEffect copy() {
|
||||
return new WeiAssassinsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");
|
||||
filter.add(new ControllerIdPredicate(player.getId()));
|
||||
Target target = new TargetPermanent(1, 1, filter, true);
|
||||
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
|
||||
while (!target.isChosen() && target.canChoose(player.getId(), game) && player.canRespond()) {
|
||||
player.chooseTarget(Outcome.DestroyPermanent, target, source, game);
|
||||
}
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -104,6 +104,7 @@ public class Alliances extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Keeper of Tresserhorn", 14, Rarity.RARE, mage.cards.k.KeeperOfTresserhorn.class));
|
||||
cards.add(new SetCardInfo("Kjeldoran Home Guard", 135, Rarity.UNCOMMON, mage.cards.k.KjeldoranHomeGuard.class));
|
||||
cards.add(new SetCardInfo("Kjeldoran Outpost", 184, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class));
|
||||
cards.add(new SetCardInfo("Krovikan Horror", 15, Rarity.RARE, mage.cards.k.KrovikanHorror.class));
|
||||
cards.add(new SetCardInfo("Krovikan Plague", 16, Rarity.UNCOMMON, mage.cards.k.KrovikanPlague.class));
|
||||
cards.add(new SetCardInfo("Lake of the Dead", 185, Rarity.RARE, mage.cards.l.LakeOfTheDead.class));
|
||||
cards.add(new SetCardInfo("Library of Lat-Nam", 47, Rarity.RARE, mage.cards.l.LibraryOfLatNam.class));
|
||||
|
|
|
@ -217,6 +217,7 @@ public class FifthEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Icatian Scout", 313, Rarity.COMMON, IcatianScout.class));
|
||||
cards.add(new SetCardInfo("Icatian Store", 423, Rarity.RARE, mage.cards.i.IcatianStore.class));
|
||||
cards.add(new SetCardInfo("Icatian Town", 314, Rarity.RARE, mage.cards.i.IcatianTown.class));
|
||||
cards.add(new SetCardInfo("Ice Floe", 424, Rarity.UNCOMMON, mage.cards.i.IceFloe.class));
|
||||
cards.add(new SetCardInfo("Imposing Visage", 241, Rarity.COMMON, mage.cards.i.ImposingVisage.class));
|
||||
cards.add(new SetCardInfo("Incinerate", 242, Rarity.COMMON, mage.cards.i.Incinerate.class));
|
||||
cards.add(new SetCardInfo("Inferno", 243, Rarity.RARE, mage.cards.i.Inferno.class));
|
||||
|
|
|
@ -167,6 +167,7 @@ public class IceAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Hyalopterous Lemure", 21, Rarity.UNCOMMON, mage.cards.h.HyalopterousLemure.class));
|
||||
cards.add(new SetCardInfo("Hydroblast", 72, Rarity.COMMON, mage.cards.h.Hydroblast.class));
|
||||
cards.add(new SetCardInfo("Hymn of Rebirth", 373, Rarity.UNCOMMON, mage.cards.h.HymnOfRebirth.class));
|
||||
cards.add(new SetCardInfo("Ice Floe", 333, Rarity.UNCOMMON, mage.cards.i.IceFloe.class));
|
||||
cards.add(new SetCardInfo("Iceberg", 73, Rarity.UNCOMMON, mage.cards.i.Iceberg.class));
|
||||
cards.add(new SetCardInfo("Icequake", 22, Rarity.UNCOMMON, mage.cards.i.Icequake.class));
|
||||
cards.add(new SetCardInfo("Icy Manipulator", 297, Rarity.UNCOMMON, mage.cards.i.IcyManipulator.class));
|
||||
|
@ -211,6 +212,7 @@ public class IceAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Magus of the Unseen", 82, Rarity.RARE, mage.cards.m.MagusOfTheUnseen.class));
|
||||
cards.add(new SetCardInfo("Malachite Talisman", 303, Rarity.UNCOMMON, mage.cards.m.MalachiteTalisman.class));
|
||||
cards.add(new SetCardInfo("Marton Stromgald", 199, Rarity.RARE, mage.cards.m.MartonStromgald.class));
|
||||
cards.add(new SetCardInfo("Melting", 201, Rarity.UNCOMMON, mage.cards.m.Melting.class));
|
||||
cards.add(new SetCardInfo("Merieke Ri Berit", 375, Rarity.RARE, mage.cards.m.MeriekeRiBerit.class));
|
||||
cards.add(new SetCardInfo("Mesmeric Trance", 83, Rarity.RARE, mage.cards.m.MesmericTrance.class));
|
||||
cards.add(new SetCardInfo("Meteor Shower", 202, Rarity.COMMON, mage.cards.m.MeteorShower.class));
|
||||
|
@ -272,6 +274,7 @@ public class IceAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Shambling Strider", 151, Rarity.COMMON, mage.cards.s.ShamblingStrider.class));
|
||||
cards.add(new SetCardInfo("Shatter", 216, Rarity.COMMON, mage.cards.s.Shatter.class));
|
||||
cards.add(new SetCardInfo("Shield of the Ages", 310, Rarity.UNCOMMON, mage.cards.s.ShieldOfTheAges.class));
|
||||
cards.add(new SetCardInfo("Shyft", 96, Rarity.RARE, mage.cards.s.Shyft.class));
|
||||
cards.add(new SetCardInfo("Sibilant Spirit", 97, Rarity.RARE, mage.cards.s.SibilantSpirit.class));
|
||||
cards.add(new SetCardInfo("Silver Erne", 98, Rarity.UNCOMMON, mage.cards.s.SilverErne.class));
|
||||
cards.add(new SetCardInfo("Skeleton Ship", 379, Rarity.RARE, mage.cards.s.SkeletonShip.class));
|
||||
|
|
|
@ -148,6 +148,7 @@ public class MastersEditionII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Helm of Obedience", 210, Rarity.RARE, mage.cards.h.HelmOfObedience.class));
|
||||
cards.add(new SetCardInfo("Icatian Javelineers", 15, Rarity.COMMON, IcatianJavelineers.class));
|
||||
cards.add(new SetCardInfo("Icatian Scout", 17, Rarity.COMMON, IcatianScout.class));
|
||||
cards.add(new SetCardInfo("Ice Floe", 232, Rarity.UNCOMMON, mage.cards.i.IceFloe.class));
|
||||
cards.add(new SetCardInfo("Iceberg", 49, Rarity.UNCOMMON, mage.cards.i.Iceberg.class));
|
||||
cards.add(new SetCardInfo("Icequake", 94, Rarity.COMMON, mage.cards.i.Icequake.class));
|
||||
cards.add(new SetCardInfo("Icy Prison", 50, Rarity.COMMON, mage.cards.i.IcyPrison.class));
|
||||
|
@ -169,6 +170,7 @@ public class MastersEditionII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kjeldoran Outpost", 233, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class));
|
||||
cards.add(new SetCardInfo("Knight of Stromgald", 99, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class));
|
||||
cards.add(new SetCardInfo("Krovikan Fetish", 100, Rarity.COMMON, mage.cards.k.KrovikanFetish.class));
|
||||
cards.add(new SetCardInfo("Krovikan Horror", 101, Rarity.RARE, mage.cards.k.KrovikanHorror.class));
|
||||
cards.add(new SetCardInfo("Krovikan Sorcerer", 51, Rarity.COMMON, mage.cards.k.KrovikanSorcerer.class));
|
||||
cards.add(new SetCardInfo("Leaping Lizard", 171, Rarity.COMMON, mage.cards.l.LeapingLizard.class));
|
||||
cards.add(new SetCardInfo("Lim-Dul's High Guard", 103, Rarity.UNCOMMON, LimDulsHighGuard.class));
|
||||
|
@ -215,6 +217,7 @@ public class MastersEditionII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sea Drake", 64, Rarity.RARE, mage.cards.s.SeaDrake.class));
|
||||
cards.add(new SetCardInfo("Sea Spirit", 65, Rarity.UNCOMMON, mage.cards.s.SeaSpirit.class));
|
||||
cards.add(new SetCardInfo("Shrink", 175, Rarity.COMMON, mage.cards.s.Shrink.class));
|
||||
cards.add(new SetCardInfo("Shyft", 66, Rarity.COMMON, mage.cards.s.Shyft.class));
|
||||
cards.add(new SetCardInfo("Sibilant Spirit", 67, Rarity.RARE, mage.cards.s.SibilantSpirit.class));
|
||||
cards.add(new SetCardInfo("Skeleton Ship", 197, Rarity.RARE, mage.cards.s.SkeletonShip.class));
|
||||
cards.add(new SetCardInfo("Skull Catapult", 219, Rarity.UNCOMMON, mage.cards.s.SkullCatapult.class));
|
||||
|
|
|
@ -103,6 +103,7 @@ public class MastersEditionIII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Disharmony", 95, Rarity.UNCOMMON, mage.cards.d.Disharmony.class));
|
||||
cards.add(new SetCardInfo("Divine Intervention", 8, Rarity.RARE, mage.cards.d.DivineIntervention.class));
|
||||
cards.add(new SetCardInfo("Dong Zhou, the Tyrant", 96, Rarity.RARE, mage.cards.d.DongZhouTheTyrant.class));
|
||||
cards.add(new SetCardInfo("Eightfold Maze", 9, Rarity.UNCOMMON, mage.cards.e.EightfoldMaze.class));
|
||||
cards.add(new SetCardInfo("Elves of Deep Shadow", 116, Rarity.COMMON, mage.cards.e.ElvesOfDeepShadow.class));
|
||||
cards.add(new SetCardInfo("Evil Presence", 64, Rarity.COMMON, mage.cards.e.EvilPresence.class));
|
||||
cards.add(new SetCardInfo("Exorcist", 10, Rarity.UNCOMMON, mage.cards.e.Exorcist.class));
|
||||
|
|
|
@ -186,6 +186,7 @@ public class MastersEditionIV extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mahamoti Djinn", 52, Rarity.RARE, mage.cards.m.MahamotiDjinn.class));
|
||||
cards.add(new SetCardInfo("Mana Matrix", 213, Rarity.RARE, mage.cards.m.ManaMatrix.class));
|
||||
cards.add(new SetCardInfo("Mana Vault", 214, Rarity.RARE, mage.cards.m.ManaVault.class));
|
||||
cards.add(new SetCardInfo("Martyr's Cry", 19, Rarity.RARE, mage.cards.m.MartyrsCry.class));
|
||||
cards.add(new SetCardInfo("Martyrs of Korlis", 20, Rarity.UNCOMMON, mage.cards.m.MartyrsOfKorlis.class));
|
||||
cards.add(new SetCardInfo("Maze of Ith", 246, Rarity.RARE, mage.cards.m.MazeOfIth.class));
|
||||
cards.add(new SetCardInfo("Mightstone", 215, Rarity.COMMON, mage.cards.m.Mightstone.class));
|
||||
|
|
|
@ -311,6 +311,7 @@ public class Onslaught extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Trade Secrets", 118, Rarity.RARE, mage.cards.t.TradeSecrets.class));
|
||||
cards.add(new SetCardInfo("Tranquil Thicket", 326, Rarity.COMMON, mage.cards.t.TranquilThicket.class));
|
||||
cards.add(new SetCardInfo("Treespring Lorian", 293, Rarity.COMMON, mage.cards.t.TreespringLorian.class));
|
||||
cards.add(new SetCardInfo("Tribal Golem", 311, Rarity.RARE, mage.cards.t.TribalGolem.class));
|
||||
cards.add(new SetCardInfo("Tribal Unity", 294, Rarity.UNCOMMON, mage.cards.t.TribalUnity.class));
|
||||
cards.add(new SetCardInfo("Trickery Charm", 119, Rarity.COMMON, mage.cards.t.TrickeryCharm.class));
|
||||
cards.add(new SetCardInfo("True Believer", 57, Rarity.RARE, mage.cards.t.TrueBeliever.class));
|
||||
|
|
|
@ -71,6 +71,7 @@ public class Portal extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Armageddon", 167, Rarity.RARE, mage.cards.a.Armageddon.class));
|
||||
cards.add(new SetCardInfo("Armored Pegasus", 168, Rarity.COMMON, mage.cards.a.ArmoredPegasus.class));
|
||||
cards.add(new SetCardInfo("Arrogant Vampire", 1, Rarity.UNCOMMON, mage.cards.a.ArrogantVampire.class));
|
||||
cards.add(new SetCardInfo("Assassin's Blade", 2, Rarity.UNCOMMON, mage.cards.a.AssassinsBlade.class));
|
||||
cards.add(new SetCardInfo("Balance of Power", 42, Rarity.RARE, mage.cards.b.BalanceOfPower.class));
|
||||
cards.add(new SetCardInfo("Baleful Stare", 43, Rarity.UNCOMMON, mage.cards.b.BalefulStare.class));
|
||||
cards.add(new SetCardInfo("Bee Sting", 83, Rarity.UNCOMMON, mage.cards.b.BeeSting.class));
|
||||
|
@ -94,12 +95,14 @@ public class Portal extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cloud Dragon", 46, Rarity.RARE, mage.cards.c.CloudDragon.class));
|
||||
cards.add(new SetCardInfo("Cloud Pirates", 47, Rarity.COMMON, mage.cards.c.CloudPirates.class));
|
||||
cards.add(new SetCardInfo("Cloud Spirit", 48, Rarity.UNCOMMON, mage.cards.c.CloudSpirit.class));
|
||||
cards.add(new SetCardInfo("Command of Unsummoning", 49, Rarity.UNCOMMON, mage.cards.c.CommandOfUnsummoning.class));
|
||||
cards.add(new SetCardInfo("Coral Eel", 50, Rarity.COMMON, mage.cards.c.CoralEel.class));
|
||||
cards.add(new SetCardInfo("Craven Giant", 126, Rarity.COMMON, mage.cards.c.CravenGiant.class));
|
||||
cards.add(new SetCardInfo("Craven Knight", 7, Rarity.COMMON, mage.cards.c.CravenKnight.class));
|
||||
cards.add(new SetCardInfo("Cruel Bargain", 8, Rarity.RARE, mage.cards.c.CruelBargain.class));
|
||||
cards.add(new SetCardInfo("Cruel Tutor", 9, Rarity.RARE, mage.cards.c.CruelTutor.class));
|
||||
cards.add(new SetCardInfo("Deep-Sea Serpent", 52, Rarity.UNCOMMON, mage.cards.d.DeepSeaSerpent.class));
|
||||
cards.add(new SetCardInfo("Defiant Stand", 174, Rarity.UNCOMMON, mage.cards.d.DefiantStand.class));
|
||||
cards.add(new SetCardInfo("Deja Vu", 53, Rarity.COMMON, mage.cards.d.DejaVu.class));
|
||||
cards.add(new SetCardInfo("Desert Drake", 127, Rarity.UNCOMMON, mage.cards.d.DesertDrake.class));
|
||||
cards.add(new SetCardInfo("Devastation", 128, Rarity.RARE, mage.cards.d.Devastation.class));
|
||||
|
@ -214,6 +217,7 @@ public class Portal extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sacred Knight", 186, Rarity.COMMON, mage.cards.s.SacredKnight.class));
|
||||
cards.add(new SetCardInfo("Sacred Nectar", 187, Rarity.COMMON, mage.cards.s.SacredNectar.class));
|
||||
cards.add(new SetCardInfo("Scorching Spear", 154, Rarity.COMMON, mage.cards.s.ScorchingSpear.class));
|
||||
cards.add(new SetCardInfo("Scorching Winds", 155, Rarity.UNCOMMON, mage.cards.s.ScorchingWinds.class));
|
||||
cards.add(new SetCardInfo("Seasoned Marshal", 188, Rarity.UNCOMMON, mage.cards.s.SeasonedMarshal.class));
|
||||
cards.add(new SetCardInfo("Serpent Assassin", 31, Rarity.RARE, mage.cards.s.SerpentAssassin.class));
|
||||
cards.add(new SetCardInfo("Serpent Warrior", 32, Rarity.COMMON, mage.cards.s.SerpentWarrior.class));
|
||||
|
@ -248,6 +252,7 @@ public class Portal extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tidal Surge", 75, Rarity.COMMON, mage.cards.t.TidalSurge.class));
|
||||
cards.add(new SetCardInfo("Time Ebb", 76, Rarity.COMMON, mage.cards.t.TimeEbb.class));
|
||||
cards.add(new SetCardInfo("Touch of Brilliance", 77, Rarity.COMMON, mage.cards.t.TouchOfBrilliance.class));
|
||||
cards.add(new SetCardInfo("Treetop Defense", 116, Rarity.RARE, mage.cards.t.TreetopDefense.class));
|
||||
cards.add(new SetCardInfo("Undying Beast", 36, Rarity.COMMON, mage.cards.u.UndyingBeast.class));
|
||||
cards.add(new SetCardInfo("Untamed Wilds", 117, Rarity.UNCOMMON, mage.cards.u.UntamedWilds.class));
|
||||
cards.add(new SetCardInfo("Valorous Charge", 196, Rarity.UNCOMMON, mage.cards.v.ValorousCharge.class));
|
||||
|
|
|
@ -165,8 +165,10 @@ public class PortalSecondAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Raiding Nightstalker", 24, Rarity.COMMON, mage.cards.r.RaidingNightstalker.class));
|
||||
cards.add(new SetCardInfo("Rain of Daggers", 25, Rarity.RARE, mage.cards.r.RainOfDaggers.class));
|
||||
cards.add(new SetCardInfo("Raise Dead", 26, Rarity.COMMON, mage.cards.r.RaiseDead.class));
|
||||
cards.add(new SetCardInfo("Rally the Troops", 139, Rarity.UNCOMMON, mage.cards.r.RallyTheTroops.class));
|
||||
cards.add(new SetCardInfo("Ravenous Rats", 27, Rarity.COMMON, mage.cards.r.RavenousRats.class));
|
||||
cards.add(new SetCardInfo("Razorclaw Bear", 82, Rarity.RARE, mage.cards.r.RazorclawBear.class));
|
||||
cards.add(new SetCardInfo("Remove", 43, Rarity.UNCOMMON, mage.cards.r.Remove.class));
|
||||
cards.add(new SetCardInfo("Renewing Touch", 83, Rarity.UNCOMMON, mage.cards.r.RenewingTouch.class));
|
||||
cards.add(new SetCardInfo("Return of the Nightstalkers", 28, Rarity.RARE, mage.cards.r.ReturnOfTheNightstalkers.class));
|
||||
cards.add(new SetCardInfo("Righteous Charge", 140, Rarity.COMMON, mage.cards.r.RighteousCharge.class));
|
||||
|
|
|
@ -68,6 +68,7 @@ public class PortalThreeKingdoms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cao Cao, Lord of Wei", 68, Rarity.RARE, mage.cards.c.CaoCaoLordOfWei.class));
|
||||
cards.add(new SetCardInfo("Cao Ren, Wei Commander", 69, Rarity.RARE, mage.cards.c.CaoRenWeiCommander.class));
|
||||
cards.add(new SetCardInfo("Capture of Jingzhou", 38, Rarity.RARE, mage.cards.c.CaptureOfJingzhou.class));
|
||||
cards.add(new SetCardInfo("Champion's Victory", 39, Rarity.UNCOMMON, mage.cards.c.ChampionsVictory.class));
|
||||
cards.add(new SetCardInfo("Coercion", 70, Rarity.UNCOMMON, mage.cards.c.Coercion.class));
|
||||
cards.add(new SetCardInfo("Control of the Court", 105, Rarity.UNCOMMON, mage.cards.c.ControlOfTheCourt.class));
|
||||
cards.add(new SetCardInfo("Corrupt Court Official", 71, Rarity.UNCOMMON, mage.cards.c.CorruptCourtOfficial.class));
|
||||
|
@ -80,6 +81,7 @@ public class PortalThreeKingdoms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Desperate Charge", 74, Rarity.UNCOMMON, mage.cards.d.DesperateCharge.class));
|
||||
cards.add(new SetCardInfo("Diaochan, Artful Beauty", 108, Rarity.RARE, mage.cards.d.DiaochanArtfulBeauty.class));
|
||||
cards.add(new SetCardInfo("Dong Zhou, the Tyrant", 109, Rarity.RARE, mage.cards.d.DongZhouTheTyrant.class));
|
||||
cards.add(new SetCardInfo("Eightfold Maze", 2, Rarity.RARE, mage.cards.e.EightfoldMaze.class));
|
||||
cards.add(new SetCardInfo("Empty City Ruse", 3, Rarity.UNCOMMON, mage.cards.e.EmptyCityRuse.class));
|
||||
cards.add(new SetCardInfo("Exhaustion", 42, Rarity.RARE, mage.cards.e.Exhaustion.class));
|
||||
cards.add(new SetCardInfo("Extinguish", 43, Rarity.COMMON, mage.cards.e.Extinguish.class));
|
||||
|
@ -100,6 +102,7 @@ public class PortalThreeKingdoms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Huang Zhong, Shu General", 8, Rarity.RARE, mage.cards.h.HuangZhongShuGeneral.class));
|
||||
cards.add(new SetCardInfo("Hua Tuo, Honored Physician", 137, Rarity.RARE, mage.cards.h.HuaTuoHonoredPhysician.class));
|
||||
cards.add(new SetCardInfo("Hunting Cheetah", 138, Rarity.UNCOMMON, mage.cards.h.HuntingCheetah.class));
|
||||
cards.add(new SetCardInfo("Imperial Edict", 77, Rarity.COMMON, mage.cards.i.ImperialEdict.class));
|
||||
cards.add(new SetCardInfo("Imperial Recruiter", 113, Rarity.UNCOMMON, mage.cards.i.ImperialRecruiter.class));
|
||||
cards.add(new SetCardInfo("Imperial Seal", 78, Rarity.RARE, mage.cards.i.ImperialSeal.class));
|
||||
cards.add(new SetCardInfo("Independent Troops", 114, Rarity.COMMON, mage.cards.i.IndependentTroops.class));
|
||||
|
@ -134,6 +137,7 @@ public class PortalThreeKingdoms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Plains", 168, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Poison Arrow", 80, Rarity.UNCOMMON, mage.cards.p.PoisonArrow.class));
|
||||
cards.add(new SetCardInfo("Preemptive Strike", 50, Rarity.COMMON, mage.cards.p.PreemptiveStrike.class));
|
||||
cards.add(new SetCardInfo("Rally the Troops", 16, Rarity.UNCOMMON, mage.cards.r.RallyTheTroops.class));
|
||||
cards.add(new SetCardInfo("Ravages of War", 17, Rarity.RARE, mage.cards.r.RavagesOfWar.class));
|
||||
cards.add(new SetCardInfo("Ravaging Horde", 118, Rarity.UNCOMMON, mage.cards.r.RavagingHorde.class));
|
||||
cards.add(new SetCardInfo("Red Cliffs Armada", 51, Rarity.UNCOMMON, mage.cards.r.RedCliffsArmada.class));
|
||||
|
@ -182,6 +186,7 @@ public class PortalThreeKingdoms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Volunteer Militia", 30, Rarity.COMMON, mage.cards.v.VolunteerMilitia.class));
|
||||
cards.add(new SetCardInfo("Warrior's Oath", 124, Rarity.RARE, mage.cards.w.WarriorsOath.class));
|
||||
cards.add(new SetCardInfo("Wei Ambush Force", 85, Rarity.COMMON, mage.cards.w.WeiAmbushForce.class));
|
||||
cards.add(new SetCardInfo("Wei Assassins", 86, Rarity.UNCOMMON, mage.cards.w.WeiAssassins.class));
|
||||
cards.add(new SetCardInfo("Wei Elite Companions", 87, Rarity.UNCOMMON, mage.cards.w.WeiEliteCompanions.class));
|
||||
cards.add(new SetCardInfo("Wei Infantry", 88, Rarity.COMMON, mage.cards.w.WeiInfantry.class));
|
||||
cards.add(new SetCardInfo("Wei Night Raiders", 89, Rarity.UNCOMMON, mage.cards.w.WeiNightRaiders.class));
|
||||
|
|
|
@ -105,6 +105,7 @@ public class TheDark extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Marsh Gas", 10, Rarity.COMMON, mage.cards.m.MarshGas.class));
|
||||
cards.add(new SetCardInfo("Marsh Goblins", 118, Rarity.COMMON, mage.cards.m.MarshGoblins.class));
|
||||
cards.add(new SetCardInfo("Marsh Viper", 44, Rarity.COMMON, mage.cards.m.MarshViper.class));
|
||||
cards.add(new SetCardInfo("Martyr's Cry", 85, Rarity.RARE, mage.cards.m.MartyrsCry.class));
|
||||
cards.add(new SetCardInfo("Maze of Ith", 114, Rarity.UNCOMMON, mage.cards.m.MazeOfIth.class));
|
||||
cards.add(new SetCardInfo("Merfolk Assassin", 31, Rarity.UNCOMMON, mage.cards.m.MerfolkAssassin.class));
|
||||
cards.add(new SetCardInfo("Mind Bomb", 32, Rarity.RARE, mage.cards.m.MindBomb.class));
|
||||
|
|
|
@ -120,6 +120,7 @@ public class UrzasDestiny extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mental Discipline", 37, Rarity.COMMON, mage.cards.m.MentalDiscipline.class));
|
||||
cards.add(new SetCardInfo("Metalworker", 135, Rarity.RARE, mage.cards.m.Metalworker.class));
|
||||
cards.add(new SetCardInfo("Metathran Soldier", 39, Rarity.COMMON, mage.cards.m.MetathranSoldier.class));
|
||||
cards.add(new SetCardInfo("Momentum", 113, Rarity.UNCOMMON, mage.cards.m.Momentum.class));
|
||||
cards.add(new SetCardInfo("Multani's Decree", 114, Rarity.COMMON, mage.cards.m.MultanisDecree.class));
|
||||
cards.add(new SetCardInfo("Opalescence", 13, Rarity.RARE, mage.cards.o.Opalescence.class));
|
||||
cards.add(new SetCardInfo("Opposition", 40, Rarity.RARE, mage.cards.o.Opposition.class));
|
||||
|
|
|
@ -362,6 +362,7 @@ public class UrzasSaga extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Vug Lizard", 227, Rarity.UNCOMMON, mage.cards.v.VugLizard.class));
|
||||
cards.add(new SetCardInfo("War Dance", 282, Rarity.UNCOMMON, mage.cards.w.WarDance.class));
|
||||
cards.add(new SetCardInfo("Wall of Junk", 315, Rarity.UNCOMMON, mage.cards.w.WallOfJunk.class));
|
||||
cards.add(new SetCardInfo("Waylay", 56, Rarity.UNCOMMON, mage.cards.w.Waylay.class));
|
||||
cards.add(new SetCardInfo("Western Paladin", 168, Rarity.RARE, mage.cards.w.WesternPaladin.class));
|
||||
cards.add(new SetCardInfo("Whetstone", 316, Rarity.RARE, mage.cards.w.Whetstone.class));
|
||||
cards.add(new SetCardInfo("Whirlwind", 283, Rarity.RARE, mage.cards.w.Whirlwind.class));
|
||||
|
|
|
@ -147,6 +147,7 @@ public class Visions extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Resistance Fighter", 118, Rarity.COMMON, mage.cards.r.ResistanceFighter.class));
|
||||
cards.add(new SetCardInfo("Retribution of the Meek", 119, Rarity.RARE, mage.cards.r.RetributionOfTheMeek.class));
|
||||
cards.add(new SetCardInfo("Righteous Aura", 120, Rarity.COMMON, mage.cards.r.RighteousAura.class));
|
||||
cards.add(new SetCardInfo("Righteous War", 134, Rarity.RARE, mage.cards.r.RighteousWar.class));
|
||||
cards.add(new SetCardInfo("River Boa", 68, Rarity.COMMON, mage.cards.r.RiverBoa.class));
|
||||
cards.add(new SetCardInfo("Rock Slide", 92, Rarity.COMMON, mage.cards.r.RockSlide.class));
|
||||
cards.add(new SetCardInfo("Rowen", 69, Rarity.RARE, mage.cards.r.Rowen.class));
|
||||
|
@ -161,6 +162,7 @@ public class Visions extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Spitting Drake", 95, Rarity.UNCOMMON, mage.cards.s.SpittingDrake.class));
|
||||
cards.add(new SetCardInfo("Squandered Resources", 137, Rarity.RARE, mage.cards.s.SquanderedResources.class));
|
||||
cards.add(new SetCardInfo("Stampeding Wildebeests", 71, Rarity.UNCOMMON, mage.cards.s.StampedingWildebeests.class));
|
||||
cards.add(new SetCardInfo("Suleiman's Legacy", 138, Rarity.RARE, mage.cards.s.SuleimansLegacy.class));
|
||||
cards.add(new SetCardInfo("Summer Bloom", 72, Rarity.UNCOMMON, mage.cards.s.SummerBloom.class));
|
||||
cards.add(new SetCardInfo("Sun Clasp", 121, Rarity.COMMON, mage.cards.s.SunClasp.class));
|
||||
cards.add(new SetCardInfo("Suq'Ata Assassin", 19, Rarity.UNCOMMON, mage.cards.s.SuqAtaAssassin.class));
|
||||
|
|
|
@ -81,7 +81,7 @@ public class AjaniTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Kor Ally", 2);
|
||||
assertPermanentCount(playerA, "Oath of Gideon", 1);
|
||||
assertPermanentCount(playerA, "Ajani Goldmane", 1);
|
||||
assertCounterCount("Ajani Goldmane", CounterType.LOYALTY, 6); // 5 + 1 = 5
|
||||
assertCounterCount("Ajani Goldmane", CounterType.LOYALTY, 6); // 4 + 1 + 1 = 6
|
||||
|
||||
assertLife(playerA, 22);
|
||||
assertLife(playerB, 20);
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public enum AttackedThisStepCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
PlayerAttackedStepWatcher watcher = (PlayerAttackedStepWatcher) game.getState().getWatchers().get(PlayerAttackedStepWatcher.class.getSimpleName());
|
||||
return watcher != null
|
||||
&& watcher.getNumberAttackingCurrentStep(source.getControllerId()) > 0;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "during the declare attackers step and only if you've been attacked this step.";
|
||||
}
|
||||
}
|
|
@ -68,6 +68,7 @@ public enum CounterType {
|
|||
FURY("fury"),
|
||||
FUSE("fuse"),
|
||||
GOLD("gold"),
|
||||
GROWTH("growth"),
|
||||
HATCHLING("hatchling"),
|
||||
HEALING("healing"),
|
||||
HOOFPRINT("hoofprint"),
|
||||
|
|
|
@ -73,7 +73,7 @@ public class FilterPermanent extends FilterObject<Permanent> implements FilterIn
|
|||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
|
||||
if (!this.match(permanent, game)) {
|
||||
if (!permanent.isPhasedIn() || !this.match(permanent, game)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.target.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class FilterCreatureAttackingYou extends FilterAttackingCreature {
|
||||
|
||||
private final boolean orWalker;
|
||||
|
||||
public FilterCreatureAttackingYou() {
|
||||
this(false);
|
||||
}
|
||||
|
||||
public FilterCreatureAttackingYou(boolean orWalker) {
|
||||
this("creature that's attacking you" + (orWalker ? "or a planeswalker you control" : ""), orWalker);
|
||||
}
|
||||
|
||||
public FilterCreatureAttackingYou(String name) {
|
||||
this(name, false);
|
||||
}
|
||||
|
||||
public FilterCreatureAttackingYou(String name, boolean orWalker) {
|
||||
super(name);
|
||||
this.orWalker = orWalker;
|
||||
}
|
||||
|
||||
public FilterCreatureAttackingYou(final FilterCreatureAttackingYou filter) {
|
||||
super(filter);
|
||||
this.orWalker = filter.orWalker;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterCreatureAttackingYou copy() {
|
||||
return new FilterCreatureAttackingYou(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
|
||||
if (orWalker) {
|
||||
return super.match(permanent, sourceId, playerId, game)
|
||||
&& permanent.isAttacking() // to prevent unneccessary combat checking if not attacking
|
||||
&& playerId.equals(game.getCombat().getDefendingPlayerId(permanent.getId(), game));
|
||||
} else {
|
||||
return super.match(permanent, sourceId, playerId, game)
|
||||
&& permanent.isAttacking() // to prevent unneccessary combat checking if not attacking
|
||||
&& playerId.equals(game.getCombat().getDefenderId(permanent.getId()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com AS IS AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.MageInt;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class WaylayToken extends Token {
|
||||
|
||||
public WaylayToken() {
|
||||
super("Knight", "2/2 white Knight creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add(SubType.KNIGHT);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
}
|
||||
}
|
|
@ -3484,9 +3484,10 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOpponent(UUID playerToCheckId, Game game
|
||||
) {
|
||||
return !this.getId().equals(playerToCheckId) && game.isOpponent(this, playerToCheckId);
|
||||
public boolean hasOpponent(UUID playerToCheckId, Game game) {
|
||||
return !this.getId().equals(playerToCheckId)
|
||||
&& game.isOpponent(this, playerToCheckId)
|
||||
&& getInRange().contains(playerToCheckId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -128,11 +128,11 @@ public abstract class TargetImpl implements Target {
|
|||
@Override
|
||||
public String getMessage() {
|
||||
String suffix = "";
|
||||
if (targetController != null) {
|
||||
// Hint for the selecting player that the targets must be valid from the point of the ability controller
|
||||
// e.g. select opponent text may be misleading otherwise
|
||||
suffix = " (target controlling!)";
|
||||
}
|
||||
// if (targetController != null) {
|
||||
// // Hint for the selecting player that the targets must be valid from the point of the ability controller
|
||||
// // e.g. select opponent text may be misleading otherwise
|
||||
// suffix = " (target controlling!)";
|
||||
// }
|
||||
if (getMaxNumberOfTargets() != 1) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Select ").append(targetName);
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.watchers.common;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PlayerAttackedStepWatcher extends Watcher {
|
||||
|
||||
// With how many creatures attacked this player this turn
|
||||
private final Map<UUID, Integer> playerAttacked = new HashMap<>();
|
||||
|
||||
public PlayerAttackedStepWatcher() {
|
||||
super(PlayerAttackedWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||
}
|
||||
|
||||
public PlayerAttackedStepWatcher(final PlayerAttackedStepWatcher watcher) {
|
||||
super(watcher);
|
||||
for (Map.Entry<UUID, Integer> entry : watcher.playerAttacked.entrySet()) {
|
||||
this.playerAttacked.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayerAttackedStepWatcher copy() {
|
||||
return new PlayerAttackedStepWatcher(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DECLARE_ATTACKERS_STEP_POST) {
|
||||
playerAttacked.clear();
|
||||
}
|
||||
if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED) {
|
||||
playerAttacked.putIfAbsent(event.getTargetId(), 0);
|
||||
playerAttacked.compute(event.getTargetId(), (p, amount) -> amount + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
playerAttacked.clear();
|
||||
}
|
||||
|
||||
public int getNumberAttackingCurrentStep(UUID playerId) {
|
||||
return playerAttacked.getOrDefault(playerId, 0);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue