* Parallel Thoughts - Fixed handling of replacement effect (was not optional).
-
package mage.cards.p;
import java.util.Arrays;
@@ -98,14 +97,13 @@ class ParallelThoughtsSearchEffect extends OneShotEffect {
cardsInExilePile.addAll(Arrays.asList(shuffled));
// move to exile zone and turn face down
-
+ String exileName = permanent.getIdName() + " (" + game.getState().getZoneChangeCounter(source.getSourceId()) + ")";
for (Card card : cardsInExilePile.getCards(game)) {
- controller.moveCardsToExile(card, source, game, false, CardUtil.getCardExileZoneId(game, source), permanent.getLogName());
+ controller.moveCardsToExile(card, source, game, false, CardUtil.getCardExileZoneId(game, source), exileName);
card.setFaceDown(true, game);
}
// shuffle controller library
-
controller.shuffleLibrary(source, game);
}
return true;
@@ -118,7 +116,7 @@ class ParallelThoughtsReplacementEffect extends ReplacementEffectImpl {
ParallelThoughtsReplacementEffect() {
super(Duration.WhileOnBattlefield, Outcome.DrawCard);
- staticText = "If you would draw a card, you may instead put the top card of the pile you exiled with Parallel Thoughts into your hand";
+ staticText = "If you would draw a card, you may instead put the top card of the pile you exiled with {this} into your hand";
}
ParallelThoughtsReplacementEffect(final ParallelThoughtsReplacementEffect effect) {
@@ -135,13 +133,16 @@ class ParallelThoughtsReplacementEffect extends ReplacementEffectImpl {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null
&& !game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)).getCards(game).isEmpty()) {
+ if (controller.chooseUse(outcome, "Draw a card from the pile you exiled instead drawing from your library?", source, game)) {
Card card = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)).getCards(game).iterator().next();
if (card != null) {
controller.moveCards(card, Zone.HAND, source, game);
}
- }
return true;
}
+ }
+ return false;
+ }
@Override
public boolean checksEventType(GameEvent event, Game game) {
