mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
correct the choice out of available flip results
This commit is contained in:
@@ -637,8 +637,12 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
|
||||
@Override
|
||||
public boolean chooseFilpResult(SpellAbility sa, Player flipper, boolean[] results, boolean call) {
|
||||
String[] labels = call ? new String[]{"heads", "tails"} : new String[]{"win the flip", "lose the flip"};
|
||||
return GuiChoose.one(sa.getSourceCard().getName() + " - Choose a result", labels) == labels[0];
|
||||
String[] labelsSrc = call ? new String[]{"heads", "tails"} : new String[]{"win the flip", "lose the flip"};
|
||||
String[] strResults = new String[results.length];
|
||||
for(int i = 0; i < results.length; i++) {
|
||||
strResults[i] = labelsSrc[results[i] ? 0 : 1];
|
||||
}
|
||||
return GuiChoose.one(sa.getSourceCard().getName() + " - Choose a result", strResults) == labelsSrc[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user