diff --git a/Mage.Sets/src/mage/cards/a/AdroitHateflayer.java b/Mage.Sets/src/mage/cards/a/AdroitHateflayer.java index a8019903e37..e233c665125 100644 --- a/Mage.Sets/src/mage/cards/a/AdroitHateflayer.java +++ b/Mage.Sets/src/mage/cards/a/AdroitHateflayer.java @@ -51,7 +51,7 @@ public class AdroitHateflayer extends CardImpl { this.toughness = new MageInt(3); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever Adroit Hateflayer attacks, each opponent loses 2 life. this.addAbility(new AttacksTriggeredAbility(new LoseLifeOpponentsEffect(2), false)); diff --git a/Mage.Sets/src/mage/cards/a/AlleyStrangler.java b/Mage.Sets/src/mage/cards/a/AlleyStrangler.java index 2dec0ba20c0..39c189faa44 100644 --- a/Mage.Sets/src/mage/cards/a/AlleyStrangler.java +++ b/Mage.Sets/src/mage/cards/a/AlleyStrangler.java @@ -50,7 +50,7 @@ public class AlleyStrangler extends CardImpl { this.toughness = new MageInt(3); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public AlleyStrangler(final AlleyStrangler card) { diff --git a/Mage.Sets/src/mage/cards/a/AradaraExpress.java b/Mage.Sets/src/mage/cards/a/AradaraExpress.java index 9decfe74033..15ef9ba6868 100644 --- a/Mage.Sets/src/mage/cards/a/AradaraExpress.java +++ b/Mage.Sets/src/mage/cards/a/AradaraExpress.java @@ -49,7 +49,7 @@ public class AradaraExpress extends CardImpl { this.toughness = new MageInt(6); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Crew 4 this.addAbility(new CrewAbility(4)); } diff --git a/Mage.Sets/src/mage/cards/a/AtarkaPummeler.java b/Mage.Sets/src/mage/cards/a/AtarkaPummeler.java index 631bbb377ec..b71d99d5afb 100644 --- a/Mage.Sets/src/mage/cards/a/AtarkaPummeler.java +++ b/Mage.Sets/src/mage/cards/a/AtarkaPummeler.java @@ -63,7 +63,7 @@ public class AtarkaPummeler extends CardImpl { // Formidable - {3}{R}{R}: Creatures you control gain menace until end of turn. Activate this ability only if creature you control have total power 8 or greater. (They can't be blocked except by two or more creatures.) Ability ability = new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, - new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, filter), + new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, filter), new ManaCostsImpl("{3}{R}{R}"), FormidableCondition.instance); ability.setAbilityWord(AbilityWord.FORMIDABLE); diff --git a/Mage.Sets/src/mage/cards/b/BelligerentSliver.java b/Mage.Sets/src/mage/cards/b/BelligerentSliver.java index 02af27ab0ce..4237231bc90 100644 --- a/Mage.Sets/src/mage/cards/b/BelligerentSliver.java +++ b/Mage.Sets/src/mage/cards/b/BelligerentSliver.java @@ -62,7 +62,7 @@ public class BelligerentSliver extends CardImpl { this.toughness = new MageInt(2); // Sliver creatures you control have menace. (They can't be blocked except by two or more creatures.)" - Effect effect = new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter); + Effect effect = new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield, filter); effect.setText("Sliver creatures you control have menace. (They can't be blocked except by two or more creatures.)"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/b/BloodChinRager.java b/Mage.Sets/src/mage/cards/b/BloodChinRager.java index 2657e0931bc..286f2aafa1b 100644 --- a/Mage.Sets/src/mage/cards/b/BloodChinRager.java +++ b/Mage.Sets/src/mage/cards/b/BloodChinRager.java @@ -60,7 +60,7 @@ public class BloodChinRager extends CardImpl { this.toughness = new MageInt(2); // Whenever Blood-Chin Rager attacks, Warrior creatures you control gain menace until end of turn. (They can't be blocked except by two or more creatures.) - this.addAbility(new AttacksTriggeredAbility(new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, filter), false)); + this.addAbility(new AttacksTriggeredAbility(new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, filter), false)); } public BloodChinRager(final BloodChinRager card) { diff --git a/Mage.Sets/src/mage/cards/b/BobaFett.java b/Mage.Sets/src/mage/cards/b/BobaFett.java index 7680e3cfdb6..6efbf2d0d6d 100644 --- a/Mage.Sets/src/mage/cards/b/BobaFett.java +++ b/Mage.Sets/src/mage/cards/b/BobaFett.java @@ -60,7 +60,7 @@ public class BobaFett extends CardImpl { this.toughness = new MageInt(4); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Deathtouch this.addAbility(DeathtouchAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/b/BoggartBrute.java b/Mage.Sets/src/mage/cards/b/BoggartBrute.java index dbf317e2f2b..33931e649fe 100644 --- a/Mage.Sets/src/mage/cards/b/BoggartBrute.java +++ b/Mage.Sets/src/mage/cards/b/BoggartBrute.java @@ -48,7 +48,7 @@ public class BoggartBrute extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public BoggartBrute(final BoggartBrute card) { diff --git a/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java b/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java index 41bb478723d..8165cbbf054 100644 --- a/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java +++ b/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java @@ -65,7 +65,7 @@ public class BontuTheGlorified extends CardImpl { this.toughness = new MageInt(6); //Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); //Indestructible this.addAbility(IndestructibleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/b/BrazenBuccaneers.java b/Mage.Sets/src/mage/cards/b/BrazenBuccaneers.java new file mode 100644 index 00000000000..d0b91465973 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BrazenBuccaneers.java @@ -0,0 +1,69 @@ +/* + * 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.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class BrazenBuccaneers extends CardImpl { + + public BrazenBuccaneers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // When Brazen Buccaneers enters the battlefield, it explores. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect())); + } + + public BrazenBuccaneers(final BrazenBuccaneers card) { + super(card); + } + + @Override + public BrazenBuccaneers copy() { + return new BrazenBuccaneers(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BullRancor.java b/Mage.Sets/src/mage/cards/b/BullRancor.java index b61ec2923c5..a65a4333b0d 100644 --- a/Mage.Sets/src/mage/cards/b/BullRancor.java +++ b/Mage.Sets/src/mage/cards/b/BullRancor.java @@ -59,7 +59,7 @@ public class BullRancor extends CardImpl { // As long as Bull Rancor is monstrous, creatures you control have menace. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new GainAbilityControlledEffect(new MenaceAbility(), Duration.WhileOnBattlefield), + new GainAbilityControlledEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield), MonstrousCondition.instance, "As long as Bull Rancor is monstrous, creatures you control have menace") )); diff --git a/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java b/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java index 23593081c23..b2b68486c28 100644 --- a/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java +++ b/Mage.Sets/src/mage/cards/c/CaterwaulingBoggart.java @@ -66,13 +66,13 @@ public class CaterwaulingBoggart extends CardImpl { // Each Goblin you control has menace. (They can't be blocked except by two or more creatures.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( - new MenaceAbility(), + MenaceAbility.getInstance(), Duration.WhileOnBattlefield, filterGoblin, "Each Goblin you control has menace. (They can't be blocked except by two or more creatures.)"))); // Each Elemental you control has menace. (They can't be blocked except by two or more creatures.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( - new MenaceAbility(), + MenaceAbility.getInstance(), Duration.WhileOnBattlefield, filterElemental, "Each Elemental you control has menace. (They can't be blocked except by two or more creatures.)"))); } diff --git a/Mage.Sets/src/mage/cards/c/ChitinousCloak.java b/Mage.Sets/src/mage/cards/c/ChitinousCloak.java index 165c8f52c20..505ab9a6001 100644 --- a/Mage.Sets/src/mage/cards/c/ChitinousCloak.java +++ b/Mage.Sets/src/mage/cards/c/ChitinousCloak.java @@ -56,7 +56,7 @@ public class ChitinousCloak extends CardImpl { // Equipped creature gets +2/+2 and has menace. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)); - Effect effect = new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.EQUIPMENT); + Effect effect = new GainAbilityAttachedEffect(MenaceAbility.getInstance(), AttachmentType.EQUIPMENT); effect.setText("and has menace"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/c/ChitteringHost.java b/Mage.Sets/src/mage/cards/c/ChitteringHost.java index 9e65b786e82..2f638f1f4f8 100644 --- a/Mage.Sets/src/mage/cards/c/ChitteringHost.java +++ b/Mage.Sets/src/mage/cards/c/ChitteringHost.java @@ -61,13 +61,13 @@ public class ChitteringHost extends MeldCard { this.addAbility(HasteAbility.getInstance()); // Menace (This creature can't be blocked except by two or more creatures. - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // When Chittering Host enters the battlefield, other creatures you control get +1/+0 and gain menace until end of turn. Effect effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, true); effect.setText("other creatures you control get +1/+0"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); - effect = new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("other creatures"), true); + effect = new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("other creatures"), true); effect.setText("and gain menace until end of turn"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/c/CursedMinotaur.java b/Mage.Sets/src/mage/cards/c/CursedMinotaur.java index a363957ba02..2e37c6d8f90 100644 --- a/Mage.Sets/src/mage/cards/c/CursedMinotaur.java +++ b/Mage.Sets/src/mage/cards/c/CursedMinotaur.java @@ -50,7 +50,7 @@ public class CursedMinotaur extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/d/DarthVader.java b/Mage.Sets/src/mage/cards/d/DarthVader.java index 85a40aca5d2..2907d5f1f8a 100644 --- a/Mage.Sets/src/mage/cards/d/DarthVader.java +++ b/Mage.Sets/src/mage/cards/d/DarthVader.java @@ -63,7 +63,7 @@ public class DarthVader extends CardImpl { this.nightCard = true; // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Lifelink this.addAbility(LifelinkAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/d/Demoralize.java b/Mage.Sets/src/mage/cards/d/Demoralize.java index fc29a2b247a..bbf15fec7bf 100644 --- a/Mage.Sets/src/mage/cards/d/Demoralize.java +++ b/Mage.Sets/src/mage/cards/d/Demoralize.java @@ -52,7 +52,7 @@ public class Demoralize extends CardImpl { // All creatures gain menace until end of turn. (They can't be blocked except by two or more creatures.) - this.getSpellAbility().addEffect(new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); + this.getSpellAbility().addEffect(new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); // Threshold — If seven or more cards are in your graveyard, creatures can't block this turn. this.getSpellAbility().addEffect( diff --git a/Mage.Sets/src/mage/cards/d/DeputizedProtester.java b/Mage.Sets/src/mage/cards/d/DeputizedProtester.java index b5550b88287..0851efc39ef 100644 --- a/Mage.Sets/src/mage/cards/d/DeputizedProtester.java +++ b/Mage.Sets/src/mage/cards/d/DeputizedProtester.java @@ -50,7 +50,7 @@ public class DeputizedProtester extends CardImpl { this.toughness = new MageInt(1); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Melee this.addAbility(new MeleeAbility()); } diff --git a/Mage.Sets/src/mage/cards/d/DerangedWhelp.java b/Mage.Sets/src/mage/cards/d/DerangedWhelp.java index 7b00a45fb70..1cdf0c5631a 100644 --- a/Mage.Sets/src/mage/cards/d/DerangedWhelp.java +++ b/Mage.Sets/src/mage/cards/d/DerangedWhelp.java @@ -48,7 +48,7 @@ public class DerangedWhelp extends CardImpl { this.toughness = new MageInt(1); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public DerangedWhelp(final DerangedWhelp card) { diff --git a/Mage.Sets/src/mage/cards/d/DesperateCastaways.java b/Mage.Sets/src/mage/cards/d/DesperateCastaways.java new file mode 100644 index 00000000000..63ab9a4ca25 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DesperateCastaways.java @@ -0,0 +1,104 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public class DesperateCastaways extends CardImpl { + + public DesperateCastaways(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Desperate Castaways can't attack unless you control an artifact. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DesperateCastawaysEffect())); + } + + public DesperateCastaways(final DesperateCastaways card) { + super(card); + } + + @Override + public DesperateCastaways copy() { + return new DesperateCastaways(this); + } +} + +class DesperateCastawaysEffect extends RestrictionEffect { + + public DesperateCastawaysEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can't attack unless you control an artifact"; + } + + public DesperateCastawaysEffect(final DesperateCastawaysEffect effect) { + super(effect); + } + + @Override + public DesperateCastawaysEffect copy() { + return new DesperateCastawaysEffect(this); + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (permanent.getId().equals(source.getSourceId())) { + if (game.getBattlefield().countAll(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, source.getControllerId(), game) > 0) { + return false; + } + return true; + } // do not apply to other creatures. + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DireFleetHoarder.java b/Mage.Sets/src/mage/cards/d/DireFleetHoarder.java new file mode 100644 index 00000000000..047449c9b65 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireFleetHoarder.java @@ -0,0 +1,66 @@ +/* + * 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.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author TheElk801 + */ +public class DireFleetHoarder extends CardImpl { + + public DireFleetHoarder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Dire Fleet Hoarder dies, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool." + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new TreasureToken()))); + } + + public DireFleetHoarder(final DireFleetHoarder card) { + super(card); + } + + @Override + public DireFleetHoarder copy() { + return new DireFleetHoarder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/Dreamstealer.java b/Mage.Sets/src/mage/cards/d/Dreamstealer.java index d48f9a3a77e..9bda51702d4 100644 --- a/Mage.Sets/src/mage/cards/d/Dreamstealer.java +++ b/Mage.Sets/src/mage/cards/d/Dreamstealer.java @@ -58,7 +58,7 @@ public class Dreamstealer extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // When Dreamstealer deals combat damage to a player, that player discards that many cards. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DreamstealerDiscardEffect(), false, true)); diff --git a/Mage.Sets/src/mage/cards/d/DrivenDespair.java b/Mage.Sets/src/mage/cards/d/DrivenDespair.java index 7d15b56b480..82afbe7ce2f 100644 --- a/Mage.Sets/src/mage/cards/d/DrivenDespair.java +++ b/Mage.Sets/src/mage/cards/d/DrivenDespair.java @@ -63,7 +63,7 @@ public class DrivenDespair extends SplitCard { // Aftermath ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); // Until end of turn, creatures you control gain menace and "Whenever this creature deals combat damage to a player, that player discards a card." - getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn)); + getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(MenaceAbility.getInstance(), Duration.EndOfTurn)); ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1), false, true); getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn) .setText("and \"Whenever this creature deals combat damage to a player, that player discards a card.\"")); diff --git a/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java b/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java index 855609590cb..eb5aab3ed48 100644 --- a/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java +++ b/Mage.Sets/src/mage/cards/e/EmberhornMinotaur.java @@ -59,7 +59,7 @@ public class EmberhornMinotaur extends CardImpl { Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); effect.setText("it gets +1/+1"); BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect); - effect = new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn); + effect = new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.EndOfTurn); effect.setText("and gains menace until end of turn"); ability.addEffect(effect); this.addAbility(new ExertAbility(ability)); diff --git a/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java b/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java index 9904469165c..74c8ed3d52d 100644 --- a/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java +++ b/Mage.Sets/src/mage/cards/e/EmbraalBruiser.java @@ -60,7 +60,7 @@ public class EmbraalBruiser extends CardImpl { // Embraal Bruiser has menace as long as you control an artifact. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new GainAbilitySourceEffect(new MenaceAbility()), + new GainAbilitySourceEffect(MenaceAbility.getInstance()), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT), "{this} has menace as long as you control an artifact"))); } diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java index 72f6e09eaed..45715268b92 100644 --- a/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java +++ b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java @@ -70,7 +70,7 @@ public class FathomFleetCaptain extends CardImpl { this.toughness = new MageInt(1); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever Fathom Fleet Captain attacks, if you control another nontoken Pirate, you may pay {2}. If you do, creature a 2/2 black Pirate creature token with menace. this.addAbility(new ConditionalTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/f/FiremantleMage.java b/Mage.Sets/src/mage/cards/f/FiremantleMage.java index 0de938a125c..6123439b52b 100644 --- a/Mage.Sets/src/mage/cards/f/FiremantleMage.java +++ b/Mage.Sets/src/mage/cards/f/FiremantleMage.java @@ -55,7 +55,7 @@ public class FiremantleMage extends CardImpl { // Rally — Whenver Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn. this.addAbility(new AllyEntersBattlefieldTriggeredAbility( - new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), false)); + new GainAbilityControlledEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), false)); } public FiremantleMage(final FiremantleMage card) { diff --git a/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java b/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java index f464c8c1337..ab1b40c5c44 100644 --- a/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java +++ b/Mage.Sets/src/mage/cards/f/FlamebladeAdept.java @@ -53,7 +53,7 @@ public class FlamebladeAdept extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever you cycle or discard a card, Flameblade Adept gets +1/+0 until end of turn. this.addAbility(new CycleOrDiscardControllerTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn))); diff --git a/Mage.Sets/src/mage/cards/g/GatstafRavagers.java b/Mage.Sets/src/mage/cards/g/GatstafRavagers.java index f84e3cf6b46..00b7d4fa11d 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafRavagers.java +++ b/Mage.Sets/src/mage/cards/g/GatstafRavagers.java @@ -60,7 +60,7 @@ public class GatstafRavagers extends CardImpl { this.nightCard = true; // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Gatstaf Ravagers. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); diff --git a/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java b/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java index 265d515e2c3..3fd4a648b22 100644 --- a/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java +++ b/Mage.Sets/src/mage/cards/g/GeyserfieldStalker.java @@ -51,7 +51,7 @@ public class GeyserfieldStalker extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Landfall - Whenever a land enters the battlefield under your control, Geyserfield Stalker gets +2/+2 until end of turn. this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); } diff --git a/Mage.Sets/src/mage/cards/g/GiantSpectacle.java b/Mage.Sets/src/mage/cards/g/GiantSpectacle.java index 230a5d5b699..64d45642ba9 100644 --- a/Mage.Sets/src/mage/cards/g/GiantSpectacle.java +++ b/Mage.Sets/src/mage/cards/g/GiantSpectacle.java @@ -65,7 +65,7 @@ public class GiantSpectacle extends CardImpl { // Enchanted creature gets +2/+1 and has menace. ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 1)); - Effect effect = new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.AURA); + Effect effect = new GainAbilityAttachedEffect(MenaceAbility.getInstance(), AttachmentType.AURA); effect.setText("and has menace"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java b/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java index ccd3ff2cbaf..f34f1a538de 100644 --- a/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java +++ b/Mage.Sets/src/mage/cards/g/GiltLeafWinnower.java @@ -66,7 +66,7 @@ public class GiltLeafWinnower extends CardImpl { this.toughness = new MageInt(3); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // When Gilt-Leaf Winnower enters the battlefield, you may destroy target non-Elf creature whose power and toughness aren't equal. Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); diff --git a/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java b/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java index 826eda15049..c0d760847e4 100644 --- a/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java +++ b/Mage.Sets/src/mage/cards/g/GlintSleeveSiphoner.java @@ -60,7 +60,7 @@ public class GlintSleeveSiphoner extends CardImpl { this.toughness = new MageInt(1); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever Glint-Sleeve Siphoner enters the battlefield or attacks, you get {E}. this.addAbility(new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GetEnergyCountersControllerEffect(1))); diff --git a/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java b/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java index 31b558779ce..e4c2ee68cc5 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java @@ -72,7 +72,7 @@ public class GoblinDarkDwellers extends CardImpl { this.toughness = new MageInt(4); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // When Goblin Dark-Dwellers enters the battlefield, you may cast target instant or sorcery card with converted mana cost 3 or less // from your graveyard without paying its mana cost. If that card would be put into your graveyard this turn, exile it instead. diff --git a/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java b/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java index a35e8f22c78..84483903b78 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFreerunner.java @@ -54,7 +54,7 @@ public class GoblinFreerunner extends CardImpl { addAbility(new SurgeAbility(this, "{1}{R}")); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public GoblinFreerunner(final GoblinFreerunner card) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java b/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java index d63dd615c17..ccb9e7e70ef 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGloryChaser.java @@ -62,7 +62,7 @@ public class GoblinGloryChaser extends CardImpl { // As long as Goblin Glory Chaser is renowned, it has menace. Effect effect = new ConditionalContinuousEffect( - new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), + new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield), RenownedSourceCondition.instance, "As long as {this} is renowned, it has menace"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWarDrums.java b/Mage.Sets/src/mage/cards/g/GoblinWarDrums.java index f53fba68300..de6f4e1b4ae 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWarDrums.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWarDrums.java @@ -56,7 +56,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; // Creatures you control have menace. (They can't be blocked except by two or more creatures.) - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield, filter))); } public GoblinWarDrums(final GoblinWarDrums card) { diff --git a/Mage.Sets/src/mage/cards/g/GorillaWarCry.java b/Mage.Sets/src/mage/cards/g/GorillaWarCry.java index 3b0f9366fba..3e80fa03e23 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaWarCry.java +++ b/Mage.Sets/src/mage/cards/g/GorillaWarCry.java @@ -56,7 +56,7 @@ public class GorillaWarCry extends CardImpl { this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, BeforeBlockersAreDeclaredCondition.instance)); // All creatures gain menace until end of turn. (They can't be blocked except by two or more creatures.) - Effect effect = new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterCreaturePermanent()); + Effect effect = new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()); effect.setText("All creatures gain menace until end of turn. (They can't be blocked except by two or more creatures.)"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/g/GrafHarvest.java b/Mage.Sets/src/mage/cards/g/GrafHarvest.java index e6ae038832b..5aff10b6080 100644 --- a/Mage.Sets/src/mage/cards/g/GrafHarvest.java +++ b/Mage.Sets/src/mage/cards/g/GrafHarvest.java @@ -65,7 +65,7 @@ public class GrafHarvest extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); // Zombies you control have menace. - Effect effect = new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter); + Effect effect = new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield, filter); effect.setText("Zombies you control have menace. (They can't be blocked except by two or more creatures.)"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/g/GraniticTitan.java b/Mage.Sets/src/mage/cards/g/GraniticTitan.java index 22fd617fe8d..8485fc9e8d3 100644 --- a/Mage.Sets/src/mage/cards/g/GraniticTitan.java +++ b/Mage.Sets/src/mage/cards/g/GraniticTitan.java @@ -19,7 +19,7 @@ public class GraniticTitan extends CardImpl { toughness = new MageInt(4); // Menace - addAbility(new MenaceAbility()); + addAbility(MenaceAbility.getInstance()); // Cycling {2} addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}"))); diff --git a/Mage.Sets/src/mage/cards/g/GruulNodorog.java b/Mage.Sets/src/mage/cards/g/GruulNodorog.java index 961d2d966b6..ad4d87a336a 100644 --- a/Mage.Sets/src/mage/cards/g/GruulNodorog.java +++ b/Mage.Sets/src/mage/cards/g/GruulNodorog.java @@ -54,7 +54,7 @@ public class GruulNodorog extends CardImpl { this.toughness = new MageInt(4); //{R}: Gruul Nodorog gains menace until end of turn. (It can't be blocked except by two or more creatures.) - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"))); } public GruulNodorog(final GruulNodorog card) { diff --git a/Mage.Sets/src/mage/cards/g/GruulWarChant.java b/Mage.Sets/src/mage/cards/g/GruulWarChant.java index 9f0b2125d3d..3f4ffe47266 100644 --- a/Mage.Sets/src/mage/cards/g/GruulWarChant.java +++ b/Mage.Sets/src/mage/cards/g/GruulWarChant.java @@ -60,7 +60,7 @@ public class GruulWarChant extends CardImpl { // Attacking creatures you control get +1/+0 and have menace. (They can't be blocked except by two or more creatures.) - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter)); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield, filter)); ability.addEffect(new BoostAllEffect(1,0, Duration.WhileOnBattlefield, filter, false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java b/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java index 06d1816e65f..ad750f0937c 100644 --- a/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java +++ b/Mage.Sets/src/mage/cards/h/HordeOfBoggarts.java @@ -66,7 +66,7 @@ public class HordeOfBoggarts extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public HordeOfBoggarts(final HordeOfBoggarts card) { diff --git a/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java b/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java index 71772a177c2..3b8e8060a72 100644 --- a/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java +++ b/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java @@ -60,7 +60,7 @@ public class HoundOfTheFarbogs extends CardImpl { // Delirium — Hound of the Farborgs has menace as long as there are four or more card types among cards in your graveyard. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, - new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), DeliriumCondition.instance, RULE)); + new ConditionalContinuousEffect(new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield), DeliriumCondition.instance, RULE)); ability.setAbilityWord(AbilityWord.DELIRIUM); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java b/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java index cb990d46229..b8d88ed1a2e 100644 --- a/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java +++ b/Mage.Sets/src/mage/cards/i/IkraShidiqiTheUsurper.java @@ -61,7 +61,7 @@ public class IkraShidiqiTheUsurper extends CardImpl { this.toughness = new MageInt(7); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever a creature you control deals combat damage to a player, you gain life equal to that creature's toughness. this.addAbility(new IkraShidiqiTheUsurperTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/i/ImperialLancer.java b/Mage.Sets/src/mage/cards/i/ImperialLancer.java new file mode 100644 index 00000000000..feb477524f4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialLancer.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.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class ImperialLancer extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Dinosaur"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public ImperialLancer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Imperial Lancer has double strike as long as you control a Dinosaur. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), "{this} has double strike as long as you control a Dinosaur"))); + } + + public ImperialLancer(final ImperialLancer card) { + super(card); + } + + @Override + public ImperialLancer copy() { + return new ImperialLancer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/ImposingVisage.java b/Mage.Sets/src/mage/cards/i/ImposingVisage.java index 8e3d76dd726..6d3bd7685cb 100644 --- a/Mage.Sets/src/mage/cards/i/ImposingVisage.java +++ b/Mage.Sets/src/mage/cards/i/ImposingVisage.java @@ -63,7 +63,7 @@ public class ImposingVisage extends CardImpl { this.addAbility(ability); // Enchanted creature has menace. (It can't be blocked except by two or more creatures.) - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.AURA))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(MenaceAbility.getInstance(), AttachmentType.AURA))); } public ImposingVisage(final ImposingVisage card) { diff --git a/Mage.Sets/src/mage/cards/i/InsolentNeonate.java b/Mage.Sets/src/mage/cards/i/InsolentNeonate.java index b7c186a823e..8cbcc6144f6 100644 --- a/Mage.Sets/src/mage/cards/i/InsolentNeonate.java +++ b/Mage.Sets/src/mage/cards/i/InsolentNeonate.java @@ -54,7 +54,7 @@ public class InsolentNeonate extends CardImpl { this.toughness = new MageInt(1); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Discard a card, Sacrifice Insolent Neonate: Draw a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new DiscardCardCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/i/IreShaman.java b/Mage.Sets/src/mage/cards/i/IreShaman.java index e58fe289629..2d8544a4d18 100644 --- a/Mage.Sets/src/mage/cards/i/IreShaman.java +++ b/Mage.Sets/src/mage/cards/i/IreShaman.java @@ -64,7 +64,7 @@ public class IreShaman extends CardImpl { this.toughness = new MageInt(1); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Megamorph {R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{R}"), true)); diff --git a/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java b/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java index 00b036f9d9f..aa2381b6805 100644 --- a/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java +++ b/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java @@ -75,7 +75,7 @@ public class IroasGodOfVictory extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // Creatures you control have menace. (They can't be blocked except by two or more creatures.) - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield, filter))); // Prevent all damage that would be dealt to attacking creatures you control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, filterAttacking))); diff --git a/Mage.Sets/src/mage/cards/j/JangoFett.java b/Mage.Sets/src/mage/cards/j/JangoFett.java index 1f62423053a..6079f99bc60 100644 --- a/Mage.Sets/src/mage/cards/j/JangoFett.java +++ b/Mage.Sets/src/mage/cards/j/JangoFett.java @@ -71,7 +71,7 @@ public class JangoFett extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Haste this.addAbility(HasteAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java b/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java index 43c4993629b..b7f67f6043f 100644 --- a/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java +++ b/Mage.Sets/src/mage/cards/k/KariZevSkyshipRaider.java @@ -64,7 +64,7 @@ public class KariZevSkyshipRaider extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever Kari Zev, Skyship Raider attacks, create a legendary 2/1 red Monkey creature token named Ragavan that's tapped and attacking. Exile that token at end of combat. this.addAbility(new AttacksTriggeredAbility(new KariZevSkyshipRaiderEffect(), false)); diff --git a/Mage.Sets/src/mage/cards/k/KederektCreeper.java b/Mage.Sets/src/mage/cards/k/KederektCreeper.java index e806e4fafbe..2fa7de084b3 100644 --- a/Mage.Sets/src/mage/cards/k/KederektCreeper.java +++ b/Mage.Sets/src/mage/cards/k/KederektCreeper.java @@ -53,7 +53,7 @@ public class KederektCreeper extends CardImpl { this.addAbility(DeathtouchAbility.getInstance()); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public KederektCreeper(final KederektCreeper card) { diff --git a/Mage.Sets/src/mage/cards/k/KhenraScrapper.java b/Mage.Sets/src/mage/cards/k/KhenraScrapper.java index df5a4af154d..74163295842 100644 --- a/Mage.Sets/src/mage/cards/k/KhenraScrapper.java +++ b/Mage.Sets/src/mage/cards/k/KhenraScrapper.java @@ -54,7 +54,7 @@ public class KhenraScrapper extends CardImpl { this.toughness = new MageInt(3); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // You may exert Khenra Scrapper as it attacks. When you do, it gets +2/+0 until end of turn. this.addAbility(new ExertAbility(new BecomesExertSourceTriggeredAbility(new BoostSourceEffect(2, 0, Duration.EndOfTurn)))); diff --git a/Mage.Sets/src/mage/cards/k/KheruMindEater.java b/Mage.Sets/src/mage/cards/k/KheruMindEater.java index 5be14b360be..fb07722cd29 100644 --- a/Mage.Sets/src/mage/cards/k/KheruMindEater.java +++ b/Mage.Sets/src/mage/cards/k/KheruMindEater.java @@ -67,7 +67,7 @@ public class KheruMindEater extends CardImpl { this.toughness = new MageInt(3); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever Kheru Mind-Eater deals combat damage to a player, that player exiles a card from his or her hand face down. this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new KheruMindEaterExileEffect(), false, true)); diff --git a/Mage.Sets/src/mage/cards/k/KinjallisCaller.java b/Mage.Sets/src/mage/cards/k/KinjallisCaller.java new file mode 100644 index 00000000000..7be71ff7d47 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KinjallisCaller.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class KinjallisCaller extends CardImpl { + + private static final FilterCard filter = new FilterCard("Dinosaur spells"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public KinjallisCaller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Dinosaur spells you cast cost {1} less to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1))); + } + + public KinjallisCaller(final KinjallisCaller card) { + super(card); + } + + @Override + public KinjallisCaller copy() { + return new KinjallisCaller(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java index 31db10e3dc2..b285af76211 100644 --- a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java +++ b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java @@ -79,7 +79,7 @@ public class KozilekTheGreatDistortion extends CardImpl { new CardsInHandCondition(ComparisonType.FEWER_THAN, 7), "When you cast {this}, if you have fewer than seven cards in hand, draw cards equal to the difference.")); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Discard a card with converted mana cost X: Counter target spell with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new KozilekDiscardCost()); diff --git a/Mage.Sets/src/mage/cards/k/KozileksShrieker.java b/Mage.Sets/src/mage/cards/k/KozileksShrieker.java index ef2a66100c4..6e5daf684b5 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksShrieker.java +++ b/Mage.Sets/src/mage/cards/k/KozileksShrieker.java @@ -63,7 +63,7 @@ public class KozileksShrieker extends CardImpl { Effect effect = new BoostSourceEffect(1, 0, Duration.EndOfTurn); effect.setText("{this} gets +1/+0"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{C}")); - effect = new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn); + effect = new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.EndOfTurn); effect.setText("and gains menace until end of turn"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java b/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java index 7ba04117a0b..fad3fc6aa86 100644 --- a/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java +++ b/Mage.Sets/src/mage/cards/l/LordOfTheAccursed.java @@ -65,7 +65,7 @@ public class LordOfTheAccursed extends CardImpl { //{2}{B}, Tap: All Zombies gain menace until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( - new MenaceAbility(), + MenaceAbility.getInstance(), Duration.EndOfTurn, filter, "All Zombies gains menace until end of turn."), new ManaCostsImpl("{1}{B}")); diff --git a/Mage.Sets/src/mage/cards/l/LoseCalm.java b/Mage.Sets/src/mage/cards/l/LoseCalm.java index 7891c5c802c..6f28ff7ac1e 100644 --- a/Mage.Sets/src/mage/cards/l/LoseCalm.java +++ b/Mage.Sets/src/mage/cards/l/LoseCalm.java @@ -56,7 +56,7 @@ public class LoseCalm extends CardImpl { this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "It gains haste until end of turn")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - effect = new GainAbilityTargetEffect(new MenaceAbility(), Duration.EndOfTurn); + effect = new GainAbilityTargetEffect(MenaceAbility.getInstance(), Duration.EndOfTurn); effect.setText("and menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) "); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/m/MadcapSkills.java b/Mage.Sets/src/mage/cards/m/MadcapSkills.java index b3c89573c6c..20e4d5d57b6 100644 --- a/Mage.Sets/src/mage/cards/m/MadcapSkills.java +++ b/Mage.Sets/src/mage/cards/m/MadcapSkills.java @@ -65,7 +65,7 @@ public class MadcapSkills extends CardImpl { // Enchanted creature gets +3/+0 and and has menace. (It can't be blocked except by two or more creatures.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 0))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.AURA))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(MenaceAbility.getInstance(), AttachmentType.AURA))); } public MadcapSkills(final MadcapSkills card) { diff --git a/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java b/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java index eb20db682b9..f1c3ccdd0ab 100644 --- a/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java +++ b/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java @@ -187,7 +187,7 @@ class MajesticMyriarchEffect extends OneShotEffect { // Menace if (game.getBattlefield().contains(filterMenace, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn), source); + game.addEffect(new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.EndOfTurn), source); } // Reach diff --git a/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java b/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java index 5e9422278a3..61710ca3b1b 100644 --- a/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java +++ b/Mage.Sets/src/mage/cards/m/MathasFiendSeeker.java @@ -76,7 +76,7 @@ public class MathasFiendSeeker extends CardImpl { this.toughness = new MageInt(3); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // At the beginning of your end step, put a bounty counter on target creature an opponent controls. For as long as that creature has a bounty counter on it, it has "When this creature dies, each opponent draws a card and gains 2 life." Ability ability = new BeginningOfYourEndStepTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), false); diff --git a/Mage.Sets/src/mage/cards/m/MaulfistSquad.java b/Mage.Sets/src/mage/cards/m/MaulfistSquad.java index 21ba08c1b11..36064255ed5 100644 --- a/Mage.Sets/src/mage/cards/m/MaulfistSquad.java +++ b/Mage.Sets/src/mage/cards/m/MaulfistSquad.java @@ -50,7 +50,7 @@ public class MaulfistSquad extends CardImpl { this.toughness = new MageInt(1); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Fabricate 1 this.addAbility(new FabricateAbility(1)); diff --git a/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java b/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java index 52451801a1e..17508ecef28 100644 --- a/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java +++ b/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java @@ -60,7 +60,7 @@ public class MoonriseIntruder extends CardImpl { this.transformable = true; // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Moonrise Intruder. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); diff --git a/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java b/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java index af45b60e8ed..e94e979e3a0 100644 --- a/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java +++ b/Mage.Sets/src/mage/cards/m/MorkrutNecropod.java @@ -64,7 +64,7 @@ public class MorkrutNecropod extends CardImpl { this.toughness = new MageInt(7); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Whenever Morkrut Necropod attacks or blocks, sacrifice another creature or land. this.addAbility(new AttacksOrBlocksTriggeredAbility(new SacrificeControllerEffect(filter, 1, ""), false)); diff --git a/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java b/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java index ac970257543..ea283f6b40a 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousGearhulk.java @@ -64,7 +64,7 @@ public class NoxiousGearhulk extends CardImpl { this.toughness = new MageInt(4); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // When Noxious Gearhulk enters the battlefield, you may destroy another target creature. If a creature is destroyed this way, you gain life equal to its toughness. Ability ability = new EntersBattlefieldTriggeredAbility(new NoxiousGearhulkEffect()); diff --git a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java index fb5134254c0..ffcdd9be465 100644 --- a/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java +++ b/Mage.Sets/src/mage/cards/o/OdricLunarchMarshal.java @@ -161,7 +161,7 @@ class OdricLunarchMarshalEffect extends OneShotEffect { // Menace if (game.getBattlefield().contains(filterMenace, source.getControllerId(), 1, game)) { - game.addEffect(new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn, filterCreatures), source); + game.addEffect(new GainAbilityControlledEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, filterCreatures), source); } // Reach diff --git a/Mage.Sets/src/mage/cards/p/PlagueBelcher.java b/Mage.Sets/src/mage/cards/p/PlagueBelcher.java index 8fb0c4c615b..048ee5f58bd 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueBelcher.java +++ b/Mage.Sets/src/mage/cards/p/PlagueBelcher.java @@ -70,7 +70,7 @@ public class PlagueBelcher extends CardImpl { this.toughness = new MageInt(4); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // When Plague Belcher enters the battlefield, put two -1/-1 counters on target creature you control. Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance(2))); diff --git a/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java b/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java index a427dc47c55..1a129f3138e 100644 --- a/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java +++ b/Mage.Sets/src/mage/cards/p/PurphorossEmissary.java @@ -60,11 +60,11 @@ public class PurphorossEmissary extends CardImpl { this.addAbility(new BestowAbility(this, "{6}{R}")); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Enchanted creature gets +3/+3 and and has menace. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3,3)); - Effect effect = new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.AURA); + Effect effect = new GainAbilityAttachedEffect(MenaceAbility.getInstance(), AttachmentType.AURA); effect.setText("and has menace"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/p/PyreheartWolf.java b/Mage.Sets/src/mage/cards/p/PyreheartWolf.java index 8ab32e9b2b4..7f2a4d74777 100644 --- a/Mage.Sets/src/mage/cards/p/PyreheartWolf.java +++ b/Mage.Sets/src/mage/cards/p/PyreheartWolf.java @@ -62,7 +62,7 @@ public class PyreheartWolf extends CardImpl { this.toughness = new MageInt(1); // Whenever Pyreheart Wolf attacks, creatures you control gain menace until end of turn. (They can't be blocked except by two or more creatures.) - this.addAbility(new AttacksTriggeredAbility(new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, filter), false)); + this.addAbility(new AttacksTriggeredAbility(new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.EndOfTurn, filter), false)); // Undying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.) this.addAbility(new UndyingAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RampagingFerocidon.java b/Mage.Sets/src/mage/cards/r/RampagingFerocidon.java index 17663bc7fa6..2efeba3540f 100644 --- a/Mage.Sets/src/mage/cards/r/RampagingFerocidon.java +++ b/Mage.Sets/src/mage/cards/r/RampagingFerocidon.java @@ -71,7 +71,7 @@ public class RampagingFerocidon extends CardImpl { this.toughness = new MageInt(3); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Players can't gain life. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RampagingFerocidonEffect())); diff --git a/Mage.Sets/src/mage/cards/r/RelentlessDead.java b/Mage.Sets/src/mage/cards/r/RelentlessDead.java index 48e4026b520..58f00840328 100644 --- a/Mage.Sets/src/mage/cards/r/RelentlessDead.java +++ b/Mage.Sets/src/mage/cards/r/RelentlessDead.java @@ -63,7 +63,7 @@ public class RelentlessDead extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. this.addAbility(new DiesTriggeredAbility(new DoIfCostPaid(new ReturnToHandSourceEffect(), new ManaCostsImpl("{B}")))); diff --git a/Mage.Sets/src/mage/cards/r/RipscalePredator.java b/Mage.Sets/src/mage/cards/r/RipscalePredator.java index 916b3383d9d..7f7e7d00a0f 100644 --- a/Mage.Sets/src/mage/cards/r/RipscalePredator.java +++ b/Mage.Sets/src/mage/cards/r/RipscalePredator.java @@ -49,7 +49,7 @@ public class RipscalePredator extends CardImpl { this.toughness = new MageInt(5); // Ripscale Predator can't be blocked except by two or more creatures. - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public RipscalePredator(final RipscalePredator card) { diff --git a/Mage.Sets/src/mage/cards/s/ScroungedScythe.java b/Mage.Sets/src/mage/cards/s/ScroungedScythe.java index eded8abdd17..ceb1af837fc 100644 --- a/Mage.Sets/src/mage/cards/s/ScroungedScythe.java +++ b/Mage.Sets/src/mage/cards/s/ScroungedScythe.java @@ -60,7 +60,7 @@ public class ScroungedScythe extends CardImpl { // As long as equipped creature is a Human, it has menace. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new ConditionalContinuousEffect(new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.EQUIPMENT), + new ConditionalContinuousEffect(new GainAbilityAttachedEffect(MenaceAbility.getInstance(), AttachmentType.EQUIPMENT), new EquippedHasSubtypeCondition(SubType.HUMAN), staticText))); // Equip {2} diff --git a/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java b/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java index 95e1ac33b16..9f1d878f865 100644 --- a/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java +++ b/Mage.Sets/src/mage/cards/s/SearingSpearAskari.java @@ -59,7 +59,7 @@ public class SearingSpearAskari extends CardImpl { this.addAbility(new FlankingAbility()); // {1}{R}: Searing Spear Askari gains menace until end of turn. (It can't be blocked except by two or more creatures.) - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"))); } public SearingSpearAskari(final SearingSpearAskari card) { diff --git a/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java b/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java index 692c50fdc3e..719ef835506 100644 --- a/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java +++ b/Mage.Sets/src/mage/cards/s/ShatterskullRecruit.java @@ -50,7 +50,7 @@ public class ShatterskullRecruit extends CardImpl { this.toughness = new MageInt(4); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public ShatterskullRecruit(final ShatterskullRecruit card) { diff --git a/Mage.Sets/src/mage/cards/s/SinProdder.java b/Mage.Sets/src/mage/cards/s/SinProdder.java index bae067a022c..9df1da79ada 100644 --- a/Mage.Sets/src/mage/cards/s/SinProdder.java +++ b/Mage.Sets/src/mage/cards/s/SinProdder.java @@ -61,7 +61,7 @@ public class SinProdder extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // At the beginning of your upkeep, reveal the top card of your library. Any opponent may have you put that card into your graveyard. If a player does, // Sin Prodder deals damage to that player equal to that card's converted mana cost. Otherwise, put that card into your hand. diff --git a/Mage.Sets/src/mage/cards/s/SinuousVermin.java b/Mage.Sets/src/mage/cards/s/SinuousVermin.java index c2313318383..b1593aa7b80 100644 --- a/Mage.Sets/src/mage/cards/s/SinuousVermin.java +++ b/Mage.Sets/src/mage/cards/s/SinuousVermin.java @@ -62,7 +62,7 @@ public class SinuousVermin extends CardImpl { // As long as Sinuous Vermin is monstrous, it has menace. Ability ability = new SimpleStaticAbility( Zone.BATTLEFIELD, - new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), + new ConditionalContinuousEffect(new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield), MonstrousCondition.instance, "As long as {this} is monstrous, it has menace")); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/SithLord.java b/Mage.Sets/src/mage/cards/s/SithLord.java index 60255f1c544..76c6509cdf3 100644 --- a/Mage.Sets/src/mage/cards/s/SithLord.java +++ b/Mage.Sets/src/mage/cards/s/SithLord.java @@ -59,7 +59,7 @@ public class SithLord extends CardImpl { this.toughness = new MageInt(2); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Sith Lord enters the battlefield with X +1/+1 counters on it, where X is the total life lost by your opponents this turn. this.addAbility(new EntersBattlefieldAbility(new SithLordEffect(), rule)); diff --git a/Mage.Sets/src/mage/cards/s/Skulduggery.java b/Mage.Sets/src/mage/cards/s/Skulduggery.java new file mode 100644 index 00000000000..7690f8944c1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Skulduggery.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class Skulduggery extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public Skulduggery(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); + + // Until end of turn, target creature you control gets +1/+1 and target creature an opponent controls gets -1/-1. + this.getSpellAbility().addEffect(new SkulduggeryEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public Skulduggery(final Skulduggery card) { + super(card); + } + + @Override + public Skulduggery copy() { + return new Skulduggery(this); + } +} + +class SkulduggeryEffect extends ContinuousEffectImpl { + + public SkulduggeryEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + this.staticText = "Until end of turn, target creature you control gets +1/+1 and target creature an opponent controls gets -1/-1"; + } + + public SkulduggeryEffect(final SkulduggeryEffect effect) { + super(effect); + } + + @Override + public SkulduggeryEffect copy() { + return new SkulduggeryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.addPower(1); + permanent.addToughness(1); + } + permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (permanent != null) { + permanent.addPower(-1); + permanent.addToughness(-1); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SkyTerror.java b/Mage.Sets/src/mage/cards/s/SkyTerror.java index fd25a46b7f6..b0163d354d8 100644 --- a/Mage.Sets/src/mage/cards/s/SkyTerror.java +++ b/Mage.Sets/src/mage/cards/s/SkyTerror.java @@ -53,7 +53,7 @@ public class SkyTerror extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java b/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java index 4970f4f1798..a2186fd39b0 100644 --- a/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java +++ b/Mage.Sets/src/mage/cards/s/StormbloodBerserker.java @@ -51,7 +51,7 @@ public class StormbloodBerserker extends CardImpl { this.addAbility(new BloodthirstAbility(2)); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public StormbloodBerserker(final StormbloodBerserker card) { diff --git a/Mage.Sets/src/mage/cards/s/SummitApes.java b/Mage.Sets/src/mage/cards/s/SummitApes.java index 2c5f7624340..0126be12a0f 100644 --- a/Mage.Sets/src/mage/cards/s/SummitApes.java +++ b/Mage.Sets/src/mage/cards/s/SummitApes.java @@ -65,7 +65,7 @@ public class SummitApes extends CardImpl { // As long as you control a Mountain, Summit Apes has menace. (It can't be blocked except by two or more creatures.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility()), new PermanentsOnTheBattlefieldCondition(filter), rule))); + new ConditionalContinuousEffect(new GainAbilitySourceEffect(MenaceAbility.getInstance()), new PermanentsOnTheBattlefieldCondition(filter), rule))); } public SummitApes(final SummitApes card) { diff --git a/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java b/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java index 83f9283dbe6..e283cd72570 100644 --- a/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java +++ b/Mage.Sets/src/mage/cards/s/SweatworksBrawler.java @@ -54,7 +54,7 @@ public class SweatworksBrawler extends CardImpl { addAbility(new ImproviseAbility()); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public SweatworksBrawler(final SweatworksBrawler card) { diff --git a/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java b/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java index 3c2189926e4..b29a2d35c2f 100644 --- a/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java +++ b/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java @@ -76,7 +76,7 @@ public class TerrorOfKruinPass extends CardImpl { this.addAbility(DoubleStrikeAbility.getInstance()); // Werewolves you control have menace. (They can't be blocked except by two or more creatures.) - Effect effect = new ConditionalContinuousEffect(new GainAbilityAllEffect(new MenaceAbility(), Duration.Custom, filter), new TransformedCondition(), ruleText); + Effect effect = new ConditionalContinuousEffect(new GainAbilityAllEffect(MenaceAbility.getInstance(), Duration.Custom, filter), new TransformedCondition(), ruleText); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Terror of Kruin Pass. diff --git a/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java b/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java index 6a552635417..f39a5577445 100644 --- a/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java +++ b/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java @@ -59,7 +59,7 @@ public class ThrabenFoulbloods extends CardImpl { // Delirium — Thraben Foulbloods gets +1/+1 and has menace as long as there are four or more card types among cards in your graveyard. (A creature with menace can't be blocked except by two or more creatures.) ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), DeliriumCondition.instance, "Delirium — {this} gets +1/+1"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); - ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility()), DeliriumCondition.instance, + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(MenaceAbility.getInstance()), DeliriumCondition.instance, "and has menace as long as there are four or more card types among cards in your graveyard. (A creature with menace can't be blocked except by two or more creatures.)")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TilonallisKnight.java b/Mage.Sets/src/mage/cards/t/TilonallisKnight.java new file mode 100644 index 00000000000..dba7790ec6c --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TilonallisKnight.java @@ -0,0 +1,82 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public class TilonallisKnight extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public TilonallisKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Tilonalli's Knight attacks, if you control a Dinosaur, Tilonalli's Knight gets +1/+1 until end of turn. + Ability ability = new ConditionalTriggeredAbility( + new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false), + new PermanentsOnTheBattlefieldCondition(filter), + "Whenever {this} attacks, if you control a Dinosaur, {this} gets +1/+1 until end of turn." + ); + this.addAbility(ability); + } + + public TilonallisKnight(final TilonallisKnight card) { + super(card); + } + + @Override + public TilonallisKnight copy() { + return new TilonallisKnight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java b/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java index 53828c92d99..69f9a4d8c54 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedDragon.java @@ -63,7 +63,7 @@ public class TwoHeadedDragon extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,0, Duration.EndOfTurn),new ManaCostsImpl("{1}{R}"))); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); // Two-Headed Dragon can block an additional creature each combat. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect())); diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java b/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java index d2bf0bbdeaf..39fcd989c53 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java @@ -56,7 +56,7 @@ public class TwoHeadedSliver extends CardImpl { // All Sliver creatures have menace. (They can't be blocked except by two or more creatures.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( - new MenaceAbility(), + MenaceAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, "All Sliver creatures have menace. (They can't be blocked except by two or more creatures.)"))); } diff --git a/Mage.Sets/src/mage/cards/u/UntamedHunger.java b/Mage.Sets/src/mage/cards/u/UntamedHunger.java index 3e442a8d324..e2bcd15cadc 100644 --- a/Mage.Sets/src/mage/cards/u/UntamedHunger.java +++ b/Mage.Sets/src/mage/cards/u/UntamedHunger.java @@ -65,7 +65,7 @@ public class UntamedHunger extends CardImpl { // Enchanted creature gets +2/+1 and has menace. ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 1)); - Effect effect = new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.AURA); + Effect effect = new GainAbilityAttachedEffect(MenaceAbility.getInstance(), AttachmentType.AURA); effect.setText("and has menace"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/v/ViashinoRunner.java b/Mage.Sets/src/mage/cards/v/ViashinoRunner.java index 82d43889c58..5056c300a77 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoRunner.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoRunner.java @@ -49,7 +49,7 @@ public class ViashinoRunner extends CardImpl { this.toughness = new MageInt(2); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public ViashinoRunner(final ViashinoRunner card) { diff --git a/Mage.Sets/src/mage/cards/v/VineKami.java b/Mage.Sets/src/mage/cards/v/VineKami.java index d0047621143..f9f59046304 100644 --- a/Mage.Sets/src/mage/cards/v/VineKami.java +++ b/Mage.Sets/src/mage/cards/v/VineKami.java @@ -50,7 +50,7 @@ public class VineKami extends CardImpl { this.toughness = new MageInt(4); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); this.addAbility(new SoulshiftAbility(6)); } diff --git a/Mage.Sets/src/mage/cards/w/WaywardGiant.java b/Mage.Sets/src/mage/cards/w/WaywardGiant.java index 853d79594a6..eb46bea018e 100644 --- a/Mage.Sets/src/mage/cards/w/WaywardGiant.java +++ b/Mage.Sets/src/mage/cards/w/WaywardGiant.java @@ -48,7 +48,7 @@ public class WaywardGiant extends CardImpl { this.toughness = new MageInt(5); // Menace - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public WaywardGiant(final WaywardGiant card) { diff --git a/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java b/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java index 78d29197633..e520e706ba7 100644 --- a/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java +++ b/Mage.Sets/src/mage/cards/w/WeldfastMonitor.java @@ -55,7 +55,7 @@ public class WeldfastMonitor extends CardImpl { // {R}: Weldfast Monitor gains menace until end of turn this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilitySourceEffect(new MenaceAbility(), Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); + new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); } diff --git a/Mage.Sets/src/mage/cards/w/WindSpirit.java b/Mage.Sets/src/mage/cards/w/WindSpirit.java index 399e0b95231..74b9a53e11a 100644 --- a/Mage.Sets/src/mage/cards/w/WindSpirit.java +++ b/Mage.Sets/src/mage/cards/w/WindSpirit.java @@ -54,7 +54,7 @@ public class WindSpirit extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Menace (This creature can't be blocked except by two or more creatures.) - this.addAbility(new MenaceAbility()); + this.addAbility(MenaceAbility.getInstance()); } public WindSpirit(final WindSpirit card) { diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index 40d26878675..e6ac8b0d36c 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -45,6 +45,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Bishop of the Bloodstained", 91, Rarity.UNCOMMON, mage.cards.b.BishopOfTheBloodstained.class)); cards.add(new SetCardInfo("Bloodcrazed Paladin", 93, Rarity.RARE, mage.cards.b.BloodcrazedPaladin.class)); cards.add(new SetCardInfo("Boneyard Parley", 94, Rarity.MYTHIC, mage.cards.b.BoneyardParley.class)); + cards.add(new SetCardInfo("Brazen Buccaneers", 134, Rarity.COMMON, mage.cards.b.BrazenBuccaneers.class)); cards.add(new SetCardInfo("Burning Sun's Avatar", 135, Rarity.RARE, mage.cards.b.BurningSunsAvatar.class)); cards.add(new SetCardInfo("Call to the Feast", 219, Rarity.UNCOMMON, mage.cards.c.CallToTheFeast.class)); cards.add(new SetCardInfo("Captain Lannery Storm", 136, Rarity.RARE, mage.cards.c.CaptainLanneryStorm.class)); @@ -64,8 +65,10 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Deathless Ancient", 100, Rarity.UNCOMMON, mage.cards.d.DeathlessAncient.class)); cards.add(new SetCardInfo("Deeproot Champion", 185, Rarity.RARE, mage.cards.d.DeeprootChampion.class)); cards.add(new SetCardInfo("Deeproot Waters", 51, Rarity.UNCOMMON, mage.cards.d.DeeprootWaters.class)); + cards.add(new SetCardInfo("Desperate Castaways", 101, Rarity.COMMON, mage.cards.d.DesperateCastaways.class)); cards.add(new SetCardInfo("Dinosaur Stampede", 140, Rarity.UNCOMMON, mage.cards.d.DinosaurStampede.class)); cards.add(new SetCardInfo("Dire Fleet Captain", 221, Rarity.UNCOMMON, mage.cards.d.DireFleetCaptain.class)); + cards.add(new SetCardInfo("Dire Fleet Hoarder", 102, Rarity.COMMON, mage.cards.d.DireFleetHoarder.class)); cards.add(new SetCardInfo("Dowsing Dagger", 235, Rarity.RARE, mage.cards.d.DowsingDagger.class)); cards.add(new SetCardInfo("Dragonskull Summit", 252, Rarity.RARE, mage.cards.d.DragonskullSummit.class)); cards.add(new SetCardInfo("Dreamcaller Siren", 54, Rarity.RARE, mage.cards.d.DreamcallerSiren.class)); @@ -93,12 +96,14 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Huatli's Spurring", 287, Rarity.UNCOMMON, mage.cards.h.HuatlisSpurring.class)); cards.add(new SetCardInfo("Huatli, Dinosaur Knight", 285, Rarity.MYTHIC, mage.cards.h.HuatliDinosaurKnight.class)); cards.add(new SetCardInfo("Huatli, Warrior Poet", 224, Rarity.MYTHIC, mage.cards.h.HuatliWarriorPoet.class)); + cards.add(new SetCardInfo("Imperial Lancer", 15, Rarity.UNCOMMON, mage.cards.i.ImperialLancer.class)); cards.add(new SetCardInfo("Island", 265, Rarity.LAND, mage.cards.basiclands.Island.class)); cards.add(new SetCardInfo("Itlimoc, Cradle of the Sun", 191, Rarity.RARE, mage.cards.i.ItlimocCradleOfTheSun.class)); cards.add(new SetCardInfo("Ixalan's Binding", 17, Rarity.UNCOMMON, mage.cards.i.IxalansBinding.class)); cards.add(new SetCardInfo("Jace's Sentinel", 283, Rarity.UNCOMMON, mage.cards.j.JacesSentinel.class)); cards.add(new SetCardInfo("Jace, Cunning Castaway", 60, Rarity.MYTHIC, mage.cards.j.JaceCunningCastaway.class)); cards.add(new SetCardInfo("Jace, Ingenious Mind-Mage", 280, Rarity.MYTHIC, mage.cards.j.JaceIngeniousMindMage.class)); + cards.add(new SetCardInfo("Kinjalli's Caller", 18, Rarity.COMMON, mage.cards.k.KinjallisCaller.class)); cards.add(new SetCardInfo("Kinjalli's Sunwing", 19, Rarity.RARE, mage.cards.k.KinjallisSunwing.class)); cards.add(new SetCardInfo("Kitesail Freebooter", 110, Rarity.UNCOMMON, mage.cards.k.KitesailFreebooter.class)); cards.add(new SetCardInfo("Kopala, Warden of Waves", 61, Rarity.RARE, mage.cards.k.KopalaWardenOfWaves.class)); @@ -152,6 +157,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Shapers' Sanctuary", 206, Rarity.RARE, mage.cards.s.ShapersSanctuary.class)); cards.add(new SetCardInfo("Siren Stormtamer", 79, Rarity.UNCOMMON, mage.cards.s.SirenStormtamer.class)); cards.add(new SetCardInfo("Skittering Heartstopper", 122, Rarity.COMMON, mage.cards.s.SkitteringHeartstopper.class)); + cards.add(new SetCardInfo("Skulduggery", 123, Rarity.COMMON, mage.cards.s.Skulduggery.class)); cards.add(new SetCardInfo("Sky Terror", 229, Rarity.UNCOMMON, mage.cards.s.SkyTerror.class)); cards.add(new SetCardInfo("Sleek Schooner", 247, Rarity.UNCOMMON, mage.cards.s.SleekSchooner.class)); cards.add(new SetCardInfo("Slice in Twain", 207, Rarity.UNCOMMON, mage.cards.s.SliceinTwain.class)); @@ -172,6 +178,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Temple of Aclazotz", 90, Rarity.RARE, mage.cards.t.TempleOfAclazotz.class)); cards.add(new SetCardInfo("Thaumatic Compass", 249, Rarity.RARE, mage.cards.t.ThaumaticCompass.class)); cards.add(new SetCardInfo("Thundering Spineback", 210, Rarity.UNCOMMON, mage.cards.t.ThunderingSpineback.class)); + cards.add(new SetCardInfo("Tilonalli's Knight", 169, Rarity.COMMON, mage.cards.t.TilonallisKnight.class)); cards.add(new SetCardInfo("Tilonalli's Skinshifter", 170, Rarity.RARE, mage.cards.t.TilonallisSkinshifter.class)); cards.add(new SetCardInfo("Tishana's Wayfinder", 211, Rarity.COMMON, mage.cards.t.TishanasWayfinder.class)); cards.add(new SetCardInfo("Tishana, Voice of Thunder", 230, Rarity.MYTHIC, mage.cards.t.TishanaVoiceOfThunder.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExertTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExertTest.java index 67053e496dd..fabd383709b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExertTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExertTest.java @@ -105,7 +105,7 @@ public class ExertTest extends CardTestPlayerBase { setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); execute(); - assertAbility(playerA, minotaur, new MenaceAbility(), true); + assertAbility(playerA, minotaur, MenaceAbility.getInstance(), true); assertPowerToughness(playerA, minotaur, 5, 4); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RenownTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RenownTest.java index 4a138d3fc33..9cf055f0a62 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RenownTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RenownTest.java @@ -203,7 +203,7 @@ public class RenownTest extends CardTestPlayerBase { Permanent goblin = getPermanent("Goblin Glory Chaser", playerA); Assert.assertEquals("has has renown", true, goblin.isRenowned()); - assertAbility(playerA, "Goblin Glory Chaser", new MenaceAbility(), true); + assertAbility(playerA, "Goblin Glory Chaser", MenaceAbility.getInstance(), true); assertPowerToughness(playerA, "Goblin Glory Chaser", 2, 2); assertLife(playerA, 20); diff --git a/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java b/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java index 8735b17d3ff..6e55108574a 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java @@ -5,28 +5,35 @@ */ package mage.abilities.keyword; +import java.io.ObjectStreamException; import mage.abilities.Ability; -import mage.abilities.StaticAbility; +import mage.abilities.EvasionAbility; +import mage.abilities.MageSingleton; import mage.abilities.effects.common.combat.CantBeBlockedByOneEffect; -import mage.constants.Zone; /** * * @author LevelX2 */ -public class MenaceAbility extends StaticAbility { +public class MenaceAbility extends EvasionAbility implements MageSingleton { - public MenaceAbility() { - super(Zone.BATTLEFIELD, new CantBeBlockedByOneEffect(2)); + private static final MenaceAbility instance = new MenaceAbility(); + + private Object readResolve() throws ObjectStreamException { + return instance; } - public MenaceAbility(final MenaceAbility ability) { - super(ability); + public static MenaceAbility getInstance() { + return instance; + } + + private MenaceAbility() { + this.addEffect(new CantBeBlockedByOneEffect(2)); } @Override public Ability copy() { - return new MenaceAbility(this); + return instance; } @Override diff --git a/Mage/src/main/java/mage/game/permanent/token/PirateToken.java b/Mage/src/main/java/mage/game/permanent/token/PirateToken.java index fe4d04270fd..37a3ee7a52b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PirateToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PirateToken.java @@ -45,6 +45,6 @@ public class PirateToken extends Token { subtype.add(SubType.PIRATE); power = new MageInt(2); toughness = new MageInt(2); - addAbility(new MenaceAbility()); + addAbility(MenaceAbility.getInstance()); } }