mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
simplification in AF_ChooseColor
This commit is contained in:
@@ -590,25 +590,10 @@ public class AbilityFactory_Choose {
|
|||||||
|
|
||||||
for (Player p : tgtPlayers) {
|
for (Player p : tgtPlayers) {
|
||||||
if (tgt == null || p.canTarget(sa)) {
|
if (tgt == null || p.canTarget(sa)) {
|
||||||
List<String> colors = new ArrayList<String>(Arrays.asList(Constant.Color.onlyColors));
|
|
||||||
if (sa.getActivatingPlayer().isHuman()) {
|
if (sa.getActivatingPlayer().isHuman()) {
|
||||||
if (params.containsKey("OrColors")) {
|
if (params.containsKey("OrColors")) {
|
||||||
//ArrayList<String> chosenColors = new ArrayList<String>();
|
List<String> o = GuiUtils.getChoices("Choose a color or colors", Constant.Color.onlyColors);
|
||||||
//boolean done = false;
|
|
||||||
//while (!done) {
|
|
||||||
List<String> o = GuiUtils.getChoices("Choose a color or colors", colors.toArray(new String[0]));
|
|
||||||
/*if (null == o) {
|
|
||||||
done = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
String thisColor = (String) o;
|
|
||||||
chosenColors.add(thisColor);
|
|
||||||
colors.remove(thisColor);
|
|
||||||
card.setChosenColor(chosenColors);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
card.setChosenColor(new ArrayList<String>(o));
|
card.setChosenColor(new ArrayList<String>(o));
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Object o = GuiUtils.getChoice("Choose a color", Constant.Color.onlyColors);
|
Object o = GuiUtils.getChoice("Choose a color", Constant.Color.onlyColors);
|
||||||
|
|||||||
Reference in New Issue
Block a user