feat(draft): replace Cogwork Librarian opt-out dialog with opt-in button#10291
Open
billyhewlett wants to merge 1 commit intoCard-Forge:masterfrom
Open
feat(draft): replace Cogwork Librarian opt-out dialog with opt-in button#10291billyhewlett 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
When a player holds Cogwork Librarian during a cube draft, the current
implementation prompts "Draft an extra pick with Cogwork Librarian?" (Yes/No)
on every single pick until the player chooses to use it. The player must
actively click "No" on each pack they want to draft normally, which is
disruptive when they are waiting for the right pack to use the ability.
Additionally, there is a pre-existing bug: if a player activates Cogwork
and then drafts a card that has a draft action (e.g., Lore Seeker), the
extra pick is silently dropped.
draftCard()ends with a hardcodedreturn truewhen any draft action runs, overriding thepassPack = falseset by Cogwork's handler.
Changes
LimitedPlayer.javacogworkLibrarianActivatedByUIpublic flag, consumed byhandleCogworkLibrarian()instead of showing a dialog. Defaults tofalse, so the ability is not used unless the player explicitly opts in.hasCogworkLibrarianAvailable()predicate so the UI can querypending state without touching internal flags.
handleCogworkLibrarian()dialog prompt with flag-read-and-clear.draftCard()toreturn passPackinstead of hardcodedreturn true,so Cogwork combined with draft-action cards (Lore Seeker, etc.) works
correctly.
FDeckEditor.java(mobile)btnUseLibrarianbutton inDraftPackPage, hidden bydefault. Appears above the card list when Cogwork is pending.
doLayout()to reserve space for the button when visible.cogworkLibrarianActivatedByUI = trueand hides itself.moveCard()and re-evaluated inrefresh()after each pack loads.
Behavior Change
Testing
Draft with a cube containing Cogwork Librarian. Verify: