mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Fix defaults booster box counts for certain edition types
This commit is contained in:
@@ -65,7 +65,17 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
FROM_THE_VAULT,
|
FROM_THE_VAULT,
|
||||||
|
|
||||||
OTHER,
|
OTHER,
|
||||||
THIRDPARTY // custom sets
|
THIRDPARTY; // custom sets
|
||||||
|
|
||||||
|
public String getBoosterBoxDefault() {
|
||||||
|
switch (this) {
|
||||||
|
case CORE:
|
||||||
|
case EXPANSION:
|
||||||
|
return "36";
|
||||||
|
default:
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum FoilType {
|
public enum FoilType {
|
||||||
@@ -457,7 +467,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
}
|
}
|
||||||
res.type = enumType;
|
res.type = enumType;
|
||||||
res.prerelease = section.get("Prerelease", null);
|
res.prerelease = section.get("Prerelease", null);
|
||||||
res.boosterBoxCount = Integer.parseInt(section.get("BoosterBox", "36"));
|
res.boosterBoxCount = Integer.parseInt(section.get("BoosterBox", enumType.getBoosterBoxDefault()));
|
||||||
|
|
||||||
switch(section.get("foil", "newstyle").toLowerCase()) {
|
switch(section.get("foil", "newstyle").toLowerCase()) {
|
||||||
case "notsupported":
|
case "notsupported":
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ public abstract class SealedProduct implements InventoryItemFromSet {
|
|||||||
|
|
||||||
public SealedProduct(String name0, Template boosterData) {
|
public SealedProduct(String name0, Template boosterData) {
|
||||||
if (null == name0) { throw new IllegalArgumentException("name0 must not be null"); }
|
if (null == name0) { throw new IllegalArgumentException("name0 must not be null"); }
|
||||||
if (null == boosterData) { throw new IllegalArgumentException("boosterData must not be null"); }
|
if (null == boosterData) {
|
||||||
|
throw new IllegalArgumentException("boosterData must not be null");
|
||||||
|
}
|
||||||
contents = boosterData;
|
contents = boosterData;
|
||||||
name = name0;
|
name = name0;
|
||||||
hash = name.hashCode() ^ getClass().hashCode() ^ contents.hashCode();
|
hash = name.hashCode() ^ getClass().hashCode() ^ contents.hashCode();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Type=Reprint
|
|||||||
BoosterCovers=1
|
BoosterCovers=1
|
||||||
Booster=2 fromSheet("MB1 White CommonUncommon"), 2 fromSheet("MB1 Blue CommonUncommon"), 2 fromSheet("MB1 Black CommonUncommon"), 2 fromSheet("MB1 Green CommonUncommon"), 2 fromSheet("MB1 Red CommonUncommon"), 1 fromSheet("MB1 Multi CommonUncommon"), 1 fromSheet("MB1 Artifact Land CommonUncommon"), 1 fromSheet("MB1 Pre M15"), 1 fromSheet("MB1 Post M15 RareMythic"), 1 fromSheet("MB1 Foils")
|
Booster=2 fromSheet("MB1 White CommonUncommon"), 2 fromSheet("MB1 Blue CommonUncommon"), 2 fromSheet("MB1 Black CommonUncommon"), 2 fromSheet("MB1 Green CommonUncommon"), 2 fromSheet("MB1 Red CommonUncommon"), 1 fromSheet("MB1 Multi CommonUncommon"), 1 fromSheet("MB1 Artifact Land CommonUncommon"), 1 fromSheet("MB1 Pre M15"), 1 fromSheet("MB1 Post M15 RareMythic"), 1 fromSheet("MB1 Foils")
|
||||||
Foil=NotSupported
|
Foil=NotSupported
|
||||||
|
BoosterBox=60
|
||||||
|
|
||||||
[cards]
|
[cards]
|
||||||
1 R All Is Dust
|
1 R All Is Dust
|
||||||
|
|||||||
Reference in New Issue
Block a user