mirror of
https://github.com/correl/mage.git
synced 2025-03-13 01:09:53 -09:00
[HOU] Added Doomfall.
This commit is contained in:
parent
442d8ebc78
commit
1210f9795a
7 changed files with 132 additions and 50 deletions
Mage.Sets/src/mage
cards
sets
Mage/src/main/java/mage/filter
|
@ -31,12 +31,10 @@ import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -44,17 +42,11 @@ import java.util.UUID;
|
|||
*/
|
||||
public class Castigate extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a nonland card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public Castigate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{W}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}{B}");
|
||||
|
||||
// Target opponent reveals his or her hand. You choose a nonland card from it and exile that card.
|
||||
this.getSpellAbility().addEffect(new ExileCardYouChooseTargetOpponentEffect(filter));
|
||||
this.getSpellAbility().addEffect(new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND));
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
|
|
112
Mage.Sets/src/mage/cards/d/Doomfall.java
Normal file
112
Mage.Sets/src/mage/cards/d/Doomfall.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class Doomfall extends CardImpl {
|
||||
|
||||
public Doomfall(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
||||
|
||||
// Choose one —
|
||||
this.getSpellAbility().getModes().setMinModes(1);
|
||||
this.getSpellAbility().getModes().setMaxModes(1);
|
||||
|
||||
// • Target player exiles a creature he or she controls.
|
||||
this.getSpellAbility().addEffect(new DoomfallEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
// • Target opponent reveals his or her hand. You choose a nonland card from it. Exile that card.
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND)
|
||||
.setText("Target opponent reveals his or her hand. You choose a nonland card from it. Exile that card"));
|
||||
mode.getTargets().add(new TargetOpponent());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
public Doomfall(final Doomfall card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Doomfall copy() {
|
||||
return new Doomfall(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DoomfallEffect extends OneShotEffect {
|
||||
|
||||
public DoomfallEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "target player exiles a creature he or she controls";
|
||||
}
|
||||
|
||||
public DoomfallEffect(final DoomfallEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoomfallEffect copy() {
|
||||
return new DoomfallEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (targetPlayer != null) {
|
||||
Target target = new TargetControlledCreaturePermanent();
|
||||
target.setNotTarget(true);
|
||||
if (targetPlayer.choose(outcome, target, source.getSourceId(), game)) {
|
||||
targetPlayer.moveCards(game.getCard(target.getFirstTarget()), Zone.EXILED, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -38,9 +38,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
@ -53,7 +51,7 @@ import mage.target.common.TargetOpponent;
|
|||
public class PickTheBrain extends CardImpl {
|
||||
|
||||
public PickTheBrain(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
||||
|
||||
// Target opponent reveals his or her hand. You choose a nonland card from it and exile that card.
|
||||
// <i>Delirium</i> — If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles his or her library.
|
||||
|
@ -73,12 +71,6 @@ public class PickTheBrain extends CardImpl {
|
|||
|
||||
class PickTheBrainEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a nonland card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public PickTheBrainEffect() {
|
||||
super(true, "that card's controller", "all cards with the same name as that card");
|
||||
}
|
||||
|
@ -98,8 +90,8 @@ class PickTheBrainEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (opponent != null && controller != null) {
|
||||
if (!opponent.getHand().isEmpty()) {
|
||||
opponent.revealCards("Exile " + filter.getMessage(), opponent.getHand(), game);
|
||||
TargetCard target = new TargetCard(Zone.HAND, filter);
|
||||
opponent.revealCards("Exile " + StaticFilters.FILTER_CARD_A_NON_LAND.getMessage(), opponent.getHand(), game);
|
||||
TargetCard target = new TargetCard(Zone.HAND, StaticFilters.FILTER_CARD_A_NON_LAND);
|
||||
if (controller.choose(Outcome.Exile, opponent.getHand(), target, game)) {
|
||||
Card card = opponent.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
|
|
|
@ -41,9 +41,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
|
@ -59,7 +57,7 @@ import mage.watchers.common.ManaSpentToCastWatcher;
|
|||
public class RiversGrasp extends CardImpl {
|
||||
|
||||
public RiversGrasp(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U/B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U/B}");
|
||||
|
||||
// If {U} was spent to cast River's Grasp, return up to one target creature to its owner's hand. If {B} was spent to cast River's Grasp, target player reveals his or her hand, you choose a nonland card from it, then that player discards that card.
|
||||
Target targetCreature = new TargetCreaturePermanent(0, 1);
|
||||
|
@ -90,12 +88,6 @@ public class RiversGrasp extends CardImpl {
|
|||
|
||||
class RiversGraspEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a nonland card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public RiversGraspEffect() {
|
||||
super(Outcome.Discard);
|
||||
this.staticText = "Target player reveals his or her hand, you choose a card from it, then that player discards that card.";
|
||||
|
@ -117,7 +109,7 @@ class RiversGraspEffect extends OneShotEffect {
|
|||
player.revealCards("River's Grasp", player.getHand(), game);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
TargetCard target = new TargetCard(Zone.HAND, filter);
|
||||
TargetCard target = new TargetCard(Zone.HAND, StaticFilters.FILTER_CARD_A_NON_LAND);
|
||||
if (controller.choose(Outcome.Benefit, player.getHand(), target, game)) {
|
||||
Card card = player.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
|
|
|
@ -37,9 +37,7 @@ import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
|
@ -48,20 +46,14 @@ import mage.target.common.TargetOpponent;
|
|||
*/
|
||||
public class ThoughtKnotSeer extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a nonland card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public ThoughtKnotSeer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{C}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{C}");
|
||||
this.subtype.add("Eldrazi");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// When Thought-Knot Seer enters the battlefield, target opponent reveals his or her hand. You choose a nonland card from it and exile that card.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileCardYouChooseTargetOpponentEffect(filter), false);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND), false);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ public class HourOfDevastation extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Desert of the Indomitable", 172, Rarity.COMMON, mage.cards.d.DesertOfTheIndomitable.class));
|
||||
cards.add(new SetCardInfo("Desert of the Mindful", 173, Rarity.COMMON, mage.cards.d.DesertOfTheMindful.class));
|
||||
cards.add(new SetCardInfo("Desert of the True", 174, Rarity.COMMON, mage.cards.d.DesertOfTheTrue.class));
|
||||
cards.add(new SetCardInfo("Doomfall", 62, Rarity.UNCOMMON, mage.cards.d.Doomfall.class));
|
||||
cards.add(new SetCardInfo("Hour of Revelation", 15, Rarity.RARE, mage.cards.h.HourOfRevelation.class));
|
||||
cards.add(new SetCardInfo("Inferno Jet", 99, Rarity.UNCOMMON, mage.cards.i.InfernoJet.class));
|
||||
cards.add(new SetCardInfo("Khenra Eternal", 66, Rarity.COMMON, mage.cards.k.KhenraEternal.class));
|
||||
|
|
|
@ -33,6 +33,7 @@ public final class StaticFilters {
|
|||
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT = new FilterControlledArtifactPermanent();
|
||||
public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard();
|
||||
public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard();
|
||||
public static final FilterNonlandCard FILTER_CARD_A_NON_LAND = new FilterNonlandCard("a nonland card");
|
||||
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
|
||||
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE = new FilterCreaturePermanent();
|
||||
|
|
Loading…
Add table
Reference in a new issue