[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

@ -4,6 +4,7 @@ import DHFeature from '../data/item/feature.mjs';
import { createScrollText, damageKeyToNumber, getDamageKey } from '../helpers/utils.mjs';
import DhCompanionLevelUp from '../applications/levelup/companionLevelup.mjs';
import { ResourceUpdateMap } from '../data/action/baseAction.mjs';
import { abilities } from '../config/actorConfig.mjs';
export default class DhpActor extends Actor {
parties = new Set();
@ -509,6 +510,30 @@ export default class DhpActor extends Actor {
return await rollClass.build(config);
}
async rollTrait(trait, options = {}) {
const abilityLabel = game.i18n.localize(abilities[trait].label);
const config = {
event: event,
title: `${game.i18n.localize('DAGGERHEART.GENERAL.dualityRoll')}: ${this.name}`,
headerTitle: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', {
ability: abilityLabel
}),
effects: await game.system.api.data.actions.actionsTypes.base.getEffects(this),
roll: {
trait: trait,
type: 'trait'
},
hasRoll: true,
actionType: 'action',
headerTitle: `${game.i18n.localize('DAGGERHEART.GENERAL.dualityRoll')}: ${this.name}`,
title: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', {
ability: abilityLabel
}),
...options
};
return await this.diceRoll(config);
}
get rollClass() {
return CONFIG.Dice.daggerheart[['character', 'companion'].includes(this.type) ? 'DualityRoll' : 'D20Roll'];
}