mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Opt - Fixed missing reveal window.
This commit is contained in:
parent
5c05e7885c
commit
d0c055c5fd
2 changed files with 6 additions and 3 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue