mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
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:
parent
a397dd05f6
commit
91ca8bf656
7 changed files with 15 additions and 10 deletions
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue