Add TappedOut and MTGGoldfish deck URL loading - #11045
Merged
Merged
Conversation
tool4ever
reviewed
Jun 27, 2026
tool4ever
approved these changes
Aug 5, 2026
Aderon3D
added a commit
to Aderon3D/Reforge-Commander
that referenced
this pull request
Aug 6, 2026
) * Hobbit draft files * Add GuiBase.isMobile() helper for Android-or-iOS platform checks (Card-Forge#11382) * Add TappedOut and MTGGoldfish deck URL loading (Card-Forge#11045) * Fix using cloned state to check unmanifest (Card-Forge#11523) * MBC cards, 4th August (Card-Forge#11506) * Card cleanup: 2026-07-21 [\upcoming, 1st, 2nd & 3rd passes] (Card-Forge#11312) * fix(engine): selective-fold stacked tokens at durable capture sites (#57) Problem: tryStackToken() ran BEFORE capture sites in TokenEffectBase burst loop. Tokens with durable refs (RememberTokens, AtEOT, addToCombat, etc.) were removed from cardList by stacking, but downstream code still referenced them — creating 'ghost' cards invisible on the battlefield. Fix: add boolean referenced flag at top of per-token iteration, set true at each durable capture site (pumpKeywords, AtEOTTrig, addToCombat, AttachAfter, RememberTokens, RememberOriginalTokens, ImprintTokens, RememberSource, TokenRemembered, allTokens with AtEOT), defer tryStackToken to end of loop, gate on !referenced. Unreferenced tokens stack for memory savings; referenced tokens stay resident to preserve ref integrity. Durable set validated by 3-agent debate (A1 architecture, B1 performance, A2 rules, B2 testing, A3 integration, B3 testing). A3/B3 reached consensus: selective-fold is correct, tryStackToken is within-pass (not durable), triggerList is within-pass (not durable), AtEOT non-capturing escape is NON-STARTER, flyweight win is narrow. Closes #57 * style(test): add REFORGE headers + strip non-ponytail comments per CodeRabbit review * fix(engine): add missing 'referenced' variable declaration in TokenEffectBase The selective-fold fix (#57) used 'referenced' without declaring it, causing compilation failure on CI. Add 'boolean referenced = false;' at the top of the per-token loop iteration. * fix(test): use iterator().next() instead of .get(0) on Iterable getRemembered() returns Iterable, not List. .get(0) doesn't compile. * fix: apply CodeRabbit auto-fixes Fixed 11 file(s) based on 4 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * fix(engine): revert triggerList referenced flag — triggerList is within-pass, not durable The other agent added referenced=true on triggerList.put() calls, but triggerList is consumed by triggerChangesZoneAll + clear within the same pass — it's not a durable external reference. Marking all tokens as referenced defeats selective-fold entirely. Reverts the triggerList lines from commit 5ae0985. * fix(test): remove unused imports GamePieceType, AbilityManaPart * fix(test): restore TestMethodVisibilityRegressionTest to original class references The CodeRabbit auto-fix commit renamed references to non-existent classes (e.g. CardRankerReforgeTest) but the actual test files were never renamed. * fix(test): revert CodeRabbit auto-fixes to unrelated test files The CodeRabbit commit 5ae0985 broke compilation by: - Stripping 'public' from test methods in 7 files (breaks TestMethodVisibilityRegressionTest which asserts they're public) - Renaming class references in TestMethodVisibilityRegressionTest to non-existent classes (CardRankerReforgeTest etc.) * fix(test): rewrite StackedTokenDurableRefTest with working API The other agent's rewrite used non-existent APIs (setMapParams, getRemembered().size(), EmptySa.resolve() which is a no-op). Replace with simple direct tryStackToken tests that actually verify the zone-level selective-fold invariant. * fix(test): correct import path for StackedTokenCard forge.card.StackedTokenCard → forge.game.card.StackedTokenCard * fix(test): capture stack prototype before bf.add() triggers expand bf.add() → onChanged() → updateZoneForView → getCards() → expandStacks() clears stackedTokens. Save prototype reference before the add. * fix(test): simplify mixed test to avoid internal state trap bf.add() triggers expandStacks() via onChanged→updateZoneForView→getCards. Just verify resident and expanded copies coexist. * fix(test): remove unused StackedTokenCard import (checkstyle) * Some cleanup (Card-Forge#11527) * style(test): use getFirstRemembered() in stacked token test * Remove Flying ability from Silvan Reveler Closes Card-Forge#11529 * fix(net): rooms default to host + 3 open slots; fix(images): cache-aware download with atomic tmp + retry move; docs: release builds & versioning section * Update oin_the_brave.txt Closes Card-Forge#11531 * fix(test): resolve conflict — sync test files with master (javadoc headers) * fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * fix(deck): use possessive quantifiers in URL provider regex to prevent ReDoS * ci(codeql): add config file for actions language matrix entry * fix(test): make package-private @test methods public so TestNG runs them * fix(deck): possessive/linear regexes to clear CodeQL ReDoS alerts in URL providers * fix(deck): use ReDoS-safe linear regexes, preserve capture semantics in URL providers * fix(deck): MTGA_EXPORT use linear greedy matching instead of lazy quantifiers to clear CodeQL ReDoS * fix(deck): possessive quantifiers on remaining TappedOut regex patterns * fix(deck): replace mtga textarea regex with linear tag scan to clear CodeQL ReDoS * fix(deck): use linear indexOf scan for mtga textarea (clear CodeQL ReDoS on tag regex) --------- Co-authored-by: Chris H <zenchristo@gmail.com> Co-authored-by: Liminal Warmth <liminal.warmth@gmail.com> Co-authored-by: Madwand99 <Madwand99@gmail.com> Co-authored-by: tool4ever <therealtoolkit@hotmail.com> Co-authored-by: Fulgur14 <54345051+Fulgur14@users.noreply.github.com> Co-authored-by: Renato Filipe Vidal Santos <45150760+dracontes@users.noreply.github.com> Co-authored-by: Reforge <dev@reforge-commander.dev> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Alby7 <alby9696@gmail.com>
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.
This expands deck URL loading beyond Moxfield and Archidekt with support for TappedOut and MTGGoldfish.
Thanks to Codex and #10247 for help with code and inspiration.