diff --git a/Mage.Sets/src/mage/cards/c/ChangeTheEquation.java b/Mage.Sets/src/mage/cards/c/ChangeTheEquation.java new file mode 100644 index 0000000000..04c890a690 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChangeTheEquation.java @@ -0,0 +1,55 @@ +package mage.cards.c; + +import mage.ObjectColor; +import mage.abilities.Mode; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.target.TargetSpell; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ChangeTheEquation extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("spell with mana value 2 or less"); + private static final FilterSpell filter2 = new FilterSpell("red or green spell with mana value 6 or less"); + + static { + filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3)); + filter2.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 7)); + filter.add(Predicates.or( + new ColorPredicate(ObjectColor.RED), + new ColorPredicate(ObjectColor.GREEN) + )); + } + + public ChangeTheEquation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Choose one -- + // * Counter target spell with mana value 2 or less. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + + // * Counter target red or green spell with mana value 6 or less. + this.getSpellAbility().addMode(new Mode(new CounterTargetEffect()).addTarget(new TargetSpell(filter2))); + } + + private ChangeTheEquation(final ChangeTheEquation card) { + super(card); + } + + @Override + public ChangeTheEquation copy() { + return new ChangeTheEquation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index c6f5fb893c..f0bed42e43 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -26,6 +26,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Blossoming Sands", 268, Rarity.COMMON, mage.cards.b.BlossomingSands.class)); cards.add(new SetCardInfo("Boon-Bringer Valkyrie", 9, Rarity.RARE, mage.cards.b.BoonBringerValkyrie.class)); cards.add(new SetCardInfo("Chandra, Hope's Beacon", 134, Rarity.MYTHIC, mage.cards.c.ChandraHopesBeacon.class)); + cards.add(new SetCardInfo("Change the Equation", 50, Rarity.UNCOMMON, mage.cards.c.ChangeTheEquation.class)); cards.add(new SetCardInfo("Chrome Host Hulk", 188, Rarity.UNCOMMON, mage.cards.c.ChromeHostHulk.class)); cards.add(new SetCardInfo("City on Fire", 135, Rarity.RARE, mage.cards.c.CityOnFire.class)); cards.add(new SetCardInfo("Cragsmasher Yeti", 333, Rarity.COMMON, mage.cards.c.CragsmasherYeti.class));