[ECL] Implement Pyrrhic Strike (#14229)

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
Muz 2026-01-10 12:56:36 -06:00 committed by GitHub
parent cdcb0afacc
commit e51275392d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.condition.common.BlightedCondition;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.BlightAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.TargetPermanent;
/**
*
* @author muz
*/
public final class PyrrhicStrike extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("creature with mana value 3 or greater");
static {
filter.add(new ManaValuePredicate(ComparisonType.OR_GREATER, 3));
}
public PyrrhicStrike(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
// As an additional cost to cast this spell, you may blight 2.
this.addAbility(new BlightAbility(2));
// Choose one. If this spell's additional cost was paid, choose both instead.
this.getSpellAbility().getModes().setChooseText(
"Choose one. If this spell's additional cost was paid, choose both instead."
);
this.getSpellAbility().getModes().setMoreCondition(2, BlightedCondition.instance);
// * Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
// * Destroy target creature with mana value 3 or greater.
Mode mode = new Mode(new DestroyTargetEffect());
mode.addTarget(new TargetPermanent(filter));
this.getSpellAbility().addMode(mode);
}
private PyrrhicStrike(final PyrrhicStrike card) {
super(card);
}
@Override
public PyrrhicStrike copy() {
return new PyrrhicStrike(this);
}
}

View file

@ -240,6 +240,7 @@ public final class LorwynEclipsed extends ExpansionSet {
cards.add(new SetCardInfo("Prismatic Undercurrents", 189, Rarity.UNCOMMON, mage.cards.p.PrismaticUndercurrents.class));
cards.add(new SetCardInfo("Protective Response", 29, Rarity.UNCOMMON, mage.cards.p.ProtectiveResponse.class));
cards.add(new SetCardInfo("Puca's Eye", 259, Rarity.UNCOMMON, mage.cards.p.PucasEye.class));
cards.add(new SetCardInfo("Pyrrhic Strike", 30, Rarity.UNCOMMON, mage.cards.p.PyrrhicStrike.class));
cards.add(new SetCardInfo("Reaping Willow", 240, Rarity.UNCOMMON, mage.cards.r.ReapingWillow.class));
cards.add(new SetCardInfo("Pummeler for Hire", 190, Rarity.UNCOMMON, mage.cards.p.PummelerForHire.class));
cards.add(new SetCardInfo("Reckless Ransacking", 152, Rarity.COMMON, mage.cards.r.RecklessRansacking.class));