* Kaho, Minamo Historian - Fixed a bug that the card could not be cast from exile (fixes #2401).

This commit is contained in:
LevelX2 2016-10-03 00:38:22 +02:00
parent 31e92fbfcb
commit 7cedf8b193

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.SearchEffect;
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.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
@ -118,12 +119,7 @@ class KahoMinamoHistorianEffect extends SearchEffect {
if (controller.searchLibrary(target, game)) { if (controller.searchLibrary(target, game)) {
UUID exileZone = CardUtil.getCardExileZoneId(game, source); UUID exileZone = CardUtil.getCardExileZoneId(game, source);
if (target.getTargets().size() > 0) { if (target.getTargets().size() > 0) {
for (UUID cardId : target.getTargets()) { controller.moveCardsToExile(new CardsImpl(target.getTargets()).getCards(game), source, game, true, exileZone, sourceObject.getIdName());
Card card = controller.getLibrary().getCard(cardId, game);
if (card != null) {
controller.moveCardToExileWithInfo(card, exileZone, sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true);
}
}
} }
} }
controller.shuffleLibrary(source, game); controller.shuffleLibrary(source, game);
@ -161,7 +157,6 @@ class KahoMinamoHistorianCastEffect extends OneShotEffect {
if (cards.size() > 0 && controller.choose(Outcome.PlayForFree, cards, target, game)) { if (cards.size() > 0 && controller.choose(Outcome.PlayForFree, cards, target, game)) {
Card card = game.getCard(target.getFirstTarget()); Card card = game.getCard(target.getFirstTarget());
if (card != null) { if (card != null) {
game.getExile().removeCard(card, game);
controller.cast(card.getSpellAbility(), game, true); controller.cast(card.getSpellAbility(), game, true);
} }
} }