mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Double Pick each pass
This commit is contained in:
@@ -142,7 +142,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
private String boosterMustContain = "";
|
private String boosterMustContain = "";
|
||||||
private String boosterReplaceSlotFromPrintSheet = "";
|
private String boosterReplaceSlotFromPrintSheet = "";
|
||||||
private String[] chaosDraftThemes = new String[0];
|
private String[] chaosDraftThemes = new String[0];
|
||||||
private boolean doublePickToStartRound = false;
|
private String doublePickDuringDraft = "";
|
||||||
private final ListMultimap<String, CardInSet> cardMap;
|
private final ListMultimap<String, CardInSet> cardMap;
|
||||||
private final Map<String, Integer> tokenNormalized;
|
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 getAdditionalSheetForFoils() { return additionalSheetForFoils; }
|
||||||
public String getAdditionalUnlockSet() { return additionalUnlockSet; }
|
public String getAdditionalUnlockSet() { return additionalUnlockSet; }
|
||||||
public boolean getSmallSetOverride() { return smallSetOverride; }
|
public boolean getSmallSetOverride() { return smallSetOverride; }
|
||||||
public boolean getDoublePickToStartRound() { return doublePickToStartRound; }
|
public String getDoublePickDuringDraft() { return doublePickDuringDraft; }
|
||||||
public String getBoosterMustContain() { return boosterMustContain; }
|
public String getBoosterMustContain() { return boosterMustContain; }
|
||||||
public String getBoosterReplaceSlotFromPrintSheet() { return boosterReplaceSlotFromPrintSheet; }
|
public String getBoosterReplaceSlotFromPrintSheet() { return boosterReplaceSlotFromPrintSheet; }
|
||||||
public String[] getChaosDraftThemes() { return chaosDraftThemes; }
|
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.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.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.boosterMustContain = section.get("BoosterMustContain", ""); // e.g. Dominaria guaranteed legendary creature
|
||||||
res.boosterReplaceSlotFromPrintSheet = section.get("BoosterReplaceSlotFromPrintSheet", ""); // e.g. Zendikar Rising guaranteed double-faced card
|
res.boosterReplaceSlotFromPrintSheet = section.get("BoosterReplaceSlotFromPrintSheet", ""); // e.g. Zendikar Rising guaranteed double-faced card
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Code=CMR
|
|||||||
Date=2020-11-11
|
Date=2020-11-11
|
||||||
Name=Commander Legends
|
Name=Commander Legends
|
||||||
Type=Other
|
Type=Other
|
||||||
|
DoublePick=Always
|
||||||
|
|
||||||
[cards]
|
[cards]
|
||||||
1 C The Prismatic Piper
|
1 C The Prismatic Piper
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class BoosterDraft implements IBoosterDraft {
|
|||||||
private final List<LimitedPlayer> players = new ArrayList<>();
|
private final List<LimitedPlayer> players = new ArrayList<>();
|
||||||
private LimitedPlayer localPlayer;
|
private LimitedPlayer localPlayer;
|
||||||
|
|
||||||
private boolean doublePickToStartRound = false;
|
private String doublePickDuringDraft = ""; // "FirstPick" or "Always"
|
||||||
protected int nextBoosterGroup = 0;
|
protected int nextBoosterGroup = 0;
|
||||||
private int currentBoosterSize = 0;
|
private int currentBoosterSize = 0;
|
||||||
private int currentBoosterPick = 0;
|
private int currentBoosterPick = 0;
|
||||||
@@ -143,7 +143,7 @@ public class BoosterDraft implements IBoosterDraft {
|
|||||||
} else {
|
} else {
|
||||||
// Only one set is chosen. If that set lets you draft 2 cards to start adjust draft settings now
|
// Only one set is chosen. If that set lets you draft 2 cards to start adjust draft settings now
|
||||||
String setCode = sets.get(0);
|
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);
|
final IUnOpenedProduct product1 = block.getBooster(setCode);
|
||||||
|
|
||||||
@@ -370,7 +370,10 @@ public class BoosterDraft implements IBoosterDraft {
|
|||||||
public void passPacks() {
|
public void passPacks() {
|
||||||
// Alternate direction of pack passing
|
// Alternate direction of pack passing
|
||||||
int adjust = this.nextBoosterGroup % 2 == 1 ? 1 : -1;
|
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;
|
adjust = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user