Enhance progression rolls, damage rolls and other fixes
Some checks failed
Release Creation / build (release) Failing after 56s

This commit is contained in:
2025-06-12 20:53:54 +02:00
parent 17be9df64b
commit c08a8c38e9
35 changed files with 1630 additions and 282 deletions

View File

@ -178,7 +178,17 @@ export default class CthulhuEternalUtils {
const html = options.fn(this);
return html.replace(rgx, "$& selected");
});
}
static async damageRoll(rollMessage) {
let rollData = rollMessage.rolls[0]?.options?.rollData
let actor = game.actors.get(rollData.actorId)
if (!actor) {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Label.noActorFound"))
return
}
rollData.weapon.resultType = rollData.resultType // Keep the result type from the roll message
actor.system.roll("damage", rollData.weapon)
}
static async nudgeRoll(rollMessage) {