From ac5a9435a70ebffdd2bac3a2f8d17684fb3f0d8d Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 11:48:01 -0400 Subject: [PATCH 1/8] Elvish Berserker added --- .../src/mage/sets/exodus/ElvishBerserker.java | 52 +++++++++++++++ .../sets/ninthedition/ElvishBerserker.java | 65 +++++++++++++++++++ .../sets/tenthedition/ElvishBerserker.java | 52 +++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java create mode 100644 Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java create mode 100644 Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java diff --git a/Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java b/Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java new file mode 100644 index 00000000000..a5b0844e716 --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.exodus; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class ElvishBerserker extends mage.sets.ninthedition.ElvishBerserker { + + public ElvishBerserker(UUID ownerId) { + super(ownerId); + this.cardNumber = 110; + this.expansionSetCode = "EXO"; + } + + public ElvishBerserker(final ElvishBerserker card) { + super(card); + } + + @Override + public ElvishBerserker copy() { + return new ElvishBerserker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java b/Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java new file mode 100644 index 00000000000..67397948b20 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.ninthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author anonymous + */ +public class ElvishBerserker extends CardImpl { + + public ElvishBerserker(UUID ownerId) { + super(ownerId, 237, "Elvish Berserker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Elf"); + this.subtype.add("Berserker"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Elvish Berserker becomes blocked, it gets +1/+1 until end of turn for each creature blocking it. + this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + } + + public ElvishBerserker(final ElvishBerserker card) { + super(card); + } + + @Override + public ElvishBerserker copy() { + return new ElvishBerserker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java b/Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java new file mode 100644 index 00000000000..3ff69c63076 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tenthedition; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class ElvishBerserker extends mage.sets.ninthedition.ElvishBerserker { + + public ElvishBerserker(UUID ownerId) { + super(ownerId); + this.cardNumber = 260; + this.expansionSetCode = "10E"; + } + + public ElvishBerserker(final ElvishBerserker card) { + super(card); + } + + @Override + public ElvishBerserker copy() { + return new ElvishBerserker(this); + } +} From 617e00cee4009563e28e8632b22b57b1ddaeafd1 Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 12:30:57 -0400 Subject: [PATCH 2/8] Fertilid added --- .../src/mage/sets/archenemy/Fertilid.java | 52 ++++++++++++++++ .../src/mage/sets/commander/Fertilid.java | 61 +++++++++++++++++++ .../src/mage/sets/morningtide/Fertilid.java | 52 ++++++++++++++++ .../src/mage/sets/planechase/Fertilid.java | 52 ++++++++++++++++ 4 files changed, 217 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/archenemy/Fertilid.java create mode 100644 Mage.Sets/src/mage/sets/commander/Fertilid.java create mode 100644 Mage.Sets/src/mage/sets/morningtide/Fertilid.java create mode 100644 Mage.Sets/src/mage/sets/planechase/Fertilid.java diff --git a/Mage.Sets/src/mage/sets/archenemy/Fertilid.java b/Mage.Sets/src/mage/sets/archenemy/Fertilid.java new file mode 100644 index 00000000000..14679543053 --- /dev/null +++ b/Mage.Sets/src/mage/sets/archenemy/Fertilid.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.archenemy; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class Fertilid extends mage.sets.commander.Fertilid { + + public Fertilid(UUID ownerId) { + super(ownerId); + this.cardNumber = 54; + this.expansionSetCode = "ARC"; + } + + public Fertilid(final Fertilid card) { + super(card); + } + + @Override + public Fertilid copy() { + return new Fertilid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/Fertilid.java b/Mage.Sets/src/mage/sets/commander/Fertilid.java new file mode 100644 index 00000000000..4c829685076 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/Fertilid.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commander; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author anonymous + */ +public class Fertilid extends CardImpl { + + public Fertilid(UUID ownerId) { + super(ownerId, 154, "Fertilid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "CMD"; + this.subtype.add("Elemental"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Fertilid enters the battlefield with two +1/+1 counters on it. + // {1}{G}, Remove a +1/+1 counter from Fertilid: Target player searches his or her library for a basic land card and puts it onto the battlefield tapped. Then that player shuffles his or her library. + } + + public Fertilid(final Fertilid card) { + super(card); + } + + @Override + public Fertilid copy() { + return new Fertilid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/Fertilid.java b/Mage.Sets/src/mage/sets/morningtide/Fertilid.java new file mode 100644 index 00000000000..6b710ba91c0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/Fertilid.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.morningtide; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class Fertilid extends mage.sets.commander.Fertilid { + + public Fertilid(UUID ownerId) { + super(ownerId); + this.cardNumber = 122; + this.expansionSetCode = "MOR"; + } + + public Fertilid(final Fertilid card) { + super(card); + } + + @Override + public Fertilid copy() { + return new Fertilid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/Fertilid.java b/Mage.Sets/src/mage/sets/planechase/Fertilid.java new file mode 100644 index 00000000000..400a940838b --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/Fertilid.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planechase; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class Fertilid extends mage.sets.commander.Fertilid { + + public Fertilid(UUID ownerId) { + super(ownerId); + this.cardNumber = 72; + this.expansionSetCode = "HOP"; + } + + public Fertilid(final Fertilid card) { + super(card); + } + + @Override + public Fertilid copy() { + return new Fertilid(this); + } +} From 505cd944a0938dc86b58af0bd5f612f6c9bf8600 Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 12:38:30 -0400 Subject: [PATCH 3/8] Fertilid implementation --- Mage.Sets/src/mage/sets/commander/Fertilid.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Mage.Sets/src/mage/sets/commander/Fertilid.java b/Mage.Sets/src/mage/sets/commander/Fertilid.java index 4c829685076..310895d17a0 100644 --- a/Mage.Sets/src/mage/sets/commander/Fertilid.java +++ b/Mage.Sets/src/mage/sets/commander/Fertilid.java @@ -29,9 +29,21 @@ package mage.sets.commander; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterBasicLandCard; +import mage.target.TargetPlayer; +import mage.target.common.TargetCardInLibrary; /** * @@ -47,7 +59,12 @@ public class Fertilid extends CardImpl { this.toughness = new MageInt(0); // Fertilid enters the battlefield with two +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); // {1}{G}, Remove a +1/+1 counter from Fertilid: Target player searches his or her library for a basic land card and puts it onto the battlefield tapped. Then that player shuffles his or her library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), new ManaCostsImpl("{1}{G}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); + this.getSpellAbility().addTarget(new TargetPlayer()); + this.addAbility(ability); } public Fertilid(final Fertilid card) { From 0194cfa8b199b4f005ad6094b2b89932e5382e35 Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 13:02:58 -0400 Subject: [PATCH 4/8] Pain Magnification added --- .../sets/dissension/PainMagnification.java | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/dissension/PainMagnification.java diff --git a/Mage.Sets/src/mage/sets/dissension/PainMagnification.java b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java new file mode 100644 index 00000000000..fbc90a4263a --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java @@ -0,0 +1,96 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dissension; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author anonymous + */ +public class PainMagnification extends CardImpl { + + public PainMagnification(UUID ownerId) { + super(ownerId, 121, "Pain Magnification", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{R}"); + this.expansionSetCode = "DIS"; + + // Whenever an opponent is dealt 3 or more damage by a single source, that player discards a card. + this.addAbility(new PainMagnificationTriggeredAbility()); + } + + public PainMagnification(final PainMagnification card) { + super(card); + } + + @Override + public PainMagnification copy() { + return new PainMagnification(this); + } +} + +class PainMagnificationTriggeredAbility extends TriggeredAbilityImpl { + + public PainMagnificationTriggeredAbility() { + super(Zone.BATTLEFIELD, new DiscardTargetEffect(1, false), false); + } + + public PainMagnificationTriggeredAbility(final PainMagnificationTriggeredAbility ability) { + super(ability); + } + + @Override + public PainMagnificationTriggeredAbility copy() { + return new PainMagnificationTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) { + int amount = event.getAmount(); + if(amount >= 3) { + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever an opponent is dealt 3 or more damage by a single source, that player discards a card."; + } +} From 36a703f21d423cb6acd63e21c717865756e5d811 Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 14:01:22 -0400 Subject: [PATCH 5/8] Pain Magnification fix to set the opponent as the target for the discard ability --- .../src/mage/sets/dissension/PainMagnification.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/dissension/PainMagnification.java b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java index fbc90a4263a..2c771c192d2 100644 --- a/Mage.Sets/src/mage/sets/dissension/PainMagnification.java +++ b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java @@ -29,6 +29,7 @@ package mage.sets.dissension; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -36,6 +37,7 @@ import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; +import mage.target.targetpointer.FixedTarget; /** * @@ -64,7 +66,7 @@ public class PainMagnification extends CardImpl { class PainMagnificationTriggeredAbility extends TriggeredAbilityImpl { public PainMagnificationTriggeredAbility() { - super(Zone.BATTLEFIELD, new DiscardTargetEffect(1, false), false); + super(Zone.BATTLEFIELD, new DiscardTargetEffect(1), false); } public PainMagnificationTriggeredAbility(final PainMagnificationTriggeredAbility ability) { @@ -79,9 +81,14 @@ class PainMagnificationTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + // If the damaged player is an opponent if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) { int amount = event.getAmount(); if(amount >= 3) { + // If at least 3 damage is dealt, set the the opponent as the Discard target + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getPlayerId())); + } return true; } } From 5f582e59d3dd11f6d5d16c6432b9de402983da58 Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 14:13:45 -0400 Subject: [PATCH 6/8] Fixed ability target for Fertilid --- Mage.Sets/src/mage/sets/commander/Fertilid.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/commander/Fertilid.java b/Mage.Sets/src/mage/sets/commander/Fertilid.java index 310895d17a0..2ad4df84788 100644 --- a/Mage.Sets/src/mage/sets/commander/Fertilid.java +++ b/Mage.Sets/src/mage/sets/commander/Fertilid.java @@ -63,7 +63,7 @@ public class Fertilid extends CardImpl { // {1}{G}, Remove a +1/+1 counter from Fertilid: Target player searches his or her library for a basic land card and puts it onto the battlefield tapped. Then that player shuffles his or her library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), new ManaCostsImpl("{1}{G}")); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); - this.getSpellAbility().addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } From 77c66d6a84712815b46cbdc821c6fe111465fd0f Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 14:27:21 -0400 Subject: [PATCH 7/8] Comment typo --- Mage.Sets/src/mage/sets/dissension/PainMagnification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/dissension/PainMagnification.java b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java index 2c771c192d2..3846e509d62 100644 --- a/Mage.Sets/src/mage/sets/dissension/PainMagnification.java +++ b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java @@ -85,7 +85,7 @@ class PainMagnificationTriggeredAbility extends TriggeredAbilityImpl { if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) { int amount = event.getAmount(); if(amount >= 3) { - // If at least 3 damage is dealt, set the the opponent as the Discard target + // If at least 3 damage is dealt, set the opponent as the Discard target for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); } From f1dad0994aa2b66f7ea8b32efca62fcb4bc5c9f9 Mon Sep 17 00:00:00 2001 From: Marshall Date: Sun, 14 Jun 2015 14:32:12 -0400 Subject: [PATCH 8/8] Comment updates --- Mage.Sets/src/mage/sets/archenemy/Fertilid.java | 2 +- Mage.Sets/src/mage/sets/commander/Fertilid.java | 2 +- Mage.Sets/src/mage/sets/dissension/PainMagnification.java | 2 +- Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java | 2 +- Mage.Sets/src/mage/sets/morningtide/Fertilid.java | 2 +- Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java | 2 +- Mage.Sets/src/mage/sets/planechase/Fertilid.java | 2 +- Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/sets/archenemy/Fertilid.java b/Mage.Sets/src/mage/sets/archenemy/Fertilid.java index 14679543053..df59cab005e 100644 --- a/Mage.Sets/src/mage/sets/archenemy/Fertilid.java +++ b/Mage.Sets/src/mage/sets/archenemy/Fertilid.java @@ -31,7 +31,7 @@ import java.util.UUID; /** * - * @author anonymous + * @author ilcartographer */ public class Fertilid extends mage.sets.commander.Fertilid { diff --git a/Mage.Sets/src/mage/sets/commander/Fertilid.java b/Mage.Sets/src/mage/sets/commander/Fertilid.java index 2ad4df84788..ea820f44fed 100644 --- a/Mage.Sets/src/mage/sets/commander/Fertilid.java +++ b/Mage.Sets/src/mage/sets/commander/Fertilid.java @@ -47,7 +47,7 @@ import mage.target.common.TargetCardInLibrary; /** * - * @author anonymous + * @author ilcartographer */ public class Fertilid extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/dissension/PainMagnification.java b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java index 3846e509d62..bed43711a4f 100644 --- a/Mage.Sets/src/mage/sets/dissension/PainMagnification.java +++ b/Mage.Sets/src/mage/sets/dissension/PainMagnification.java @@ -41,7 +41,7 @@ import mage.target.targetpointer.FixedTarget; /** * - * @author anonymous + * @author ilcartographer */ public class PainMagnification extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java b/Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java index a5b0844e716..1f8625c7cf2 100644 --- a/Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java +++ b/Mage.Sets/src/mage/sets/exodus/ElvishBerserker.java @@ -31,7 +31,7 @@ import java.util.UUID; /** * - * @author anonymous + * @author ilcartographer */ public class ElvishBerserker extends mage.sets.ninthedition.ElvishBerserker { diff --git a/Mage.Sets/src/mage/sets/morningtide/Fertilid.java b/Mage.Sets/src/mage/sets/morningtide/Fertilid.java index 6b710ba91c0..3a9e5670b46 100644 --- a/Mage.Sets/src/mage/sets/morningtide/Fertilid.java +++ b/Mage.Sets/src/mage/sets/morningtide/Fertilid.java @@ -31,7 +31,7 @@ import java.util.UUID; /** * - * @author anonymous + * @author ilcartographer */ public class Fertilid extends mage.sets.commander.Fertilid { diff --git a/Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java b/Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java index 67397948b20..b111c600ed6 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java +++ b/Mage.Sets/src/mage/sets/ninthedition/ElvishBerserker.java @@ -38,7 +38,7 @@ import mage.constants.Rarity; /** * - * @author anonymous + * @author ilcartographer */ public class ElvishBerserker extends CardImpl { diff --git a/Mage.Sets/src/mage/sets/planechase/Fertilid.java b/Mage.Sets/src/mage/sets/planechase/Fertilid.java index 400a940838b..6a3a8489195 100644 --- a/Mage.Sets/src/mage/sets/planechase/Fertilid.java +++ b/Mage.Sets/src/mage/sets/planechase/Fertilid.java @@ -31,7 +31,7 @@ import java.util.UUID; /** * - * @author anonymous + * @author ilcartographer */ public class Fertilid extends mage.sets.commander.Fertilid { diff --git a/Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java b/Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java index 3ff69c63076..83ff3259f95 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java +++ b/Mage.Sets/src/mage/sets/tenthedition/ElvishBerserker.java @@ -31,7 +31,7 @@ import java.util.UUID; /** * - * @author anonymous + * @author ilcartographer */ public class ElvishBerserker extends mage.sets.ninthedition.ElvishBerserker {