Skip to content

Player Hidden Keywords related to SearchLibrary#10219

Draft
kojotak wants to merge 6 commits intoCard-Forge:masterfrom
kojotak:issue/4760/searchLibrary
Draft

Player Hidden Keywords related to SearchLibrary#10219
kojotak wants to merge 6 commits intoCard-Forge:masterfrom
kojotak:issue/4760/searchLibrary

Conversation

@kojotak
Copy link
Copy Markdown
Contributor

@kojotak kojotak commented Mar 30, 2026

An attempt to refactor 3 hidden player keywords related to "search library" from #4760 :

  • "LimitSearchLibrary"
  • "CantSearchLibrary"
  • "Spells and abilities you control can't cause you to search your library."

Tested using Stoneforge Mystic, Mindlock Orb, Ashiok, Dream Render, Aven Mindcensor. Example of applying library search limit of 4 cards:

image

@kojotak kojotak marked this pull request as draft March 31, 2026 07:33
@kojotak kojotak force-pushed the issue/4760/searchLibrary branch from 496b3a5 to 98f3002 Compare March 31, 2026 18:26
}
return targetPlayer == null || !targetPlayer.equals(sa.getActivatingPlayer())
|| !hasKeyword("Spells and abilities you control can't cause you to search your library.");
|| !StaticAbilityCantSearchLibrary.cantCauseToSearchLibrary(this);
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 should just use the same method above so it can be more dynamic

Copy link
Copy Markdown
Contributor Author

@kojotak kojotak Mar 31, 2026

Choose a reason for hiding this comment

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

Do you mean:

  • remove the cantCauseToSearchLibrary() method completely
  • add check for CantCauseToSearchLibrary mode into cantSearchLibrary()?

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.

it's just a slightly more specific variant, not a different mode
we usually have one entry point, so scripts can just use params for their needs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the unnecessary mode in f7b33c7 but this may break something else, because the if is no longer specific to Ashiok only.

I was thinking about an alternative: add ValidActivatingPlayer$ Opponent for Ashiok card, move the targetPlayer vs activatingPlayer check into new cantCauseToSearchLibrary() method.

K:Flash
K:Flying
S:Mode$ Continuous | Affected$ Player.Opponent | AddKeyword$ LimitSearchLibrary | Description$ If an opponent would search a library, that player searches the top four cards of that library instead.
S:Mode$ LimitSearchLibrary | ValidPlayer$ Player.Opponent | LimitNum$ 4 | Description$ If an opponent would search a library, that player searches the top four cards of that library instead.
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.

technically this is a replacement effect
not sure yet if the static approach is better for both

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So it should look like Kenessos, Priest of Thassa with Scry?

Types:Legendary Planeswalker Ashiok
Loyalty:5
S:Mode$ Continuous | Affected$ Opponent | AddKeyword$ Spells and abilities you control can't cause you to search your library. | Description$ Spells and abilities your opponents control can't cause their controller to search their library.
S:Mode$ CantSearchLibrary | ValidPlayer$ Opponent | Description$ Spells and abilities your opponents control can't cause their controller to search their library.
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.

We need to add ValidCause to check for Spells and Abilities and check if they are controlled by the same player as the one that gets their library searched

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.

3 participants