FIx spell order and dual rollll for spell damages
Release Creation / build (release) Successful in 1m6s
Release Creation / build (release) Successful in 1m6s
This commit is contained in:
+3
-14
@@ -375,12 +375,12 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
|
||||
{
|
||||
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",
|
||||
rollType: "spell-damage",
|
||||
@@ -394,18 +394,7 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
|
||||
actorName: actor.name,
|
||||
actorImage: actor.img
|
||||
}
|
||||
const roll = new documents.LethalFantasyRoll(damageFormula, {}, 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 documents.LethalFantasyRoll.rollSpellDamageToMessage(damageFormula, rollOpts)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user