diff --git a/src/Dialogs/Attacke.hbs b/src/Dialogs/Attacke.hbs
new file mode 100644
index 0000000..34e54b1
--- /dev/null
+++ b/src/Dialogs/Attacke.hbs
@@ -0,0 +1,28 @@
+
+
{{localize "DSA41.kampf.modifikator"}}
+ {{>editable-input type="number" name="modifikator" class="colspan2" value=(lookup formData "modifikator") }}
+
+
+ {{options.item.basis_attacke}}
+
+ + {{options.item.talent_attacke}}
+
+ {{#if (ne options.item.modifikator_attacke 0)}}
+ + {{options.item.modifikator_attacke}}
+ {{/if}}
+
+ {{#if (ne options.item.parierwaffe_attacke 0)}}
+ + {{options.item.parierwaffe_attacke}}
+ {{/if}}
+
+ {{#if (ne options.item.schild_attacke 0)}}
+ + {{options.item.schild_attacke}}
+ {{/if}}
+
+ {{#if (lt options.item.tp_kk 0)}}
+ + {{options.item.tp_kk}}
+ {{/if}}
+
+ + {{formData.modifikator}}
+
+
diff --git a/src/Dialogs/FernkampfAngriff.hbs b/src/Dialogs/FernkampfAttacke.hbs
similarity index 100%
rename from src/Dialogs/FernkampfAngriff.hbs
rename to src/Dialogs/FernkampfAttacke.hbs
diff --git a/src/main.mjs b/src/main.mjs
index a08a00c..8f00392 100644
--- a/src/main.mjs
+++ b/src/main.mjs
@@ -590,10 +590,11 @@ function DSA41_ApplicationMixin(BaseApplication) {
class DSA41_Dialog extends DSA41_ApplicationMixin(ApplicationV2) {
static PARTS = {
+ Attacke: { template: "systems/dsa-4th-edition/src/Dialogs/Attacke.hbs" },
Parade: { template: "systems/dsa-4th-edition/src/Dialogs/Parade.hbs" },
Trefferpunkte: { template: "systems/dsa-4th-edition/src/Dialogs/Trefferpunkte.hbs" },
- FernkampfAngriff: { template: "systems/dsa-4th-edition/src/Dialogs/FernkampfAngriff.hbs" },
+ FernkampfAttacke: { template: "systems/dsa-4th-edition/src/Dialogs/FernkampfAttacke.hbs" },
FernkampfTrefferpunkte: { template: "systems/dsa-4th-edition/src/Dialogs/FernkampfTrefferpunkte.hbs" },
footer: { template: "templates/generic/form-footer.hbs" },
@@ -680,17 +681,40 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) {
flavor += " <= " + success_value;
}
+ if (roll_type == "attacke") {
+ const item = this.document.system.computed.kampf.waffen[item_id];
+ const title = game.i18n.localize("DSA41.roll_types." + roll_type) + ": " + item.name;
+ const data = await DSA41_Dialog.wait("Attacke", { window: { title: title }, item: item });
+
+ let flavor = game.i18n.localize("DSA41.roll_types." + roll_type);
+ if (typeof success_value !== 'undefined') {
+ flavor += " <= " + (Number(success_value) + data.modifikator);
+ }
+
+ let roll = new Roll(roll_formula, this.document.system);
+ roll.toMessage({
+ speaker: ChatMessage.getSpeaker({ actor: this.document }),
+ flavor: flavor,
+ });
+
+ return;
+ }
if (roll_type == "parade") {
const item = this.document.system.computed.kampf.waffen[item_id];
const title = game.i18n.localize("DSA41.roll_types." + roll_type) + ": " + item.name;
const data = await DSA41_Dialog.wait("Parade", { window: { title: title }, item: item });
+ let flavor = game.i18n.localize("DSA41.roll_types." + roll_type);
+ if (typeof success_value !== 'undefined') {
+ flavor += " <= " + (Number(success_value) + data.modifikator);
+ }
+
if (data.crit == "on") {
roll_formula = "round((" + roll_formula + ") / 2)";
}
-
- let roll = new Roll(roll_formula + " + " + data.modifikator, this.document.system);
+
+ let roll = new Roll(roll_formula, this.document.system);
roll.toMessage({
speaker: ChatMessage.getSpeaker({ actor: this.document }),
flavor: flavor,
@@ -719,7 +743,7 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) {
if (roll_type == "fernkampf-attacke") {
const title = game.i18n.localize("DSA41.roll_types." + roll_type) + ": " + item.name;
- const data = await DSA41_Dialog.wait("FernkampfAngriff", { window: { title: title }, item: this.document.system.computed.kampf.fernkampf_waffen[item_id] });
+ const data = await DSA41_Dialog.wait("FernkampfAttacke", { window: { title: title }, item: this.document.system.computed.kampf.fernkampf_waffen[item_id] });
const groessen_modifikator = Math.max(data.ziel_groesse + data.deckung + data.ziel_bewegung, -2);
const andere_modifikator = data.entfernung + data.wind + data.modifikator;