Skip to content

Add TappedOut and MTGGoldfish deck URL loading - #11045

Merged
tool4ever merged 3 commits into
Card-Forge:masterfrom
Madwand99:AddMoreDeckImportSites
Aug 5, 2026
Merged

Add TappedOut and MTGGoldfish deck URL loading#11045
tool4ever merged 3 commits into
Card-Forge:masterfrom
Madwand99:AddMoreDeckImportSites

Conversation

@Madwand99

@Madwand99 Madwand99 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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.

Comment thread forge-gui/src/main/java/forge/deck/DeckUrlLoader.java Outdated
@tool4ever
tool4ever merged commit 2d19945 into Card-Forge:master Aug 5, 2026
3 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants