forked from External/mage
[DFT] Implement Ancient Vendetta (#13344)
This commit is contained in:
parent
df0a2760b6
commit
8d54145732
2 changed files with 61 additions and 0 deletions
60
Mage.Sets/src/mage/cards/a/AncientVendetta.java
Normal file
60
Mage.Sets/src/mage/cards/a/AncientVendetta.java
Normal 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 opponent’s 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));
|
||||
}
|
||||
}
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue