mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
* Opt - Fixed missing reveal window.
This commit is contained in:
parent
5c05e7885c
commit
d0c055c5fd
2 changed files with 6 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue