From ee6d3c0fc94a336807bd9ab40afbe8fd44dbdea2 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 09:55:47 -0400 Subject: [PATCH 01/11] fixed Mistbind Clique not triggering on championing of Mutavault --- Mage.Sets/src/mage/cards/m/MistbindClique.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/m/MistbindClique.java b/Mage.Sets/src/mage/cards/m/MistbindClique.java index 076bd47680..2081aa056b 100644 --- a/Mage.Sets/src/mage/cards/m/MistbindClique.java +++ b/Mage.Sets/src/mage/cards/m/MistbindClique.java @@ -108,7 +108,7 @@ class MistbindCliqueAbility extends ZoneChangeTriggeredAbility { && event.getSourceId().equals(getSourceId()) && !event.getSourceId().equals(event.getTargetId())) { Permanent sacrificed = game.getPermanentOrLKIBattlefield(event.getTargetId()); - if (sacrificed != null && sacrificed.hasSubtype(SubType.FAERIE, game)) { + if (sacrificed != null) {// no longer checks for Faerie as LKI isn't always accurate, can't think of how that could matter anyway - TheElk801 return true; } } From a8bce9302371dce7a07c755aacf9be2bfdd698cb Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 10:11:42 -0400 Subject: [PATCH 02/11] fixed Dual Nature giving tokens to the wrong player --- Mage.Sets/src/mage/cards/d/DualNature.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/d/DualNature.java b/Mage.Sets/src/mage/cards/d/DualNature.java index 23da3a3638..3080786093 100644 --- a/Mage.Sets/src/mage/cards/d/DualNature.java +++ b/Mage.Sets/src/mage/cards/d/DualNature.java @@ -112,7 +112,7 @@ class DualNatureCreateTokenEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); if (permanent != null) { CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(permanent.getControllerId()); effect.setTargetPointer(targetPointer); From 38f83c84f6e14dbe673c60b949b4beb6337827f3 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 10:32:11 -0400 Subject: [PATCH 03/11] Implemented Rimefeather Owl --- .../src/mage/cards/r/RimefeatherOwl.java | 140 ++++++++++++++++++ Mage.Sets/src/mage/sets/Coldsnap.java | 1 + 2 files changed, 141 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RimefeatherOwl.java diff --git a/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java b/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java new file mode 100644 index 0000000000..9e89292b85 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java @@ -0,0 +1,140 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public class RimefeatherOwl extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Permanents with ice counters on them"); + private static final FilterPermanent filter2 = new FilterPermanent("snow permanents on the battlefield"); + + static { + filter.add(Predicates.not(new CounterPredicate(CounterType.ICE))); + filter2.add(Predicates.not(new SupertypePredicate(SuperType.SNOW))); + } + + public RimefeatherOwl(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Rimefeather Owl's power and toughness are each equal to the number of snow permanents on the battlefield. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter2), Duration.EndOfGame))); + + // {1}{snow}: Put an ice counter on target permanent. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.ICE.createInstance()), new ManaCostsImpl("{1}{S}")); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + + // Permanents with ice counters on them are snow. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RimefeatherOwlEffect(Duration.WhileOnBattlefield, filter))); + } + + public RimefeatherOwl(final RimefeatherOwl card) { + super(card); + } + + @Override + public RimefeatherOwl copy() { + return new RimefeatherOwl(this); + } +} + +class RimefeatherOwlEffect extends ContinuousEffectImpl { + + private final FilterPermanent filter; + + public RimefeatherOwlEffect(Duration duration, FilterPermanent filter) { + super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment); + this.filter = filter; + } + + public RimefeatherOwlEffect(final RimefeatherOwlEffect effect) { + super(effect); + this.filter = effect.filter; + } + + @Override + public RimefeatherOwlEffect copy() { + return new RimefeatherOwlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + permanent.addSuperType(SuperType.SNOW); + + } + return true; + } + + @Override + public String getText(Mode mode) { + return "All nonland permanents are legendary"; + } +} diff --git a/Mage.Sets/src/mage/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index 0636461c80..60a4328d23 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -141,6 +141,7 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Resize", 117, Rarity.UNCOMMON, mage.cards.r.Resize.class)); cards.add(new SetCardInfo("Rimebound Dead", 69, Rarity.COMMON, mage.cards.r.RimeboundDead.class)); cards.add(new SetCardInfo("Rime Transfusion", 68, Rarity.UNCOMMON, mage.cards.r.RimeTransfusion.class)); + cards.add(new SetCardInfo("Rimefeather Owl", 42, Rarity.RARE, mage.cards.r.RimefeatherOwl.class)); cards.add(new SetCardInfo("Rimescale Dragon", 95, Rarity.RARE, mage.cards.r.RimescaleDragon.class)); cards.add(new SetCardInfo("Rimewind Cryomancer", 43, Rarity.UNCOMMON, mage.cards.r.RimewindCryomancer.class)); cards.add(new SetCardInfo("Rimewind Taskmage", 44, Rarity.COMMON, mage.cards.r.RimewindTaskmage.class)); From 9384bf8df4f68d14c009df92eb69609b5025c988 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 11:40:10 -0400 Subject: [PATCH 04/11] Implemented Apocalypse Sanctuaries --- Mage.Sets/src/mage/cards/a/AnaSanctuary.java | 101 ++++++++++++++++++ Mage.Sets/src/mage/cards/c/CetaSanctuary.java | 80 ++------------ Mage.Sets/src/mage/cards/d/DegaSanctuary.java | 65 +++++++++++ .../src/mage/cards/n/NecraSanctuary.java | 67 ++++++++++++ Mage.Sets/src/mage/cards/r/RakaSanctuary.java | 67 ++++++++++++ Mage.Sets/src/mage/sets/Apocalypse.java | 4 + .../common/SanctuaryTriggeredAbility.java | 80 ++++++++++++++ 7 files changed, 393 insertions(+), 71 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/a/AnaSanctuary.java create mode 100644 Mage.Sets/src/mage/cards/d/DegaSanctuary.java create mode 100644 Mage.Sets/src/mage/cards/n/NecraSanctuary.java create mode 100644 Mage.Sets/src/mage/cards/r/RakaSanctuary.java create mode 100644 Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java diff --git a/Mage.Sets/src/mage/cards/a/AnaSanctuary.java b/Mage.Sets/src/mage/cards/a/AnaSanctuary.java new file mode 100644 index 0000000000..8b8584ecba --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AnaSanctuary.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.a; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public class AnaSanctuary extends CardImpl { + + public AnaSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // At the beginning of your upkeep, if you control a blue or black permanent, target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead. + Ability ability = new SanctuaryTriggeredAbility( + new BoostEffect(1), new BoostEffect(5), ObjectColor.BLACK, ObjectColor.BLUE, + "At the beginning of your upkeep, if you control a blue or black permanent, " + + "target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead." + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public AnaSanctuary(final AnaSanctuary card) { + super(card); + } + + @Override + public AnaSanctuary copy() { + return new AnaSanctuary(this); + } +} + +class BoostEffect extends OneShotEffect { + + private final int amount; + + BoostEffect(int amount) { + super(Outcome.Benefit); + this.amount = amount; + } + + BoostEffect(final BoostEffect effect) { + super(effect); + this.amount = effect.amount; + } + + @Override + public BoostEffect copy() { + return new BoostEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + ContinuousEffect effect = new BoostTargetEffect(amount, amount, Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + game.addEffect(effect, source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CetaSanctuary.java b/Mage.Sets/src/mage/cards/c/CetaSanctuary.java index ef3a88fc4d..7a126b0743 100644 --- a/Mage.Sets/src/mage/cards/c/CetaSanctuary.java +++ b/Mage.Sets/src/mage/cards/c/CetaSanctuary.java @@ -30,44 +30,28 @@ package mage.cards.c; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.DrawDiscardControllerEffect; 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.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * - * @author Pete Rossi + * @author TheElk801 */ public class CetaSanctuary extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("a red or green permanent"); - - static { - filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN))); - } - public CetaSanctuary(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); // At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card. - TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CetaSanctuaryEffect(), TargetController.YOU, true); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), - "At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card.")); - + Ability ability = new SanctuaryTriggeredAbility( + new DrawDiscardControllerEffect(1, 1), new DrawDiscardControllerEffect(2, 1), ObjectColor.GREEN, ObjectColor.RED, + "At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. " + + "If you control a red permanent and a green permanent, instead draw two cards, then discard a card." + ); + this.addAbility(ability); } public CetaSanctuary(final CetaSanctuary card) { @@ -79,49 +63,3 @@ public class CetaSanctuary extends CardImpl { return new CetaSanctuary(this); } } - -class CetaSanctuaryEffect extends OneShotEffect { - - public CetaSanctuaryEffect() { - super(Outcome.DrawCard); - } - - public CetaSanctuaryEffect(final CetaSanctuaryEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - int red = 0; - int green = 0; - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { - ObjectColor color = permanent.getColor(game); - if (color.isRed()) { - red = 1; - } - if (color.isGreen()) { - green = 1; - } - - if (red == 1 && green == 1) { - break; - } - } - - if (red != 0 || green != 0) { - controller.drawCards((red + green), game); - controller.discard(1, false, source, game); - return true; - } - } - return false; - - } - - @Override - public CetaSanctuaryEffect copy() { - return new CetaSanctuaryEffect(this); - } -} diff --git a/Mage.Sets/src/mage/cards/d/DegaSanctuary.java b/Mage.Sets/src/mage/cards/d/DegaSanctuary.java new file mode 100644 index 0000000000..67141fe4cb --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DegaSanctuary.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.cards.d; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class DegaSanctuary extends CardImpl { + + public DegaSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + // At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. If you control a black permanent and a red permanent, you gain 4 life instead. + Ability ability = new SanctuaryTriggeredAbility( + new GainLifeEffect(2), new GainLifeEffect(4), ObjectColor.BLACK, ObjectColor.RED, + "At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. " + + "If you control a black permanent and a red permanent, you gain 4 life instead." + ); + this.addAbility(ability); + } + + public DegaSanctuary(final DegaSanctuary card) { + super(card); + } + + @Override + public DegaSanctuary copy() { + return new DegaSanctuary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/n/NecraSanctuary.java b/Mage.Sets/src/mage/cards/n/NecraSanctuary.java new file mode 100644 index 0000000000..0658d639c7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NecraSanctuary.java @@ -0,0 +1,67 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.n; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class NecraSanctuary extends CardImpl { + + public NecraSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + + // At the beginning of your upkeep, if you control a green or white permanent, target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead. + Ability ability = new SanctuaryTriggeredAbility( + new LoseLifeTargetEffect(1), new LoseLifeTargetEffect(3), ObjectColor.GREEN, ObjectColor.WHITE, + "At the beginning of your upkeep, if you control a green or white permanent, " + + "target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead." + ); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public NecraSanctuary(final NecraSanctuary card) { + super(card); + } + + @Override + public NecraSanctuary copy() { + return new NecraSanctuary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RakaSanctuary.java b/Mage.Sets/src/mage/cards/r/RakaSanctuary.java new file mode 100644 index 0000000000..2ee93f4a45 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RakaSanctuary.java @@ -0,0 +1,67 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class RakaSanctuary extends CardImpl { + + public RakaSanctuary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + // At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead. + Ability ability = new SanctuaryTriggeredAbility( + new DamageTargetEffect(1), new DamageTargetEffect(3), ObjectColor.WHITE, ObjectColor.BLUE, + "At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. " + + "If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead." + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public RakaSanctuary(final RakaSanctuary card) { + super(card); + } + + @Override + public RakaSanctuary copy() { + return new RakaSanctuary(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Apocalypse.java b/Mage.Sets/src/mage/sets/Apocalypse.java index 122dc92c5c..4bd813e5bd 100644 --- a/Mage.Sets/src/mage/sets/Apocalypse.java +++ b/Mage.Sets/src/mage/sets/Apocalypse.java @@ -24,6 +24,7 @@ public class Apocalypse extends ExpansionSet { this.ratioBoosterMythic = 0; cards.add(new SetCardInfo("Aether Mutation", 91, Rarity.UNCOMMON, mage.cards.a.AetherMutation.class)); cards.add(new SetCardInfo("Ana Disciple", 73, Rarity.COMMON, mage.cards.a.AnaDisciple.class)); + cards.add(new SetCardInfo("Ana Sanctuary", 74, Rarity.UNCOMMON, mage.cards.a.AnaSanctuary.class)); cards.add(new SetCardInfo("Anavolver", 75, Rarity.RARE, mage.cards.a.Anavolver.class)); cards.add(new SetCardInfo("Angelfire Crusader", 1, Rarity.COMMON, mage.cards.a.AngelfireCrusader.class)); cards.add(new SetCardInfo("Battlefield Forge", 139, Rarity.RARE, mage.cards.b.BattlefieldForge.class)); @@ -45,6 +46,7 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Death Grasp", 95, Rarity.RARE, mage.cards.d.DeathGrasp.class)); cards.add(new SetCardInfo("Death Mutation", 96, Rarity.UNCOMMON, mage.cards.d.DeathMutation.class)); cards.add(new SetCardInfo("Dega Disciple", 4, Rarity.COMMON, mage.cards.d.DegaDisciple.class)); + cards.add(new SetCardInfo("Dega Sanctuary", 5, Rarity.UNCOMMON, mage.cards.d.DegaSanctuary.class)); cards.add(new SetCardInfo("Degavolver", 6, Rarity.RARE, mage.cards.d.Degavolver.class)); cards.add(new SetCardInfo("Desolation Angel", 38, Rarity.RARE, mage.cards.d.DesolationAngel.class)); cards.add(new SetCardInfo("Desolation Giant", 59, Rarity.RARE, mage.cards.d.DesolationGiant.class)); @@ -99,6 +101,7 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Mournful Zombie", 43, Rarity.COMMON, mage.cards.m.MournfulZombie.class)); cards.add(new SetCardInfo("Mystic Snake", 112, Rarity.RARE, mage.cards.m.MysticSnake.class)); cards.add(new SetCardInfo("Necra Disciple", 44, Rarity.COMMON, mage.cards.n.NecraDisciple.class)); + cards.add(new SetCardInfo("Necra Sanctuary", 45, Rarity.UNCOMMON, mage.cards.n.NecraSanctuary.class)); cards.add(new SetCardInfo("Necravolver", 46, Rarity.RARE, mage.cards.n.Necravolver.class)); cards.add(new SetCardInfo("Night // Day", 131, Rarity.UNCOMMON, mage.cards.n.NightDay.class)); cards.add(new SetCardInfo("Order // Chaos", 132, Rarity.UNCOMMON, mage.cards.o.OrderChaos.class)); @@ -118,6 +121,7 @@ public class Apocalypse extends ExpansionSet { cards.add(new SetCardInfo("Quagmire Druid", 51, Rarity.COMMON, mage.cards.q.QuagmireDruid.class)); cards.add(new SetCardInfo("Quicksilver Dagger", 118, Rarity.COMMON, mage.cards.q.QuicksilverDagger.class)); cards.add(new SetCardInfo("Raka Disciple", 66, Rarity.COMMON, mage.cards.r.RakaDisciple.class)); + cards.add(new SetCardInfo("Raka Sanctuary", 67, Rarity.UNCOMMON, mage.cards.r.RakaSanctuary.class)); cards.add(new SetCardInfo("Rakavolver", 68, Rarity.RARE, mage.cards.r.Rakavolver.class)); cards.add(new SetCardInfo("Razorfin Hunter", 119, Rarity.COMMON, mage.cards.r.RazorfinHunter.class)); cards.add(new SetCardInfo("Reef Shaman", 29, Rarity.COMMON, mage.cards.r.ReefShaman.class)); diff --git a/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java new file mode 100644 index 0000000000..9023e003cb --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java @@ -0,0 +1,80 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.abilities.common; + +import mage.ObjectColor; +import mage.abilities.TriggeredAbility; +import mage.abilities.condition.CompoundCondition; +import mage.abilities.condition.Condition; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author TheElk801 + */ +public class SanctuaryTriggeredAbility extends ConditionalTriggeredAbility { + + private static Condition makeOrCondition(ObjectColor color1, ObjectColor color2) { + FilterPermanent filter = new FilterPermanent(); + filter.add(Predicates.or( + new ColorPredicate(color1), + new ColorPredicate(color2) + )); + return new PermanentsOnTheBattlefieldCondition(filter); + } + + private static Condition makeAndCondition(ObjectColor color1, ObjectColor color2) { + FilterPermanent filter1 = new FilterPermanent(); + filter1.add(new ColorPredicate(color1)); + Condition condition1 = new PermanentsOnTheBattlefieldCondition(filter1); + FilterPermanent filter2 = new FilterPermanent(); + filter2.add(new ColorPredicate(color2)); + Condition condition2 = new PermanentsOnTheBattlefieldCondition(filter2); + return new CompoundCondition(condition1, condition2); + } + + private static TriggeredAbility makeTrigger(OneShotEffect effect1, OneShotEffect effect2, ObjectColor color1, ObjectColor color2) { + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility( + new ConditionalOneShotEffect(effect1, new InvertCondition(makeAndCondition(color1, color2))), TargetController.YOU, false + ); + ability.addEffect(new ConditionalOneShotEffect(effect2, makeAndCondition(color1, color2))); + return ability; + } + + public SanctuaryTriggeredAbility(OneShotEffect effect1, OneShotEffect effect2, ObjectColor color1, ObjectColor color2, String text) { + super(makeTrigger(effect1, effect2, color1, color2), makeOrCondition(color1, color2), text); + } +} From fe23e227a6e36f3a6ebe0b4518c93f7f3f3f8d71 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 14:11:11 -0400 Subject: [PATCH 05/11] fixed Ixalan booster count --- Mage.Sets/src/mage/sets/Ixalan.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index d75998cc27..03a3a24910 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -27,7 +27,7 @@ public class Ixalan extends ExpansionSet { this.hasBoosters = true; this.hasBasicLands = true; this.numBoosterLands = 1; - this.numBoosterCommon = 11; + this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 8; From c264817f4e986586ed4a2ec6ffe8e2e01c11cd7b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 14:49:57 -0400 Subject: [PATCH 06/11] fixed Admiral Beckett Brass not triggering correctly when cloned --- .../src/mage/cards/a/AdmiralBeckettBrass.java | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java index 84b6dcd8c1..6e97c7ab13 100644 --- a/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java +++ b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java @@ -65,12 +65,13 @@ import mage.watchers.Watcher; */ public class AdmiralBeckettBrass extends CardImpl { - private final UUID originalId; private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other Pirates you control"); + private static final FilterNonlandPermanent filter2 = new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn"); static { filter.add(new SubtypePredicate(SubType.PIRATE)); filter.add(new ControllerPredicate(TargetController.YOU)); + filter2.add(new ControllerDealtDamageByPiratesPredicate()); } public AdmiralBeckettBrass(UUID ownerId, CardSetInfo setInfo) { @@ -87,25 +88,12 @@ public class AdmiralBeckettBrass extends CardImpl { // At the beginning of your end step, gain control of target nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn. Ability ability = new BeginningOfEndStepTriggeredAbility(new GainControlTargetEffect(Duration.Custom), TargetController.YOU, false); - ability.addTarget(new TargetNonlandPermanent(new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn"))); - originalId = ability.getOriginalId(); + ability.addTarget(new TargetNonlandPermanent(filter2)); this.addAbility(ability, new DamagedByPiratesWatcher()); } public AdmiralBeckettBrass(final AdmiralBeckettBrass card) { super(card); - this.originalId = card.originalId; - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - ability.getTargets().clear(); - FilterNonlandPermanent playerFilter = new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn"); - playerFilter.add(new ControllerDealtDamageByPiratesPredicate()); - TargetNonlandPermanent target = new TargetNonlandPermanent(1, 1, playerFilter, true); - ability.addTarget(target); - } } @Override From ad1c3ae79a66b16cbe0de3b5ca0042d4fbc06a26 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 14:59:47 -0400 Subject: [PATCH 07/11] small nonfunctional change to Mathas, Fiend Seeker --- Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java b/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java index 5e9422278a..60a0c81692 100644 --- a/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java +++ b/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java @@ -83,9 +83,7 @@ public class MathasFiendSeeker extends CardImpl { ability.addTarget(new TargetCreaturePermanent(filter)); Ability ability2 = new DiesTriggeredAbility(new DrawCardAllEffect(1, TargetController.OPPONENT)); ability2.addEffect(new OpponentsGainLifeEffect()); - Effect effect = new MathasFiendSeekerGainAbilityEffect( - ability2, - Duration.Custom, rule); + Effect effect = new MathasFiendSeekerGainAbilityEffect(ability2, Duration.Custom, rule); ability.addEffect(effect); this.addAbility(ability); } @@ -112,8 +110,8 @@ class MathasFiendSeekerGainAbilityEffect extends GainAbilityTargetEffect { @Override public boolean isInactive(Ability source, Game game) { - Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source)); - if (land != null && land.getCounters(game).getCount(CounterType.BOUNTY) < 1) { + Permanent creature = game.getPermanent(this.targetPointer.getFirst(game, source)); + if (creature != null && creature.getCounters(game).getCount(CounterType.BOUNTY) < 1) { return true; } return false; @@ -129,7 +127,7 @@ class OpponentsGainLifeEffect extends OneShotEffect { public OpponentsGainLifeEffect() { super(Outcome.GainLife); - staticText = "Each opponent gains 2 life."; + staticText = "and gains 2 life."; } public OpponentsGainLifeEffect(final OpponentsGainLifeEffect effect) { From cfb7ba82fb5e86e62db38aea00870233cb93f7c9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Sep 2017 21:17:14 -0400 Subject: [PATCH 08/11] changed how Hope of Ghirapur's ability works, making it copiable --- .../src/mage/cards/h/HopeOfGhirapur.java | 73 ++++++++----------- 1 file changed, 31 insertions(+), 42 deletions(-) diff --git a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java index 07c212e770..7111d06e4d 100644 --- a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java +++ b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java @@ -33,7 +33,6 @@ import java.util.Set; import java.util.UUID; import mage.MageInt; import mage.MageObject; -import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -44,7 +43,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterPlayer; -import mage.filter.predicate.Predicate; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; @@ -59,6 +59,12 @@ import mage.watchers.Watcher; */ public class HopeOfGhirapur extends CardImpl { + private static final FilterPlayer filter = new FilterPlayer("player who was dealt combat damage by {this} this turn"); + + static { + filter.add(new HopeOfGhirapurPlayerLostLifePredicate()); + } + public HopeOfGhirapur(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); @@ -70,28 +76,10 @@ public class HopeOfGhirapur extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - //TODO: Make ability properly copiable // Sacrifice Hope of Ghirapur: Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HopeOfGhirapurCantCastEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayer(1, 1, false, filter)); this.addAbility(ability, new HopeOfGhirapurCombatDamageWatcher()); - - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SimpleActivatedAbility) { - if (!ability.getEffects().isEmpty() && (ability.getEffects().get(0) instanceof HopeOfGhirapurCantCastEffect)) { - MageObject sourceObject = ability.getSourceObject(game); - if (sourceObject != null) { - ability.getTargets().clear(); - FilterPlayer playerFilter = new FilterPlayer("player who was dealt combat damage by " + sourceObject.getIdName() + " this turn"); - MageObjectReference sourceReference = new MageObjectReference(ability.getSourceId(), ability.getSourceObjectZoneChangeCounter(), game); - playerFilter.add(new HopeOfGhirapurPlayerLostLifePredicate(sourceReference)); - ability.addTarget(new TargetPlayer(1, 1, false, playerFilter)); - } - } - } } public HopeOfGhirapur(final HopeOfGhirapur card) { @@ -152,19 +140,20 @@ class HopeOfGhirapurCantCastEffect extends ContinuousRuleModifyingEffectImpl { } } -class HopeOfGhirapurPlayerLostLifePredicate implements Predicate { +class HopeOfGhirapurPlayerLostLifePredicate implements ObjectSourcePlayerPredicate> { - private final MageObjectReference sourceReference; - - public HopeOfGhirapurPlayerLostLifePredicate(MageObjectReference sourceReference) { - this.sourceReference = sourceReference; + public HopeOfGhirapurPlayerLostLifePredicate() { } @Override - public boolean apply(Player input, Game game) { + public boolean apply(ObjectSourcePlayer input, Game game) { + Player targetPlayer = input.getObject(); + if (targetPlayer == null) { + return false; + } HopeOfGhirapurCombatDamageWatcher watcher = (HopeOfGhirapurCombatDamageWatcher) game.getState().getWatchers().get(HopeOfGhirapurCombatDamageWatcher.class.getSimpleName()); if (watcher != null) { - return watcher.playerGotCombatDamage(sourceReference, input.getId()); + return watcher.playerGotCombatDamage(input.getSourceId(), input.getObject().getId()); } return false; } @@ -172,7 +161,7 @@ class HopeOfGhirapurPlayerLostLifePredicate implements Predicate { class HopeOfGhirapurCombatDamageWatcher extends Watcher { - private final HashMap> combatDamagedPlayers = new HashMap<>(); + private final HashMap> combatDamagedPlayers = new HashMap<>(); public HopeOfGhirapurCombatDamageWatcher() { super(HopeOfGhirapurCombatDamageWatcher.class.getSimpleName(), WatcherScope.GAME); @@ -180,10 +169,10 @@ class HopeOfGhirapurCombatDamageWatcher extends Watcher { public HopeOfGhirapurCombatDamageWatcher(final HopeOfGhirapurCombatDamageWatcher watcher) { super(watcher); - for (MageObjectReference sourceReference : watcher.combatDamagedPlayers.keySet()) { + for (UUID damagerId : watcher.combatDamagedPlayers.keySet()) { Set players = new HashSet<>(); - players.addAll(watcher.combatDamagedPlayers.get(sourceReference)); - this.combatDamagedPlayers.put(sourceReference, players); + players.addAll(watcher.combatDamagedPlayers.get(damagerId)); + this.combatDamagedPlayers.put(damagerId, players); } } @@ -195,29 +184,29 @@ class HopeOfGhirapurCombatDamageWatcher extends Watcher { @Override public void watch(GameEvent event, Game game) { if (event.getType() == EventType.DAMAGED_PLAYER && ((DamagedPlayerEvent) event).isCombatDamage()) { - MageObjectReference sourceReference = new MageObjectReference(event.getSourceId(), game); + UUID damagerId = event.getSourceId(); Set players; - if (combatDamagedPlayers.containsKey(sourceReference)) { - players = combatDamagedPlayers.get(sourceReference); + if (combatDamagedPlayers.containsKey(damagerId)) { + players = combatDamagedPlayers.get(damagerId); } else { players = new HashSet<>(); - combatDamagedPlayers.put(sourceReference, players); + combatDamagedPlayers.put(damagerId, players); } players.add(event.getTargetId()); } } /** - * Checks if the current object has damaged the player during - * the current turn. + * Checks if the current object has damaged the player during the current + * turn. * - * @param objectReference + * @param objectId * @param playerId * @return */ - public boolean playerGotCombatDamage(MageObjectReference objectReference, UUID playerId) { - if (combatDamagedPlayers.containsKey(objectReference)) { - return combatDamagedPlayers.get(objectReference).contains(playerId); + public boolean playerGotCombatDamage(UUID objectId, UUID playerId) { + if (combatDamagedPlayers.containsKey(objectId)) { + return combatDamagedPlayers.get(objectId).contains(playerId); } return false; } From 0b3c24949f5ef21544b1d88ee9794532083e8ec5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 22 Sep 2017 10:00:29 +0200 Subject: [PATCH 09/11] Added Ixalan set to the supported sets for image download by wizard source. --- .gitignore | 1 - .../dl/sources/WizardCardsImageSource.java | 20 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 9e68d19ddd..c14e808037 100644 --- a/.gitignore +++ b/.gitignore @@ -132,4 +132,3 @@ Mage.Client/serverlist.txt client_secrets.json dependency-reduced-pom.xml -/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/ \ No newline at end of file diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java index 50bf2c99ca..5ea83188bf 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java @@ -257,16 +257,16 @@ public enum WizardCardsImageSource implements CardImageSource { supportedSets.add("E01"); supportedSets.add("HOU"); supportedSets.add("C17"); -// supportedSets.add("XLN"); -// supportedSets.add("DDT"); -// supportedSets.add("IMA"); -// supportedSets.add("E02"); -// supportedSets.add("V17"); -// supportedSets.add("UST"); -// supportedSets.add("RIX"); -// supportedSets.add("A25"); -// supportedSets.add("DOM"); -// supportedSets.add("M19"); + supportedSets.add("XLN"); +// supportedSets.add("DDT"); // Duel Decks: Merfolk vs. Goblins +// supportedSets.add("IMA"); // Iconic Msters +// supportedSets.add("E02"); // Explorers of Ixalan +// supportedSets.add("V17"); // From the Vault: Transform +// supportedSets.add("UST"); // Unstable +// supportedSets.add("RIX"); // Rivals of Ixalan +// supportedSets.add("A25"); // Masters 25 +// supportedSets.add("DOM"); // Dominaria +// supportedSets.add("M19"); // Core 2019 sets = new HashMap<>(); setsAliases = new HashMap<>(); From cd31a94ed2360c1de9da35409bba556a6b797906 Mon Sep 17 00:00:00 2001 From: igoudt Date: Fri, 22 Sep 2017 14:27:49 +0200 Subject: [PATCH 10/11] text fixes, gatecreeper vine etb is optional --- Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java | 5 +++-- Mage.Sets/src/mage/cards/b/BrassTalonChimera.java | 1 + Mage.Sets/src/mage/cards/b/BullElephant.java | 5 +++-- .../src/mage/cards/c/CultivatorOfBlades.java | 9 +++++---- Mage.Sets/src/mage/cards/f/FierceEmpath.java | 7 ++++--- Mage.Sets/src/mage/cards/f/Fork.java | 15 ++++----------- Mage.Sets/src/mage/cards/g/GatecreeperVine.java | 5 +++-- Mage.Sets/src/mage/cards/g/GoblinWarchief.java | 5 +++-- Mage.Sets/src/mage/cards/g/GuildFeud.java | 5 +++-- Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java | 5 +++-- Mage.Sets/src/mage/cards/j/JelennSphinx.java | 12 ++++++------ Mage.Sets/src/mage/cards/k/KatabaticWinds.java | 7 ++++--- Mage.Sets/src/mage/cards/l/LivingLands.java | 5 +++-- Mage.Sets/src/mage/cards/m/MagewrightsStone.java | 5 +++-- Mage.Sets/src/mage/cards/m/Manabond.java | 9 +++++---- Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java | 5 +++-- Mage.Sets/src/mage/cards/o/OblivionRing.java | 5 +++-- Mage.Sets/src/mage/cards/o/OddsEnds.java | 6 +++--- Mage.Sets/src/mage/cards/o/OrcishOriflamme.java | 7 ++++--- Mage.Sets/src/mage/cards/p/PlagueRats.java | 7 ++++--- Mage.Sets/src/mage/cards/p/PureSimple.java | 5 +++-- Mage.Sets/src/mage/cards/q/QuirionRanger.java | 5 +++-- .../src/mage/cards/r/RecurringNightmare.java | 5 +++-- .../src/mage/cards/s/SkirkDrillSergeant.java | 5 +++-- .../src/mage/cards/s/SunspireGatekeepers.java | 5 +++-- .../src/mage/cards/s/SurvivalOfTheFittest.java | 5 +++-- Mage.Sets/src/mage/cards/t/TemporaryInsanity.java | 7 ++++--- .../src/mage/cards/v/VerduranEnchantress.java | 5 +++-- Mage.Sets/src/mage/cards/w/WoodElves.java | 5 +++-- Mage/src/main/java/mage/filter/StaticFilters.java | 2 +- 30 files changed, 99 insertions(+), 80 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java b/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java index 540df39df1..71387fcbb9 100644 --- a/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java +++ b/Mage.Sets/src/mage/cards/b/BraidsCabalMinion.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.common.SacrificeEffect; @@ -38,13 +37,15 @@ import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; +import java.util.UUID; + /** * * @author cbt33, North (Karma) */ public class BraidsCabalMinion extends CardImpl { - static final FilterPermanent filter = new FilterPermanent("artifact, creature, or land"); + static final FilterPermanent filter = new FilterPermanent("an artifact, creature, or land"); static { filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), diff --git a/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java b/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java index 03f74c44b2..fc3b22aba5 100644 --- a/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java +++ b/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java @@ -73,6 +73,7 @@ public class BrassTalonChimera extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); ability.addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield)); ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); } public BrassTalonChimera(final BrassTalonChimera card) { diff --git a/Mage.Sets/src/mage/cards/b/BullElephant.java b/Mage.Sets/src/mage/cards/b/BullElephant.java index 0351b1fc0f..8ad3fdc609 100644 --- a/Mage.Sets/src/mage/cards/b/BullElephant.java +++ b/Mage.Sets/src/mage/cards/b/BullElephant.java @@ -1,6 +1,5 @@ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; @@ -13,9 +12,11 @@ import mage.filter.common.FilterControlledLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + public class BullElephant extends CardImpl { - private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("two forests you control"); + private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("Forests you control"); static { controlledForest.add(new SubtypePredicate(SubType.FOREST)); diff --git a/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java b/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java index 981b95d857..d5acad521d 100644 --- a/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java +++ b/Mage.Sets/src/mage/cards/c/CultivatorOfBlades.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; @@ -36,9 +35,11 @@ import mage.abilities.keyword.FabricateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.common.FilterAttackingCreature; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -57,7 +58,7 @@ public class CultivatorOfBlades extends CardImpl { this.addAbility(new FabricateAbility(2)); // Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power. - this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, new FilterAttackingCreature(), true, true), + this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true, true), true, "Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power.")); } diff --git a/Mage.Sets/src/mage/cards/f/FierceEmpath.java b/Mage.Sets/src/mage/cards/f/FierceEmpath.java index f427161d05..d03a0fbd00 100644 --- a/Mage.Sets/src/mage/cards/f/FierceEmpath.java +++ b/Mage.Sets/src/mage/cards/f/FierceEmpath.java @@ -27,26 +27,27 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.ComparisonType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 */ public class FierceEmpath extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with converted mana cost 6 or greater"); + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 6 or greater"); static { filter.add(new ConvertedManaCostPredicate(ComparisonType.MORE_THAN, 5)); } diff --git a/Mage.Sets/src/mage/cards/f/Fork.java b/Mage.Sets/src/mage/cards/f/Fork.java index 84bcec8ee7..ceabe8744d 100644 --- a/Mage.Sets/src/mage/cards/f/Fork.java +++ b/Mage.Sets/src/mage/cards/f/Fork.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; @@ -35,34 +34,28 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; import mage.players.Player; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author jeffwadsworth */ public class Fork extends CardImpl { - private static final FilterSpell filter = new FilterSpell("target instant or sorcery spell"); - - static { - filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), - new CardTypePredicate(CardType.SORCERY))); - } public Fork(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}"); // Copy target instant or sorcery spell, except that the copy is red. You may choose new targets for the copy. this.getSpellAbility().addEffect(new ForkEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL)); } diff --git a/Mage.Sets/src/mage/cards/g/GatecreeperVine.java b/Mage.Sets/src/mage/cards/g/GatecreeperVine.java index 1b42934a58..7cb613c6d1 100644 --- a/Mage.Sets/src/mage/cards/g/GatecreeperVine.java +++ b/Mage.Sets/src/mage/cards/g/GatecreeperVine.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; @@ -44,6 +43,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -72,7 +73,7 @@ public class GatecreeperVine extends CardImpl { // When Gatecreeper Vine enters the battlefield, you may search your library for a basic land card or a Gate card, reveal it, put it into your hand, then shuffle your library. TargetCardInLibrary target = new TargetCardInLibrary(filter); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); } public GatecreeperVine(final GatecreeperVine card) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinWarchief.java b/Mage.Sets/src/mage/cards/g/GoblinWarchief.java index 2d79eade95..0b0fa0f4be 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWarchief.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWarchief.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -43,6 +42,8 @@ import mage.filter.FilterCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author jonubuu @@ -50,7 +51,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; public class GoblinWarchief extends CardImpl { private static final FilterCard filterSpells = new FilterCard("Goblin spells"); - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblins"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creatures"); static { filterSpells.add(new SubtypePredicate(SubType.GOBLIN)); diff --git a/Mage.Sets/src/mage/cards/g/GuildFeud.java b/Mage.Sets/src/mage/cards/g/GuildFeud.java index 8147774664..ac73640d59 100644 --- a/Mage.Sets/src/mage/cards/g/GuildFeud.java +++ b/Mage.Sets/src/mage/cards/g/GuildFeud.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -44,6 +43,8 @@ import mage.players.Player; import mage.target.TargetCard; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +59,7 @@ public class GuildFeud extends CardImpl { // then puts the rest into his or her graveyard. You do the same with the top three // cards of your library. If two creatures are put onto the battlefield this way, // those creatures fight each other. - Ability ability = new BeginningOfUpkeepTriggeredAbility(new GuildFeudEffect(), TargetController.YOU, true); + Ability ability = new BeginningOfUpkeepTriggeredAbility(new GuildFeudEffect(), TargetController.YOU, false); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java b/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java index 8173802a67..4ad47a36fb 100644 --- a/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java +++ b/Mage.Sets/src/mage/cards/h/HaazdaSnareSquad.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -45,6 +44,8 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -68,7 +69,7 @@ public class HaazdaSnareSquad extends CardImpl { // Whenever Haazda Snare Squad attacks you may pay {W}. If you do, tap target creature an opponent controls. Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new TapTargetEffect(""), new ManaCostsImpl("{W}")),false, - "Whenever {this} attacks you may pay {W}. If you do, tap target creature an opponent controls."); + "Whenever {this} attacks, you may pay {W}. If you do, tap target creature an opponent controls."); Target target = new TargetCreaturePermanent(filter); ability.addTarget(target); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/j/JelennSphinx.java b/Mage.Sets/src/mage/cards/j/JelennSphinx.java index 585e84f5fa..52bec18ec6 100644 --- a/Mage.Sets/src/mage/cards/j/JelennSphinx.java +++ b/Mage.Sets/src/mage/cards/j/JelennSphinx.java @@ -27,7 +27,6 @@ */ package mage.cards.j; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.effects.common.continuous.BoostAllEffect; @@ -36,18 +35,19 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.common.FilterAttackingCreature; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; /** - * * @author LevelX2 */ public class JelennSphinx extends CardImpl { public JelennSphinx(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{U}"); this.subtype.add(SubType.SPHINX); this.power = new MageInt(1); @@ -58,7 +58,7 @@ public class JelennSphinx extends CardImpl { // Vigilance this.addAbility(VigilanceAbility.getInstance()); // Whenever Jelenn Sphinx attacks, other attacking creatures get +1/+1 until end of turn. - this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1,1, Duration.EndOfTurn,new FilterAttackingCreature(),true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true), false)); } public JelennSphinx(final JelennSphinx card) { diff --git a/Mage.Sets/src/mage/cards/k/KatabaticWinds.java b/Mage.Sets/src/mage/cards/k/KatabaticWinds.java index 8e30349556..6dbcf40b42 100644 --- a/Mage.Sets/src/mage/cards/k/KatabaticWinds.java +++ b/Mage.Sets/src/mage/cards/k/KatabaticWinds.java @@ -27,8 +27,6 @@ */ package mage.cards.k; -import java.util.Optional; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -49,6 +47,9 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import java.util.Optional; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -120,7 +121,7 @@ class KatabaticWindsRuleModifyingEffect extends ContinuousRuleModifyingEffectImp public KatabaticWindsRuleModifyingEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = ", and their activated abilities with {tap} in their costs can't be activated"; + staticText = ", and their activated abilities with {T} in their costs can't be activated"; } public KatabaticWindsRuleModifyingEffect(final KatabaticWindsRuleModifyingEffect effect) { diff --git a/Mage.Sets/src/mage/cards/l/LivingLands.java b/Mage.Sets/src/mage/cards/l/LivingLands.java index b6abf372ea..c2e3c79e7b 100644 --- a/Mage.Sets/src/mage/cards/l/LivingLands.java +++ b/Mage.Sets/src/mage/cards/l/LivingLands.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffect; @@ -39,13 +38,15 @@ import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author Quercitron */ public class LivingLands extends CardImpl { - private static final FilterLandPermanent filter = new FilterLandPermanent("All Forests"); + private static final FilterLandPermanent filter = new FilterLandPermanent("Forests"); static { filter.add(new SubtypePredicate(SubType.FOREST)); diff --git a/Mage.Sets/src/mage/cards/m/MagewrightsStone.java b/Mage.Sets/src/mage/cards/m/MagewrightsStone.java index b76c5710f4..77ebf02c95 100644 --- a/Mage.Sets/src/mage/cards/m/MagewrightsStone.java +++ b/Mage.Sets/src/mage/cards/m/MagewrightsStone.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageObject; import mage.abilities.Abilities; import mage.abilities.Ability; @@ -47,12 +46,14 @@ import mage.filter.predicate.Predicate; import mage.game.Game; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * @author BursegSardaukar */ public class MagewrightsStone extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that has an ability with {T} in its cost"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that has an activated ability with {T} in its cost"); static { filter.add(new HasAbilityWithTapSymbolPredicate()); diff --git a/Mage.Sets/src/mage/cards/m/Manabond.java b/Mage.Sets/src/mage/cards/m/Manabond.java index 65a28192c7..de9097f4f7 100644 --- a/Mage.Sets/src/mage/cards/m/Manabond.java +++ b/Mage.Sets/src/mage/cards/m/Manabond.java @@ -27,9 +27,6 @@ */ package mage.cards.m; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; @@ -43,6 +40,10 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; + /** * * @author Plopman @@ -70,7 +71,7 @@ class ManabondEffect extends OneShotEffect { public ManabondEffect() { super(Outcome.PutCardInPlay); - staticText = "you may reveal your hand and put all land cards from it onto the battlefield. If you do, discard your hand"; + staticText = "reveal your hand and put all land cards from it onto the battlefield. If you do, discard your hand"; } public ManabondEffect(final ManabondEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java index 0fc0cbfb13..20be0a0c0b 100644 --- a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java +++ b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; @@ -50,6 +49,8 @@ import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -132,6 +133,6 @@ class MelekIzzetParagonTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you cast an instant or sorcery from your library, copy it. You may choose new targets for the copy."; + return "Whenever you cast an instant or sorcery spell from your library, copy it. You may choose new targets for the copy."; } } diff --git a/Mage.Sets/src/mage/cards/o/OblivionRing.java b/Mage.Sets/src/mage/cards/o/OblivionRing.java index 0b4b77c38c..9e5c6a51fc 100644 --- a/Mage.Sets/src/mage/cards/o/OblivionRing.java +++ b/Mage.Sets/src/mage/cards/o/OblivionRing.java @@ -28,7 +28,6 @@ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; @@ -43,13 +42,15 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com */ public class OblivionRing extends CardImpl { - private static final FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another nonland permanent"); + private static final FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another target nonland permanent"); static { anotherNonlandPermanent.add(new AnotherPredicate()); diff --git a/Mage.Sets/src/mage/cards/o/OddsEnds.java b/Mage.Sets/src/mage/cards/o/OddsEnds.java index 86bc6953cf..60d6885637 100644 --- a/Mage.Sets/src/mage/cards/o/OddsEnds.java +++ b/Mage.Sets/src/mage/cards/o/OddsEnds.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CopyTargetSpellEffect; @@ -38,12 +37,13 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SpellAbilityType; import mage.filter.StaticFilters; -import mage.filter.common.FilterAttackingCreature; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; import mage.target.TargetSpell; +import java.util.UUID; + public class OddsEnds extends SplitCard { public OddsEnds(UUID ownerId, CardSetInfo setInfo) { @@ -56,7 +56,7 @@ public class OddsEnds extends SplitCard { // Ends // Target player sacrifices two attacking creatures. - getRightHalfCard().getSpellAbility().addEffect(new SacrificeEffect(new FilterAttackingCreature(), 2, "Target player")); + getRightHalfCard().getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_ATTACKING_CREATURES, 2, "Target player")); getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer()); } diff --git a/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java b/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java index 2eeac4af89..0eecf9594f 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java +++ b/Mage.Sets/src/mage/cards/o/OrcishOriflamme.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; @@ -35,7 +34,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.common.FilterAttackingCreature; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -48,7 +49,7 @@ public class OrcishOriflamme extends CardImpl { // Attacking creatures you control get +1/+0. - BoostControlledEffect boostEffect = new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, new FilterAttackingCreature(), false); + BoostControlledEffect boostEffect = new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_ATTACKING_CREATURES, false); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect)); } diff --git a/Mage.Sets/src/mage/cards/p/PlagueRats.java b/Mage.Sets/src/mage/cards/p/PlagueRats.java index 861a86cce3..05895ed8f8 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueRats.java +++ b/Mage.Sets/src/mage/cards/p/PlagueRats.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; @@ -36,19 +35,21 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.NamePredicate; +import java.util.UUID; + /** * * @author lopho */ public class PlagueRats extends CardImpl { - private static final FilterCreaturePermanent plagueRatsFilter = new FilterCreaturePermanent("Plague Rats on the battlefield"); + private static final FilterCreaturePermanent plagueRatsFilter = new FilterCreaturePermanent("creatures named Plague Rats on the battlefield"); static { plagueRatsFilter.add(new NamePredicate("Plague Rats")); } diff --git a/Mage.Sets/src/mage/cards/p/PureSimple.java b/Mage.Sets/src/mage/cards/p/PureSimple.java index 3dc4bc1f41..a814617eb3 100644 --- a/Mage.Sets/src/mage/cards/p/PureSimple.java +++ b/Mage.Sets/src/mage/cards/p/PureSimple.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardSetInfo; @@ -41,6 +40,8 @@ import mage.filter.predicate.mageobject.MulticoloredPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Wehk @@ -48,7 +49,7 @@ import mage.target.TargetPermanent; public class PureSimple extends SplitCard { private static final FilterPermanent filterDestroy = new FilterPermanent("Auras and Equipment"); - private static final FilterPermanent filterMulticolor = new FilterPermanent("multicolor permanent"); + private static final FilterPermanent filterMulticolor = new FilterPermanent("multicolored permanent"); static { filterDestroy.add(Predicates.or(new SubtypePredicate(SubType.AURA), new SubtypePredicate(SubType.EQUIPMENT))); diff --git a/Mage.Sets/src/mage/cards/q/QuirionRanger.java b/Mage.Sets/src/mage/cards/q/QuirionRanger.java index 7b0a93ebae..5f7dc39ba7 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionRanger.java +++ b/Mage.Sets/src/mage/cards/q/QuirionRanger.java @@ -27,7 +27,6 @@ */ package mage.cards.q; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; @@ -43,13 +42,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author jonubuu */ public class QuirionRanger extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Forest"); static { filter.add(new SubtypePredicate(SubType.FOREST)); diff --git a/Mage.Sets/src/mage/cards/r/RecurringNightmare.java b/Mage.Sets/src/mage/cards/r/RecurringNightmare.java index d966f3291d..dbeeade31f 100644 --- a/Mage.Sets/src/mage/cards/r/RecurringNightmare.java +++ b/Mage.Sets/src/mage/cards/r/RecurringNightmare.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; @@ -42,13 +41,15 @@ import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author jeffwadsworth */ public class RecurringNightmare extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("creature card in your graveyard"); + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card"); private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("creature"); public RecurringNightmare(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java b/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java index 03d1936f92..97c26f9144 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java +++ b/Mage.Sets/src/mage/cards/s/SkirkDrillSergeant.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -49,13 +48,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 */ public class SkirkDrillSergeant extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another Goblin"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("or another Goblin"); static { filter.add(new SubtypePredicate(SubType.GOBLIN)); diff --git a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java index 35554b5dc9..1a899747cf 100644 --- a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java +++ b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java @@ -28,7 +28,6 @@ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; @@ -43,6 +42,8 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.KnightToken; +import java.util.UUID; + /** * * @author LevelX2 @@ -68,7 +69,7 @@ public class SunspireGatekeepers extends CardImpl { this.addAbility(new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken())), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), - "When {this} enter the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance.")); + "When {this} enters the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance.")); } public SunspireGatekeepers (final SunspireGatekeepers card) { diff --git a/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java b/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java index d3ccf3f2a8..c83b54b5fc 100644 --- a/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java +++ b/Mage.Sets/src/mage/cards/s/SurvivalOfTheFittest.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.DiscardTargetCost; @@ -43,13 +42,15 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author jeffwadsworth */ public class SurvivalOfTheFittest extends CardImpl { - private static final FilterCard filter = new FilterCard("creature card"); + private static final FilterCard filter = new FilterCard("a creature card"); static { filter.add(new CardTypePredicate(CardType.CREATURE)); diff --git a/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java b/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java index 000ea57ee5..a81490af79 100644 --- a/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java +++ b/Mage.Sets/src/mage/cards/t/TemporaryInsanity.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.Effect; @@ -43,6 +42,8 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author FenrisulfrX @@ -58,12 +59,12 @@ public class TemporaryInsanity extends CardImpl { // and gain control of it until end of turn. Effect effect = new GainControlTargetEffect(Duration.EndOfTurn); - effect.setText("and gain control of it until end of the turn. "); + effect.setText("and gain control of it until end of turn. "); this.getSpellAbility().addEffect(effect); // That creature gains haste until end of turn. effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); - effect.setText("That creature gains haste until end of the turn."); + effect.setText("That creature gains haste until end of turn."); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java b/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java index 2c78a0998a..d59235b557 100644 --- a/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java +++ b/Mage.Sets/src/mage/cards/v/VerduranEnchantress.java @@ -27,7 +27,6 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -38,13 +37,15 @@ import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; +import java.util.UUID; + /** * * @author Plopman */ public class VerduranEnchantress extends CardImpl { - private static final FilterSpell filter = new FilterSpell("an Enchantment spell"); + private static final FilterSpell filter = new FilterSpell("an enchantment spell"); static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); diff --git a/Mage.Sets/src/mage/cards/w/WoodElves.java b/Mage.Sets/src/mage/cards/w/WoodElves.java index 372f790f0f..b4818f1cdc 100644 --- a/Mage.Sets/src/mage/cards/w/WoodElves.java +++ b/Mage.Sets/src/mage/cards/w/WoodElves.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; @@ -39,13 +38,15 @@ import mage.filter.common.FilterLandCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Plopman */ public class WoodElves extends CardImpl { - private static final FilterLandCard filter = new FilterLandCard("Forest"); + private static final FilterLandCard filter = new FilterLandCard("Forest card"); static{ filter.add(new SubtypePredicate(SubType.FOREST)); } diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 462f267201..5a193985cb 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -68,7 +68,7 @@ public final class StaticFilters { public static final FilterPermanent FILTER_CREATURE_TOKENS = new FilterCreaturePermanent("creature tokens"); - public static final FilterPermanent FILTER_ATTACKING_CREATURES = new FilterCreaturePermanent("attacking creatures"); + public static final FilterCreaturePermanent FILTER_ATTACKING_CREATURES = new FilterCreaturePermanent("attacking creatures"); public static final FilterPermanent FILTER_PERMANENT_AURA = new FilterPermanent(); public static final FilterPermanent FILTER_PERMANENT_EQUIPMENT = new FilterPermanent(); From 5120d752b1e95d7df31b1b4710f30b78687a2a98 Mon Sep 17 00:00:00 2001 From: igoudt Date: Fri, 22 Sep 2017 14:37:11 +0200 Subject: [PATCH 11/11] add missing chimera abilities --- Mage.Sets/src/mage/cards/i/IronHeartChimera.java | 6 ++++-- Mage.Sets/src/mage/cards/l/LeadBellyChimera.java | 6 ++++-- Mage.Sets/src/mage/cards/t/TinWingChimera.java | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/i/IronHeartChimera.java b/Mage.Sets/src/mage/cards/i/IronHeartChimera.java index d330025632..0ed742e319 100644 --- a/Mage.Sets/src/mage/cards/i/IronHeartChimera.java +++ b/Mage.Sets/src/mage/cards/i/IronHeartChimera.java @@ -27,25 +27,26 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.constants.SubType; import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -72,6 +73,7 @@ public class IronHeartChimera extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield)); ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); } public IronHeartChimera(final IronHeartChimera card) { diff --git a/Mage.Sets/src/mage/cards/l/LeadBellyChimera.java b/Mage.Sets/src/mage/cards/l/LeadBellyChimera.java index f6b4334bdd..c6f7d53957 100644 --- a/Mage.Sets/src/mage/cards/l/LeadBellyChimera.java +++ b/Mage.Sets/src/mage/cards/l/LeadBellyChimera.java @@ -27,25 +27,26 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.constants.SubType; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -72,6 +73,7 @@ public class LeadBellyChimera extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); ability.addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield)); ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); } public LeadBellyChimera(final LeadBellyChimera card) { diff --git a/Mage.Sets/src/mage/cards/t/TinWingChimera.java b/Mage.Sets/src/mage/cards/t/TinWingChimera.java index 8577703fbd..fe0cd843e3 100644 --- a/Mage.Sets/src/mage/cards/t/TinWingChimera.java +++ b/Mage.Sets/src/mage/cards/t/TinWingChimera.java @@ -27,25 +27,26 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.constants.SubType; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -72,6 +73,7 @@ public class TinWingChimera extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost()); ability.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield)); ability.addTarget(new TargetCreaturePermanent(filter)); + addAbility(ability); } public TinWingChimera(final TinWingChimera card) {