Dice for shield + Release system
All checks were successful
Release Creation / build (release) Successful in 48s

This commit is contained in:
2025-02-09 09:29:19 +01:00
parent 0f1226145b
commit 7f94522e97
24 changed files with 132 additions and 70 deletions

View File

@ -125,6 +125,7 @@ export default class LethalFantasyRoll extends Roll {
let hasMaxValue = true
let hasGrantedDice = false
let hasStaticModifier = false
let hasExplode = true
if (options.rollType === "challenge" || options.rollType === "save") {
options.rollName = game.i18n.localize(`LETHALFANTASY.Label.${options.rollTarget.rollKey}`)
@ -245,6 +246,7 @@ export default class LethalFantasyRoll extends Roll {
hasModifier = true
hasChangeDice = false
hasMaxValue = false
hasExplode = false
options.rollTarget.value = 0
} else if (options.rollType.includes("weapon-damage")) {
@ -372,12 +374,20 @@ export default class LethalFantasyRoll extends Roll {
modifierFormula += ` + ${options.rollTarget.staticModifier}`
}
let sign = fullModifier < 0 ? "-" : "+"
titleFormula = `${dice}E ${sign} ${modifierFormula}`
if (hasExplode) {
titleFormula = `${dice}E ${sign} ${modifierFormula}`
} else {
titleFormula = `${dice} ${sign} ${modifierFormula}`
}
} else {
modifierFormula = "0"
fullModifier = 0
baseFormula = `${dice}`
titleFormula = `${dice}E`
if (hasExplode) {
titleFormula = `${dice}E`
} else {
titleFormula = `${dice}`
}
}
// Specific pain case