Player Hidden Keywords related to SearchLibrary#10219
Player Hidden Keywords related to SearchLibrary#10219kojotak wants to merge 6 commits intoCard-Forge:masterfrom
Conversation
forge-game/src/main/java/forge/game/staticability/StaticAbilitySearchLibrary.java
Show resolved
Hide resolved
496b3a5 to
98f3002
Compare
| } | ||
| return targetPlayer == null || !targetPlayer.equals(sa.getActivatingPlayer()) | ||
| || !hasKeyword("Spells and abilities you control can't cause you to search your library."); | ||
| || !StaticAbilityCantSearchLibrary.cantCauseToSearchLibrary(this); |
There was a problem hiding this comment.
this should just use the same method above so it can be more dynamic
There was a problem hiding this comment.
Do you mean:
- remove the
cantCauseToSearchLibrary()method completely - add check for
CantCauseToSearchLibrarymode intocantSearchLibrary()?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
technically this is a replacement effect
not sure yet if the static approach is better for both
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
An attempt to refactor 3 hidden player keywords related to "search library" from #4760 :
Tested using
Stoneforge Mystic,Mindlock Orb,Ashiok, Dream Render,Aven Mindcensor. Example of applying library search limit of 4 cards: