Fixed so that spellcast attacks use that modifier (#509)

This commit is contained in:
WBHarry 2025-08-02 04:43:54 +02:00 committed by GitHub
parent c2de25693f
commit 90faf48b05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 3 deletions

View file

@ -72,9 +72,13 @@ export class DHActionRollData extends foundry.abstract.DataModel {
if (!this.parent?.actor) return modifiers;
switch (this.parent.actor.type) {
case 'character':
const spellcastingTrait =
this.type === 'spellcast'
? (this.parent.actor?.system?.spellcastModifierTrait?.key ?? 'agility')
: null;
const trait =
this.useDefault || !this.trait
? (this.parent.item.system.attack.roll.trait ?? 'agility')
? (spellcastingTrait ?? this.parent.item.system.attack.roll.trait ?? 'agility')
: this.trait;
if (
this.type === CONFIG.DH.GENERAL.rollTypes.attack.id ||