implement [LCI] Dusk Rose Reliquary

This commit is contained in:
xenohedron 2023-10-30 19:29:16 -04:00
parent 92e089663f
commit 32310455cb
3 changed files with 49 additions and 1 deletions

View file

@ -0,0 +1,47 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author xenohedron
*/
public final class DuskRoseReliquary extends CardImpl {
public DuskRoseReliquary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{W}");
// As an additional cost to cast this spell, sacrifice an artifact or creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT)));
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// When Dusk Rose Reliquary enters the battlefield, exile target artifact or creature an opponent controls until Dusk Rose Reliquary leaves the battlefield.
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileUntilSourceLeavesEffect());
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_ARTIFACT_OR_CREATURE));
this.addAbility(ability);
}
private DuskRoseReliquary(final DuskRoseReliquary card) {
super(card);
}
@Override
public DuskRoseReliquary copy() {
return new DuskRoseReliquary(this);
}
}

View file

@ -53,6 +53,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
cards.add(new SetCardInfo("Digsite Conservator", 252, Rarity.UNCOMMON, mage.cards.d.DigsiteConservator.class));
cards.add(new SetCardInfo("Dinotomaton", 144, Rarity.COMMON, mage.cards.d.Dinotomaton.class));
cards.add(new SetCardInfo("Dowsing Device", 146, Rarity.UNCOMMON, mage.cards.d.DowsingDevice.class));
cards.add(new SetCardInfo("Dusk Rose Reliquary", 10, Rarity.UNCOMMON, mage.cards.d.DuskRoseReliquary.class));
cards.add(new SetCardInfo("Earthshaker Dreadmaw", 183, Rarity.UNCOMMON, mage.cards.e.EarthshakerDreadmaw.class));
cards.add(new SetCardInfo("Enterprising Scallywag", 148, Rarity.UNCOMMON, mage.cards.e.EnterprisingScallywag.class));
cards.add(new SetCardInfo("Explorer's Cache", 184, Rarity.UNCOMMON, mage.cards.e.ExplorersCache.class));

View file

@ -112,7 +112,7 @@ public class SacrificeTargetCost extends CostImpl implements SacrificeCost {
return permanents;
}
private static final String makeText(TargetControlledPermanent target) {
private static String makeText(TargetControlledPermanent target) {
if (target.getMinNumberOfTargets() != target.getMaxNumberOfTargets()) {
return target.getTargetName();
}