Remove obsolete Pick zone.

This commit is contained in:
emerald000 2015-12-11 17:03:45 -05:00
parent 7f105fb123
commit 2ceb8425e5
74 changed files with 146 additions and 423 deletions

View file

@ -119,7 +119,7 @@ class SagesOfTheAnimaReplacementEffect extends ReplacementEffectImpl {
cards.remove(revealedCard);
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard());
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);

View file

@ -97,14 +97,13 @@ class BrowseEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
if (cards.size() > 0) {
player.lookAtCards("Browse", cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put in your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand"));
if (player.choose(Outcome.Benefit, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -110,7 +110,7 @@ class SoldeviSageEffect extends OneShotEffect {
}
if (drawnCards.size() > 0) {
TargetCard cardToDiscard = new TargetCard(Zone.PICK, new FilterCard("card to discard"));
TargetCard cardToDiscard = new TargetCard(Zone.HAND, new FilterCard("card to discard"));
cardToDiscard.setNotTarget(true);
if (player.choose(Outcome.Discard, drawnCards, cardToDiscard, game)) {
Card card = player.getHand().get(cardToDiscard.getFirstTarget(), game);

View file

@ -27,8 +27,7 @@
*/
package mage.sets.avacynrestored;
import mage.constants.CardType;
import mage.constants.Rarity;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
@ -37,21 +36,22 @@ import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.other.AuraCardCanAttachToPermanentId;
import mage.filter.predicate.other.AuraPermanentCanAttachToPermanentId;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetCard;
import mage.target.TargetPermanent;
import java.util.UUID;
import mage.filter.predicate.other.AuraCardCanAttachToPermanentId;
import mage.filter.predicate.other.AuraPermanentCanAttachToPermanentId;
/**
* @author noxx
*/
@ -138,7 +138,7 @@ class BrunaLightOfAlabasterEffect extends OneShotEffect {
int count = player.getHand().count(filterAuraCard, game);
while (player.canRespond() && count > 0 && player.chooseUse(Outcome.Benefit, "Attach an Aura from your hand?", source, game)) {
TargetCard targetAura = new TargetCard(Zone.PICK, filterAuraCard);
TargetCard targetAura = new TargetCard(Zone.HAND, filterAuraCard);
if (player.choose(Outcome.Benefit, player.getHand(), targetAura, game)) {
Card aura = game.getCard(targetAura.getFirstTarget());
if (aura != null) {
@ -152,7 +152,7 @@ class BrunaLightOfAlabasterEffect extends OneShotEffect {
count = player.getGraveyard().count(filterAuraCard, game);
while (player.canRespond() && count > 0 && player.chooseUse(Outcome.Benefit, "Attach an Aura from your graveyard?", source, game)) {
TargetCard targetAura = new TargetCard(Zone.PICK, filterAuraCard);
TargetCard targetAura = new TargetCard(Zone.GRAVEYARD, filterAuraCard);
if (player.choose(Outcome.Benefit, player.getGraveyard(), targetAura, game)) {
Card aura = game.getCard(targetAura.getFirstTarget());
if (aura != null) {

View file

@ -38,10 +38,8 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardsImpl;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
/**
*
@ -106,20 +104,7 @@ class LairDelveEffect extends OneShotEffect {
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}

View file

@ -173,7 +173,7 @@ class KioraRevealEffect extends OneShotEffect {
if ((creatureCardFound || landCardFound)
&& controller.chooseUse(Outcome.DrawCard,
"Put a creature card and/or a land card into your hand?", source, game)) {
TargetCard target = new TargetCard(Zone.PICK, new FilterCreatureCard("creature card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCreatureCard("creature card to put into your hand"));
if (creatureCardFound && controller.chooseTarget(Outcome.DrawCard, cards, target, source, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -165,7 +165,6 @@ class HeroesPodiumEffect extends OneShotEffect {
if (filter.match(card, game)) {
legendaryIncluded = true;
}
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Heroes' Podium", cards, game);
@ -178,7 +177,7 @@ class HeroesPodiumEffect extends OneShotEffect {
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
return true;
} else {
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.LIBRARY, filter);
if (player.choose(outcome, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -106,7 +106,7 @@ class KodamasReachEffect extends OneShotEffect {
}
controller.revealCards(sourceObject.getIdName(), revealed, game);
if (target.getTargets().size() == 2) {
TargetCard target2 = new TargetCard(Zone.PICK, filter);
TargetCard target2 = new TargetCard(Zone.LIBRARY, filter);
controller.choose(Outcome.Benefit, revealed, target2, game);
Card card = revealed.get(target2.getFirstTarget(), game);
if (card != null) {

View file

@ -112,12 +112,12 @@ class AEthermagesTouchEffect extends OneShotEffect {
if (!cards.isEmpty()) {
player.revealCards("AEthermage's Touch", cards, game);
TargetCard target = new TargetCard(Zone.PICK, filterPutOntoBattlefield);
TargetCard target = new TargetCard(Zone.LIBRARY, filterPutOntoBattlefield);
if (properCardFound && player.choose(Outcome.PutCreatureInPlay, cards, target, game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {
cards.remove(card);
if (card.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), source.getControllerId())) {
if (card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId())) {
// It gains \"At the beginning of your end step, return this creature to its owner's hand.\"
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), TargetController.YOU, null, false);
ContinuousEffect effect = new GainAbilityTargetEffect(ability, Duration.Custom);

View file

@ -101,7 +101,6 @@ class LimDulsVaultEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Lim-Dul's Vault", cards, game);
@ -112,7 +111,7 @@ class LimDulsVaultEffect extends OneShotEffect {
player.shuffleLibrary(game);
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard(doAgain ? textBottom : textTop));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard(doAgain ? textBottom : textTop));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);

View file

@ -33,18 +33,12 @@ import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
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.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
/**
*
@ -94,25 +88,7 @@ class ArjunTheShiftingFlameEffect extends OneShotEffect {
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
int count = you.getHand().size();
Cards cards = new CardsImpl();
for (Card card : you.getHand().getCards(game)) {
cards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (you.canRespond() && cards.size() > 1) {
you.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
you.getHand().clear();
you.putCardsOnBottomOfLibrary(you.getHand(), game, source, true);
you.drawCards(count, game);
}
return true;

View file

@ -99,7 +99,6 @@ class WorldlyCounselEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Worldly Counsel", cards, game);
@ -111,7 +110,7 @@ class WorldlyCounselEffect extends OneShotEffect {
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
return true;
} else {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
@ -121,22 +120,7 @@ class WorldlyCounselEffect extends OneShotEffect {
}
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -43,7 +43,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.Predicates;
@ -125,7 +124,6 @@ class CallToTheKindredEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Call to the Kindred", cards, game);
@ -142,32 +140,17 @@ class CallToTheKindredEffect extends OneShotEffect {
filter.setMessage(sb.toString());
if (cards.count(filter, game) > 0 && player.chooseUse(Outcome.DrawCard, "Do you wish to put a creature card onto the battlefield?", source, game)) {
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.LIBRARY, filter);
if (player.choose(Outcome.PutCreatureInPlay, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), source.getControllerId());
card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
}
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -29,10 +29,6 @@ package mage.sets.darkascension;
import java.util.List;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.condition.common.MorbidCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
@ -40,6 +36,10 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
@ -105,7 +105,7 @@ class GruesomeDiscoveryEffect extends OneShotEffect {
targetPlayer.discard(2, source, game);
}
TargetCard target = new TargetCard(2, Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(2, Zone.HAND, new FilterCard());
if (player.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) {
List<UUID> targets = target.getTargets();
for (UUID targetId : targets) {

View file

@ -203,12 +203,11 @@ class JarOfEyeballsEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Jar of Eyeballs", cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
@ -216,22 +215,7 @@ class JarOfEyeballsEffect extends OneShotEffect {
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
}
}
target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -27,6 +27,8 @@
*/
package mage.sets.dissension;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
@ -44,9 +46,6 @@ import mage.game.permanent.token.ElementalToken;
import mage.players.Player;
import mage.target.TargetCard;
import java.util.Set;
import java.util.UUID;
/**
*
* @author magenoxx
@ -120,7 +119,7 @@ class ResearchEffect extends OneShotEffect {
filteredCards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
if (player.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = player.getSideboard().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -125,7 +125,7 @@ class BlessedReincarnationEffect extends OneShotEffect {
}
if (card.getCardType().contains(CardType.CREATURE)) {
card.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), player.getId());
card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId());
}
if (cards.size() > 0) {

View file

@ -123,7 +123,7 @@ class EvershrikeEffect extends OneShotEffect {
filterAuraCard.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xAmount));
int count = controller.getHand().count(filterAuraCard, game);
while (controller.canRespond() && count > 0 && controller.chooseUse(Outcome.Benefit, "Do you wish to put an Aura card from your hand onto Evershrike", source, game)) {
TargetCard targetAura = new TargetCard(Zone.PICK, filterAuraCard);
TargetCard targetAura = new TargetCard(Zone.HAND, filterAuraCard);
if (controller.choose(Outcome.Benefit, controller.getHand(), targetAura, game)) {
Card aura = game.getCard(targetAura.getFirstTarget());
if (aura != null) {

View file

@ -105,7 +105,7 @@ class TalarasBaneEffect extends OneShotEffect {
Card card = null;
if (targetPlayer != null && you != null) {
targetPlayer.revealCards("Talaras Bane", targetPlayer.getHand(), game);
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.HAND, filter);
if (you.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) {
card = targetPlayer.getHand().get(target.getFirstTarget(), game);
}

View file

@ -156,12 +156,11 @@ class PlungeIntoDarknessSearchEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Plunge into Darkness", cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -136,7 +136,7 @@ class SylvanLibraryEffect extends OneShotEffect {
}
int numberOfCardsToPutBack = cardsPutBack.size();
if (numberOfCardsToPutBack > 1) {
TargetCard target2 = new TargetCard(Zone.PICK, new FilterCard("card to put on the top of your library (last chosen will be on top)"));
TargetCard target2 = new TargetCard(Zone.HAND, new FilterCard("card to put on the top of your library (last chosen will be on top)"));
while (controller.canRespond() && cardsPutBack.size() > 1) {
controller.choose(Outcome.Benefit, cardsPutBack, target2, game);
Card card = cardsPutBack.get(target2.getFirstTarget(), game);

View file

@ -29,9 +29,6 @@ package mage.sets.futuresight;
import java.util.Set;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
@ -39,7 +36,9 @@ 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.predicate.Predicate;
@ -128,7 +127,7 @@ class GlitteringWishEffect extends OneShotEffect {
filteredCards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
if (player.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = player.getSideboard().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -119,7 +119,6 @@ class DimirCharmEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if(card != null){
cards.add(card);
game.getState().setZone(card.getId(), Zone.PICK);
}
}
if(cards.size() > 0){

View file

@ -105,7 +105,6 @@ class OrcishLibrarianEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
@ -120,7 +119,7 @@ class OrcishLibrarianEffect extends OneShotEffect {
}
}
player.lookAtCards("OrcishLibrarian", cards, game);
TargetCard target = new TargetCard (Zone.PICK, new FilterCard("card to put on the top of target player's library"));
TargetCard target = new TargetCard (Zone.LIBRARY, new FilterCard("card to put on the top of target player's library"));
while (player.canRespond() && cards.size() > 0) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);

View file

@ -100,14 +100,13 @@ class ForbiddenAlchemyEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
if (cards.size() > 0) {
player.lookAtCards("Forbidden Alchemy", cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put in your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand"));
if (player.choose(Outcome.Benefit, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -91,7 +91,7 @@ class NightTerrorsEffect extends OneShotEffect {
if (player != null && targetPlayer != null) {
targetPlayer.revealCards("Night Terrors", targetPlayer.getHand(), game);
TargetCard target = new TargetCard(Zone.PICK, new FilterNonlandCard("nonland card to exile"));
TargetCard target = new TargetCard(Zone.HAND, new FilterNonlandCard("nonland card to exile"));
if (player.choose(Outcome.Exile, targetPlayer.getHand(), target, game)) {
Card card = targetPlayer.getHand().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -104,7 +104,7 @@ class RevivingVaporsEffect extends OneShotEffect {
if (cards.size() == 1) {
card = cards.getRandom(game);
} else {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
target.setRequired(true);
if (controller.choose(Outcome.DrawCard, cards, target, game)) {
card = cards.get(target.getFirstTarget(), game);

View file

@ -29,16 +29,15 @@ package mage.sets.judgment;
import java.util.Set;
import java.util.UUID;
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.predicate.mageobject.CardTypePredicate;
@ -116,7 +115,7 @@ class BurningWishEffect extends OneShotEffect {
filteredCards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
if (player.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = player.getSideboard().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -29,16 +29,15 @@ package mage.sets.judgment;
import java.util.Set;
import java.util.UUID;
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.predicate.mageobject.CardTypePredicate;
@ -116,7 +115,7 @@ class CunningWishEffect extends OneShotEffect {
filteredCards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
if (player.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = player.getSideboard().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -118,12 +118,11 @@ class FlashOfInsightEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards(sourceObject.getName(), cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
@ -133,27 +132,7 @@ class FlashOfInsightEffect extends OneShotEffect {
}
}
target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
if (cards.size() > 0) {
game.informPlayers(new StringBuilder(sourceObject.getName()).append(": ")
.append(player.getLogName()).append(" puts ")
.append(cards.size() == 1 ? "a":cards.size())
.append(" card").append(cards.size() > 1 ? "s":"")
.append(" on the bottom of his or her library").toString());
}
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}

View file

@ -29,16 +29,15 @@ package mage.sets.judgment;
import java.util.Set;
import java.util.UUID;
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.predicate.Predicates;
@ -119,7 +118,7 @@ class GoldenWishEffect extends OneShotEffect {
filteredCards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
if (player.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = player.getSideboard().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -29,16 +29,15 @@ package mage.sets.judgment;
import java.util.Set;
import java.util.UUID;
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.predicate.Predicates;
@ -119,7 +118,7 @@ class LivingWishEffect extends OneShotEffect {
filteredCards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.OUTSIDE, filter);
if (player.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = player.getSideboard().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -101,7 +101,7 @@ class BitterRevelationEffect extends OneShotEffect {
if (cards.size() > 0) {
Cards cardsToHand = new CardsImpl();
player.lookAtCards("Bitter Revelation", cards, game);
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.PICK, new FilterCard("two cards to put in your hand"));
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.LIBRARY, new FilterCard("two cards to put in your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
for (UUID targetId : target.getTargets()) {
Card card = cards.get(targetId, game);

View file

@ -100,13 +100,12 @@ class NaturalSelectionEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
you.lookAtCards("Natural Selection", cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the top of target player's library"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put on the top of target player's library"));
while (player.canRespond() && cards.size() > 1) {
you.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);

View file

@ -28,10 +28,6 @@
package mage.sets.magic2010;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -40,6 +36,10 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
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.predicate.Predicate;
import mage.game.ExileZone;
@ -113,7 +113,7 @@ class MirrorOfFateEffect extends OneShotEffect {
card.moveToExile(null, null, source.getSourceId(), game);
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on top of your library"));
TargetCard target = new TargetCard(Zone.EXILED, new FilterCard("card to put on top of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);

View file

@ -29,10 +29,6 @@ package mage.sets.magic2010;
import java.util.Set;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -40,6 +36,10 @@ 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.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Library;
@ -112,7 +112,7 @@ class PolymorphEffect extends OneShotEffect {
}
if (card.getCardType().contains(CardType.CREATURE)) {
card.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), player.getId());
card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId());
}
if (cards.size() > 0) {

View file

@ -27,13 +27,14 @@
*/
package mage.sets.magic2012;
import mage.constants.CardType;
import mage.constants.Rarity;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
@ -41,8 +42,6 @@ import mage.players.Player;
import mage.target.TargetCard;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author nantuko
@ -86,7 +85,7 @@ class MonomaniaEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.HAND, filter);
if (player.choose(Outcome.Detriment, player.getHand(), target, game)) {
while (player.getHand().size() > 1) {
for (UUID uuid : player.getHand()) {

View file

@ -108,7 +108,6 @@ class SphinxOfUthuunEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.revealCards(sourceObject.getName(), cards, game);
@ -117,7 +116,7 @@ class SphinxOfUthuunEffect extends OneShotEffect {
if (!opponents.isEmpty()) {
Player opponent = game.getPlayer(opponents.iterator().next());
TargetCard target = new TargetCard(0, cards.size(), Zone.PICK, new FilterCard("cards to put in the first pile"));
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY, new FilterCard("cards to put in the first pile"));
target.setRequired(false);
List<Card> pile1 = new ArrayList<>();
Cards pile1CardsIds = new CardsImpl();

View file

@ -95,14 +95,13 @@ class GlimpseTheFutureEffect extends OneShotEffect {
Card card = controller.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
if (cards.size() > 0) {
controller.lookAtCards("Glimpse the Future", cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put in your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand"));
if (controller.choose(Outcome.Benefit, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -92,7 +92,7 @@ class PainfulMemoriesEffect extends OneShotEffect {
targetPlayer.revealCards("Painful Memories", targetPlayer.getHand(), game);
if (targetPlayer.getHand().size() > 0) {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(Zone.HAND, new FilterCard());
if (you.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) {
Card card = targetPlayer.getHand().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -109,7 +109,6 @@ class MitoticManipulationEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
if (permanentNames.contains(card.getName())) {
cardsFound.add(card);
}
@ -118,7 +117,7 @@ class MitoticManipulationEffect extends OneShotEffect {
player.lookAtCards("Mitotic Manipulation", cards, game);
if (!cardsFound.isEmpty() && player.chooseUse(Outcome.PutCardInPlay, "Do you wish to put a card on the battlefield?", source, game)) {
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.LIBRARY, filter);
if (player.choose(Outcome.PutCardInPlay, cardsFound, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
@ -128,22 +127,7 @@ class MitoticManipulationEffect extends OneShotEffect {
}
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -118,7 +118,7 @@ class ThievingSpriteEffect extends OneShotEffect {
Cards cardsInHand = new CardsImpl();
cardsInHand.addAll(targetPlayer.getHand());
TargetCard target = new TargetCard(numberOfFaeries, Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(numberOfFaeries, Zone.HAND, new FilterCard());
if (targetPlayer.choose(Outcome.Discard, cardsInHand, target, game)) {
List<UUID> targets = target.getTargets();
@ -133,7 +133,7 @@ class ThievingSpriteEffect extends OneShotEffect {
revealedCards.addAll(targetPlayer.getHand());
}
TargetCard targetInHand = new TargetCard(Zone.PICK, new FilterCard("card to discard"));
TargetCard targetInHand = new TargetCard(Zone.HAND, new FilterCard("card to discard"));
if (!revealedCards.isEmpty()) {
targetPlayer.revealCards("Thieving Sprite", revealedCards, game);

View file

@ -28,9 +28,6 @@
package mage.sets.newphyrexia;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
@ -39,7 +36,9 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
@ -108,7 +107,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.PICK, filter);
TargetCard target = new TargetCard(Zone.HAND, filter);
if (you.choose(Outcome.Benefit, player.getHand(), target, game)) {
Card card = player.getHand().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -139,7 +139,7 @@ class PsychicSurgeryEffect extends OneShotEffect {
player.lookAtCards("Psychic Surgery", cards, game);
if (!cards.isEmpty() && player.chooseUse(Outcome.Exile, "Do you wish to exile a card?", source, game)) {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to exile"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to exile"));
if (player.choose(Outcome.Exile, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
@ -148,22 +148,7 @@ class PsychicSurgeryEffect extends OneShotEffect {
}
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on top of his library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
return false;

View file

@ -122,13 +122,12 @@ class ShrineOfPiercingVisionEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Shrine of Piercing Vision", cards, game);
if (!cards.isEmpty()) {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
@ -138,22 +137,7 @@ class ShrineOfPiercingVisionEffect extends OneShotEffect {
}
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -97,7 +97,7 @@ class BalshanBeguilerEffect extends OneShotEffect {
cards.addAll(player.getLibrary().getTopCards(game, 2));
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard());
if (you.choose(Outcome.Benefit, cards, target, game)) {
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, true);

View file

@ -103,7 +103,7 @@ class SilentBladeOniEffect extends OneShotEffect {
Cards cardsInHand = new CardsImpl();
cardsInHand.addAll(opponent.getHand());
if (cardsInHand.size() > 0) {
TargetCard target = new TargetCard(1, Zone.PICK, new FilterNonlandCard());
TargetCard target = new TargetCard(1, Zone.HAND, new FilterNonlandCard());
if (controller.chooseTarget(outcome, cardsInHand, target, source, game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {

View file

@ -105,7 +105,7 @@ class CongregationAtDawnEffect extends OneShotEffect {
controller.revealCards(sourceObject.getName(), revealed, game);
controller.shuffleLibrary(game);
TargetCard targetToLib = new TargetCard(Zone.PICK, new FilterCard(textTop));
TargetCard targetToLib = new TargetCard(Zone.LIBRARY, new FilterCard(textTop));
while (revealed.size() > 1 && controller.canRespond()) {
controller.choose(Outcome.Neutral, revealed, targetToLib, game);

View file

@ -103,7 +103,7 @@ class MindleechMassEffect extends OneShotEffect {
opponent.revealCards("Opponents hand", cardsInHand, game);
if (cardsInHand.size() > 0
&& cardsInHand.getCards(new FilterNonlandCard(), game).size() > 0) {
TargetCard target = new TargetCard(1, Zone.PICK, new FilterNonlandCard());
TargetCard target = new TargetCard(1, Zone.HAND, new FilterNonlandCard());
if (you.chooseTarget(Outcome.PlayForFree, cardsInHand, target, source, game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {

View file

@ -28,22 +28,15 @@
package mage.sets.ravnica;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
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.Zone;
import mage.filter.FilterCard;
import mage.constants.Rarity;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
/**
*
@ -86,25 +79,7 @@ class MindmoilEffect extends OneShotEffect {
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
int count = you.getHand().size();
Cards cards = new CardsImpl();
for (Card card : you.getHand().getCards(game)) {
cards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (you.canRespond() && cards.size() > 1) {
you.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
you.getHand().clear();
you.putCardsOnBottomOfLibrary(you.getHand(), game, source, true);
you.drawCards(count, game);
}
return true;

View file

@ -199,7 +199,6 @@ class JaceArchitectOfThoughtEffect2 extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.revealCards("Jace, Architect of Thought", cards, game);
@ -217,7 +216,7 @@ class JaceArchitectOfThoughtEffect2 extends OneShotEffect {
opponent = game.getPlayer(opponents.iterator().next());
}
TargetCard target = new TargetCard(0, cards.size(), Zone.PICK, new FilterCard("cards to put in the first pile"));
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY, new FilterCard("cards to put in the first pile"));
target.setRequired(false);
Cards pile1 = new CardsImpl();
if (opponent.choose(Outcome.Neutral, cards, target, game)) {
@ -260,20 +259,7 @@ class JaceArchitectOfThoughtEffect2 extends OneShotEffect {
}
}
TargetCard targetCard = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cardsToLibrary.size() > 1) {
player.choose(Outcome.Neutral, cardsToLibrary, targetCard, game);
Card card = cardsToLibrary.get(targetCard.getFirstTarget(), game);
if (card != null) {
cardsToLibrary.remove(card);
player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, false, false);
}
target.clearChosen();
}
if (cardsToLibrary.size() == 1) {
Card card = cardsToLibrary.get(cardsToLibrary.iterator().next(), game);
player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, false, false);
}
player.putCardsOnBottomOfLibrary(cardsToLibrary, game, source, true);
return true;
}
return false;

View file

@ -29,16 +29,15 @@ package mage.sets.returntoravnica;
import java.util.List;
import java.util.UUID;
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.FilterCreatureCard;
@ -102,7 +101,7 @@ class JaradsOrdersEffect extends OneShotEffect {
}
controller.revealCards("Jarad's Orders", revealed, game);
if (target.getTargets().size() == 2) {
TargetCard target2 = new TargetCard(Zone.PICK, filter);
TargetCard target2 = new TargetCard(Zone.LIBRARY, filter);
controller.choose(Outcome.Benefit, revealed, target2, game);
Card card = revealed.get(target2.getFirstTarget(), game);
controller.moveCards(card, Zone.LIBRARY, Zone.HAND, source, game);

View file

@ -28,14 +28,13 @@
package mage.sets.riseoftheeldrazi;
import java.util.UUID;
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.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
@ -95,7 +94,7 @@ class PerishTheThoughtEffect extends OneShotEffect {
targetOpponent.revealCards("Perish the Thought", targetOpponent.getHand(), game);
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
TargetCard target = new TargetCard(Zone.PICK, filter);
TargetCard target = new TargetCard(Zone.HAND, filter);
target.setNotTarget(true);
if (you.choose(Outcome.Neutral, targetOpponent.getHand(), target, game)) {
Card chosenCard = targetOpponent.getHand().get(target.getFirstTarget(), game);

View file

@ -100,14 +100,13 @@ class CloneShellEffect extends OneShotEffect {
for (int i = 0; i < count; i++) {
Card card = player.getLibrary().removeFromTop(game);
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
if (cards.size() == 0) {
return false;
}
TargetCard target1 = new TargetCard(Zone.PICK, filter1);
TargetCard target1 = new TargetCard(Zone.LIBRARY, filter1);
if (player.choose(Outcome.Detriment, cards, target1, game)) {
Card card = cards.get(target1.getFirstTarget(), game);
if (card != null) {
@ -123,7 +122,7 @@ class CloneShellEffect extends OneShotEffect {
}
if (cards.size() > 0) {
TargetCard target2 = new TargetCard(Zone.PICK, filter2);
TargetCard target2 = new TargetCard(Zone.LIBRARY, filter2);
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Benefit, cards, target2, game);
Card card = cards.get(target2.getFirstTarget(), game);

View file

@ -28,7 +28,6 @@
package mage.sets.seventhedition;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -99,7 +98,7 @@ class AgonizingMemoriesEffect extends OneShotEffect {
private void chooseCardInHandAndPutOnTopOfLibrary(Game game, Ability source, Player you, Player targetPlayer) {
if (targetPlayer.getHand().size() > 0) {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the top of library (last chosen will be on top)"));
TargetCard target = new TargetCard(Zone.HAND, new FilterCard("card to put on the top of library (last chosen will be on top)"));
if (you.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) {
Card card = targetPlayer.getHand().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -96,14 +96,13 @@ class AncestralMemoriesEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
if (cards.size() > 0) {
player.lookAtCards("Ancestral Memories", cards, game);
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.PICK, new FilterCard("two cards to put in your hand"));
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.LIBRARY, new FilterCard("two cards to put in your hand"));
if (player.choose(Outcome.Benefit, cards, target, game)) {
for (UUID targetId : (List<UUID>)target.getTargets()) {
Card card = cards.get(targetId, game);

View file

@ -118,7 +118,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.PICK, filter);
TargetCard target = new TargetCard(Zone.HAND, filter);
if (controller.choose(Outcome.Benefit, player.getHand(), target, game)) {
Card card = player.getHand().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -98,7 +98,7 @@ class SplittingHeadacheEffect extends OneShotEffect {
player.revealCards("Splitting Headache", player.getHand(), game);
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(Zone.HAND, new FilterCard());
if (you.choose(Outcome.Benefit, player.getHand(), target, game)) {
Card card = player.getHand().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -38,7 +38,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterLandCard;
import mage.game.Game;
@ -101,7 +100,6 @@ class GiftOfTheGargantuanEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
if (card.getCardType().contains(CardType.CREATURE)) {
creatureCardFound = true;
}
@ -115,7 +113,7 @@ class GiftOfTheGargantuanEffect extends OneShotEffect {
if ((creatureCardFound || landCardFound) && player.chooseUse(Outcome.DrawCard, "Do you wish to reveal a creature card and/or a land card and put them into your hand?", source, game)) {
Cards revealedCards = new CardsImpl();
TargetCard target = new TargetCard(Zone.PICK, new FilterCreatureCard("creature card to reveal and put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCreatureCard("creature card to reveal and put into your hand"));
if (creatureCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
@ -125,7 +123,7 @@ class GiftOfTheGargantuanEffect extends OneShotEffect {
}
}
target = new TargetCard(Zone.PICK, new FilterLandCard("land card to reveal and put into your hand"));
target = new TargetCard(Zone.LIBRARY, new FilterLandCard("land card to reveal and put into your hand"));
if (landCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
@ -139,22 +137,7 @@ class GiftOfTheGargantuanEffect extends OneShotEffect {
player.revealCards("Gift of the Gargantuan", revealedCards, game);
}
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -29,16 +29,15 @@ package mage.sets.tempest;
import java.util.List;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.SearchEffect;
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.game.Game;
@ -111,7 +110,7 @@ class IntuitionEffect extends SearchEffect {
}
controller.revealCards("Reveal", cards, game);
TargetCard targetCard = new TargetCard(Zone.PICK, new FilterCard());
TargetCard targetCard = new TargetCard(Zone.LIBRARY, new FilterCard());
while(!opponent.choose(Outcome.Neutral, cards, targetCard, game)) {
if (!opponent.canRespond()) {

View file

@ -28,17 +28,16 @@
package mage.sets.tenthedition;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
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.game.Game;
import mage.players.Library;
@ -130,7 +129,7 @@ class TellingTimeEffect extends OneShotEffect {
return cards.getRandom(null);
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard(message));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard(message));
if (player.choose(Outcome.Benefit, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -28,9 +28,6 @@
package mage.sets.tenthedition;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
@ -39,7 +36,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
@ -96,7 +95,7 @@ class ThrullSurgeonEffect extends OneShotEffect {
Player you = game.getPlayer(source.getControllerId());
if (targetPlayer != null && you != null) {
you.lookAtCards("Discard", targetPlayer.getHand(), game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(Zone.HAND, new FilterCard());
target.setNotTarget(true);
if (you.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) {
Card card = targetPlayer.getHand().get(target.getFirstTarget(), game);

View file

@ -128,7 +128,7 @@ class DiscipleOfPhenaxEffect extends OneShotEffect {
targetPlayer.revealCards("Disciple of Phenax", revealedCards, game);
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
TargetCard yourChoice = new TargetCard(Zone.PICK, new FilterCard());
TargetCard yourChoice = new TargetCard(Zone.HAND, new FilterCard());
yourChoice.setNotTarget(true);
if (you.choose(Outcome.Benefit, revealedCards, yourChoice, game)) {
Card card = targetPlayer.getHand().get(yourChoice.getFirstTarget(), game);

View file

@ -115,7 +115,7 @@ class SteamAuguryEffect extends OneShotEffect {
}
if (opponent != null) {
TargetCard target = new TargetCard(0, cards.size(), Zone.PICK, new FilterCard("cards to put in the first pile"));
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY, new FilterCard("cards to put in the first pile"));
List<Card> pile1 = new ArrayList<>();
Cards pile1CardsIds = new CardsImpl();
target.setRequired(false);

View file

@ -104,7 +104,7 @@ class HarmonicConvergenceEffect extends OneShotEffect {
list.add(permanent);
}
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on top of your library"));
TargetCard target = new TargetCard(Zone.BATTLEFIELD, new FilterCard("card to put on top of your library"));
for (UUID playerId : moveList.keySet()) {
Player player = game.getPlayer(playerId);
List<Permanent> list = moveList.get(playerId);

View file

@ -108,12 +108,11 @@ public class RavenFamiliar extends CardImpl {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
player.lookAtCards("Raven Familiar", cards, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
@ -121,22 +120,7 @@ public class RavenFamiliar extends CardImpl {
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
}
}
target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -123,7 +123,7 @@ class KrovikanSorcererEffect extends OneShotEffect {
}
}
if (drawnCards.size() > 0) {
TargetCard cardToDiscard = new TargetCard(Zone.PICK, new FilterCard("card to discard"));
TargetCard cardToDiscard = new TargetCard(Zone.HAND, new FilterCard("card to discard"));
cardToDiscard.setNotTarget(true);
if (player.choose(Outcome.Discard, drawnCards, cardToDiscard, game)) {
Card card = player.getHand().get(cardToDiscard.getFirstTarget(), game);

View file

@ -96,7 +96,7 @@ class DoomsdayEffect extends OneShotEffect {
allCards.addAll(player.getLibrary().getCardList());
allCards.addAll(player.getGraveyard());
int number = Math.min(5, allCards.size());
TargetCard target = new TargetCard(number, number, Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(number, number, Zone.ALL, new FilterCard());
if (player.choose(Outcome.Benefit, allCards, target, game)){
// exile the rest
@ -113,7 +113,7 @@ class DoomsdayEffect extends OneShotEffect {
}
//Put the chosen cards on top of your library in any order
target = new TargetCard(Zone.PICK, new FilterCard("Card to put on top"));
target = new TargetCard(Zone.ALL, new FilterCard("Card to put on top"));
while (cards.size() > 1 && player.canRespond()) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);

View file

@ -117,7 +117,7 @@ class BalaGedThiefEffect extends OneShotEffect {
int count = Math.min(cardsInHand.size(), numberOfAllies);
TargetCard target = new TargetCard(count, Zone.PICK, new FilterCard());
TargetCard target = new TargetCard(count, Zone.HAND, new FilterCard());
Cards revealedCards = new CardsImpl();
if (targetPlayer.choose(Outcome.DrawCard, cardsInHand, target, game)) {
@ -130,7 +130,7 @@ class BalaGedThiefEffect extends OneShotEffect {
}
}
TargetCard targetInHand = new TargetCard(Zone.PICK, new FilterCard("card to discard"));
TargetCard targetInHand = new TargetCard(Zone.HAND, new FilterCard("card to discard"));
if (!revealedCards.isEmpty()) {
targetPlayer.revealCards("Bala Ged Thief", revealedCards, game);

View file

@ -41,10 +41,8 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
/**
*
@ -109,27 +107,11 @@ class MerfolkWayfinderEffect extends OneShotEffect {
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
} else {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
}
player.revealCards("Merfolk Wayfinder", cardsToReveal, game);
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
while (player.canRespond() && cards.size() > 1) {
player.choose(Outcome.Neutral, cards, target, game);
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
target.clearChosen();
}
if (cards.size() == 1) {
Card card = cards.get(cards.iterator().next(), game);
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
player.putCardsOnBottomOfLibrary(cards, game, source, true);
return true;
}
}

View file

@ -27,6 +27,7 @@
*/
package mage.abilities.effects.common;
import java.util.Set;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -39,8 +40,6 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import java.util.Set;
/**
* @author magenoxx_at_gmail.com
*/
@ -48,7 +47,7 @@ public class CastCardFromOutsideTheGameEffect extends OneShotEffect {
private static final String choiceText = "Cast a card from outside the game?";
private FilterCard filterCard;
private final FilterCard filterCard;
public CastCardFromOutsideTheGameEffect(FilterCard filter, String ruleText) {
super(Outcome.Benefit);
@ -76,15 +75,17 @@ public class CastCardFromOutsideTheGameEffect extends OneShotEffect {
while (player.chooseUse(Outcome.Benefit, choiceText, source, game)) {
Cards cards = player.getSideboard();
if (cards.isEmpty()) {
if (!game.isSimulation())
if (!game.isSimulation()) {
game.informPlayer(player, "You have no cards outside the game.");
}
return false;
}
Set<Card> filtered = cards.getCards(filterCard, source.getSourceId(), source.getControllerId(), game);
if (filtered.isEmpty()) {
if (!game.isSimulation())
if (!game.isSimulation()) {
game.informPlayer(player, "You have no " + filterCard.getMessage() + " outside the game.");
}
return false;
}
@ -93,7 +94,7 @@ public class CastCardFromOutsideTheGameEffect extends OneShotEffect {
filteredCards.add(card.getId());
}
TargetCard target = new TargetCard(Zone.PICK, filterCard);
TargetCard target = new TargetCard(Zone.OUTSIDE, filterCard);
if (player.choose(Outcome.Benefit, filteredCards, target, game)) {
Card card = player.getSideboard().get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -546,8 +546,6 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
removed = true;
}
break;
case PICK: // Pick should no longer be used
case BATTLEFIELD: // for sacrificing permanents or putting to library
removed = true;
break;

View file

@ -6,7 +6,7 @@ package mage.constants;
*/
public enum Zone {
HAND, GRAVEYARD, LIBRARY, BATTLEFIELD, STACK, EXILED, ALL, OUTSIDE, PICK, COMMAND;
HAND, GRAVEYARD, LIBRARY, BATTLEFIELD, STACK, EXILED, ALL, OUTSIDE, COMMAND;
public boolean match(Zone zone) {
return (this == zone || this == ALL || zone == ALL);

View file

@ -862,7 +862,7 @@ public abstract class PlayerImpl implements Player, Serializable {
moveObjectToLibrary(objectId, source == null ? null : source.getSourceId(), game, false, false);
}
} else {
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library (last one chosen will be bottommost)"));
TargetCard target = new TargetCard(Zone.ALL, new FilterCard("card to put on the bottom of your library (last one chosen will be bottommost)"));
target.setRequired(true);
while (isInGame() && cards.size() > 1) {
this.choose(Outcome.Neutral, cards, target, game);
@ -3344,11 +3344,7 @@ public abstract class PlayerImpl implements Player, Serializable {
StringBuilder sb = new StringBuilder(this.getLogName())
.append(" puts ").append(withName ? card.getLogName() : "a card").append(" ");
if (fromZone != null) {
if (fromZone.equals(Zone.PICK)) {
sb.append("a picked card ");
} else {
sb.append("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" ");
}
sb.append("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" ");
}
sb.append("to the ").append(toTop ? "top" : "bottom");
if (card.getOwnerId().equals(getId())) {