mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -145,19 +145,20 @@ public enum CSubmenuQuestData implements ICDoc {
|
||||
break;
|
||||
|
||||
case CustomFormat:
|
||||
if ( customFormatCodes.isEmpty() )
|
||||
{
|
||||
if (customFormatCodes.isEmpty()) {
|
||||
|
||||
int answer = JOptionPane.showConfirmDialog(null, "You have defined custom format as containing no sets.\nThis will start a game without restriction.\n\nContinue?");
|
||||
if ( JOptionPane.YES_OPTION != answer )
|
||||
if (JOptionPane.YES_OPTION != answer) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
fmtStartPool = customFormatCodes.isEmpty() ? null : new GameFormatQuest("Custom", customFormatCodes, null); // chosen sets and no banend cards
|
||||
break;
|
||||
|
||||
case SealedDeck:
|
||||
dckStartPool = view.getSelectedDeck();
|
||||
if ( null == dckStartPool )
|
||||
{
|
||||
if (null == dckStartPool) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "You have not selected a deck to start", "Cannot start a quest", JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
@@ -165,8 +166,8 @@ public enum CSubmenuQuestData implements ICDoc {
|
||||
|
||||
case DraftDeck:
|
||||
dckStartPool = view.getSelectedDeck();
|
||||
if ( null == dckStartPool )
|
||||
{
|
||||
if (null == dckStartPool) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "You have not selected a deck to start", "Cannot start a quest", JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
@@ -190,28 +191,31 @@ public enum CSubmenuQuestData implements ICDoc {
|
||||
List<String> sets = new ArrayList<String>();
|
||||
for (Entry<CardPrinted, Integer> c : dckStartPool.getMain()) {
|
||||
String edition = c.getKey().getEdition();
|
||||
if ( !sets.contains(edition) )
|
||||
if (!sets.contains(edition)) {
|
||||
sets.add(edition);
|
||||
}
|
||||
}
|
||||
for (Entry<CardPrinted, Integer> c : dckStartPool.getSideboard()) {
|
||||
String edition = c.getKey().getEdition();
|
||||
if ( !sets.contains(edition) )
|
||||
if (!sets.contains(edition)) {
|
||||
sets.add(edition);
|
||||
}
|
||||
}
|
||||
fmtPrizes = new GameFormat("From deck", sets, null);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
switch(prizedPoolType) {
|
||||
case Complete:
|
||||
fmtPrizes = null;
|
||||
break;
|
||||
case CustomFormat:
|
||||
if ( customPrizeFormatCodes.isEmpty() )
|
||||
{
|
||||
if (customPrizeFormatCodes.isEmpty()) {
|
||||
|
||||
int answer = JOptionPane.showConfirmDialog(null, "You have defined custom format as containing no sets.\nThis will choose all editions without restriction as prized.\n\nContinue?");
|
||||
if ( JOptionPane.YES_OPTION != answer )
|
||||
if (JOptionPane.YES_OPTION != answer) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
fmtPrizes = customPrizeFormatCodes.isEmpty() ? null : new GameFormat("Custom Prizes", customPrizeFormatCodes, null); // chosen sets and no banend cards
|
||||
break;
|
||||
case Rotating:
|
||||
@@ -220,6 +224,7 @@ public enum CSubmenuQuestData implements ICDoc {
|
||||
default:
|
||||
throw new RuntimeException("Should not get this result");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final Object o = JOptionPane.showInputDialog(null, "Poets will remember your quest as:", "Quest Name", JOptionPane.OK_CANCEL_OPTION);
|
||||
|
||||
Reference in New Issue
Block a user