Skip to content

Autotap - Add support for filter abilities#11173

Draft
Eradev wants to merge 7 commits into
Card-Forge:masterfrom
Eradev:autotap
Draft

Autotap - Add support for filter abilities#11173
Eradev wants to merge 7 commits into
Card-Forge:masterfrom
Eradev:autotap

Conversation

@Eradev

@Eradev Eradev commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Changes to auto-tap detection:

  • Added support for filter abilities with generic cost (e.g. {1}: Add {R}.), and filter lands (e.g. Cascade Bluffs):
    • Doesn't chain filter;
    • Skip useless filters (no gains);
  • Detection of remaining cards in hand/command zones to select which asset to use first to try and maximize plays;
  • Added tests for use cases;

You can add the VM option -Dforge.debugManaPayment=true to help visualize what it attempts to use.

Let me know if there are edge cases it misses.

@Eradev Eradev added AI General AI tag GUI labels Jul 7, 2026
@Eradev Eradev marked this pull request as draft July 7, 2026 06:41
@Eradev Eradev marked this pull request as ready for review July 7, 2026 07:12

@tool4ever tool4ever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this'll work better than the last AI attempt 🤔

Anyway this is huge and the highlighting part is already a separate feature: #5112

Please extract that into its own PR first, it'll certainly be useful for testing the rest of this 👍

@Eradev Eradev removed the GUI label Jul 7, 2026
@Eradev Eradev requested a review from tool4ever July 7, 2026 11:35
@Eradev

Eradev commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Hopefully this'll work better than the last AI attempt 🤔

Anyway this is huge and the highlighting part is already a separate feature: #5112

Please extract that into its own PR first, it'll certainly be useful for testing the rest of this 👍

Moved to #11176

@Eradev Eradev marked this pull request as draft July 9, 2026 04:00

addCard("Mountain", p);
addCard("Plains", p);
addCard("Boros Signet", p);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after we're done with most code concerns need to remove AI:RemoveDeck:All from all applicable cards so I can batch fuzz random generated decks for crashes

final int depth = manaPaymentDepth.get() + 1;
manaPaymentDepth.set(depth);
final boolean outermost = depth == 1;
try {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will need a cleaner solution than this massive wrap for which you're trying to ignore the code style

at the same time a ThreadLocal seems overkill and only risks wrong usage of such non obviously "constrained in concurrency" class

why not simply some overload for a nested entrypoint instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI General AI tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants