mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge branch 'etali' into 'master'
PlayEffect: Fix loop of selecting same card when optional Closes #1835 See merge request core-developers/forge!4697
This commit is contained in:
@@ -180,8 +180,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
activator.addController(controlledByTimeStamp, controlledByPlayer);
|
||||
}
|
||||
|
||||
final CardCollection saidNoTo = new CardCollection();
|
||||
while (tgtCards.size() > saidNoTo.size() && saidNoTo.size() < amount && amount > 0) {
|
||||
while (!tgtCards.isEmpty() && amount > 0) {
|
||||
activator.getController().tempShowCards(showCards);
|
||||
Card tgtCard = controller.getController().chooseSingleEntityForEffect(tgtCards, sa, Localizer.getInstance().getMessage("lblSelectCardToPlay"), null);
|
||||
activator.getController().endTempShowCards();
|
||||
@@ -207,7 +206,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
if (wasFaceDown) {
|
||||
tgtCard.turnFaceDownNoUpdate();
|
||||
}
|
||||
saidNoTo.add(tgtCard);
|
||||
tgtCards.remove(tgtCard);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -241,7 +240,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
source.addRemembered(tgtCard);
|
||||
}
|
||||
} else {
|
||||
saidNoTo.add(tgtCard);
|
||||
tgtCards.remove(tgtCard);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user