fix(draft): Lore Seeker adds cube booster from surplus in cube drafts#10292
Open
billyhewlett wants to merge 1 commit intoCard-Forge:masterfrom
Open
fix(draft): Lore Seeker adds cube booster from surplus in cube drafts#10292billyhewlett wants to merge 1 commit intoCard-Forge:masterfrom
billyhewlett wants to merge 1 commit intoCard-Forge:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In cube drafts, Lore Seeker's effect ("after you draft this, you may add a
booster pack to the draft") calls
addBooster(CardEdition), which opens aset-selection dialog and injects a booster from an arbitrary retail set.
This breaks the cube draft's card pool contract: players draft a card from
outside the cube.
Background
In a cube draft, the number of cards used equals (players × packs × pack size).
The remainder of the cube's card pool sits unused after booster initialization.
For example, a 540-card cube with 8 players drafting 3 packs of 15 uses
8 × 3 × 15 = 360 cards, leaving 180 surplus. Lore Seeker should draw its
booster from this surplus rather than from a retail set.
Changes
UnOpenedProduct.javaAdd
getRemainingCards(): returns all cards still in the print sheets afterbooster draws. Enables callers to inspect surplus without modifying state.
BoosterDraft.javacubeProduct) to the cube'sUnOpenedProductduringsetupCustomDraft().initializeBoosters()distributes all packs, snapshot remainingcards into a shuffled
cubeSurpluslist.addBooster()(no-arg) to draw a pack fromcubeSurplus.Returns
nullwhen surplus is exhausted.IBoosterDraft.javaAdd
default DraftPack addBooster()returningnullas the base case fornon-cube draft implementations.
LimitedPlayer.javaIn
addSingleBoosterPack(), trydraft.addBooster()first. If it returnsa pack (cube surplus available), use it. Fall back to the existing
set-selection dialog only for non-cube drafts or when surplus is exhausted.
Non-cube drafts
Unaffected.
addBooster()returnsnullfor all non-BoosterDraftimplementations, and the fallback path runs as before.
Testing
Draft with a cube containing Lore Seeker. Verify: