diff --git a/Mage.Sets/src/mage/cards/a/AnimistsMight.java b/Mage.Sets/src/mage/cards/a/AnimistsMight.java new file mode 100644 index 0000000000..24825edbc3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AnimistsMight.java @@ -0,0 +1,61 @@ +package mage.cards.a; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceTargetsPermanentCondition; +import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AnimistsMight extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("a legendary creature you control"); + private static final FilterPermanent filter2 + = new FilterCreatureOrPlaneswalkerPermanent("creature or planeswalker you don't control"); + + static { + filter.add(SuperType.LEGENDARY.getPredicate()); + filter2.add(TargetController.NOT_YOU.getControllerPredicate()); + } + + private static final Condition condition = new SourceTargetsPermanentCondition(filter); + + public AnimistsMight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + // This spell costs {2} less to cast if it targets a legendary creature you control. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new SpellCostReductionSourceEffect(2, condition).setCanWorksOnStackOnly(true) + ).setRuleAtTheTop(true)); + + // Target creature you control deals damage equal to twice its power to target creature or planeswalker you don't control. + this.getSpellAbility().addEffect(new DamageWithPowerFromOneToAnotherTargetEffect("", 2)); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + private AnimistsMight(final AnimistsMight card) { + super(card); + } + + @Override + public AnimistsMight copy() { + return new AnimistsMight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java b/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java index d077a30812..f7bd0c8deb 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java @@ -21,6 +21,7 @@ public final class MarchOfTheMachineTheAftermath extends ExpansionSet { this.hasBasicLands = false; this.hasBoosters = false; // temporary + cards.add(new SetCardInfo("Animist's Might", 20, Rarity.UNCOMMON, mage.cards.a.AnimistsMight.class)); cards.add(new SetCardInfo("Arni Metalbrow", 16, Rarity.RARE, mage.cards.a.ArniMetalbrow.class)); cards.add(new SetCardInfo("Ayara's Oathsworn", 11, Rarity.RARE, mage.cards.a.AyarasOathsworn.class)); cards.add(new SetCardInfo("Blot Out", 12, Rarity.UNCOMMON, mage.cards.b.BlotOut.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageWithPowerFromOneToAnotherTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageWithPowerFromOneToAnotherTargetEffect.java index 361526b785..95e88c87f6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageWithPowerFromOneToAnotherTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageWithPowerFromOneToAnotherTargetEffect.java @@ -13,20 +13,27 @@ import mage.players.Player; */ public class DamageWithPowerFromOneToAnotherTargetEffect extends OneShotEffect { - String firstTargetName; + private final String firstTargetName; + private final int multiplier; public DamageWithPowerFromOneToAnotherTargetEffect() { this(""); } public DamageWithPowerFromOneToAnotherTargetEffect(String firstTargetName) { + this(firstTargetName, 1); + } + + public DamageWithPowerFromOneToAnotherTargetEffect(String firstTargetName, int multiplier) { super(Outcome.Damage); this.firstTargetName = firstTargetName; + this.multiplier = multiplier; } public DamageWithPowerFromOneToAnotherTargetEffect(final DamageWithPowerFromOneToAnotherTargetEffect effect) { super(effect); this.firstTargetName = effect.firstTargetName; + this.multiplier = effect.multiplier; } @Override @@ -64,6 +71,8 @@ public class DamageWithPowerFromOneToAnotherTargetEffect extends OneShotEffect { throw new IllegalStateException("It must have two targets, but found " + mode.getTargets().size()); } - return (firstTargetName.isEmpty() ? mode.getTargets().get(0).getDescription() : firstTargetName) + " deals damage equal to its power to " + mode.getTargets().get(1).getDescription(); + return (firstTargetName.isEmpty() ? mode.getTargets().get(0).getDescription() : firstTargetName) + + " deals damage equal to" + (multiplier == 2 ? " twice" : "") + + " its power to " + mode.getTargets().get(1).getDescription(); } }