mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge pull request #6123 from ssouders412/FaeOfWIshesFix
Fae of Wishes//Granted fix
This commit is contained in:
commit
5856d0744b
5 changed files with 52 additions and 21 deletions
|
@ -10,9 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
|
@ -22,12 +20,6 @@ import mage.target.common.TargetCardInHand;
|
|||
*/
|
||||
public final class Drekavac extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("noncreature card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
public Drekavac(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
this.subtype.add(SubType.BEAST);
|
||||
|
@ -35,7 +27,7 @@ public final class Drekavac extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Drekavac enters the battlefield, sacrifice it unless you discard a noncreature card.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand(filter)))));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_A_NON_CREATURE)))));
|
||||
}
|
||||
|
||||
public Drekavac(final Drekavac card) {
|
||||
|
|
|
@ -14,10 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
@ -60,12 +57,6 @@ public final class EntomberExarch extends CardImpl {
|
|||
|
||||
class EntomberExarchEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("noncreature card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
EntomberExarchEffect() {
|
||||
super(Outcome.Discard);
|
||||
staticText = "target opponent reveals their hand, you choose a noncreature card from it, then that player discards that card";
|
||||
|
@ -82,7 +73,7 @@ class EntomberExarchEffect extends OneShotEffect {
|
|||
player.revealCards("Entomber Exarch", player.getHand(), game);
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (you != null) {
|
||||
TargetCard target = new TargetCard(Zone.HAND, filter);
|
||||
TargetCard target = new TargetCard(Zone.HAND, StaticFilters.FILTER_CARD_A_NON_CREATURE);
|
||||
if (you.choose(Outcome.Benefit, player.getHand(), target, game)) {
|
||||
Card card = player.getHand().get(target.getFirstTarget(), game);
|
||||
return player.discard(card, source, game);
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class FaeOfWishes extends AdventureCard {
|
|||
|
||||
// Granted
|
||||
// You may choose a noncreature card you own from outside the game, reveal it, and put it into your hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_A_NON_LAND));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_A_NON_CREATURE));
|
||||
}
|
||||
|
||||
private FaeOfWishes(final FaeOfWishes card) {
|
||||
|
|
|
@ -110,6 +110,24 @@ public final class StaticFilters {
|
|||
FILTER_CARD_FROM_YOUR_GRAVEYARD.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterNoncreatureCard FILTER_CARD_NON_CREATURE = new FilterNoncreatureCard();
|
||||
|
||||
static {
|
||||
FILTER_CARD_NON_CREATURE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterNoncreatureCard FILTER_CARD_A_NON_CREATURE = new FilterNoncreatureCard("a noncreature card");
|
||||
|
||||
static {
|
||||
FILTER_CARD_A_NON_CREATURE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterNoncreatureCard FILTER_CARDS_NON_CREATURE = new FilterNoncreatureCard("noncreature cards");
|
||||
|
||||
static {
|
||||
FILTER_CARDS_NON_CREATURE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterLandCard FILTER_CARD_LAND = new FilterLandCard();
|
||||
|
||||
static {
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package mage.filter.common;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
* @author ssouders412
|
||||
*/
|
||||
public class FilterNoncreatureCard extends FilterCard {
|
||||
|
||||
public FilterNoncreatureCard() {
|
||||
this("noncreature card");
|
||||
}
|
||||
|
||||
public FilterNoncreatureCard(String name) {
|
||||
super(name);
|
||||
this.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
public FilterNoncreatureCard(final FilterNoncreatureCard filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterNoncreatureCard copy() {
|
||||
return new FilterNoncreatureCard(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue