[V14] TagTeamRoll Rework (#1732)

* Initial rolls working

* Fixed reroll

* more

* More work

* Added results section

* .

* Visual improvements

* .

* Removed traces of old TagTeamRoll

* Added initiator handling

* Added updating for other players

* Fixed sync start

* Completed finish method

* Damage reroll

* Fixed localization

* Fixed crit damage

* Fixes

* Added visual of advantage and disadvantage dice
This commit is contained in:
WBHarry 2026-03-16 09:31:15 +01:00 committed by GitHub
parent a7eda31aec
commit 3031531b14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 1301 additions and 738 deletions

View file

@ -21,6 +21,9 @@ export default class DHRoll extends Roll {
static async build(config = {}, message = {}) {
const roll = await this.buildConfigure(config, message);
if (!roll) return;
if (config.skips?.createMessage) config.messageRoll = roll;
await this.buildEvaluate(roll, config, (message = {}));
await this.buildPost(roll, config, (message = {}));
return config;
@ -30,12 +33,6 @@ export default class DHRoll extends Roll {
config.hooks = [...this.getHooks(), ''];
config.dialog ??= {};
const actorIdSplit = config.source?.actor?.split('.');
if (actorIdSplit) {
const tagTeamSettings = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.TagTeamRoll);
config.tagTeamSelected = Boolean(tagTeamSettings.members[actorIdSplit[actorIdSplit.length - 1]]);
}
for (const hook of config.hooks) {
if (Hooks.call(`${CONFIG.DH.id}.preRoll${hook.capitalize()}`, config, message) === false) return null;
}