[CMR] Implemented Sweet-Gum Recluse

This commit is contained in:
Evan Kranzler 2020-10-29 19:13:03 -04:00
parent 408d2b5fc4
commit 7803d92aa6
7 changed files with 73 additions and 11 deletions

View file

@ -23,7 +23,7 @@ public final class CradleToGrave extends CardImpl {
static { static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
filter.add(new EnteredThisTurnPredicate()); filter.add(EnteredThisTurnPredicate.instance);
} }
public CradleToGrave(UUID ownerId, CardSetInfo setInfo) { public CradleToGrave(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,7 +30,7 @@ public final class ForceOfDespair extends CardImpl {
static { static {
filter.add(new ColorPredicate(ObjectColor.BLACK)); filter.add(new ColorPredicate(ObjectColor.BLACK));
filter2.add(new EnteredThisTurnPredicate()); filter2.add(EnteredThisTurnPredicate.instance);
} }
public ForceOfDespair(UUID ownerId, CardSetInfo setInfo) { public ForceOfDespair(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,7 +30,7 @@ public final class ForgeOfHeroes extends CardImpl {
static { static {
filter.add(CommanderPredicate.instance); filter.add(CommanderPredicate.instance);
filter.add(new EnteredThisTurnPredicate()); filter.add(EnteredThisTurnPredicate.instance);
} }
public ForgeOfHeroes(UUID ownerId, CardSetInfo setInfo) { public ForgeOfHeroes(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,7 +28,7 @@ public final class RuinsOfOranRief extends CardImpl {
static { static {
filter.add(ColorlessPredicate.instance); filter.add(ColorlessPredicate.instance);
filter.add(new EnteredThisTurnPredicate()); filter.add(EnteredThisTurnPredicate.instance);
} }
public RuinsOfOranRief(UUID ownerId, CardSetInfo setInfo) { public RuinsOfOranRief(UUID ownerId, CardSetInfo setInfo) {

View file

@ -0,0 +1,66 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.CascadeAbility;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.EnteredThisTurnPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SweetGumRecluse extends CardImpl {
private static final FilterPermanent filter
= new FilterCreaturePermanent("creatures that entered the battlefield this turn");
static {
filter.add(EnteredThisTurnPredicate.instance);
}
public SweetGumRecluse(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.subtype.add(SubType.SPIDER);
this.power = new MageInt(0);
this.toughness = new MageInt(3);
// Flash
this.addAbility(FlashAbility.getInstance());
// Cascade
this.addAbility(new CascadeAbility());
// Reach
this.addAbility(ReachAbility.getInstance());
// When Sweet-Gum Recluse enters the battlefield, put three +1/+1 counters on each of any number of target creatures that entered the battlefield this turn.
Ability ability = new EntersBattlefieldTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance(3))
);
ability.addTarget(new TargetPermanent(0, Integer.MAX_VALUE, filter, false));
this.addAbility(ability);
}
private SweetGumRecluse(final SweetGumRecluse card) {
super(card);
}
@Override
public SweetGumRecluse copy() {
return new SweetGumRecluse(this);
}
}

View file

@ -107,6 +107,7 @@ public final class CommanderLegends extends ExpansionSet {
cards.add(new SetCardInfo("Spectator Seating", 356, Rarity.RARE, mage.cards.s.SpectatorSeating.class)); cards.add(new SetCardInfo("Spectator Seating", 356, Rarity.RARE, mage.cards.s.SpectatorSeating.class));
cards.add(new SetCardInfo("Staff of Domination", 343, Rarity.RARE, mage.cards.s.StaffOfDomination.class)); cards.add(new SetCardInfo("Staff of Domination", 343, Rarity.RARE, mage.cards.s.StaffOfDomination.class));
cards.add(new SetCardInfo("Supreme Will", 102, Rarity.UNCOMMON, mage.cards.s.SupremeWill.class)); cards.add(new SetCardInfo("Supreme Will", 102, Rarity.UNCOMMON, mage.cards.s.SupremeWill.class));
cards.add(new SetCardInfo("Sweet-Gum Recluse", 260, Rarity.RARE, mage.cards.s.SweetGumRecluse.class));
cards.add(new SetCardInfo("Tevesh Szat, Doom of Fools", 153, Rarity.MYTHIC, mage.cards.t.TeveshSzatDoomOfFools.class)); cards.add(new SetCardInfo("Tevesh Szat, Doom of Fools", 153, Rarity.MYTHIC, mage.cards.t.TeveshSzatDoomOfFools.class));
cards.add(new SetCardInfo("Thorn of the Black Rose", 154, Rarity.COMMON, mage.cards.t.ThornOfTheBlackRose.class)); cards.add(new SetCardInfo("Thorn of the Black Rose", 154, Rarity.COMMON, mage.cards.t.ThornOfTheBlackRose.class));
cards.add(new SetCardInfo("Three Visits", 261, Rarity.UNCOMMON, mage.cards.t.ThreeVisits.class)); cards.add(new SetCardInfo("Three Visits", 261, Rarity.UNCOMMON, mage.cards.t.ThreeVisits.class));

View file

@ -1,8 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.filter.predicate.permanent; package mage.filter.predicate.permanent;
import mage.filter.predicate.Predicate; import mage.filter.predicate.Predicate;
@ -10,10 +5,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public class EnteredThisTurnPredicate implements Predicate<Permanent> { public enum EnteredThisTurnPredicate implements Predicate<Permanent> {
instance;
@Override @Override
public boolean apply(Permanent input, Game game) { public boolean apply(Permanent input, Game game) {