mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Remove obsolete Pick zone.
This commit is contained in:
parent
7f105fb123
commit
2ceb8425e5
74 changed files with 146 additions and 423 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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())) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue