Added effects for Weapon and Armor traits

This commit is contained in:
WBHarry 2025-06-14 17:29:54 +02:00
parent b7ea925276
commit b8482da848
13 changed files with 573 additions and 51 deletions

View file

@ -129,7 +129,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
async use(event) {
if (this.roll.type && this.roll.trait) {
const modifierValue = this.actor.system.traits[this.roll.trait].value;
const modifierValue =
this.actor.system.traits[this.roll.trait].value + (this.actor.system.bonuses.attack ?? 0);
const config = {
event: event,
title: this.item.name,

View file

@ -23,7 +23,7 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
getFormula(actor) {
return this.custom.enabled
? this.custom.formula
: `${actor.system[this.multiplier] ?? 1}${this.dice}${this.bonus ? (this.bonus < 0 ? ` - ${Math.abs(this.bonus)}` : ` + ${this.bonus}`) : ''}`;
: `${actor.system[this.multiplier]?.total ?? 1}${this.dice}${this.bonus ? (this.bonus < 0 ? ` - ${Math.abs(this.bonus)}` : ` + ${this.bonus}`) : ''}`;
}
}