Skip to content

change opponents filter to check oponents of drawing player... #13839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ThorstenHacke
Copy link
Contributor

…instead of cards controller
fixes #13833

@github-actions github-actions bot added the cards label Jul 8, 2025
FilterPlayer filter = new FilterPlayer("opponent");
List<PlayerIdPredicate> opponentPredicates = new ArrayList<>();
for (UUID opponentId : game.getOpponents(playerToDraw.getId())) {
if (playersInPlayerRange.contains(opponentId)) {
Copy link
Member

Choose a reason for hiding this comment

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

There is interesting rule with a limited range -- if another player must make a choice then possible targets must be shared between range of both players (in range of source controller and in range of choosing player). I don't remember any cards that use such checks. Is your code was added to support it?

801.5a If a player is asked to choose an object or player, they must choose one within their range of influence.

Example: In a game with a range of influence of 1, Alex is seated to the left of Rob. Alex activates the ability of Cuombajj Witches, which reads, “{T}: Cuombajj Witches deals 1 damage to any target and 1 damage to any target of an opponent’s choice,” targeting Rob and choosing Rob as the opponent who picks the other target. Rob must choose a target that’s in both his range of influence and in the range of influence of the controller of Cuombajj Witches. He must therefore choose himself, Alex, or a creature controlled by either himself or Alex.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The rule and the example are slightly confusing as the rule itself does not mention the range of influence of the original controller. To follow what is described in the example I have to update the code again checking for the intersection of both ranges.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an additional check for players in controller range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shared fates does not allow players to select correctly.
2 participants