invert modifikator for talente

This commit is contained in:
Sven Balzer 2025-10-24 00:39:32 +02:00
parent f1fff6b6ba
commit bf5a3fa06b

View File

@ -1385,9 +1385,9 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) {
const data = await DSA41_Dialog.wait("Talent", { window: {title: title}, item: item }); const data = await DSA41_Dialog.wait("Talent", { window: {title: title}, item: item });
const eBE = (await new Roll(item.system.behinderung || "0", { BE: this.document.system.computed.kampf.ruestungen_gesamt.gesamt_behinderung }).evaluate()).total; const eBE = (await new Roll(item.system.behinderung || "0", { BE: this.document.system.computed.kampf.ruestungen_gesamt.gesamt_behinderung }).evaluate()).total;
data.modifikator += eBE; data.modifikator -= eBE;
const talentwert = item.system.talentwert - data.modifikator; const talentwert = item.system.talentwert + data.modifikator;
const roll_modifier = talentwert < 0 ? -talentwert: 0; const roll_modifier = talentwert < 0 ? -talentwert: 0;
if (hp_roll_modifier !== 0) if (hp_roll_modifier !== 0)
@ -1409,7 +1409,7 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) {
const context = { const context = {
talent: item, talent: item,
modifikator: -data.modifikator, modifikator: data.modifikator,
attribute1: { type: item.system.attribute1, value: attribute1 }, attribute1: { type: item.system.attribute1, value: attribute1 },
attribute2: { type: item.system.attribute2, value: attribute2 }, attribute2: { type: item.system.attribute2, value: attribute2 },