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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user