Double Pick each pass

This commit is contained in:
friarsol
2020-11-18 18:13:33 -05:00
parent 1a5cc99249
commit 3ba8892c4f
3 changed files with 10 additions and 6 deletions

View File

@@ -142,7 +142,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
private String boosterMustContain = "";
private String boosterReplaceSlotFromPrintSheet = "";
private String[] chaosDraftThemes = new String[0];
private boolean doublePickToStartRound = false;
private String doublePickDuringDraft = "";
private final ListMultimap<String, CardInSet> cardMap;
private final Map<String, Integer> tokenNormalized;
@@ -211,7 +211,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
public String getAdditionalSheetForFoils() { return additionalSheetForFoils; }
public String getAdditionalUnlockSet() { return additionalUnlockSet; }
public boolean getSmallSetOverride() { return smallSetOverride; }
public boolean getDoublePickToStartRound() { return doublePickToStartRound; }
public String getDoublePickDuringDraft() { return doublePickDuringDraft; }
public String getBoosterMustContain() { return boosterMustContain; }
public String getBoosterReplaceSlotFromPrintSheet() { return boosterReplaceSlotFromPrintSheet; }
public String[] getChaosDraftThemes() { return chaosDraftThemes; }
@@ -441,7 +441,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
res.additionalUnlockSet = section.get("AdditionalSetUnlockedInQuest", ""); // e.g. Time Spiral Timeshifted (TSB) for Time Spiral
res.smallSetOverride = section.getBoolean("TreatAsSmallSet", false); // for "small" sets with over 200 cards (e.g. Eldritch Moon)
res.doublePickToStartRound = section.getBoolean("DoublePick", false); // for getting two picks when opening a pack
res.doublePickDuringDraft = section.get("DoublePick", ""); // "FirstPick" or "Always"
res.boosterMustContain = section.get("BoosterMustContain", ""); // e.g. Dominaria guaranteed legendary creature
res.boosterReplaceSlotFromPrintSheet = section.get("BoosterReplaceSlotFromPrintSheet", ""); // e.g. Zendikar Rising guaranteed double-faced card

View File

@@ -3,6 +3,7 @@ Code=CMR
Date=2020-11-11
Name=Commander Legends
Type=Other
DoublePick=Always
[cards]
1 C The Prismatic Piper

View File

@@ -55,7 +55,7 @@ public class BoosterDraft implements IBoosterDraft {
private final List<LimitedPlayer> players = new ArrayList<>();
private LimitedPlayer localPlayer;
private boolean doublePickToStartRound = false;
private String doublePickDuringDraft = ""; // "FirstPick" or "Always"
protected int nextBoosterGroup = 0;
private int currentBoosterSize = 0;
private int currentBoosterPick = 0;
@@ -143,7 +143,7 @@ public class BoosterDraft implements IBoosterDraft {
} else {
// Only one set is chosen. If that set lets you draft 2 cards to start adjust draft settings now
String setCode = sets.get(0);
doublePickToStartRound = FModel.getMagicDb().getEditions().get(setCode).getDoublePickToStartRound();
doublePickDuringDraft = FModel.getMagicDb().getEditions().get(setCode).getDoublePickDuringDraft();
final IUnOpenedProduct product1 = block.getBooster(setCode);
@@ -370,7 +370,10 @@ public class BoosterDraft implements IBoosterDraft {
public void passPacks() {
// Alternate direction of pack passing
int adjust = this.nextBoosterGroup % 2 == 1 ? 1 : -1;
if (this.doublePickToStartRound && currentBoosterPick == 1) {
if ("FirstPick".equals(this.doublePickDuringDraft) && currentBoosterPick == 1) {
adjust = 0;
} else if (currentBoosterPick % 2 == 1 && "Always".equals(this.doublePickDuringDraft)) {
// This may not work with Conspiracy cards that mess with the draft
adjust = 0;
}