From a611838d6c62f1b416720dcfa7af1407ecc60c67 Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Sat, 5 Sep 2020 14:20:42 -1000 Subject: [PATCH] Add Melee and Missile Damage bonus to tweaks Melee and Missile Damage bonuses added to tweaks. Also fixed a bug in OSE code where AAC bonus was not working. --- src/lang/en.json | 6 ++++-- src/module/actor/entity.js | 9 +++++++++ src/template.json | 6 ++++++ src/templates/actors/dialogs/tweaks-dialog.html | 16 ++++++++++++++-- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index 97a6e02..f77d377 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -123,10 +123,12 @@ "ACKS.AB": "Throw", "ACKS.MeleeShort": "MEL", "ACKS.Melee": "Melee", - "ACKS.MeleeBonus": "Melee Bonus", + "ACKS.MeleeBonus": "Melee Throw Bonus", + "ACKS.MeleeDamageBonus": "Melee Damage Bonus", "ACKS.MissileShort": "MIS", "ACKS.Missile": "Missile", - "ACKS.MissileBonus": "Missile Bonus", + "ACKS.MissileBonus": "Missile Throw Bonus", + "ACKS.MissileDamageBonus": "Missile Damage Bonus", "ACKS.Initiative": "Initiative", "ACKS.InitiativeBonus": "Initiative Bonus", "ACKS.InitiativeShort": "INIT", diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index 639784e..d1e490f 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -383,6 +383,11 @@ export class AcksActor extends Actor { dmgParts.push(data.scores.str.mod); } + // Add Melee mod to damage + if (attData.roll.type == "melee") { + dmgParts.push(data.damage.mod.melee); + } + // Damage roll AcksDice.Roll({ event: options.event, @@ -447,6 +452,10 @@ export class AcksActor extends Actor { if (options.type == "melee") { dmgParts.push(data.scores.str.mod); } + // Add Melee mod to damage + if (options.type == "melee") { + dmgParts.push(data.damage.mod.melee); + } const rollData = { actor: this.data, item: attData.item, diff --git a/src/template.json b/src/template.json index e42fbb3..0ab0fa2 100644 --- a/src/template.json +++ b/src/template.json @@ -21,6 +21,12 @@ "value": 0, "mod": 0 }, + "damage": { + "mod": { + "missile": 0 + "melee": 0 + } + }, "thac0": { "value": 19, "bba": 0, diff --git a/src/templates/actors/dialogs/tweaks-dialog.html b/src/templates/actors/dialogs/tweaks-dialog.html index 051ba25..88947b5 100644 --- a/src/templates/actors/dialogs/tweaks-dialog.html +++ b/src/templates/actors/dialogs/tweaks-dialog.html @@ -45,6 +45,12 @@ +
+ +
+ +
+
@@ -52,11 +58,17 @@ data-dtype="Number" />
+
+ +
+ +
+
- {{#if config.ascending}} - {{else}}