mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +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);
|
activator.addController(controlledByTimeStamp, controlledByPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
final CardCollection saidNoTo = new CardCollection();
|
while (!tgtCards.isEmpty() && amount > 0) {
|
||||||
while (tgtCards.size() > saidNoTo.size() && saidNoTo.size() < amount && amount > 0) {
|
|
||||||
activator.getController().tempShowCards(showCards);
|
activator.getController().tempShowCards(showCards);
|
||||||
Card tgtCard = controller.getController().chooseSingleEntityForEffect(tgtCards, sa, Localizer.getInstance().getMessage("lblSelectCardToPlay"), null);
|
Card tgtCard = controller.getController().chooseSingleEntityForEffect(tgtCards, sa, Localizer.getInstance().getMessage("lblSelectCardToPlay"), null);
|
||||||
activator.getController().endTempShowCards();
|
activator.getController().endTempShowCards();
|
||||||
@@ -207,7 +206,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
if (wasFaceDown) {
|
if (wasFaceDown) {
|
||||||
tgtCard.turnFaceDownNoUpdate();
|
tgtCard.turnFaceDownNoUpdate();
|
||||||
}
|
}
|
||||||
saidNoTo.add(tgtCard);
|
tgtCards.remove(tgtCard);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +240,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
source.addRemembered(tgtCard);
|
source.addRemembered(tgtCard);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
saidNoTo.add(tgtCard);
|
tgtCards.remove(tgtCard);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user