Implement [WOE] Moment of Valor

This commit is contained in:
xenohedron 2023-08-24 23:57:19 -04:00
parent c45627db0c
commit 40ec773c5f
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,54 @@
package mage.cards.m;
import mage.abilities.Mode;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author xenohedron
*/
public final class MomentOfValor extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater");
static {
filter.add(new PowerPredicate(ComparisonType.OR_GREATER, 4));
}
public MomentOfValor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
// Choose one --
// * Untap target creature. It gets +1/+0 and gains indestructible until end of turn.
this.getSpellAbility().addEffect(new UntapTargetEffect());
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0).setText("It gets +1/+0"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance()).setText("and gains indestructible until end of turn"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// * Destroy target creature with power 4 or greater.
Mode mode = new Mode(new DestroyTargetEffect());
mode.addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addMode(mode);
}
private MomentOfValor(final MomentOfValor card) {
super(card);
}
@Override
public MomentOfValor copy() {
return new MomentOfValor(this);
}
}

View file

@ -145,6 +145,7 @@ public final class WildsOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Mintstrosity", 100, Rarity.COMMON, mage.cards.m.Mintstrosity.class));
cards.add(new SetCardInfo("Misleading Motes", 61, Rarity.COMMON, mage.cards.m.MisleadingMotes.class));
cards.add(new SetCardInfo("Mocking Sprite", 62, Rarity.COMMON, mage.cards.m.MockingSprite.class));
cards.add(new SetCardInfo("Moment of Valor", 20, Rarity.COMMON, mage.cards.m.MomentOfValor.class));
cards.add(new SetCardInfo("Monstrous Rage", 142, Rarity.UNCOMMON, mage.cards.m.MonstrousRage.class));
cards.add(new SetCardInfo("Moonshaker Cavalry", 21, Rarity.MYTHIC, mage.cards.m.MoonshakerCavalry.class));
cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));