duality tpl

This commit is contained in:
Dapoolp 2025-06-13 20:18:51 +02:00
parent 21b528e56c
commit 36bbfc52fb
10 changed files with 990 additions and 511 deletions

View file

@ -105,7 +105,11 @@ export class DHBaseAction extends foundry.abstract.DataModel {
}
get chatTemplate() {
return 'systems/daggerheart/templates/chat/attack-roll.hbs';
return 'systems/daggerheart/templates/chat/duality-roll.hbs';
}
get chatTitle() {
return this.item.name;
}
static getRollType() {
@ -132,7 +136,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
const modifierValue = this.actor.system.traits[this.roll.trait].value;
const config = {
event: event,
title: this.item.name,
title: this.chatTitle,
roll: {
modifier: modifierValue,
label: game.i18n.localize(abilities[this.roll.trait].label),
@ -200,6 +204,12 @@ export class DHAttackAction extends DHBaseAction {
return 'weapon';
}
get chatTitle() {
return game.i18n.format('DAGGERHEART.Chat.AttackRoll.Title', {
attack: this.item.name
});
}
prepareData() {
super.prepareData();
if (this.damage.includeBase && !!this.item?.system?.damage) {