mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Fixed issue with single set Fantasy Blocks
This commit is contained in:
@@ -95,11 +95,6 @@ public class BoosterDraft implements IBoosterDraft {
|
|||||||
if (block == null) { return false; }
|
if (block == null) { return false; }
|
||||||
|
|
||||||
final List<CardEdition> cardSets = block.getSets();
|
final List<CardEdition> cardSets = block.getSets();
|
||||||
if (cardSets.isEmpty()) {
|
|
||||||
SOptionPane.showErrorDialog(block.toString() + " does not contain any set combinations.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Stack<String> sets = new Stack<>();
|
final Stack<String> sets = new Stack<>();
|
||||||
for (int k = cardSets.size() - 1; k >= 0; k--) {
|
for (int k = cardSets.size() - 1; k >= 0; k--) {
|
||||||
sets.add(cardSets.get(k).getCode());
|
sets.add(cardSets.get(k).getCode());
|
||||||
@@ -111,6 +106,11 @@ public class BoosterDraft implements IBoosterDraft {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sets.isEmpty()) {
|
||||||
|
SOptionPane.showErrorDialog(block.toString() + " does not contain any set combinations.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
final int nPacks = block.getCntBoostersDraft();
|
final int nPacks = block.getCntBoostersDraft();
|
||||||
|
|
||||||
if (sets.size() > 1) {
|
if (sets.size() > 1) {
|
||||||
@@ -279,7 +279,7 @@ public class BoosterDraft implements IBoosterDraft {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addSingleBoosterPack(int player, boolean random) {
|
public void addSingleBoosterPack(int player, boolean random) {
|
||||||
// TODO Cogwork Librarian
|
// TODO Lore Seeker
|
||||||
}
|
}
|
||||||
|
|
||||||
// size 7, all the computers decks
|
// size 7, all the computers decks
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ public final class CardBlock implements Comparable<CardBlock> {
|
|||||||
/**
|
/**
|
||||||
* TODO: Write javadoc for Constructor.
|
* TODO: Write javadoc for Constructor.
|
||||||
* @param pathname
|
* @param pathname
|
||||||
* @param keySelector0
|
* @param editions0
|
||||||
*/
|
*/
|
||||||
public Reader(String pathname, CardEdition.Collection editions0) {
|
public Reader(String pathname, CardEdition.Collection editions0) {
|
||||||
super(pathname, CardBlock.FN_GET_NAME);
|
super(pathname, CardBlock.FN_GET_NAME);
|
||||||
@@ -255,7 +255,7 @@ public final class CardBlock implements Comparable<CardBlock> {
|
|||||||
String metaSpec = set.substring(5);
|
String metaSpec = set.substring(5);
|
||||||
boolean noDraft = metaSpec.startsWith("NoDraft-");
|
boolean noDraft = metaSpec.startsWith("NoDraft-");
|
||||||
if( noDraft ) metaSpec = metaSpec.substring(8);
|
if( noDraft ) metaSpec = metaSpec.substring(8);
|
||||||
metas.add(new MetaSet(metaSpec, noDraft));
|
metas.add(new MetaSet(metaSpec, !noDraft));
|
||||||
} else {
|
} else {
|
||||||
sets.add(editions.getEditionByCodeOrThrow(set));
|
sets.add(editions.getEditionByCodeOrThrow(set));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user