From c37b782b7537419cd698d61dd3d406a18b950e7e Mon Sep 17 00:00:00 2001 From: Dilnu Date: Sun, 13 Nov 2016 20:05:52 -0500 Subject: [PATCH 01/10] Fix the Commander Predicate which was written incorrectly. This fixes Bastion Protector. --- .../mage/filter/predicate/permanent/CommanderPredicate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/CommanderPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/CommanderPredicate.java index 9324bcb64bd..c96298c33f4 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/CommanderPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/CommanderPredicate.java @@ -22,7 +22,7 @@ public class CommanderPredicate implements Predicate { Player owner = game.getPlayer(input.getOwnerId()); return input.getCardType().contains(CardType.CREATURE) && owner != null - && input.getId().equals(owner.getCommandersIds()); + && owner.getCommandersIds().contains(input.getId()); } @Override From 493a43cf93857bfb9ef74608f6f33a7662c1e74f Mon Sep 17 00:00:00 2001 From: JRHerlehy Date: Mon, 14 Nov 2016 21:12:15 -0800 Subject: [PATCH 02/10] Implement Metamorphose Implement Metamorphose from Scourge --- Mage.Sets/src/mage/cards/m/Metamorphose.java | 127 +++++++++++++++++++ Mage.Sets/src/mage/sets/Scourge.java | 3 +- 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/m/Metamorphose.java diff --git a/Mage.Sets/src/mage/cards/m/Metamorphose.java b/Mage.Sets/src/mage/cards/m/Metamorphose.java new file mode 100644 index 00000000000..25649fb8f92 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/Metamorphose.java @@ -0,0 +1,127 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCardInHand; +import java.util.UUID; + +/** + * + * @author JRHerlehy + */ +public class Metamorphose extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("permanent an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public Metamorphose(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Put target permanent an opponent controls on top of its owner's library. That opponent may put an artifact, creature, enchantment, or land card from his or her hand onto the battlefield. + this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addEffect(new MetamorphoseEffect()); + + } + + public Metamorphose(final Metamorphose card) { + super(card); + } + + @Override + public Metamorphose copy() { + return new Metamorphose(this); + } +} + +class MetamorphoseEffect extends OneShotEffect { + private static final FilterCard filter = new FilterCard("artifact, creature, enchantment, or land card"); + + static{ + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.ENCHANTMENT), + new CardTypePredicate(CardType.LAND) + )); + } + + public MetamorphoseEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "That opponent may put an artifact, creature, enchantment, or land card from his or her hand onto the battlefield."; + } + + public MetamorphoseEffect (final MetamorphoseEffect effect) { super(effect); } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); + if (permanent != null) { + Player controller = game.getPlayer(permanent.getControllerId()); + if (controller.chooseUse(Outcome.PutCardInPlay, "Do you wish to put an artifact, creature, enchantment, or land card onto the battlefield?", source, game)) { + TargetCardInHand target = new TargetCardInHand(filter); + target.clearChosen(); + if (controller.chooseTarget(outcome, target, source, game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } + } + } + + return true; + } + + return false; + } + + @Override + public MetamorphoseEffect copy() { return new MetamorphoseEffect(this); } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Scourge.java b/Mage.Sets/src/mage/sets/Scourge.java index 0484e90b364..f10ac9d07cd 100644 --- a/Mage.Sets/src/mage/sets/Scourge.java +++ b/Mage.Sets/src/mage/sets/Scourge.java @@ -68,7 +68,7 @@ public class Scourge extends ExpansionSet { cards.add(new SetCardInfo("Brain Freeze", 29, Rarity.UNCOMMON, mage.cards.b.BrainFreeze.class)); cards.add(new SetCardInfo("Break Asunder", 113, Rarity.COMMON, mage.cards.b.BreakAsunder.class)); cards.add(new SetCardInfo("Cabal Conditioning", 56, Rarity.RARE, mage.cards.c.CabalConditioning.class)); - cards.add(new SetCardInfo("Cabal Interrogator", 57, Rarity.UNCOMMON, mage.cards.c.CabalInterrogator.class)); + cards.add(new SetCardInfo("Cabal Interrogator", 57, Rarity.UNCOMMON, mage.cards.c.CabalInterrogator.class)); cards.add(new SetCardInfo("Dawn Elemental", 7, Rarity.RARE, mage.cards.d.DawnElemental.class)); cards.add(new SetCardInfo("Call to the Grave", 58, Rarity.RARE, mage.cards.c.CallToTheGrave.class)); cards.add(new SetCardInfo("Carbonize", 83, Rarity.UNCOMMON, mage.cards.c.Carbonize.class)); @@ -120,6 +120,7 @@ public class Scourge extends ExpansionSet { cards.add(new SetCardInfo("Kurgadon", 124, Rarity.UNCOMMON, mage.cards.k.Kurgadon.class)); cards.add(new SetCardInfo("Long-Term Plans", 38, Rarity.UNCOMMON, mage.cards.l.LongTermPlans.class)); cards.add(new SetCardInfo("Mercurial Kite", 39, Rarity.COMMON, mage.cards.m.MercurialKite.class)); + cards.add(new SetCardInfo("Metamorphose", 40, Rarity.UNCOMMON, mage.cards.m.Metamorphose.class)); cards.add(new SetCardInfo("Mind's Desire", 41, Rarity.RARE, mage.cards.m.MindsDesire.class)); cards.add(new SetCardInfo("Mischievous Quanar", 42, Rarity.RARE, mage.cards.m.MischievousQuanar.class)); cards.add(new SetCardInfo("Misguided Rage", 99, Rarity.COMMON, mage.cards.m.MisguidedRage.class)); From d129dbc746f8c73e936fda76bc636b2f79363ab3 Mon Sep 17 00:00:00 2001 From: Pete Rossi Date: Mon, 14 Nov 2016 23:42:11 -0800 Subject: [PATCH 03/10] Implement Chimeric Egg --- Mage.Sets/src/mage/cards/c/ChimericEgg.java | 95 +++++++++++++++++++++ Mage.Sets/src/mage/sets/Darksteel.java | 1 + 2 files changed, 96 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ChimericEgg.java diff --git a/Mage.Sets/src/mage/cards/c/ChimericEgg.java b/Mage.Sets/src/mage/cards/c/ChimericEgg.java new file mode 100644 index 00000000000..579e458cf5f --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChimericEgg.java @@ -0,0 +1,95 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.Token; + + + +/** + * + * @author Pete Rossi + */ +public class ChimericEgg extends CardImpl { + + private final static FilterSpell nonArtifactFilter = new FilterSpell("a nonartifact spell"); + + static { + nonArtifactFilter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + } + + public ChimericEgg(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // Whenever an opponent casts a nonartifact spell, put a charge counter on Chimeric Egg. + this.addAbility(new SpellCastOpponentTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), nonArtifactFilter, false)); + + // Remove three charge counters from Chimeric Egg: Chimeric Egg becomes a 6/6 Construct artifact creature with trample until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect + (new ChimericEggToken(), "", Duration.EndOfTurn), new RemoveCountersSourceCost(new Counter(CounterType.CHARGE.getName(), 3)))); + } + + public ChimericEgg(final ChimericEgg card) { + super(card); + } + + @Override + public ChimericEgg copy() { + return new ChimericEgg(this); + } + + private class ChimericEggToken extends Token { + ChimericEggToken() { + super("", "6/6 Construct artifact creature with trample"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + this.subtype.add("Construct"); + power = new MageInt(6); + toughness = new MageInt(6); + this.addAbility(TrampleAbility.getInstance()); + } + } +} diff --git a/Mage.Sets/src/mage/sets/Darksteel.java b/Mage.Sets/src/mage/sets/Darksteel.java index d9eb296235f..441baeeb03c 100644 --- a/Mage.Sets/src/mage/sets/Darksteel.java +++ b/Mage.Sets/src/mage/sets/Darksteel.java @@ -44,6 +44,7 @@ public class Darksteel extends ExpansionSet { cards.add(new SetCardInfo("Barbed Lightning", 55, Rarity.COMMON, mage.cards.b.BarbedLightning.class)); cards.add(new SetCardInfo("Blinkmoth Nexus", 163, Rarity.RARE, mage.cards.b.BlinkmothNexus.class)); cards.add(new SetCardInfo("Burden of Greed", 38, Rarity.COMMON, mage.cards.b.BurdenOfGreed.class)); + cards.add(new SetCardInfo("Chimeric Egg", 106, Rarity.UNCOMMON, mage.cards.c.ChimericEgg.class)); cards.add(new SetCardInfo("Chittering Rats", 39, Rarity.COMMON, mage.cards.c.ChitteringRats.class)); cards.add(new SetCardInfo("Chromescale Drake", 20, Rarity.RARE, mage.cards.c.ChromescaleDrake.class)); cards.add(new SetCardInfo("Coretapper", 107, Rarity.UNCOMMON, mage.cards.c.Coretapper.class)); From 17705ea3025b2e6731ab2a1f427f600a5ca87563 Mon Sep 17 00:00:00 2001 From: JRHerlehy Date: Mon, 14 Nov 2016 23:56:46 -0800 Subject: [PATCH 04/10] Rareity Fix Fixed incorrect rareity assigned to CoP: Artifacts in Fifth Dawn from Common to Uncommon --- Mage.Sets/src/mage/sets/FifthDawn.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/FifthDawn.java b/Mage.Sets/src/mage/sets/FifthDawn.java index e143c113a20..ca85fd75d4b 100644 --- a/Mage.Sets/src/mage/sets/FifthDawn.java +++ b/Mage.Sets/src/mage/sets/FifthDawn.java @@ -85,7 +85,7 @@ public class FifthDawn extends ExpansionSet { cards.add(new SetCardInfo("Cackling Imp", 44, Rarity.COMMON, mage.cards.c.CacklingImp.class)); cards.add(new SetCardInfo("Channel the Suns", 84, Rarity.UNCOMMON, mage.cards.c.ChannelTheSuns.class)); cards.add(new SetCardInfo("Chimeric Coils", 108, Rarity.UNCOMMON, mage.cards.c.ChimericCoils.class)); - cards.add(new SetCardInfo("Circle of Protection: Artifacts", 8, Rarity.COMMON, mage.cards.c.CircleOfProtectionArtifacts.class)); + cards.add(new SetCardInfo("Circle of Protection: Artifacts", 8, Rarity.UNCOMMON, mage.cards.c.CircleOfProtectionArtifacts.class)); cards.add(new SetCardInfo("Clearwater Goblet", 109, Rarity.RARE, mage.cards.c.ClearwaterGoblet.class)); cards.add(new SetCardInfo("Clock of Omens", 110, Rarity.UNCOMMON, mage.cards.c.ClockOfOmens.class)); cards.add(new SetCardInfo("Composite Golem", 111, Rarity.UNCOMMON, mage.cards.c.CompositeGolem.class)); From e4323529d6a0ddd386f38fc9a6923f0cb2682452 Mon Sep 17 00:00:00 2001 From: Styxo Date: Tue, 15 Nov 2016 12:20:26 +0100 Subject: [PATCH 05/10] Added Jodah's Avenger, Spellshift and Venarian Glimmer --- Mage.Sets/src/mage/cards/j/JodahsAvenger.java | 148 +++++++ Mage.Sets/src/mage/cards/s/Spellshift.java | 122 +++++ .../src/mage/cards/v/VenarianGlimmer.java | 101 +++++ Mage.Sets/src/mage/sets/PlanarChaos.java | 419 +++++++++--------- 4 files changed, 582 insertions(+), 208 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/j/JodahsAvenger.java create mode 100644 Mage.Sets/src/mage/cards/s/Spellshift.java create mode 100644 Mage.Sets/src/mage/cards/v/VenarianGlimmer.java diff --git a/Mage.Sets/src/mage/cards/j/JodahsAvenger.java b/Mage.Sets/src/mage/cards/j/JodahsAvenger.java new file mode 100644 index 00000000000..688c4132a62 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JodahsAvenger.java @@ -0,0 +1,148 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.j; + +import java.util.HashSet; +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.abilities.keyword.ShadowAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author Styxo + */ +public class JodahsAvenger extends CardImpl { + + public JodahsAvenger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); + + this.subtype.add("Shapeshifter"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {0}: Until end of turn, Jodah's Avenger gets -1/-1 and gains your choice of double strike, protection from red, vigilance, or shadow. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new JodahsAvengerEffect(), new ManaCostsImpl("{0}"))); + } + + public JodahsAvenger(final JodahsAvenger card) { + super(card); + } + + @Override + public JodahsAvenger copy() { + return new JodahsAvenger(this); + } +} + +class JodahsAvengerEffect extends ContinuousEffectImpl { + + private static final HashSet choices = new HashSet<>(); + private Ability gainedAbility; + + static { + choices.add("Double strike"); + choices.add("Protection from red"); + choices.add("Vigilance"); + choices.add("Shadow"); + } + + public JodahsAvengerEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.AddAbility); + this.staticText = "Until end of turn, {this} gets -1/-1 and gains your choice of double strike, protection from red, vigilance, or shadow"; + } + + public JodahsAvengerEffect(final JodahsAvengerEffect effect) { + super(effect); + } + + @Override + public JodahsAvengerEffect copy() { + return new JodahsAvengerEffect(this); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Choice choice = new ChoiceImpl(true); + choice.setMessage("Choose one"); + choice.setChoices(choices); + if (controller.choose(outcome, choice, game)) { + switch (choice.getChoice()) { + case "Double strike": + gainedAbility = DoubleStrikeAbility.getInstance(); + break; + case "Vigilance": + gainedAbility = VigilanceAbility.getInstance(); + break; + case "Shadow": + gainedAbility = ShadowAbility.getInstance(); + break; + default: + gainedAbility = ProtectionAbility.from(ObjectColor.RED); + break; + } + } + } + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourceObject = game.getPermanent(source.getSourceId()); + if (sourceObject != null) { + sourceObject.addPower(-1); + sourceObject.addToughness(-1); + game.addEffect(new GainAbilitySourceEffect(gainedAbility, Duration.EndOfTurn), source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/Spellshift.java b/Mage.Sets/src/mage/cards/s/Spellshift.java new file mode 100644 index 00000000000..b33b9200feb --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Spellshift.java @@ -0,0 +1,122 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterInstantOrSorcerySpell; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Library; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author Styxo + */ +public class Spellshift extends CardImpl { + + public Spellshift(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); + + // Counter target instant or sorcery spell. + this.getSpellAbility().addTarget(new TargetSpell(new FilterInstantOrSorcerySpell())); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + + // Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library. + this.getSpellAbility().addEffect(new SpellshiftEffect()); + } + + public Spellshift(final Spellshift card) { + super(card); + } + + @Override + public Spellshift copy() { + return new Spellshift(this); + } +} + +class SpellshiftEffect extends OneShotEffect { + + public SpellshiftEffect() { + super(Outcome.Detriment); + this.staticText = "Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library"; + } + + public SpellshiftEffect(final SpellshiftEffect effect) { + super(effect); + } + + @Override + public SpellshiftEffect copy() { + return new SpellshiftEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(((Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK)).getControllerId()); + if (player != null) { + Library library = player.getLibrary(); + if (library.size() > 0) { + Cards cards = new CardsImpl(); + Card card = library.removeFromTop(game); + cards.add(card); + while (!(card.getCardType().contains(CardType.SORCERY) || card.getCardType().contains(CardType.INSTANT)) && library.size() > 0) { + card = library.removeFromTop(game); + cards.add(card); + } + + if (card.getCardType().contains(CardType.SORCERY) || card.getCardType().contains(CardType.INSTANT)) { + if (player.chooseUse(outcome, "Cast " + card.getLogName() + " ?", source, game)) { + if (player.cast(card.getSpellAbility(), game, true)) { + cards.remove(card.getId()); + } + } + } + + if (cards.size() > 0) { + library.addAll(cards.getCards(game), game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java b/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java new file mode 100644 index 00000000000..bfd5f8d2476 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java @@ -0,0 +1,101 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.v; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.filter.common.FilterNonlandCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author Styxo + */ +public class VenarianGlimmer extends CardImpl { + + public VenarianGlimmer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}"); + + // Target player reveals his or her hand. You choose a nonland card with converted mana cost X or less from it. That player discards that card. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new VenarianGlimmerEffect()); + } + + public VenarianGlimmer(final VenarianGlimmer card) { + super(card); + } + + @Override + public VenarianGlimmer copy() { + return new VenarianGlimmer(this); + } +} + +class VenarianGlimmerEffect extends OneShotEffect { + + public VenarianGlimmerEffect() { + super(Outcome.Discard); + this.staticText = "Target player reveals his or her hand. You choose a nonland card with converted mana cost X or less from it. That player discards that card"; + } + + public VenarianGlimmerEffect(final VenarianGlimmerEffect effect) { + super(effect); + } + + @Override + public VenarianGlimmerEffect copy() { + return new VenarianGlimmerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + FilterCard filter = new FilterNonlandCard(); + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + Effect effect = new DiscardCardYouChooseTargetEffect(filter, TargetController.ANY); + effect.setTargetPointer(targetPointer); + effect.apply(game, source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/PlanarChaos.java b/Mage.Sets/src/mage/sets/PlanarChaos.java index 1e4b0626a5b..9a1879cdf23 100644 --- a/Mage.Sets/src/mage/sets/PlanarChaos.java +++ b/Mage.Sets/src/mage/sets/PlanarChaos.java @@ -1,208 +1,211 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets; - -import mage.constants.SetType; -import mage.cards.ExpansionSet; -import mage.constants.Rarity; - -/** - * - * @author North - */ -public class PlanarChaos extends ExpansionSet { - - private static final PlanarChaos fINSTANCE = new PlanarChaos(); - - public static PlanarChaos getInstance() { - return fINSTANCE; - } - - private PlanarChaos() { - super("Planar Chaos", "PLC", ExpansionSet.buildDate(2007, 1, 2), SetType.EXPANSION); - this.blockName = "Time Spiral"; - this.parentSet = TimeSpiral.getInstance(); - this.hasBasicLands = false; - this.hasBoosters = true; - this.numBoosterLands = 0; - this.numBoosterCommon = 10; - this.numBoosterUncommon = 3; - this.numBoosterRare = 1; - this.ratioBoosterMythic = 0; - cards.add(new SetCardInfo("Aeon Chronicler", 32, Rarity.RARE, mage.cards.a.AeonChronicler.class)); - cards.add(new SetCardInfo("Aether Membrane", 93, Rarity.UNCOMMON, mage.cards.a.AetherMembrane.class)); - cards.add(new SetCardInfo("Akroma, Angel of Fury", 94, Rarity.RARE, mage.cards.a.AkromaAngelOfFury.class)); - cards.add(new SetCardInfo("Ana Battlemage", 124, Rarity.UNCOMMON, mage.cards.a.AnaBattlemage.class)); - cards.add(new SetCardInfo("Aquamorph Entity", 33, Rarity.COMMON, mage.cards.a.AquamorphEntity.class)); - cards.add(new SetCardInfo("Aven Riftwatcher", 1, Rarity.COMMON, mage.cards.a.AvenRiftwatcher.class)); - cards.add(new SetCardInfo("Battering Sliver", 95, Rarity.COMMON, mage.cards.b.BatteringSliver.class)); - cards.add(new SetCardInfo("Benalish Commander", 2, Rarity.RARE, mage.cards.b.BenalishCommander.class)); - cards.add(new SetCardInfo("Big Game Hunter", 63, Rarity.UNCOMMON, mage.cards.b.BigGameHunter.class)); - cards.add(new SetCardInfo("Blightspeaker", 64, Rarity.COMMON, mage.cards.b.Blightspeaker.class)); - cards.add(new SetCardInfo("Blood Knight", 115, Rarity.UNCOMMON, mage.cards.b.BloodKnight.class)); - cards.add(new SetCardInfo("Body Double", 35, Rarity.RARE, mage.cards.b.BodyDouble.class)); - cards.add(new SetCardInfo("Bog Serpent", 84, Rarity.COMMON, mage.cards.b.BogSerpent.class)); - cards.add(new SetCardInfo("Boom // Bust", 112, Rarity.RARE, mage.cards.b.BoomBust.class)); - cards.add(new SetCardInfo("Braids, Conjurer Adept", 36, Rarity.RARE, mage.cards.b.BraidsConjurerAdept.class)); - cards.add(new SetCardInfo("Brain Gorgers", 65, Rarity.COMMON, mage.cards.b.BrainGorgers.class)); - cards.add(new SetCardInfo("Brute Force", 116, Rarity.COMMON, mage.cards.b.BruteForce.class)); - cards.add(new SetCardInfo("Calciderm", 23, Rarity.UNCOMMON, mage.cards.c.Calciderm.class)); - cards.add(new SetCardInfo("Cautery Sliver", 154, Rarity.UNCOMMON, mage.cards.c.CauterySliver.class)); - cards.add(new SetCardInfo("Chronozoa", 37, Rarity.RARE, mage.cards.c.Chronozoa.class)); - cards.add(new SetCardInfo("Circle of Affliction", 66, Rarity.UNCOMMON, mage.cards.c.CircleOfAffliction.class)); - cards.add(new SetCardInfo("Citanul Woodreaders", 125, Rarity.COMMON, mage.cards.c.CitanulWoodreaders.class)); - cards.add(new SetCardInfo("Cradle to Grave", 67, Rarity.COMMON, mage.cards.c.CradleToGrave.class)); - cards.add(new SetCardInfo("Crovax, Ascendant Hero", 3, Rarity.RARE, mage.cards.c.CrovaxAscendantHero.class)); - cards.add(new SetCardInfo("Damnation", 85, Rarity.RARE, mage.cards.d.Damnation.class)); - cards.add(new SetCardInfo("Darkheart Sliver", 155, Rarity.UNCOMMON, mage.cards.d.DarkheartSliver.class)); - cards.add(new SetCardInfo("Dash Hopes", 68, Rarity.COMMON, mage.cards.d.DashHopes.class)); - cards.add(new SetCardInfo("Dawn Charm", 4, Rarity.COMMON, mage.cards.d.DawnCharm.class)); - cards.add(new SetCardInfo("Dead // Gone", 113, Rarity.COMMON, mage.cards.d.DeadGone.class)); - cards.add(new SetCardInfo("Deadly Grub", 69, Rarity.COMMON, mage.cards.d.DeadlyGrub.class)); - cards.add(new SetCardInfo("Deadwood Treefolk", 126, Rarity.UNCOMMON, mage.cards.d.DeadwoodTreefolk.class)); - cards.add(new SetCardInfo("Detritivore", 96, Rarity.RARE, mage.cards.d.Detritivore.class)); - cards.add(new SetCardInfo("Dismal Failure", 39, Rarity.UNCOMMON, mage.cards.d.DismalFailure.class)); - cards.add(new SetCardInfo("Dormant Sliver", 156, Rarity.UNCOMMON, mage.cards.d.DormantSliver.class)); - cards.add(new SetCardInfo("Dreamscape Artist", 40, Rarity.COMMON, mage.cards.d.DreamscapeArtist.class)); - cards.add(new SetCardInfo("Dunerider Outlaw", 86, Rarity.UNCOMMON, mage.cards.d.DuneriderOutlaw.class)); - cards.add(new SetCardInfo("Dust Corona", 97, Rarity.COMMON, mage.cards.d.DustCorona.class)); - cards.add(new SetCardInfo("Dust Elemental", 5, Rarity.RARE, mage.cards.d.DustElemental.class)); - cards.add(new SetCardInfo("Enslave", 70, Rarity.UNCOMMON, mage.cards.e.Enslave.class)); - cards.add(new SetCardInfo("Erratic Mutation", 41, Rarity.COMMON, mage.cards.e.ErraticMutation.class)); - cards.add(new SetCardInfo("Essence Warden", 145, Rarity.COMMON, mage.cards.e.EssenceWarden.class)); - cards.add(new SetCardInfo("Evolution Charm", 127, Rarity.COMMON, mage.cards.e.EvolutionCharm.class)); - cards.add(new SetCardInfo("Extirpate", 71, Rarity.RARE, mage.cards.e.Extirpate.class)); - cards.add(new SetCardInfo("Fa'adiyah Seer", 146, Rarity.COMMON, mage.cards.f.FaadiyahSeer.class)); - cards.add(new SetCardInfo("Fatal Frenzy", 98, Rarity.RARE, mage.cards.f.FatalFrenzy.class)); - cards.add(new SetCardInfo("Firefright Mage", 99, Rarity.COMMON, mage.cards.f.FirefrightMage.class)); - cards.add(new SetCardInfo("Frenetic Sliver", 157, Rarity.UNCOMMON, mage.cards.f.FreneticSliver.class)); - cards.add(new SetCardInfo("Frozen Aether", 54, Rarity.UNCOMMON, mage.cards.f.FrozenAether.class)); - cards.add(new SetCardInfo("Fungal Behemoth", 128, Rarity.RARE, mage.cards.f.FungalBehemoth.class)); - cards.add(new SetCardInfo("Fury Charm", 100, Rarity.COMMON, mage.cards.f.FuryCharm.class)); - cards.add(new SetCardInfo("Gaea's Anthem", 147, Rarity.RARE, mage.cards.g.GaeasAnthem.class)); - cards.add(new SetCardInfo("Ghost Tactician", 6, Rarity.COMMON, mage.cards.g.GhostTactician.class)); - cards.add(new SetCardInfo("Giant Dustwasp", 129, Rarity.COMMON, mage.cards.g.GiantDustwasp.class)); - cards.add(new SetCardInfo("Gossamer Phantasm", 55, Rarity.COMMON, mage.cards.g.GossamerPhantasm.class)); - cards.add(new SetCardInfo("Groundbreaker", 148, Rarity.RARE, mage.cards.g.Groundbreaker.class)); - cards.add(new SetCardInfo("Hammerheim Deadeye", 101, Rarity.UNCOMMON, mage.cards.h.HammerheimDeadeye.class)); - cards.add(new SetCardInfo("Harmonize", 149, Rarity.UNCOMMON, mage.cards.h.Harmonize.class)); - cards.add(new SetCardInfo("Healing Leaves", 150, Rarity.COMMON, mage.cards.h.HealingLeaves.class)); - cards.add(new SetCardInfo("Hedge Troll", 151, Rarity.UNCOMMON, mage.cards.h.HedgeTroll.class)); - cards.add(new SetCardInfo("Heroes Remembered", 7, Rarity.RARE, mage.cards.h.HeroesRemembered.class)); - cards.add(new SetCardInfo("Hunting Wilds", 130, Rarity.UNCOMMON, mage.cards.h.HuntingWilds.class)); - cards.add(new SetCardInfo("Imp's Mischief", 72, Rarity.RARE, mage.cards.i.ImpsMischief.class)); - cards.add(new SetCardInfo("Intet, the Dreamer", 158, Rarity.RARE, mage.cards.i.IntetTheDreamer.class)); - cards.add(new SetCardInfo("Jedit Ojanen of Efrava", 131, Rarity.RARE, mage.cards.j.JeditOjanenOfEfrava.class)); - cards.add(new SetCardInfo("Kavu Predator", 132, Rarity.UNCOMMON, mage.cards.k.KavuPredator.class)); - cards.add(new SetCardInfo("Keen Sense", 152, Rarity.UNCOMMON, mage.cards.k.KeenSense.class)); - cards.add(new SetCardInfo("Keldon Marauders", 102, Rarity.COMMON, mage.cards.k.KeldonMarauders.class)); - cards.add(new SetCardInfo("Lavacore Elemental", 103, Rarity.UNCOMMON, mage.cards.l.LavacoreElemental.class)); - cards.add(new SetCardInfo("Life and Limb", 133, Rarity.RARE, mage.cards.l.LifeAndLimb.class)); - cards.add(new SetCardInfo("Magus of the Arena", 104, Rarity.RARE, mage.cards.m.MagusOfTheArena.class)); - cards.add(new SetCardInfo("Magus of the Bazaar", 43, Rarity.RARE, mage.cards.m.MagusOfTheBazaar.class)); - cards.add(new SetCardInfo("Magus of the Coffers", 73, Rarity.RARE, mage.cards.m.MagusOfTheCoffers.class)); - cards.add(new SetCardInfo("Magus of the Library", 134, Rarity.RARE, mage.cards.m.MagusOfTheLibrary.class)); - cards.add(new SetCardInfo("Magus of the Tabernacle", 8, Rarity.RARE, mage.cards.m.MagusOfTheTabernacle.class)); - cards.add(new SetCardInfo("Malach of the Dawn", 24, Rarity.UNCOMMON, mage.cards.m.MalachOfTheDawn.class)); - cards.add(new SetCardInfo("Mana Tithe", 25, Rarity.COMMON, mage.cards.m.ManaTithe.class)); - cards.add(new SetCardInfo("Melancholy", 88, Rarity.COMMON, mage.cards.m.Melancholy.class)); - cards.add(new SetCardInfo("Merfolk Thaumaturgist", 56, Rarity.COMMON, mage.cards.m.MerfolkThaumaturgist.class)); - cards.add(new SetCardInfo("Mesa Enchantress", 26, Rarity.RARE, mage.cards.m.MesaEnchantress.class)); - cards.add(new SetCardInfo("Midnight Charm", 74, Rarity.COMMON, mage.cards.m.MidnightCharm.class)); - cards.add(new SetCardInfo("Mire Boa", 135, Rarity.COMMON, mage.cards.m.MireBoa.class)); - cards.add(new SetCardInfo("Mirri the Cursed", 75, Rarity.RARE, mage.cards.m.MirriTheCursed.class)); - cards.add(new SetCardInfo("Mycologist", 27, Rarity.UNCOMMON, mage.cards.m.Mycologist.class)); - cards.add(new SetCardInfo("Necrotic Sliver", 159, Rarity.UNCOMMON, mage.cards.n.NecroticSliver.class)); - cards.add(new SetCardInfo("Needlepeak Spider", 105, Rarity.COMMON, mage.cards.n.NeedlepeakSpider.class)); - cards.add(new SetCardInfo("Null Profusion", 89, Rarity.RARE, mage.cards.n.NullProfusion.class)); - cards.add(new SetCardInfo("Numot, the Devastator", 160, Rarity.RARE, mage.cards.n.NumotTheDevastator.class)); - cards.add(new SetCardInfo("Oros, the Avenger", 161, Rarity.RARE, mage.cards.o.OrosTheAvenger.class)); - cards.add(new SetCardInfo("Ovinize", 57, Rarity.UNCOMMON, mage.cards.o.Ovinize.class)); - cards.add(new SetCardInfo("Pallid Mycoderm", 10, Rarity.COMMON, mage.cards.p.PallidMycoderm.class)); - cards.add(new SetCardInfo("Phantasmagorian", 77, Rarity.UNCOMMON, mage.cards.p.Phantasmagorian.class)); - cards.add(new SetCardInfo("Piracy Charm", 58, Rarity.COMMON, mage.cards.p.PiracyCharm.class)); - cards.add(new SetCardInfo("Pongify", 44, Rarity.UNCOMMON, mage.cards.p.Pongify.class)); - cards.add(new SetCardInfo("Porphyry Nodes", 28, Rarity.RARE, mage.cards.p.PorphyryNodes.class)); - cards.add(new SetCardInfo("Poultice Sliver", 11, Rarity.COMMON, mage.cards.p.PoulticeSliver.class)); - cards.add(new SetCardInfo("Pouncing Wurm", 136, Rarity.UNCOMMON, mage.cards.p.PouncingWurm.class)); - cards.add(new SetCardInfo("Primal Plasma", 59, Rarity.COMMON, mage.cards.p.PrimalPlasma.class)); - cards.add(new SetCardInfo("Prodigal Pyromancer", 118, Rarity.COMMON, mage.cards.p.ProdigalPyromancer.class)); - cards.add(new SetCardInfo("Psychotrope Thallid", 137, Rarity.UNCOMMON, mage.cards.p.PsychotropeThallid.class)); - cards.add(new SetCardInfo("Pyrohemia", 119, Rarity.UNCOMMON, mage.cards.p.Pyrohemia.class)); - cards.add(new SetCardInfo("Radha, Heir to Keld", 162, Rarity.RARE, mage.cards.r.RadhaHeirToKeld.class)); - cards.add(new SetCardInfo("Rathi Trapper", 90, Rarity.COMMON, mage.cards.r.RathiTrapper.class)); - cards.add(new SetCardInfo("Reality Acid", 45, Rarity.COMMON, mage.cards.r.RealityAcid.class)); - cards.add(new SetCardInfo("Rebuff the Wicked", 12, Rarity.UNCOMMON, mage.cards.r.RebuffTheWicked.class)); - cards.add(new SetCardInfo("Reckless Wurm", 120, Rarity.UNCOMMON, mage.cards.r.RecklessWurm.class)); - cards.add(new SetCardInfo("Reflex Sliver", 138, Rarity.COMMON, mage.cards.r.ReflexSliver.class)); - cards.add(new SetCardInfo("Revered Dead", 29, Rarity.COMMON, mage.cards.r.ReveredDead.class)); - cards.add(new SetCardInfo("Ridged Kusite", 78, Rarity.COMMON, mage.cards.r.RidgedKusite.class)); - cards.add(new SetCardInfo("Riptide Pilferer", 60, Rarity.UNCOMMON, mage.cards.r.RiptidePilferer.class)); - cards.add(new SetCardInfo("Roiling Horror", 79, Rarity.RARE, mage.cards.r.RoilingHorror.class)); - cards.add(new SetCardInfo("Rough // Tumble", 114, Rarity.UNCOMMON, mage.cards.r.RoughTumble.class)); - cards.add(new SetCardInfo("Saltblast", 15, Rarity.UNCOMMON, mage.cards.s.Saltblast.class)); - cards.add(new SetCardInfo("Saltfield Recluse", 16, Rarity.COMMON, mage.cards.s.SaltfieldRecluse.class)); - cards.add(new SetCardInfo("Seal of Primordium", 153, Rarity.COMMON, mage.cards.s.SealOfPrimordium.class)); - cards.add(new SetCardInfo("Serendib Sorcerer", 61, Rarity.RARE, mage.cards.s.SerendibSorcerer.class)); - cards.add(new SetCardInfo("Serra's Boon", 17, Rarity.UNCOMMON, mage.cards.s.SerrasBoon.class)); - cards.add(new SetCardInfo("Serra Sphinx", 62, Rarity.RARE, mage.cards.s.SerraSphinx.class)); - cards.add(new SetCardInfo("Shade of Trokair", 18, Rarity.COMMON, mage.cards.s.ShadeOfTrokair.class)); - cards.add(new SetCardInfo("Shaper Parasite", 46, Rarity.COMMON, mage.cards.s.ShaperParasite.class)); - cards.add(new SetCardInfo("Shivan Meteor", 106, Rarity.UNCOMMON, mage.cards.s.ShivanMeteor.class)); - cards.add(new SetCardInfo("Shivan Wumpus", 121, Rarity.RARE, mage.cards.s.ShivanWumpus.class)); - cards.add(new SetCardInfo("Shrouded Lore", 91, Rarity.UNCOMMON, mage.cards.s.ShroudedLore.class)); - cards.add(new SetCardInfo("Simian Spirit Guide", 122, Rarity.COMMON, mage.cards.s.SimianSpiritGuide.class)); - cards.add(new SetCardInfo("Sinew Sliver", 30, Rarity.COMMON, mage.cards.s.SinewSliver.class)); - cards.add(new SetCardInfo("Skirk Shaman", 123, Rarity.COMMON, mage.cards.s.SkirkShaman.class)); - cards.add(new SetCardInfo("Sophic Centaur", 139, Rarity.UNCOMMON, mage.cards.s.SophicCentaur.class)); - cards.add(new SetCardInfo("Spitting Sliver", 80, Rarity.COMMON, mage.cards.s.SpittingSliver.class)); - cards.add(new SetCardInfo("Stingscourger", 107, Rarity.COMMON, mage.cards.s.Stingscourger.class)); - cards.add(new SetCardInfo("Stonecloaker", 19, Rarity.UNCOMMON, mage.cards.s.Stonecloaker.class)); - cards.add(new SetCardInfo("Stormfront Riders", 20, Rarity.UNCOMMON, mage.cards.s.StormfrontRiders.class)); - cards.add(new SetCardInfo("Sulfur Elemental", 108, Rarity.UNCOMMON, mage.cards.s.SulfurElemental.class)); - cards.add(new SetCardInfo("Sunlance", 31, Rarity.COMMON, mage.cards.s.Sunlance.class)); - cards.add(new SetCardInfo("Synchronous Sliver", 48, Rarity.COMMON, mage.cards.s.SynchronousSliver.class)); - cards.add(new SetCardInfo("Temporal Extortion", 81, Rarity.RARE, mage.cards.t.TemporalExtortion.class)); - cards.add(new SetCardInfo("Teneb, the Harvester", 163, Rarity.RARE, mage.cards.t.TenebTheHarvester.class)); - cards.add(new SetCardInfo("Tidewalker", 49, Rarity.UNCOMMON, mage.cards.t.Tidewalker.class)); - cards.add(new SetCardInfo("Timbermare", 140, Rarity.RARE, mage.cards.t.Timbermare.class)); - cards.add(new SetCardInfo("Timecrafting", 109, Rarity.UNCOMMON, mage.cards.t.Timecrafting.class)); - cards.add(new SetCardInfo("Torchling", 110, Rarity.RARE, mage.cards.t.Torchling.class)); - cards.add(new SetCardInfo("Uktabi Drake", 141, Rarity.COMMON, mage.cards.u.UktabiDrake.class)); - cards.add(new SetCardInfo("Urborg, Tomb of Yawgmoth", 165, Rarity.RARE, mage.cards.u.UrborgTombOfYawgmoth.class)); - cards.add(new SetCardInfo("Utopia Vow", 142, Rarity.COMMON, mage.cards.u.UtopiaVow.class)); - cards.add(new SetCardInfo("Vampiric Link", 92, Rarity.COMMON, mage.cards.v.VampiricLink.class)); - cards.add(new SetCardInfo("Vitaspore Thallid", 143, Rarity.COMMON, mage.cards.v.VitasporeThallid.class)); - cards.add(new SetCardInfo("Voidstone Gargoyle", 21, Rarity.RARE, mage.cards.v.VoidstoneGargoyle.class)); - cards.add(new SetCardInfo("Vorosh, the Hunter", 164, Rarity.RARE, mage.cards.v.VoroshTheHunter.class)); - cards.add(new SetCardInfo("Waning Wurm", 83, Rarity.UNCOMMON, mage.cards.w.WaningWurm.class)); - cards.add(new SetCardInfo("Whitemane Lion", 22, Rarity.COMMON, mage.cards.w.WhitemaneLion.class)); - cards.add(new SetCardInfo("Wild Pair", 144, Rarity.RARE, mage.cards.w.WildPair.class)); - cards.add(new SetCardInfo("Wistful Thinking", 53, Rarity.COMMON, mage.cards.w.WistfulThinking.class)); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import mage.constants.SetType; +import mage.cards.ExpansionSet; +import mage.constants.Rarity; + +/** + * + * @author North + */ +public class PlanarChaos extends ExpansionSet { + + private static final PlanarChaos fINSTANCE = new PlanarChaos(); + + public static PlanarChaos getInstance() { + return fINSTANCE; + } + + private PlanarChaos() { + super("Planar Chaos", "PLC", ExpansionSet.buildDate(2007, 1, 2), SetType.EXPANSION); + this.blockName = "Time Spiral"; + this.parentSet = TimeSpiral.getInstance(); + this.hasBasicLands = false; + this.hasBoosters = true; + this.numBoosterLands = 0; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + cards.add(new SetCardInfo("Aeon Chronicler", 32, Rarity.RARE, mage.cards.a.AeonChronicler.class)); + cards.add(new SetCardInfo("Aether Membrane", 93, Rarity.UNCOMMON, mage.cards.a.AetherMembrane.class)); + cards.add(new SetCardInfo("Akroma, Angel of Fury", 94, Rarity.RARE, mage.cards.a.AkromaAngelOfFury.class)); + cards.add(new SetCardInfo("Ana Battlemage", 124, Rarity.UNCOMMON, mage.cards.a.AnaBattlemage.class)); + cards.add(new SetCardInfo("Aquamorph Entity", 33, Rarity.COMMON, mage.cards.a.AquamorphEntity.class)); + cards.add(new SetCardInfo("Aven Riftwatcher", 1, Rarity.COMMON, mage.cards.a.AvenRiftwatcher.class)); + cards.add(new SetCardInfo("Battering Sliver", 95, Rarity.COMMON, mage.cards.b.BatteringSliver.class)); + cards.add(new SetCardInfo("Benalish Commander", 2, Rarity.RARE, mage.cards.b.BenalishCommander.class)); + cards.add(new SetCardInfo("Big Game Hunter", 63, Rarity.UNCOMMON, mage.cards.b.BigGameHunter.class)); + cards.add(new SetCardInfo("Blightspeaker", 64, Rarity.COMMON, mage.cards.b.Blightspeaker.class)); + cards.add(new SetCardInfo("Blood Knight", 115, Rarity.UNCOMMON, mage.cards.b.BloodKnight.class)); + cards.add(new SetCardInfo("Body Double", 35, Rarity.RARE, mage.cards.b.BodyDouble.class)); + cards.add(new SetCardInfo("Bog Serpent", 84, Rarity.COMMON, mage.cards.b.BogSerpent.class)); + cards.add(new SetCardInfo("Boom // Bust", 112, Rarity.RARE, mage.cards.b.BoomBust.class)); + cards.add(new SetCardInfo("Braids, Conjurer Adept", 36, Rarity.RARE, mage.cards.b.BraidsConjurerAdept.class)); + cards.add(new SetCardInfo("Brain Gorgers", 65, Rarity.COMMON, mage.cards.b.BrainGorgers.class)); + cards.add(new SetCardInfo("Brute Force", 116, Rarity.COMMON, mage.cards.b.BruteForce.class)); + cards.add(new SetCardInfo("Calciderm", 23, Rarity.UNCOMMON, mage.cards.c.Calciderm.class)); + cards.add(new SetCardInfo("Cautery Sliver", 154, Rarity.UNCOMMON, mage.cards.c.CauterySliver.class)); + cards.add(new SetCardInfo("Chronozoa", 37, Rarity.RARE, mage.cards.c.Chronozoa.class)); + cards.add(new SetCardInfo("Circle of Affliction", 66, Rarity.UNCOMMON, mage.cards.c.CircleOfAffliction.class)); + cards.add(new SetCardInfo("Citanul Woodreaders", 125, Rarity.COMMON, mage.cards.c.CitanulWoodreaders.class)); + cards.add(new SetCardInfo("Cradle to Grave", 67, Rarity.COMMON, mage.cards.c.CradleToGrave.class)); + cards.add(new SetCardInfo("Crovax, Ascendant Hero", 3, Rarity.RARE, mage.cards.c.CrovaxAscendantHero.class)); + cards.add(new SetCardInfo("Damnation", 85, Rarity.RARE, mage.cards.d.Damnation.class)); + cards.add(new SetCardInfo("Darkheart Sliver", 155, Rarity.UNCOMMON, mage.cards.d.DarkheartSliver.class)); + cards.add(new SetCardInfo("Dash Hopes", 68, Rarity.COMMON, mage.cards.d.DashHopes.class)); + cards.add(new SetCardInfo("Dawn Charm", 4, Rarity.COMMON, mage.cards.d.DawnCharm.class)); + cards.add(new SetCardInfo("Dead // Gone", 113, Rarity.COMMON, mage.cards.d.DeadGone.class)); + cards.add(new SetCardInfo("Deadly Grub", 69, Rarity.COMMON, mage.cards.d.DeadlyGrub.class)); + cards.add(new SetCardInfo("Deadwood Treefolk", 126, Rarity.UNCOMMON, mage.cards.d.DeadwoodTreefolk.class)); + cards.add(new SetCardInfo("Detritivore", 96, Rarity.RARE, mage.cards.d.Detritivore.class)); + cards.add(new SetCardInfo("Dismal Failure", 39, Rarity.UNCOMMON, mage.cards.d.DismalFailure.class)); + cards.add(new SetCardInfo("Dormant Sliver", 156, Rarity.UNCOMMON, mage.cards.d.DormantSliver.class)); + cards.add(new SetCardInfo("Dreamscape Artist", 40, Rarity.COMMON, mage.cards.d.DreamscapeArtist.class)); + cards.add(new SetCardInfo("Dunerider Outlaw", 86, Rarity.UNCOMMON, mage.cards.d.DuneriderOutlaw.class)); + cards.add(new SetCardInfo("Dust Corona", 97, Rarity.COMMON, mage.cards.d.DustCorona.class)); + cards.add(new SetCardInfo("Dust Elemental", 5, Rarity.RARE, mage.cards.d.DustElemental.class)); + cards.add(new SetCardInfo("Enslave", 70, Rarity.UNCOMMON, mage.cards.e.Enslave.class)); + cards.add(new SetCardInfo("Erratic Mutation", 41, Rarity.COMMON, mage.cards.e.ErraticMutation.class)); + cards.add(new SetCardInfo("Essence Warden", 145, Rarity.COMMON, mage.cards.e.EssenceWarden.class)); + cards.add(new SetCardInfo("Evolution Charm", 127, Rarity.COMMON, mage.cards.e.EvolutionCharm.class)); + cards.add(new SetCardInfo("Extirpate", 71, Rarity.RARE, mage.cards.e.Extirpate.class)); + cards.add(new SetCardInfo("Fa'adiyah Seer", 146, Rarity.COMMON, mage.cards.f.FaadiyahSeer.class)); + cards.add(new SetCardInfo("Fatal Frenzy", 98, Rarity.RARE, mage.cards.f.FatalFrenzy.class)); + cards.add(new SetCardInfo("Firefright Mage", 99, Rarity.COMMON, mage.cards.f.FirefrightMage.class)); + cards.add(new SetCardInfo("Frenetic Sliver", 157, Rarity.UNCOMMON, mage.cards.f.FreneticSliver.class)); + cards.add(new SetCardInfo("Frozen Aether", 54, Rarity.UNCOMMON, mage.cards.f.FrozenAether.class)); + cards.add(new SetCardInfo("Fungal Behemoth", 128, Rarity.RARE, mage.cards.f.FungalBehemoth.class)); + cards.add(new SetCardInfo("Fury Charm", 100, Rarity.COMMON, mage.cards.f.FuryCharm.class)); + cards.add(new SetCardInfo("Gaea's Anthem", 147, Rarity.RARE, mage.cards.g.GaeasAnthem.class)); + cards.add(new SetCardInfo("Ghost Tactician", 6, Rarity.COMMON, mage.cards.g.GhostTactician.class)); + cards.add(new SetCardInfo("Giant Dustwasp", 129, Rarity.COMMON, mage.cards.g.GiantDustwasp.class)); + cards.add(new SetCardInfo("Gossamer Phantasm", 55, Rarity.COMMON, mage.cards.g.GossamerPhantasm.class)); + cards.add(new SetCardInfo("Groundbreaker", 148, Rarity.RARE, mage.cards.g.Groundbreaker.class)); + cards.add(new SetCardInfo("Hammerheim Deadeye", 101, Rarity.UNCOMMON, mage.cards.h.HammerheimDeadeye.class)); + cards.add(new SetCardInfo("Harmonize", 149, Rarity.UNCOMMON, mage.cards.h.Harmonize.class)); + cards.add(new SetCardInfo("Healing Leaves", 150, Rarity.COMMON, mage.cards.h.HealingLeaves.class)); + cards.add(new SetCardInfo("Hedge Troll", 151, Rarity.UNCOMMON, mage.cards.h.HedgeTroll.class)); + cards.add(new SetCardInfo("Heroes Remembered", 7, Rarity.RARE, mage.cards.h.HeroesRemembered.class)); + cards.add(new SetCardInfo("Hunting Wilds", 130, Rarity.UNCOMMON, mage.cards.h.HuntingWilds.class)); + cards.add(new SetCardInfo("Imp's Mischief", 72, Rarity.RARE, mage.cards.i.ImpsMischief.class)); + cards.add(new SetCardInfo("Intet, the Dreamer", 158, Rarity.RARE, mage.cards.i.IntetTheDreamer.class)); + cards.add(new SetCardInfo("Jedit Ojanen of Efrava", 131, Rarity.RARE, mage.cards.j.JeditOjanenOfEfrava.class)); + cards.add(new SetCardInfo("Jodah's Avenger", 42, Rarity.UNCOMMON, mage.cards.j.JodahsAvenger.class)); + cards.add(new SetCardInfo("Kavu Predator", 132, Rarity.UNCOMMON, mage.cards.k.KavuPredator.class)); + cards.add(new SetCardInfo("Keen Sense", 152, Rarity.UNCOMMON, mage.cards.k.KeenSense.class)); + cards.add(new SetCardInfo("Keldon Marauders", 102, Rarity.COMMON, mage.cards.k.KeldonMarauders.class)); + cards.add(new SetCardInfo("Lavacore Elemental", 103, Rarity.UNCOMMON, mage.cards.l.LavacoreElemental.class)); + cards.add(new SetCardInfo("Life and Limb", 133, Rarity.RARE, mage.cards.l.LifeAndLimb.class)); + cards.add(new SetCardInfo("Magus of the Arena", 104, Rarity.RARE, mage.cards.m.MagusOfTheArena.class)); + cards.add(new SetCardInfo("Magus of the Bazaar", 43, Rarity.RARE, mage.cards.m.MagusOfTheBazaar.class)); + cards.add(new SetCardInfo("Magus of the Coffers", 73, Rarity.RARE, mage.cards.m.MagusOfTheCoffers.class)); + cards.add(new SetCardInfo("Magus of the Library", 134, Rarity.RARE, mage.cards.m.MagusOfTheLibrary.class)); + cards.add(new SetCardInfo("Magus of the Tabernacle", 8, Rarity.RARE, mage.cards.m.MagusOfTheTabernacle.class)); + cards.add(new SetCardInfo("Malach of the Dawn", 24, Rarity.UNCOMMON, mage.cards.m.MalachOfTheDawn.class)); + cards.add(new SetCardInfo("Mana Tithe", 25, Rarity.COMMON, mage.cards.m.ManaTithe.class)); + cards.add(new SetCardInfo("Melancholy", 88, Rarity.COMMON, mage.cards.m.Melancholy.class)); + cards.add(new SetCardInfo("Merfolk Thaumaturgist", 56, Rarity.COMMON, mage.cards.m.MerfolkThaumaturgist.class)); + cards.add(new SetCardInfo("Mesa Enchantress", 26, Rarity.RARE, mage.cards.m.MesaEnchantress.class)); + cards.add(new SetCardInfo("Midnight Charm", 74, Rarity.COMMON, mage.cards.m.MidnightCharm.class)); + cards.add(new SetCardInfo("Mire Boa", 135, Rarity.COMMON, mage.cards.m.MireBoa.class)); + cards.add(new SetCardInfo("Mirri the Cursed", 75, Rarity.RARE, mage.cards.m.MirriTheCursed.class)); + cards.add(new SetCardInfo("Mycologist", 27, Rarity.UNCOMMON, mage.cards.m.Mycologist.class)); + cards.add(new SetCardInfo("Necrotic Sliver", 159, Rarity.UNCOMMON, mage.cards.n.NecroticSliver.class)); + cards.add(new SetCardInfo("Needlepeak Spider", 105, Rarity.COMMON, mage.cards.n.NeedlepeakSpider.class)); + cards.add(new SetCardInfo("Null Profusion", 89, Rarity.RARE, mage.cards.n.NullProfusion.class)); + cards.add(new SetCardInfo("Numot, the Devastator", 160, Rarity.RARE, mage.cards.n.NumotTheDevastator.class)); + cards.add(new SetCardInfo("Oros, the Avenger", 161, Rarity.RARE, mage.cards.o.OrosTheAvenger.class)); + cards.add(new SetCardInfo("Ovinize", 57, Rarity.UNCOMMON, mage.cards.o.Ovinize.class)); + cards.add(new SetCardInfo("Pallid Mycoderm", 10, Rarity.COMMON, mage.cards.p.PallidMycoderm.class)); + cards.add(new SetCardInfo("Phantasmagorian", 77, Rarity.UNCOMMON, mage.cards.p.Phantasmagorian.class)); + cards.add(new SetCardInfo("Piracy Charm", 58, Rarity.COMMON, mage.cards.p.PiracyCharm.class)); + cards.add(new SetCardInfo("Pongify", 44, Rarity.UNCOMMON, mage.cards.p.Pongify.class)); + cards.add(new SetCardInfo("Porphyry Nodes", 28, Rarity.RARE, mage.cards.p.PorphyryNodes.class)); + cards.add(new SetCardInfo("Poultice Sliver", 11, Rarity.COMMON, mage.cards.p.PoulticeSliver.class)); + cards.add(new SetCardInfo("Pouncing Wurm", 136, Rarity.UNCOMMON, mage.cards.p.PouncingWurm.class)); + cards.add(new SetCardInfo("Primal Plasma", 59, Rarity.COMMON, mage.cards.p.PrimalPlasma.class)); + cards.add(new SetCardInfo("Prodigal Pyromancer", 118, Rarity.COMMON, mage.cards.p.ProdigalPyromancer.class)); + cards.add(new SetCardInfo("Psychotrope Thallid", 137, Rarity.UNCOMMON, mage.cards.p.PsychotropeThallid.class)); + cards.add(new SetCardInfo("Pyrohemia", 119, Rarity.UNCOMMON, mage.cards.p.Pyrohemia.class)); + cards.add(new SetCardInfo("Radha, Heir to Keld", 162, Rarity.RARE, mage.cards.r.RadhaHeirToKeld.class)); + cards.add(new SetCardInfo("Rathi Trapper", 90, Rarity.COMMON, mage.cards.r.RathiTrapper.class)); + cards.add(new SetCardInfo("Reality Acid", 45, Rarity.COMMON, mage.cards.r.RealityAcid.class)); + cards.add(new SetCardInfo("Rebuff the Wicked", 12, Rarity.UNCOMMON, mage.cards.r.RebuffTheWicked.class)); + cards.add(new SetCardInfo("Reckless Wurm", 120, Rarity.UNCOMMON, mage.cards.r.RecklessWurm.class)); + cards.add(new SetCardInfo("Reflex Sliver", 138, Rarity.COMMON, mage.cards.r.ReflexSliver.class)); + cards.add(new SetCardInfo("Revered Dead", 29, Rarity.COMMON, mage.cards.r.ReveredDead.class)); + cards.add(new SetCardInfo("Ridged Kusite", 78, Rarity.COMMON, mage.cards.r.RidgedKusite.class)); + cards.add(new SetCardInfo("Riptide Pilferer", 60, Rarity.UNCOMMON, mage.cards.r.RiptidePilferer.class)); + cards.add(new SetCardInfo("Roiling Horror", 79, Rarity.RARE, mage.cards.r.RoilingHorror.class)); + cards.add(new SetCardInfo("Rough // Tumble", 114, Rarity.UNCOMMON, mage.cards.r.RoughTumble.class)); + cards.add(new SetCardInfo("Saltblast", 15, Rarity.UNCOMMON, mage.cards.s.Saltblast.class)); + cards.add(new SetCardInfo("Saltfield Recluse", 16, Rarity.COMMON, mage.cards.s.SaltfieldRecluse.class)); + cards.add(new SetCardInfo("Seal of Primordium", 153, Rarity.COMMON, mage.cards.s.SealOfPrimordium.class)); + cards.add(new SetCardInfo("Serendib Sorcerer", 61, Rarity.RARE, mage.cards.s.SerendibSorcerer.class)); + cards.add(new SetCardInfo("Serra's Boon", 17, Rarity.UNCOMMON, mage.cards.s.SerrasBoon.class)); + cards.add(new SetCardInfo("Serra Sphinx", 62, Rarity.RARE, mage.cards.s.SerraSphinx.class)); + cards.add(new SetCardInfo("Shade of Trokair", 18, Rarity.COMMON, mage.cards.s.ShadeOfTrokair.class)); + cards.add(new SetCardInfo("Shaper Parasite", 46, Rarity.COMMON, mage.cards.s.ShaperParasite.class)); + cards.add(new SetCardInfo("Shivan Meteor", 106, Rarity.UNCOMMON, mage.cards.s.ShivanMeteor.class)); + cards.add(new SetCardInfo("Shivan Wumpus", 121, Rarity.RARE, mage.cards.s.ShivanWumpus.class)); + cards.add(new SetCardInfo("Shrouded Lore", 91, Rarity.UNCOMMON, mage.cards.s.ShroudedLore.class)); + cards.add(new SetCardInfo("Simian Spirit Guide", 122, Rarity.COMMON, mage.cards.s.SimianSpiritGuide.class)); + cards.add(new SetCardInfo("Sinew Sliver", 30, Rarity.COMMON, mage.cards.s.SinewSliver.class)); + cards.add(new SetCardInfo("Skirk Shaman", 123, Rarity.COMMON, mage.cards.s.SkirkShaman.class)); + cards.add(new SetCardInfo("Sophic Centaur", 139, Rarity.UNCOMMON, mage.cards.s.SophicCentaur.class)); + cards.add(new SetCardInfo("Spellshift", 47, Rarity.RARE, mage.cards.s.Spellshift.class)); + cards.add(new SetCardInfo("Spitting Sliver", 80, Rarity.COMMON, mage.cards.s.SpittingSliver.class)); + cards.add(new SetCardInfo("Stingscourger", 107, Rarity.COMMON, mage.cards.s.Stingscourger.class)); + cards.add(new SetCardInfo("Stonecloaker", 19, Rarity.UNCOMMON, mage.cards.s.Stonecloaker.class)); + cards.add(new SetCardInfo("Stormfront Riders", 20, Rarity.UNCOMMON, mage.cards.s.StormfrontRiders.class)); + cards.add(new SetCardInfo("Sulfur Elemental", 108, Rarity.UNCOMMON, mage.cards.s.SulfurElemental.class)); + cards.add(new SetCardInfo("Sunlance", 31, Rarity.COMMON, mage.cards.s.Sunlance.class)); + cards.add(new SetCardInfo("Synchronous Sliver", 48, Rarity.COMMON, mage.cards.s.SynchronousSliver.class)); + cards.add(new SetCardInfo("Temporal Extortion", 81, Rarity.RARE, mage.cards.t.TemporalExtortion.class)); + cards.add(new SetCardInfo("Teneb, the Harvester", 163, Rarity.RARE, mage.cards.t.TenebTheHarvester.class)); + cards.add(new SetCardInfo("Tidewalker", 49, Rarity.UNCOMMON, mage.cards.t.Tidewalker.class)); + cards.add(new SetCardInfo("Timbermare", 140, Rarity.RARE, mage.cards.t.Timbermare.class)); + cards.add(new SetCardInfo("Timecrafting", 109, Rarity.UNCOMMON, mage.cards.t.Timecrafting.class)); + cards.add(new SetCardInfo("Torchling", 110, Rarity.RARE, mage.cards.t.Torchling.class)); + cards.add(new SetCardInfo("Uktabi Drake", 141, Rarity.COMMON, mage.cards.u.UktabiDrake.class)); + cards.add(new SetCardInfo("Urborg, Tomb of Yawgmoth", 165, Rarity.RARE, mage.cards.u.UrborgTombOfYawgmoth.class)); + cards.add(new SetCardInfo("Utopia Vow", 142, Rarity.COMMON, mage.cards.u.UtopiaVow.class)); + cards.add(new SetCardInfo("Vampiric Link", 92, Rarity.COMMON, mage.cards.v.VampiricLink.class)); + cards.add(new SetCardInfo("Venarian Glimmer", 52, Rarity.UNCOMMON, mage.cards.v.VenarianGlimmer.class)); + cards.add(new SetCardInfo("Vitaspore Thallid", 143, Rarity.COMMON, mage.cards.v.VitasporeThallid.class)); + cards.add(new SetCardInfo("Voidstone Gargoyle", 21, Rarity.RARE, mage.cards.v.VoidstoneGargoyle.class)); + cards.add(new SetCardInfo("Vorosh, the Hunter", 164, Rarity.RARE, mage.cards.v.VoroshTheHunter.class)); + cards.add(new SetCardInfo("Waning Wurm", 83, Rarity.UNCOMMON, mage.cards.w.WaningWurm.class)); + cards.add(new SetCardInfo("Whitemane Lion", 22, Rarity.COMMON, mage.cards.w.WhitemaneLion.class)); + cards.add(new SetCardInfo("Wild Pair", 144, Rarity.RARE, mage.cards.w.WildPair.class)); + cards.add(new SetCardInfo("Wistful Thinking", 53, Rarity.COMMON, mage.cards.w.WistfulThinking.class)); + } +} From 47874a7f030330d43f41e197efb7dd59ac77e0f3 Mon Sep 17 00:00:00 2001 From: spjspj Date: Tue, 15 Nov 2016 23:20:51 +1100 Subject: [PATCH 06/10] spjspj - Force stop and stop skip for when there's potential attackers --- .../src/mage/player/human/HumanPlayer.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index ed84caa5172..06767728750 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -912,10 +912,7 @@ public class HumanPlayer extends PlayerImpl { FilterCreatureForCombat filter = filterCreatureForCombat.copy(); filter.add(new ControllerIdPredicate(attackingPlayerId)); while (!abort) { - if (passedAllTurns || passedUntilEndStepBeforeMyTurn - || (!getUserData().getUserSkipPrioritySteps().isStopOnDeclareAttackersDuringSkipAction() && (passedTurn || passedTurnSkipStack || passedUntilEndOfTurn || passedUntilNextMain))) { - return; - } + Map options = new HashMap<>(); List possibleAttackers = new ArrayList<>(); @@ -927,6 +924,12 @@ public class HumanPlayer extends PlayerImpl { options.put(Constants.Option.POSSIBLE_ATTACKERS, (Serializable) possibleAttackers); if (possibleAttackers.size() > 0) { options.put(Constants.Option.SPECIAL_BUTTON, (Serializable) "All attack"); + if (getUserData().getUserSkipPrioritySteps().isStopOnDeclareAttackersDuringSkipAction()) { + resetPlayerPassedActions(); + } + } else if (passedAllTurns || passedUntilEndStepBeforeMyTurn + || (!getUserData().getUserSkipPrioritySteps().isStopOnDeclareAttackersDuringSkipAction() && (passedTurn || passedTurnSkipStack || passedUntilEndOfTurn || passedUntilNextMain))) { + return; } game.fireSelectEvent(playerId, "Select attackers", options); From 6d8b37b2ac3565d2859bbbf6f0f86a112fbcff77 Mon Sep 17 00:00:00 2001 From: JRHerlehy Date: Tue, 15 Nov 2016 10:18:53 -0800 Subject: [PATCH 07/10] Add controll != null check. Added recommended changes. --- Mage.Sets/src/mage/cards/m/Metamorphose.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/m/Metamorphose.java b/Mage.Sets/src/mage/cards/m/Metamorphose.java index 25649fb8f92..fa34b6f93e1 100644 --- a/Mage.Sets/src/mage/cards/m/Metamorphose.java +++ b/Mage.Sets/src/mage/cards/m/Metamorphose.java @@ -105,7 +105,7 @@ class MetamorphoseEffect extends OneShotEffect { Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); if (permanent != null) { Player controller = game.getPlayer(permanent.getControllerId()); - if (controller.chooseUse(Outcome.PutCardInPlay, "Do you wish to put an artifact, creature, enchantment, or land card onto the battlefield?", source, game)) { + if (controller != null && controller.canRespond() && controller.chooseUse(Outcome.PutCardInPlay, "Do you wish to put an artifact, creature, enchantment, or land card onto the battlefield?", source, game)) { TargetCardInHand target = new TargetCardInHand(filter); target.clearChosen(); if (controller.chooseTarget(outcome, target, source, game)) { From 03ee51bcbff43ca9b65aabe102dd694d5c1578d4 Mon Sep 17 00:00:00 2001 From: HCrescent Date: Tue, 15 Nov 2016 21:24:12 -0600 Subject: [PATCH 08/10] Added Lifeline --- Mage.Sets/src/mage/cards/l/Lifeline.java | 107 +++++++++++++++++++++++ Mage.Sets/src/mage/sets/UrzasSaga.java | 1 + 2 files changed, 108 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/l/Lifeline.java diff --git a/Mage.Sets/src/mage/cards/l/Lifeline.java b/Mage.Sets/src/mage/cards/l/Lifeline.java new file mode 100644 index 00000000000..5877e7cd99d --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Lifeline.java @@ -0,0 +1,107 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.l; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author HCrescent + */ +public class Lifeline extends CardImpl { + +private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature"); + + public Lifeline(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); + + + // Whenever a creature dies, if another creature is on the battlefield, return the first card to the battlefield under its owner's control at the beginning of the next end step. + Ability ability = new ConditionalTriggeredAbility( + new DiesCreatureTriggeredAbility( Zone.BATTLEFIELD, new LifelineEffect(), false, filter, true), + new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0, false), + "Whenever a creature dies, if another creature is on the battlefield, return the first card to the battlefield under its owner's control at the beginning of the next end step."); + this.addAbility(ability); + } + + public Lifeline(final Lifeline card) { + super(card); + } + + @Override + public Lifeline copy() { + return new Lifeline(this); + } +} +class LifelineEffect extends OneShotEffect { + + public LifelineEffect() { + super(Outcome.PutCardInPlay); + this.staticText = ""; + } + + public LifelineEffect(final LifelineEffect effect) { + super(effect); + } + + @Override + public LifelineEffect copy() { + return new LifelineEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(getTargetPointer().getFirst(game, source)); + if (card != null) { + Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + effect.setText("return that card to the battlefield under it's owner's control at the beginning of the next end step"); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.ANY), source); + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/UrzasSaga.java b/Mage.Sets/src/mage/sets/UrzasSaga.java index af1b7d6428b..9e39b08c873 100644 --- a/Mage.Sets/src/mage/sets/UrzasSaga.java +++ b/Mage.Sets/src/mage/sets/UrzasSaga.java @@ -199,6 +199,7 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Karn, Silver Golem", 298, Rarity.RARE, mage.cards.k.KarnSilverGolem.class)); cards.add(new SetCardInfo("Launch", 82, Rarity.COMMON, mage.cards.l.Launch.class)); cards.add(new SetCardInfo("Lay Waste", 201, Rarity.COMMON, mage.cards.l.LayWaste.class)); + cards.add(new SetCardInfo("Lifeline", 299, Rarity.RARE, mage.cards.l.Lifeline.class)); cards.add(new SetCardInfo("Lightning Dragon", 202, Rarity.RARE, mage.cards.l.LightningDragon.class)); cards.add(new SetCardInfo("Lilting Refrain", 83, Rarity.UNCOMMON, mage.cards.l.LiltingRefrain.class)); cards.add(new SetCardInfo("Lingering Mirage", 84, Rarity.UNCOMMON, mage.cards.l.LingeringMirage.class)); From d7b1ae68ed2ce0cf9f6f971a13541ee6087dcb27 Mon Sep 17 00:00:00 2001 From: spjspj Date: Fri, 18 Nov 2016 00:14:59 +1100 Subject: [PATCH 09/10] spjspj - Sorcery count was double --- Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java | 1 - Mage.Server/src/main/java/mage/server/ChatManager.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java index 125023b4e5b..e192c16c248 100644 --- a/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/DragCardGrid.java @@ -564,7 +564,6 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg artifactCounter, enchantmentCounter, instantCounter, - sorceryCounter, planeswalkerCounter, sorceryCounter, tribalCounter diff --git a/Mage.Server/src/main/java/mage/server/ChatManager.java b/Mage.Server/src/main/java/mage/server/ChatManager.java index 98208801ab6..57d9ff37537 100644 --- a/Mage.Server/src/main/java/mage/server/ChatManager.java +++ b/Mage.Server/src/main/java/mage/server/ChatManager.java @@ -107,7 +107,7 @@ public class ChatManager { } private boolean containsSwearing(String message) { - if (message != null && message.toLowerCase().matches("^.*(anal|asshole|balls|bastard|bitch|blowjob|cock|crap|cunt|damn|dick|douche|fag|fuck|idiot|moron|piss|prick|pussy|rape|rapist|sex|screw you|shit|slut|vagina).*$")) { + if (message != null && message.toLowerCase().matches("^.*(anal|asshole|balls|bastard|bitch|blowjob|cock|crap|cunt|cum|damn|dick|dildo|douche|fag|fuck|idiot|moron|piss|prick|pussy|rape|rapist|sex|screw|shit|slut|vagina).*$")) { return true; } return false; From 67395a8e0916edaebc864e7bfeb5aeca9b388daa Mon Sep 17 00:00:00 2001 From: HCrescent Date: Thu, 17 Nov 2016 22:25:18 -0600 Subject: [PATCH 10/10] Added Mortuary --- Mage.Sets/src/mage/cards/m/Mortuary.java | 63 ++++++++++++++++++++++++ Mage.Sets/src/mage/sets/Stronghold.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/Mortuary.java diff --git a/Mage.Sets/src/mage/cards/m/Mortuary.java b/Mage.Sets/src/mage/cards/m/Mortuary.java new file mode 100644 index 00000000000..cdfbf8f1a75 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/Mortuary.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author HCrescent + */ +public class Mortuary extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature"); + + public Mortuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); + + Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new PutOnLibraryTargetEffect(true, "put that card on top of your library."), false, filter, true, true); + // Whenever a creature is put into your graveyard from the battlefield, put that card on top of your library. + this.addAbility(ability); + } + + public Mortuary(final Mortuary card) { + super(card); + } + + @Override + public Mortuary copy() { + return new Mortuary(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Stronghold.java b/Mage.Sets/src/mage/sets/Stronghold.java index 366d17bb714..c180b9d87cc 100644 --- a/Mage.Sets/src/mage/sets/Stronghold.java +++ b/Mage.Sets/src/mage/sets/Stronghold.java @@ -121,6 +121,7 @@ public class Stronghold extends ExpansionSet { cards.add(new SetCardInfo("Mogg Infestation", 93, Rarity.RARE, mage.cards.m.MoggInfestation.class)); cards.add(new SetCardInfo("Mogg Maniac", 94, Rarity.UNCOMMON, mage.cards.m.MoggManiac.class)); cards.add(new SetCardInfo("Morgue Thrull", 15, Rarity.COMMON, mage.cards.m.MorgueThrull.class)); + cards.add(new SetCardInfo("Mortuary", 16, Rarity.RARE, mage.cards.m.Mortuary.class)); cards.add(new SetCardInfo("Mox Diamond", 132, Rarity.RARE, mage.cards.m.MoxDiamond.class)); cards.add(new SetCardInfo("Mulch", 60, Rarity.COMMON, mage.cards.m.Mulch.class)); cards.add(new SetCardInfo("Nomads en-Kor", 109, Rarity.COMMON, mage.cards.n.NomadsEnKor.class));