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

[Bugfix] Attacking Multiple Tokens with FastForward #230

Merged

Conversation

kyleady
Copy link
Contributor

@kyleady kyleady commented Aug 22, 2022

Issue

Attacking when multiple tokens are targeted works as expected, rolling an attack for each target when not using the fastForward feature. However, when the fastForward feature is used, only a single attack is made against just one of the tokens targeted.

Fix

In module/dice.js change the behavior in performD20RollAndCreateMessage() when form === null to setting allRollsParts equal to an Array with parts repeated a number of times equal to the number of targets (or 1 if no targets). This fixes the issue so that an Attack will be made against each targeted token.

Note that this does allow allRollsParts to get unnecessarily large when targeting multiple tokens while making a non-Attack d20Roll, but line 230 filters down to the one needed roll for these non-Attack rolls.

        if (!isAttackRoll || game.user.targets.size < 1) {
		roll = roll.rollArray[0];
	}

@EndlesNights EndlesNights merged commit 93a3986 into EndlesNights:main Aug 23, 2022
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.

2 participants