From d0c055c5fdf362ef05d0352d76a5754fcf4472c0 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 29 Oct 2014 14:18:16 +0100 Subject: [PATCH] * Opt - Fixed missing reveal window. --- Mage.Sets/src/mage/sets/invasion/Opt.java | 3 +-- .../effects/common/LookLibraryMayPutToBottomEffect.java | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/invasion/Opt.java b/Mage.Sets/src/mage/sets/invasion/Opt.java index deb98c4811..57ff0adb74 100644 --- a/Mage.Sets/src/mage/sets/invasion/Opt.java +++ b/Mage.Sets/src/mage/sets/invasion/Opt.java @@ -28,7 +28,6 @@ package mage.sets.invasion; import java.util.UUID; - import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.LookLibraryMayPutToBottomEffect; import mage.cards.CardImpl; @@ -48,8 +47,8 @@ public class Opt extends CardImpl { this.color.setBlue(true); // Look at the top card of your library. You may put that card on the bottom of your library. - // This is functionally the same as scry, copy scry effect, removing "scry", unless theres a simpler way im overlooking? this.getSpellAbility().addEffect(new LookLibraryMayPutToBottomEffect()); + // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java index 665f0bdfc5..62981ad01a 100644 --- a/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java +++ b/Mage/src/mage/abilities/effects/common/LookLibraryMayPutToBottomEffect.java @@ -6,9 +6,11 @@ package mage.abilities.effects.common; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; +import mage.cards.CardsImpl; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -33,7 +35,8 @@ public class LookLibraryMayPutToBottomEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller == null) { + MageObject sourceObject = game.getObject(source.getSourceId()); + if (sourceObject == null || controller == null) { return false; } if (!controller.getLibrary().isEmptyDraw()) { @@ -41,6 +44,7 @@ public class LookLibraryMayPutToBottomEffect extends OneShotEffect { if (card == null) { return false; } + controller.lookAtCards(sourceObject.getLogName(), new CardsImpl(card), game); boolean toBottom = controller.chooseUse(outcome, "Put card on the bottom of your library?", game); return controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, !toBottom, false); }