From ac5a9435a70ebffdd2bac3a2f8d17684fb3f0d8d Mon Sep 17 00:00:00 2001 From: Marshall <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 11:48:01 -0400 Subject: [PATCH 01/14] 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 0000000000..a5b0844e71 --- /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 0000000000..67397948b2 --- /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 0000000000..3ff69c6307 --- /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 <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 12:30:57 -0400 Subject: [PATCH 02/14] 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 0000000000..1467954305 --- /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 0000000000..4c82968507 --- /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 0000000000..6b710ba91c --- /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 0000000000..400a940838 --- /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 <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 12:38:30 -0400 Subject: [PATCH 03/14] 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 4c82968507..310895d17a 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 <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 13:02:58 -0400 Subject: [PATCH 04/14] 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 0000000000..fbc90a4263 --- /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 <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 14:01:22 -0400 Subject: [PATCH 05/14] 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 fbc90a4263..2c771c192d 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 <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 14:13:45 -0400 Subject: [PATCH 06/14] 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 310895d17a..2ad4df8478 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 <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 14:27:21 -0400 Subject: [PATCH 07/14] 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 2c771c192d..3846e509d6 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 <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 14:32:12 -0400 Subject: [PATCH 08/14] 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 1467954305..df59cab005 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 2ad4df8478..ea820f44fe 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 3846e509d6..bed43711a4 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 a5b0844e71..1f8625c7cf 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 6b710ba91c..3a9e5670b4 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 67397948b2..b111c600ed 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 400a940838..6a3a848919 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 3ff69c6307..83ff3259f9 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 { From a0333eef8ff098e50c897a85fcd4756120149264 Mon Sep 17 00:00:00 2001 From: Marshall <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 18:06:04 -0400 Subject: [PATCH 09/14] Aquitect's Will implemented --- .../src/mage/sets/lorwyn/AquitectsWill.java | 131 ++++++++++++++++++ Mage/src/mage/counters/CounterType.java | 1 + 2 files changed, 132 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java diff --git a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java new file mode 100644 index 0000000000..9f700ffa37 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java @@ -0,0 +1,131 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.lorwyn; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author ilcartographer + */ +public class AquitectsWill extends CardImpl { + private static final String rule = "land is an Island in addition to its other types for as long as it has a flood counter on it."; + + public AquitectsWill(UUID ownerId) { + super(ownerId, 52, "Aquitect's Will", Rarity.COMMON, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{U}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Merfolk"); + + // Put a flood counter on target land. That land is an Island in addition to its other types for as long as it has a flood counter on it. If you control a Merfolk, draw a card. + this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.FLOOD.createInstance())); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + Effect effect = new AquitectsWillGainAbilityEffect( + new BlueManaAbility(), + Duration.Custom, rule); + this.getSpellAbility().addEffect(effect); + //this.getSpellAbility().addEffect(new AquitectsWillEffect()); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DrawCardSourceControllerEffect(1), + new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent("Merfolk", "Merfolk")), + "If you control a Merfolk, draw a card")); + } + + public AquitectsWill(final AquitectsWill card) { + super(card); + } + + @Override + public AquitectsWill copy() { + return new AquitectsWill(this); + } +} + +class AquitectsWillGainAbilityEffect extends GainAbilityTargetEffect { + + public AquitectsWillGainAbilityEffect(Ability ability, Duration duration, String rule) { + super(ability, duration, rule); + } + + public AquitectsWillGainAbilityEffect(final AquitectsWillGainAbilityEffect effect) { + super(effect); + } + + @Override + public boolean isInactive(Ability source, Game game) { + Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source)); + if (land != null && land.getCounters().getCount(CounterType.FLOOD) < 1) { + return true; + } + return false; + } + + @Override + public AquitectsWillGainAbilityEffect copy() { + return new AquitectsWillGainAbilityEffect(this); + } +} + +/* +class AquitectsWillEffect extends OneShotEffect { + + public AquitectsWillEffect() { + super(Outcome.DrawCard); + this.staticText = "If you control a Merfolk, draw a card."; + } + + public AquitectsWillEffect(final AquitectsWillEffect effect) { + super(effect); + } + + @Override + public AquitectsWillEffect copy() { + return new AquitectsWillEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } +}*/ diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 00e2fe3b4b..e446016fa6 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -53,6 +53,7 @@ public enum CounterType { FADE("fade"), FATE("fate"), FEATHER("feather"), + FLOOD("flood"), FUSE("fuse"), HATCHLING("hatchling"), HOOFPRINT("hoofprint"), From 6d036a60851ef621a01b90e500a7b82ea48d251f Mon Sep 17 00:00:00 2001 From: Marshall <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 18:10:46 -0400 Subject: [PATCH 10/14] Removed unused code --- .../src/mage/sets/lorwyn/AquitectsWill.java | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java index 9f700ffa37..fa89587594 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java +++ b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java @@ -59,13 +59,17 @@ public class AquitectsWill extends CardImpl { this.subtype.add("Merfolk"); // Put a flood counter on target land. That land is an Island in addition to its other types for as long as it has a flood counter on it. If you control a Merfolk, draw a card. + // Add the flood counter to target land this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.FLOOD.createInstance())); this.getSpellAbility().addTarget(new TargetLandPermanent()); + + // Add the Flood counter effect Effect effect = new AquitectsWillGainAbilityEffect( new BlueManaAbility(), Duration.Custom, rule); this.getSpellAbility().addEffect(effect); - //this.getSpellAbility().addEffect(new AquitectsWillEffect()); + + // Draw if you control a Merfolk this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DrawCardSourceControllerEffect(1), new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent("Merfolk", "Merfolk")), @@ -105,27 +109,4 @@ class AquitectsWillGainAbilityEffect extends GainAbilityTargetEffect { public AquitectsWillGainAbilityEffect copy() { return new AquitectsWillGainAbilityEffect(this); } -} - -/* -class AquitectsWillEffect extends OneShotEffect { - - public AquitectsWillEffect() { - super(Outcome.DrawCard); - this.staticText = "If you control a Merfolk, draw a card."; - } - - public AquitectsWillEffect(final AquitectsWillEffect effect) { - super(effect); - } - - @Override - public AquitectsWillEffect copy() { - return new AquitectsWillEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } -}*/ +} \ No newline at end of file From e5ef66a3cff7ed8a4c2d6554ec4eef0fd6b99b18 Mon Sep 17 00:00:00 2001 From: Marshall <ilcartographer90@gmail.com> Date: Sun, 14 Jun 2015 19:24:31 -0400 Subject: [PATCH 11/14] Added an additional parameter to BecomesBasicLandTargetEffect to allow it to keep it's other land types; Updated Aquitect's Will to actually make the card an island, not just granting it the mana ability --- .../src/mage/sets/lorwyn/AquitectsWill.java | 18 ++++++++---------- .../BecomesBasicLandTargetEffect.java | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java index fa89587594..ab30e1e44f 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java +++ b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java @@ -33,6 +33,7 @@ import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.mana.BlueManaAbility; @@ -64,10 +65,7 @@ public class AquitectsWill extends CardImpl { this.getSpellAbility().addTarget(new TargetLandPermanent()); // Add the Flood counter effect - Effect effect = new AquitectsWillGainAbilityEffect( - new BlueManaAbility(), - Duration.Custom, rule); - this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new AquitectsWillEffect(Duration.Custom, false, false, "Island")); // Draw if you control a Merfolk this.getSpellAbility().addEffect(new ConditionalOneShotEffect( @@ -86,13 +84,13 @@ public class AquitectsWill extends CardImpl { } } -class AquitectsWillGainAbilityEffect extends GainAbilityTargetEffect { +class AquitectsWillEffect extends BecomesBasicLandTargetEffect { - public AquitectsWillGainAbilityEffect(Ability ability, Duration duration, String rule) { - super(ability, duration, rule); + public AquitectsWillEffect(Duration duration, boolean chooseLandType, boolean loseType, String... landNames) { + super(duration, chooseLandType, loseType, landNames); } - public AquitectsWillGainAbilityEffect(final AquitectsWillGainAbilityEffect effect) { + public AquitectsWillEffect(final AquitectsWillEffect effect) { super(effect); } @@ -106,7 +104,7 @@ class AquitectsWillGainAbilityEffect extends GainAbilityTargetEffect { } @Override - public AquitectsWillGainAbilityEffect copy() { - return new AquitectsWillGainAbilityEffect(this); + public AquitectsWillEffect copy() { + return new AquitectsWillEffect(this); } } \ No newline at end of file diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java index 134bae4616..3cd7a1f11c 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java @@ -59,6 +59,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { protected boolean chooseLandType; protected ArrayList<String> landTypes = new ArrayList(); + protected boolean loseOther; // loses all other abilities, card types, and creature types public BecomesBasicLandTargetEffect(Duration duration) { this(duration, true, new String[0]); @@ -69,10 +70,15 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { } public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, String... landNames) { + this(duration, chooseLandType, true, landNames); + } + + public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, boolean loseOther, String... landNames) { super(duration, Outcome.Detriment); this.landTypes.addAll(Arrays.asList(landNames)); this.chooseLandType = chooseLandType; this.staticText = setText(); + this.loseOther = loseOther; } @@ -105,6 +111,19 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { this.discard(); } } + + if(!loseOther) { + for (UUID targetPermanent : targetPointer.getTargets(game, source)) { + Permanent land = game.getPermanent(targetPermanent); + if (land != null) { + for(String type : land.getSubtype()) { + if(!landTypes.contains(type)) { + landTypes.add(type); + } + } + } + } + } } @Override From 5cf5990251d24397ebfb8c8c4b609126df3ed145 Mon Sep 17 00:00:00 2001 From: Marshall <ilcartographer90@gmail.com> Date: Mon, 15 Jun 2015 20:48:56 -0400 Subject: [PATCH 12/14] Fertilid fix that actually lets the target player search library, not Fertilid's controller --- .../src/mage/sets/commander/Fertilid.java | 49 ++++++++++++++++++- .../search/SearchLibraryPutInPlayEffect.java | 4 +- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/commander/Fertilid.java b/Mage.Sets/src/mage/sets/commander/Fertilid.java index ea820f44fe..fd4d14ce21 100644 --- a/Mage.Sets/src/mage/sets/commander/Fertilid.java +++ b/Mage.Sets/src/mage/sets/commander/Fertilid.java @@ -36,12 +36,15 @@ 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.Card; 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.game.Game; +import mage.players.Player; import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; @@ -61,7 +64,7 @@ public class Fertilid extends CardImpl { // 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 ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new FertilidEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), new ManaCostsImpl("{1}{G}")); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); @@ -76,3 +79,47 @@ public class Fertilid extends CardImpl { return new Fertilid(this); } } + +class FertilidEffect extends SearchLibraryPutInPlayEffect { + + public FertilidEffect(TargetCardInLibrary target, boolean tapped, boolean forceShuffle) { + super(target, tapped, forceShuffle); + + this.staticText = "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 FertilidEffect(final FertilidEffect effect) { + super(effect); + } + + @Override + public FertilidEffect copy() { + return new FertilidEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + + if (player != null) { + if (player.searchLibrary(target, game)) { + if (target.getTargets().size() > 0) { + for (UUID cardId: target.getTargets()) { + Card card = player.getLibrary().getCard(cardId, game); + if (card != null) { + player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), tapped); + } + } + } + player.shuffleLibrary(game); + return true; + } + + if (forceShuffle) { + player.shuffleLibrary(game); + } + } + + return false; + } +} diff --git a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java b/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java index 01014677be..6776adcc8e 100644 --- a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java +++ b/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java @@ -45,8 +45,8 @@ import mage.target.common.TargetCardInLibrary; */ public class SearchLibraryPutInPlayEffect extends SearchEffect { - private boolean tapped; - private boolean forceShuffle; + protected boolean tapped; + protected boolean forceShuffle; public SearchLibraryPutInPlayEffect(TargetCardInLibrary target) { this(target, false, true, Outcome.PutCardInPlay); From 823002984afeb1ce9f6156dc5ff73d7f218eed57 Mon Sep 17 00:00:00 2001 From: Marshall <ilcartographer90@gmail.com> Date: Mon, 15 Jun 2015 21:06:19 -0400 Subject: [PATCH 13/14] Discarding the effect once the land has no more flood counters --- Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java index ab30e1e44f..7aeb233286 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java +++ b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java @@ -98,8 +98,10 @@ class AquitectsWillEffect extends BecomesBasicLandTargetEffect { public boolean isInactive(Ability source, Game game) { Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source)); if (land != null && land.getCounters().getCount(CounterType.FLOOD) < 1) { + this.discard(); return true; } + return false; } From 27880a59b4e18c81094a1db999fdc550be59f415 Mon Sep 17 00:00:00 2001 From: Marshall <ilcartographer90@gmail.com> Date: Mon, 15 Jun 2015 21:09:12 -0400 Subject: [PATCH 14/14] Removed unused imports --- Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java index 7aeb233286..b78e153907 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java +++ b/Mage.Sets/src/mage/sets/lorwyn/AquitectsWill.java @@ -31,12 +31,9 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration;