From 91ca8bf656a903ccc7a9472c09d45bc8ec524475 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 16 Jun 2014 21:23:11 +0200 Subject: [PATCH] Fixed bug of Whims of the Fates, Liliana of the Veil, Fact or Fiction, Sphinx of Uthuun, Jace Architect of Thought, Brilliant Ultimatum and SteamAugury that the player had to move all cards into one pile because the selection for the first pile could not be stopped until all cards are selected. --- Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java | 1 + Mage.Sets/src/mage/sets/innistrad/LilianaOfTheVeil.java | 5 +++-- Mage.Sets/src/mage/sets/invasion/FactOrFiction.java | 2 +- Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java | 5 +++-- .../mage/sets/returntoravnica/JaceArchitectOfThought.java | 2 +- .../src/mage/sets/shardsofalara/BrilliantUltimatum.java | 5 +++-- Mage.Sets/src/mage/sets/theros/SteamAugury.java | 5 +++-- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java b/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java index da15664213..05e25ebbf8 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/WhimsOfTheFates.java @@ -134,6 +134,7 @@ class WhimsOfTheFateEffect extends OneShotEffect { } else { target = new TargetSecondPilePermanent(playerPiles.get(1), filter); } + target.setRequired(false); currentPlayer.chooseTarget(outcome, target, source, game); StringBuilder message = new StringBuilder(currentPlayer.getName()).append(" pile ").append(i).append(": "); if (target.getTargets().isEmpty()) { diff --git a/Mage.Sets/src/mage/sets/innistrad/LilianaOfTheVeil.java b/Mage.Sets/src/mage/sets/innistrad/LilianaOfTheVeil.java index 4fbc0bfa5f..d83989055e 100644 --- a/Mage.Sets/src/mage/sets/innistrad/LilianaOfTheVeil.java +++ b/Mage.Sets/src/mage/sets/innistrad/LilianaOfTheVeil.java @@ -111,7 +111,8 @@ class LilianaOfTheVeilEffect extends OneShotEffect { if (player != null && targetPlayer != null) { int count = game.getBattlefield().countAll(new FilterPermanent(), targetPlayer.getId(), game); TargetPermanent target = new TargetPermanent(0, count, new FilterPermanent("permanents to put in the first pile"), false); - List pile1 = new ArrayList(); + List pile1 = new ArrayList<>(); + target.setRequired(false); if (player.choose(Outcome.Neutral, target, source.getSourceId(), game)) { List targets = target.getTargets(); for (UUID targetId : targets) { @@ -121,7 +122,7 @@ class LilianaOfTheVeilEffect extends OneShotEffect { } } } - List pile2 = new ArrayList(); + List pile2 = new ArrayList<>(); for (Permanent p: game.getBattlefield().getAllActivePermanents(targetPlayer.getId())) { if (!pile1.contains(p)) { pile2.add(p); diff --git a/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java b/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java index 1f377277f9..ed6aa262aa 100644 --- a/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java +++ b/Mage.Sets/src/mage/sets/invasion/FactOrFiction.java @@ -110,7 +110,7 @@ class FactOrFictionEffect extends OneShotEffect { if (!opponents.isEmpty()) { Player opponent = game.getPlayer(opponents.iterator().next()); TargetCard target = new TargetCard(0, cards.size(), Zone.PICK, new FilterCard("cards to put in the first pile")); - + target.setRequired(false); Cards pile1 = new CardsImpl(); if (opponent.choose(Outcome.Neutral, cards, target, game)) { List targets = target.getTargets(); diff --git a/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java b/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java index 3c89797187..b94de45586 100644 --- a/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java +++ b/Mage.Sets/src/mage/sets/magic2012/SphinxOfUthuun.java @@ -117,7 +117,8 @@ class SphinxOfUthuunEffect extends OneShotEffect { Player opponent = game.getPlayer(opponents.iterator().next()); TargetCard target = new TargetCard(0, cards.size(), Zone.PICK, new FilterCard("cards to put in the first pile")); - List pile1 = new ArrayList(); + target.setRequired(false); + List pile1 = new ArrayList<>(); Cards pile1CardsIds = new CardsImpl(); if (opponent.choose(Outcome.Neutral, cards, target, game)) { List targets = target.getTargets(); @@ -129,7 +130,7 @@ class SphinxOfUthuunEffect extends OneShotEffect { } } } - List pile2 = new ArrayList(); + List pile2 = new ArrayList<>(); Cards pile2CardsIds = new CardsImpl(); for (UUID cardId :cards) { Card card = game.getCard(cardId); diff --git a/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java b/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java index 1193c5b07a..243b501514 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/JaceArchitectOfThought.java @@ -262,7 +262,7 @@ class JaceArchitectOfThoughtEffect2 extends OneShotEffect { } TargetCard target = new TargetCard(0, cards.size(), Zone.PICK, new FilterCard("cards to put in the first pile")); - + target.setRequired(false); Cards pile1 = new CardsImpl(); if (opponent.choose(Outcome.Neutral, cards, target, game)) { for (UUID targetId : (List) target.getTargets()) { diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java b/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java index b08c4a0bc8..f9771abda1 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/BrilliantUltimatum.java @@ -112,9 +112,10 @@ class BrilliantUltimatumEffect extends OneShotEffect { Player opponent = game.getPlayer(source.getFirstTarget()); if (opponent != null) { TargetCard target = new TargetCard(0, pile2.size(), Zone.EXILED, new FilterCard("cards to put in the first pile")); + target.setRequired(false); Cards pile1 = new CardsImpl(); - List pileOne = new ArrayList(); - List pileTwo = new ArrayList(); + List pileOne = new ArrayList<>(); + List pileTwo = new ArrayList<>(); if (opponent.choose(Outcome.Neutral, pile2, target, game)) { List targets = target.getTargets(); for (UUID targetId : targets) { diff --git a/Mage.Sets/src/mage/sets/theros/SteamAugury.java b/Mage.Sets/src/mage/sets/theros/SteamAugury.java index 421a9ae85e..44c29ce3fd 100644 --- a/Mage.Sets/src/mage/sets/theros/SteamAugury.java +++ b/Mage.Sets/src/mage/sets/theros/SteamAugury.java @@ -112,8 +112,9 @@ class SteamAuguryEffect extends OneShotEffect { Player opponent = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (opponent != null) { TargetCard target = new TargetCard(0, cards.size(), Zone.PICK, new FilterCard("cards to put in the first pile")); - List pile1 = new ArrayList(); + List pile1 = new ArrayList<>(); Cards pile1CardsIds = new CardsImpl(); + target.setRequired(false); if (player.choose(Outcome.Neutral, cards, target, game)) { List targets = target.getTargets(); for (UUID targetId : targets) { @@ -124,7 +125,7 @@ class SteamAuguryEffect extends OneShotEffect { } } } - List pile2 = new ArrayList(); + List pile2 = new ArrayList<>(); Cards pile2CardsIds = new CardsImpl(); for (UUID cardId :cards) { Card card = game.getCard(cardId);