mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[MOM] Implement Change the Equation
This commit is contained in:
parent
b363cbe6a0
commit
012bd3e76b
2 changed files with 56 additions and 0 deletions
55
Mage.Sets/src/mage/cards/c/ChangeTheEquation.java
Normal file
55
Mage.Sets/src/mage/cards/c/ChangeTheEquation.java
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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("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("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("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("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("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));
|
cards.add(new SetCardInfo("Cragsmasher Yeti", 333, Rarity.COMMON, mage.cards.c.CragsmasherYeti.class));
|
||||||
|
|
Loading…
Reference in a new issue