mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
[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:
parent
a7eda31aec
commit
3031531b14
46 changed files with 1301 additions and 738 deletions
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue