Fix defense rolls

This commit is contained in:
2025-02-06 10:28:03 +01:00
parent 42f6674e93
commit 170d3a2874
25 changed files with 75 additions and 71 deletions

View File

@ -793,7 +793,7 @@ export default class LethalFantasyRoll extends Roll {
diceResults.push({ dice: `${dice.toUpperCase()}`, value: diceResult })
let diceSum = diceResult
while (diceResult === maxValue) {
let r = await new Roll(baseFormula).evaluate()
let r = await new Roll(dice).evaluate()
diceResult = r.dice[0].results[0].result
diceResults.push({ dice: `${dice.toUpperCase()}-1`, value: diceResult - 1 })
diceSum += (diceResult - 1)
@ -870,6 +870,7 @@ export default class LethalFantasyRoll extends Roll {
/** @override */
async render(chatOptions = {}) {
let chatData = await this._getChatCardData(chatOptions.isPrivate)
console.log("ChatData", chatData)
return await renderTemplate(this.constructor.CHAT_TEMPLATE, chatData)
}