mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
bufgix
This commit is contained in:
@@ -737,11 +737,11 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
// card has to be on battlefield or in own hand
|
// card has to be on battlefield or in own hand
|
||||||
boolean canUseInputToSelectCard = origin.size() == 1 && ( origin.get(0) == ZoneType.Battlefield || origin.get(0) == ZoneType.Hand && player == decider);
|
boolean canUseInputToSelectCard = origin.size() == 1 && ( origin.get(0) == ZoneType.Battlefield || origin.get(0) == ZoneType.Hand && player == decider);
|
||||||
|
|
||||||
Object o;
|
Card c;
|
||||||
if (sa.hasParam("AtRandom")) {
|
if (sa.hasParam("AtRandom")) {
|
||||||
o = Aggregates.random(fetchList);
|
c = Aggregates.random(fetchList);
|
||||||
} else if (sa.hasParam("Defined")) {
|
} else if (sa.hasParam("Defined")) {
|
||||||
o = fetchList.get(0);
|
c = fetchList.get(0);
|
||||||
} else {
|
} else {
|
||||||
boolean mustChoose = sa.hasParam("Mandatory");
|
boolean mustChoose = sa.hasParam("Mandatory");
|
||||||
if( canUseInputToSelectCard ) {
|
if( canUseInputToSelectCard ) {
|
||||||
@@ -749,14 +749,15 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
inp.setCancelAllowed(!mustChoose);
|
inp.setCancelAllowed(!mustChoose);
|
||||||
inp.setMessage(selectPrompt);
|
inp.setMessage(selectPrompt);
|
||||||
FThreads.setInputAndWait(inp);
|
FThreads.setInputAndWait(inp);
|
||||||
o = inp.getSelected().get(0);
|
c = inp.getSelected().get(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
List<Card> chosen = GuiChoose.getChoices(selectPrompt, 0, mustChoose ? 1 : 0, fetchList);
|
||||||
|
c = chosen.isEmpty() ? null : chosen.get(0);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
o = GuiChoose.getChoices(selectPrompt, 0, mustChoose ? 1 : 0, fetchList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o != null) {
|
if (c != null) {
|
||||||
final Card c = (Card) o;
|
|
||||||
fetchList.remove(c);
|
fetchList.remove(c);
|
||||||
Card movedCard = null;
|
Card movedCard = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user