Skip to content
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

Improvements to player selection of TargetAmount #11341

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

xenohedron
Copy link
Contributor

Now, when getMultiAmount() is called within HumanPlayer::chooseTargetAmount it enforces the minimum of 1 per target to comply with CR 601.2d:

If the spell requires the player to divide or distribute an effect (such as damage or counters) among one or more targets, the player announces the division. Each of these targets must receive at least one of whatever is being divided.

chooseTargetAmount() now also prevents a human player from choosing more targets than the amount to be divided.

The spinners in PickMultiNumberDialog now start at the minimum. So when distributing among targets, they start out at 1 for each target.

The effects that call getMultiAmount() for adding mana in some combination of colors now explicitly set the minimum to 0 so they continue to work correctly.

Furthermore, for UX improvement, the PickMultiNumberDialog is bypassed when there is only one possible choice:

  • If there is only one target, all damage/counters are distributed to it.
  • If the number of targets is equal to the amount, each target receives 1 damage/counter.

Resolves #9379.

@xenohedron xenohedron merged commit 18c6596 into magefree:master Oct 26, 2023
1 check passed
@xenohedron xenohedron deleted the targetamount branch October 26, 2023 06:12
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.

DistributeCountersEffect allows you to put 0 counters on a creature
2 participants