forked from External/mage
* Extirpate, Lobotomy, Surgical Extraction - Fixed that non basic lands could not be selected.
This commit is contained in:
parent
fb40dc553e
commit
5d83601a1a
4 changed files with 8 additions and 30 deletions
|
|
@ -53,13 +53,9 @@ public class Bribery extends CardImpl {
|
|||
super(ownerId, 62, "Bribery", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}{U}");
|
||||
this.expansionSetCode = "MMQ";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Search target opponent's library for a creature card and put that card onto the battlefield under your control. Then that player shuffles his or her library.
|
||||
this.getSpellAbility().addEffect(new BriberyEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Bribery(final Bribery card) {
|
||||
|
|
@ -97,7 +93,7 @@ class BriberyEffect extends OneShotEffect {
|
|||
if (controller.searchLibrary(target, game, opponent.getId())) {
|
||||
List<UUID> targets = target.getTargets();
|
||||
for (UUID targetId : targets) {
|
||||
Card card = opponent.getLibrary().remove(targetId, game);
|
||||
Card card = opponent.getLibrary().getCard(targetId, game);
|
||||
if (card != null) {
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,16 +59,13 @@ public class SurgicalExtraction extends CardImpl {
|
|||
private static final FilterCard filter = new FilterCard("card in a graveyard other than a basic land card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
filter.add(Predicates.not(Predicates.and(new CardTypePredicate(CardType.LAND), new SupertypePredicate("Basic"))));
|
||||
}
|
||||
|
||||
public SurgicalExtraction(UUID ownerId) {
|
||||
super(ownerId, 74, "Surgical Extraction", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{BP}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Choose target card in a graveyard other than a basic land card. Search its owner's graveyard,
|
||||
// hand, and library for any number of cards with the same name as that card and exile them.
|
||||
// Then that player shuffles his or her library.
|
||||
|
|
|
|||
|
|
@ -35,14 +35,11 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.SplitSecondAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
|
@ -62,16 +59,13 @@ public class Extirpate extends CardImpl {
|
|||
private static final FilterCard filter = new FilterCard("card in a graveyard other than a basic land card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
filter.add(Predicates.not(Predicates.and(new CardTypePredicate(CardType.LAND), new SupertypePredicate("Basic"))));
|
||||
}
|
||||
|
||||
public Extirpate(UUID ownerId) {
|
||||
super(ownerId, 71, "Extirpate", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
this.expansionSetCode = "PLC";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Split second
|
||||
this.addAbility(new SplitSecondAbility());
|
||||
// Choose target card in a graveyard other than a basic land card. Search its owner's graveyard, hand, and library for all cards with the same name as that card and exile them. Then that player shuffles his or her library.
|
||||
|
|
|
|||
|
|
@ -29,26 +29,21 @@ package mage.sets.tempest;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
|
@ -63,9 +58,6 @@ public class Lobotomy extends CardImpl {
|
|||
super(ownerId, 342, "Lobotomy", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}{B}");
|
||||
this.expansionSetCode = "TMP";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Target player reveals his or her hand, then you choose a card other than a basic land card from it. Search that player's graveyard, hand, and library for all cards with the same name as the chosen card and exile them. Then that player shuffles his or her library.
|
||||
this.getSpellAbility().addEffect(new LobotomyEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
|
@ -86,8 +78,7 @@ class LobotomyEffect extends OneShotEffect {
|
|||
private static final FilterCard filter = new FilterCard("card other than a basic land card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
filter.add(Predicates.not(Predicates.and(new CardTypePredicate(CardType.LAND), new SupertypePredicate("Basic"))));
|
||||
}
|
||||
|
||||
public LobotomyEffect() {
|
||||
|
|
@ -109,8 +100,8 @@ class LobotomyEffect extends OneShotEffect {
|
|||
// reveal hand of target player
|
||||
targetPlayer.revealCards(sourceObject.getLogName(), targetPlayer.getHand(), game);
|
||||
|
||||
// You choose a nonland card from it
|
||||
TargetCardInHand target = new TargetCardInHand(new FilterNonlandCard());
|
||||
// You choose card other than a basic land card
|
||||
TargetCardInHand target = new TargetCardInHand(filter);
|
||||
target.setNotTarget(true);
|
||||
Card chosenCard = null;
|
||||
if (controller.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue