feat(adventure): Add deck import/export and inventory management#10813
Open
emirikol1 wants to merge 2 commits into
Open
feat(adventure): Add deck import/export and inventory management#10813emirikol1 wants to merge 2 commits into
emirikol1 wants to merge 2 commits into
Conversation
…dventure mode Adds multi-format deck import (Arena, MTGO, native .dck), collection export in Arena format, and a mark-for-sale workflow. Available via both console commands and new UI buttons in the deck selection screen. Console commands: - load deck <path> Import deck, auto-give missing cards - load deck buy <path> Import deck, purchase missing cards with gold - check deck <path> Report which cards are missing - save deck <path> Export selected deck as .dck - export collection <path> Export full collection in Arena format - mark sell <path> Mark listed cards for auto-sell UI (DeckSelectScene): - Import Deck button with 3-mode dialog (free/buy/check-only) - Export Deck, Export Collection, Mark for Sale buttons Cross-platform file path handling (Unix/Mac/Windows) with ~ expansion. Co-authored-by: Cursor <cursoragent@cursor.com>
…raw string parsing PlayerFactoryUtil.addStaticAbility() crashed with ArrayIndexOutOfBoundsException when processing "Hexproof:Black" (2-part format) because it expected a 3-part "Hexproof:<validSource>:<description>" format. Now uses instanceof Hexproof pattern matching to access getValidType() and getTitle() directly, consistent with CardFactoryUtil's approach for card hexproof. Fixes crash when Veil of Summer resolves giving player hexproof from black/blue. Co-authored-by: Cursor <cursoragent@cursor.com>
Merged
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.
Summary
Adds multi-format deck import (Arena, MTGO, native .dck), collection export in Arena format, mark-for-sale workflow, and a fix for Veil of Summer crashing the game.
Deck Import/Export (Adventure Mode)
Console Commands:
load deck <path>— Import deck, auto-give missing cards freeload deck buy <path>— Import deck, purchase missing cards with goldcheck deck <path>— Report which cards are missing without importingsave deck <path>— Export selected deck as native .dckexport collection <path>— Export full collection in Arena formatmark sell <path>— Mark listed cards for auto-sellUI (DeckSelectScene):
Technical Details:
~expansionDeckRecognizerfor Arena/MTGO format parsingBug Fix: Veil of Summer crash
PlayerFactoryUtil.addStaticAbility()crashed withArrayIndexOutOfBoundsExceptionwhen processingHexproof:Black(2-part format) because it expected a 3-part format. Fixed to useinstanceof Hexproofpattern matching and accessgetValidType()directly, consistent withCardFactoryUtil's approach for card hexproof.Files Changed
forge-gui-mobile/.../util/CardUtil.java— Import/export engineforge-gui-mobile/.../player/AdventurePlayer.java— Slot management helpersforge-gui-mobile/.../stage/ConsoleCommandInterpreter.java— 6 new commandsforge-gui-mobile/.../scene/DeckSelectScene.java— 4 new UI buttonsforge-game/.../player/PlayerFactoryUtil.java— Hexproof keyword fixTest Plan
Made with Cursor