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.

This commit is contained in:
LevelX2 2014-06-16 21:23:11 +02:00
parent a397dd05f6
commit 91ca8bf656
7 changed files with 15 additions and 10 deletions

View file

@ -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()) {

View file

@ -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<Permanent> pile1 = new ArrayList<Permanent>();
List<Permanent> pile1 = new ArrayList<>();
target.setRequired(false);
if (player.choose(Outcome.Neutral, target, source.getSourceId(), game)) {
List<UUID> targets = target.getTargets();
for (UUID targetId : targets) {
@ -121,7 +122,7 @@ class LilianaOfTheVeilEffect extends OneShotEffect {
}
}
}
List<Permanent> pile2 = new ArrayList<Permanent>();
List<Permanent> pile2 = new ArrayList<>();
for (Permanent p: game.getBattlefield().getAllActivePermanents(targetPlayer.getId())) {
if (!pile1.contains(p)) {
pile2.add(p);

View file

@ -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<UUID> targets = target.getTargets();

View file

@ -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<Card> pile1 = new ArrayList<Card>();
target.setRequired(false);
List<Card> pile1 = new ArrayList<>();
Cards pile1CardsIds = new CardsImpl();
if (opponent.choose(Outcome.Neutral, cards, target, game)) {
List<UUID> targets = target.getTargets();
@ -129,7 +130,7 @@ class SphinxOfUthuunEffect extends OneShotEffect {
}
}
}
List<Card> pile2 = new ArrayList<Card>();
List<Card> pile2 = new ArrayList<>();
Cards pile2CardsIds = new CardsImpl();
for (UUID cardId :cards) {
Card card = game.getCard(cardId);

View file

@ -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<UUID>) target.getTargets()) {

View file

@ -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<Card> pileOne = new ArrayList<Card>();
List<Card> pileTwo = new ArrayList<Card>();
List<Card> pileOne = new ArrayList<>();
List<Card> pileTwo = new ArrayList<>();
if (opponent.choose(Outcome.Neutral, pile2, target, game)) {
List<UUID> targets = target.getTargets();
for (UUID targetId : targets) {

View file

@ -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<Card> pile1 = new ArrayList<Card>();
List<Card> pile1 = new ArrayList<>();
Cards pile1CardsIds = new CardsImpl();
target.setRequired(false);
if (player.choose(Outcome.Neutral, cards, target, game)) {
List<UUID> targets = target.getTargets();
for (UUID targetId : targets) {
@ -124,7 +125,7 @@ class SteamAuguryEffect extends OneShotEffect {
}
}
}
List<Card> pile2 = new ArrayList<Card>();
List<Card> pile2 = new ArrayList<>();
Cards pile2CardsIds = new CardsImpl();
for (UUID cardId :cards) {
Card card = game.getCard(cardId);