mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Made land into play effect optional
This commit is contained in:
parent
53f68197aa
commit
8540f4c03b
1 changed files with 9 additions and 6 deletions
|
@ -17,6 +17,7 @@ import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
@ -75,7 +76,7 @@ class AminatousAuguryEffect extends OneShotEffect{
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (controller != null && sourceObject != null) {
|
if (controller != null && sourceObject != null) {
|
||||||
// move cards from library to exile
|
// move cards from library to exile
|
||||||
controller.moveCardsToExile(controller.getLibrary().getTopCards(game, 8), source, game, true, source.getSourceId(), sourceObject.getIdName());
|
controller.moveCardsToExile(controller.getLibrary().getTopCards(game, 8), source, game, true, source.getSourceId(), CardUtil.createObjectRealtedWindowTitle(source, game, null));
|
||||||
ExileZone auguryExileZone = game.getExile().getExileZone(source.getSourceId());
|
ExileZone auguryExileZone = game.getExile().getExileZone(source.getSourceId());
|
||||||
if (auguryExileZone == null) {
|
if (auguryExileZone == null) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -87,11 +88,13 @@ class AminatousAuguryEffect extends OneShotEffect{
|
||||||
Zone.EXILED,
|
Zone.EXILED,
|
||||||
StaticFilters.FILTER_CARD_LAND_A
|
StaticFilters.FILTER_CARD_LAND_A
|
||||||
);
|
);
|
||||||
if (controller.choose(Outcome.PutCardInPlay, cardsToCast, target, game)) {
|
if (controller.chooseUse(Outcome.PutLandInPlay, "Put a land from among the exiled cards into play?", source, game)) {
|
||||||
Card card = cardsToCast.get(target.getFirstTarget(), game);
|
if (controller.choose(Outcome.PutLandInPlay, cardsToCast, target, game)) {
|
||||||
if (card != null) {
|
Card card = cardsToCast.get(target.getFirstTarget(), game);
|
||||||
cardsToCast.remove(card);
|
if (card != null) {
|
||||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
cardsToCast.remove(card);
|
||||||
|
controller.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AminatousAuguryExileHandler exileHandler = new AminatousAuguryExileHandler(cardsToCast, source, game);
|
AminatousAuguryExileHandler exileHandler = new AminatousAuguryExileHandler(cardsToCast, source, game);
|
||||||
|
|
Loading…
Reference in a new issue