From e320c2f9aca3b01ad659d3835e17b3498b6050c7 Mon Sep 17 00:00:00 2001 From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com> Date: Sun, 5 Oct 2025 19:17:33 +0200 Subject: [PATCH] fix for zauber that do not take magieresistenz into account --- src/main.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.mjs b/src/main.mjs index dfa81a9..559b13d 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -1565,7 +1565,7 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) { const title = game.i18n.localize("DSA41.roll_types." + roll_type) + ": " + item.name; const data = await DSA41_Dialog.wait("Zauber", { window: {title: title}, item: item }); - const zauberfertigkeitswert = item.system.zauberfertigkeitswert - data.modifikator - data.magieresistenz; + const zauberfertigkeitswert = item.system.zauberfertigkeitswert - data.modifikator - (data.magieresistenz ?? null); const roll_modifier = zauberfertigkeitswert < 0 ? -zauberfertigkeitswert: 0; if (hp_roll_modifier !== 0) @@ -1589,7 +1589,7 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) { zauber: item, modifikator: -data.modifikator, - magieresistenz: -data.magieresistenz, + magieresistenz: -(data.magieresistenz ?? 0), attribute1: { type: item.system.attribute1, value: attribute1 }, attribute2: { type: item.system.attribute2, value: attribute2 },