* Gifts Ungiven - Fixed that always have to be selected 4 cards instead up to 4 cards.

This commit is contained in:
LevelX2 2014-06-23 01:31:05 +02:00
parent 4e06f60f76
commit 8388225f90
2 changed files with 7 additions and 7 deletions

View file

@ -29,16 +29,16 @@ package mage.sets.championsofkamigawa;
import java.util.List; import java.util.List;
import java.util.UUID; 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.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.Cards; import mage.cards.Cards;
import mage.cards.CardsImpl; 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.FilterCard;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
@ -130,13 +130,13 @@ class GiftsUngivenEffect extends OneShotEffect {
for (UUID cardId : cards) { for (UUID cardId : cards) {
Card card = game.getCard(cardId); Card card = game.getCard(cardId);
if (card != null) { if (card != null) {
card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, true); player.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
} }
} }
for (UUID cardId : cardsToKeep) { for (UUID cardId : cardsToKeep) {
Card card = game.getCard(cardId); Card card = game.getCard(cardId);
if (card != null) { if (card != null) {
card.moveToZone(Zone.HAND, source.getSourceId(), game, true); player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
} }
} }
} }

View file

@ -65,7 +65,7 @@ public class TargetCardInLibrary extends TargetCard {
public TargetCardInLibrary(int minNumTargets, int maxNumTargets, FilterCard filter) { public TargetCardInLibrary(int minNumTargets, int maxNumTargets, FilterCard filter) {
super(minNumTargets, maxNumTargets, Zone.LIBRARY, filter); super(minNumTargets, maxNumTargets, Zone.LIBRARY, filter);
this.setRequired(!filter.hasPredicates()); this.setRequired(minNumTargets > 0 && !filter.hasPredicates());
this.librarySearchLimit = Integer.MAX_VALUE; this.librarySearchLimit = Integer.MAX_VALUE;
} }