Last fixes from tests

This commit is contained in:
2025-06-14 23:45:05 +02:00
parent 151312b994
commit 1f2d82bd0b
8 changed files with 29 additions and 12 deletions

View File

@@ -91,8 +91,8 @@ export default class HellbornRoll extends Roll {
case "damage":
{
let formula = options.rollItem.system.damage
if (options.rollItem.system.damageStat !== "none") {
let statKey = options.rollItem.system.damageStat.toLowerCase()
if (options.rollItem?.system?.damageStat && options.rollItem.system.damageStat !== "none" && options.rollItem.system.damageStat !== "") {
let statKey = options.rollItem.system?.damageStat.toLowerCase()
let statValue = actor.system.stats[statKey].value
formula = `${formula} + ${statValue}`
}