[DFT] Implement Ancient Vendetta (#13344)

This commit is contained in:
jam736 2025-02-16 18:06:08 -05:00 committed by GitHub
parent df0a2760b6
commit 8d54145732
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.effects.common.ChooseACardNameEffect;
import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.Game;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
*
* @author jam736
*/
public final class AncientVendetta extends CardImpl {
public AncientVendetta(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
// Choose a card name. Search target opponents graveyard, hand, and library for up to four cards with that name and exile them. Then that player shuffles.
this.getSpellAbility().addEffect((new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)));
this.getSpellAbility().addEffect(new AncientVendettaEffect());
this.getSpellAbility().addTarget(new TargetOpponent());
}
private AncientVendetta(final AncientVendetta card) {
super(card);
}
@Override
public AncientVendetta copy() {
return new AncientVendetta(this);
}
}
class AncientVendettaEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEffect {
AncientVendettaEffect() {
super(true, "target opponent's", "up to four cards with that name", false, 4);
}
private AncientVendettaEffect(final AncientVendettaEffect effect) {
super(effect);
}
@Override
public AncientVendettaEffect copy() {
return new AncientVendettaEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
String chosenCardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY);
return applySearchAndExile(game, source, chosenCardName, getTargetPointer().getFirst(game, source));
}
}

View file

@ -30,6 +30,7 @@ public final class Aetherdrift extends ExpansionSet {
cards.add(new SetCardInfo("Air Response Unit", 1, Rarity.UNCOMMON, mage.cards.a.AirResponseUnit.class));
cards.add(new SetCardInfo("Alacrian Jaguar", 152, Rarity.COMMON, mage.cards.a.AlacrianJaguar.class));
cards.add(new SetCardInfo("Amonkhet Raceway", 248, Rarity.UNCOMMON, mage.cards.a.AmonkhetRaceway.class));
cards.add(new SetCardInfo("Ancient Vendetta", 75, Rarity.UNCOMMON, mage.cards.a.AncientVendetta.class));
cards.add(new SetCardInfo("Apocalypse Runner", 188, Rarity.UNCOMMON, mage.cards.a.ApocalypseRunner.class));
cards.add(new SetCardInfo("Autarch Mammoth", 153, Rarity.UNCOMMON, mage.cards.a.AutarchMammoth.class));
cards.add(new SetCardInfo("Avishkar Raceway", 249, Rarity.COMMON, mage.cards.a.AvishkarRaceway.class));