mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
[BRO] Implement Symmetry Matrix
This commit is contained in:
parent
6a9e5f7aff
commit
894d012f94
2 changed files with 56 additions and 0 deletions
55
Mage.Sets/src/mage/cards/s/SymmetryMatrix.java
Normal file
55
Mage.Sets/src/mage/cards/s/SymmetryMatrix.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SymmetryMatrix extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("a creature with power equal to its toughness");
|
||||
|
||||
static {
|
||||
filter.add(SymmetryMatrixPredicate.instance);
|
||||
}
|
||||
|
||||
public SymmetryMatrix(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
// Whenever a creature with power equal to its toughness enters the battlefield under your control, you may pay {1}. If you do, draw a card.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DoIfCostPaid(
|
||||
new DrawCardSourceControllerEffect(1), new GenericManaCost(1)
|
||||
), filter));
|
||||
}
|
||||
|
||||
private SymmetryMatrix(final SymmetryMatrix card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SymmetryMatrix copy() {
|
||||
return new SymmetryMatrix(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum SymmetryMatrixPredicate implements Predicate<Permanent> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return input.getPower().getValue() == input.getToughness().getValue();
|
||||
}
|
||||
}
|
|
@ -121,6 +121,7 @@ public final class TheBrothersWar extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Surge Engine", 81, Rarity.MYTHIC, mage.cards.s.SurgeEngine.class));
|
||||
cards.add(new SetCardInfo("Survivor of Korlis", 28, Rarity.COMMON, mage.cards.s.SurvivorOfKorlis.class));
|
||||
cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Symmetry Matrix", 252, Rarity.UNCOMMON, mage.cards.s.SymmetryMatrix.class));
|
||||
cards.add(new SetCardInfo("Tawnos, the Toymaker", 222, Rarity.RARE, mage.cards.t.TawnosTheToymaker.class));
|
||||
cards.add(new SetCardInfo("Teferi, Temporal Pilgrim", 66, Rarity.MYTHIC, mage.cards.t.TeferiTemporalPilgrim.class));
|
||||
cards.add(new SetCardInfo("Terisian Mindbreaker", 83, Rarity.RARE, mage.cards.t.TerisianMindbreaker.class));
|
||||
|
|
Loading…
Reference in a new issue