FIx spell order and dual rollll for spell damages
Release Creation / build (release) Successful in 1m6s

This commit is contained in:
2026-05-25 12:29:39 +02:00
parent d389a85a9f
commit e45edd60c4
30 changed files with 139 additions and 122 deletions
+3 -14
View File
@@ -268,12 +268,12 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
{
action: "cancel",
label: game.i18n.localize("LETHALFANTASY.Combat.proceedNo"),
callback: () => null
callback: () => "cancel"
}
],
rejectClose: false
})
if (manualDR === null) return
if (manualDR === null || manualDR === "cancel") return
const rollOpts = {
type: "spell-damage",
@@ -286,18 +286,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
actorName: this.actor.name,
actorImage: this.actor.img
}
const roll = new LethalFantasyRoll(formula, {}, rollOpts)
await roll.evaluate()
const diceResults = []
for (const term of roll.dice) {
for (const r of term.results) {
diceResults.push({ dice: `1D${term.faces}`, value: r.result })
}
}
roll.options.diceResults = diceResults
roll.options.rollTotal = roll.total
if (game?.dice3d) await game.dice3d.showForRoll(roll, game.user, true)
await roll.toMessage()
await LethalFantasyRoll.rollSpellDamageToMessage(formula, rollOpts)
}
static #onCreateEquipment(event, target) {