Allow a flag in Test options
that would disable automatic advantage gain
#263
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Checklist:
forien
Description
Motivation and context
Some Opposed Tests (namely, Group Advantage actions) should not generate advantage when winning them. And while system itself does not handle that in any way, I've added support for that in the new Token Action HUD WFRP4e update, as can be seen here (for example):
https://github.com/Foundry-Workshop/token-action-hud-wfrp4e/blob/1356baa3439c4b6b6f450399d9c288bd86efa2af/dist/modules/GroupAdvantage.js#L76-L84
I went ahead and added a new flag in Tests' options called
preventAdvantage
with the idea that if theattackerTest
has that flag, then no advantage should be generated by that test by other automations.Summary of changes
Added a check that checks for two things:
attackerTest
have optionpreventAdvantage
set exactly totrue
?If both are true, then advantage is not calculated for the Opposed Test.
How has this been tested?
Batter
,Trick
orAdditional Effort
from the Token Action HUD WFRP4e v1.2.0Development / Testing Environment