Utility module with tweaks, enhancements and macros to help GMs with game management when running Warhammer Fantasy Roleplay (4e) sessions in Foundry Virtual Tabletop.
MIT License
15
stars
9
forks
source link
Allow a flag in Test `options` that would disable automatic advantage gain #263
[ ] Maintenance (updates to the repository, dependencies and other non-functional code management)
Checklist:
[ ] I have run linting on my code to follow the follow the style of this project.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generate no new unhandled or unexpected warnings.
[x] My change requires an update to the documentation.
[x] I can be reached on Discord by my handle: 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):
I went ahead and added a new flag in Tests' options called preventAdvantage with the idea that if the attackerTest 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:
1. Is the Group Advantage enabled?
2. Does the `attackerTest` have option `preventAdvantage` set **exactly** to `true`?
If both are true, then advantage is not calculated for the Opposed Test.
### How has this been tested?
Use Group Advantage actions like Batter, Trick or Additional Effort from the Token Action HUD WFRP4e v1.2.0
should notice that they no longer grant advantage due to "won opposed test", but instead grant advantage based on actions themselves
Perform any Opposed Test outside of actions mentioned above
should notice that automated advantage is handled as usual by GM Toolkit
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: 1. Is the Group Advantage enabled? 2. Does the `attackerTest` have option `preventAdvantage` set **exactly** to `true`? 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