Fix spell save/defense again
Release Creation / build (release) Successful in 45s

This commit is contained in:
2026-06-13 21:06:18 +02:00
parent ace726a1fc
commit 60b351f50d
4 changed files with 43 additions and 1 deletions
+25
View File
@@ -299,6 +299,7 @@ export default class LethalFantasyUtils {
if (currentGrit > 0) {
buttons.push({
action: "grit",
type: "button",
label: `Spend 1 Grit (+1D6) [${currentGrit} left]`,
icon: "fa-solid fa-fist-raised",
callback: () => "grit"
@@ -308,6 +309,7 @@ export default class LethalFantasyUtils {
if (currentLuck > 0) {
buttons.push({
action: "luck",
type: "button",
label: `Spend 1 Luck (+1D6) [${currentLuck} left]`,
icon: "fa-solid fa-clover",
callback: () => "luck"
@@ -316,6 +318,7 @@ export default class LethalFantasyUtils {
buttons.push({
action: "bonusDie",
type: "button",
label: "Add bonus die",
icon: "fa-solid fa-dice",
callback: () => "bonusDie"
@@ -324,6 +327,7 @@ export default class LethalFantasyUtils {
if (canShieldReact) {
buttons.push({
action: "shieldReact",
type: "button",
label: `Roll shield (${shieldLabel})`,
icon: "fa-solid fa-shield",
callback: () => "shieldReact"
@@ -331,6 +335,7 @@ export default class LethalFantasyUtils {
} else if (canAdHoc) {
buttons.push({
action: "adHocShield",
type: "button",
label: "Roll ad-hoc shield (choose dice + DR)",
icon: "fa-solid fa-shield-halved",
callback: () => "adHocShield"
@@ -339,6 +344,7 @@ export default class LethalFantasyUtils {
buttons.push({
action: "continue",
type: "button",
label: "Continue (no defense bonus)",
icon: "fa-solid fa-forward",
callback: () => "continue"
@@ -534,6 +540,7 @@ export default class LethalFantasyUtils {
buttons: [
{
action: "rollSave",
type: "button",
label: "Roll Save",
icon: "fa-solid fa-person-running",
callback: (event, button) => button.form.elements.saveKey.value,
@@ -607,6 +614,8 @@ export default class LethalFantasyUtils {
content,
buttons: [
{
action: "rangeDefense",
type: "button",
label: "Roll Defense",
icon: "fa-solid fa-shield",
callback: (event, button, dialog) => {
@@ -714,6 +723,8 @@ export default class LethalFantasyUtils {
content,
buttons: [
{
action: "defenseRoll",
type: "button",
label: "Roll Defense",
icon: "fa-solid fa-shield",
callback: (event, button, dialog) => {
@@ -809,6 +820,7 @@ export default class LethalFantasyUtils {
}
return {
action: c.type,
type: "button",
label,
icon,
callback: () => c
@@ -998,6 +1010,7 @@ export default class LethalFantasyUtils {
buttons: [
{
action: "roll",
type: "button",
label: "Roll Bonus Die",
icon: "fa-solid fa-dice",
callback: (event, button) => {
@@ -1007,6 +1020,7 @@ export default class LethalFantasyUtils {
},
{
action: "cancel",
type: "button",
label: "Cancel",
icon: "fa-solid fa-xmark",
callback: () => null
@@ -1054,6 +1068,7 @@ export default class LethalFantasyUtils {
buttons: [
{
action: "roll",
type: "button",
label: "Roll Shield",
icon: "fa-solid fa-shield",
callback: (event, button) => {
@@ -1067,6 +1082,7 @@ export default class LethalFantasyUtils {
},
{
action: "cancel",
type: "button",
label: "Cancel",
icon: "fa-solid fa-xmark",
callback: () => null
@@ -1137,6 +1153,7 @@ export default class LethalFantasyUtils {
if (currentGrit > 0) {
buttons.push({
action: "grit",
type: "button",
label: `Spend 1 Grit (+1D6) [${currentGrit} left]`,
icon: "fa-solid fa-fist-raised",
callback: () => "grit"
@@ -1146,6 +1163,7 @@ export default class LethalFantasyUtils {
if (currentLuck > 0) {
buttons.push({
action: "luck",
type: "button",
label: `Spend 1 Luck (+1D6) [${currentLuck} left]`,
icon: "fa-solid fa-clover",
callback: () => "luck"
@@ -1154,6 +1172,7 @@ export default class LethalFantasyUtils {
buttons.push({
action: "continue",
type: "button",
label: "Continue (no bonus)",
icon: "fa-solid fa-forward",
callback: () => "continue"
@@ -1229,12 +1248,14 @@ export default class LethalFantasyUtils {
const buttons = [
{
action: "grit",
type: "button",
label: `Spend 1 Grit (+1D6) [${currentGrit} left]`,
icon: "fa-solid fa-fist-raised",
callback: () => "grit"
},
{
action: "continue",
type: "button",
label: "Continue (no bonus)",
icon: "fa-solid fa-forward",
callback: () => "continue"
@@ -1625,21 +1646,25 @@ export default class LethalFantasyUtils {
buttons: [
{
action: "noDR",
type: "button",
label: "No DR",
callback: () => ({ drType: "none", damage: damageTotal })
},
{
action: "armorDR",
type: "button",
label: "With Armor DR",
callback: () => ({ drType: "armor", damage: Math.max(0, damageTotal - armorDR) })
},
{
action: "allDR",
type: "button",
label: "With Armor + Shield DR",
callback: () => ({ drType: "all", damage: Math.max(0, damageTotal - totalDR) })
},
{
action: "cancel",
type: "button",
label: "Cancel",
callback: () => null
}