From d35b168cd51cd57f16e2e105908c7a2bc5056a4b Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 10 Oct 2014 14:56:39 +0200 Subject: [PATCH] * See the Unwritten - Fxed that the selection of creatures was not optional. --- .../sets/khansoftarkir/SeeTheUnwritten.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java b/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java index c825521ace..400a1a9c61 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/SeeTheUnwritten.java @@ -30,7 +30,6 @@ package mage.sets.khansoftarkir; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.Mode; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.FerociousCondition; import mage.abilities.decorator.ConditionalOneShotEffect; @@ -47,7 +46,6 @@ import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; -import mage.util.CardUtil; @@ -114,32 +112,34 @@ class SeeTheUnwrittenEffect extends OneShotEffect { if (player != null && sourceObject != null) { Cards cards = new CardsImpl(Zone.LIBRARY); - boolean properCardFound = false; + int creatureCardsFound = 0; int count = Math.min(player.getLibrary().size(), 8); for (int i = 0; i < count; i++) { Card card = player.getLibrary().removeFromTop(game); if (card != null) { cards.add(card); if (filter.match(card, source.getSourceId(), source.getControllerId(), game)) { - properCardFound = true; + creatureCardsFound++; } } } if (!cards.isEmpty()) { player.revealCards(sourceObject.getLogName(), cards, game); - TargetCard target = new TargetCard(numberOfCardsToPutIntoPlay, numberOfCardsToPutIntoPlay, Zone.LIBRARY, filter); - if (properCardFound && player.choose(Outcome.PutCreatureInPlay, cards, target, game)) { - for(UUID creatureId: target.getTargets()) { - Card card = game.getCard(creatureId); - if (card != null) { - cards.remove(card); - player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); + if (creatureCardsFound > 0 && player.chooseUse(outcome, "Put creature(s) into play?", game)) { + int cardsToChoose = Math.min(numberOfCardsToPutIntoPlay, creatureCardsFound); + TargetCard target = new TargetCard(cardsToChoose, cardsToChoose, Zone.LIBRARY, filter); + if (player.choose(Outcome.PutCreatureInPlay, cards, target, game)) { + for(UUID creatureId: target.getTargets()) { + Card card = game.getCard(creatureId); + if (card != null) { + cards.remove(card); + player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); + } } + } - } - for (UUID cardId : cards) { Card card = game.getCard(cardId); if (card != null) {