From 944e8a08f41bcd8497c2ec9ea18940f19d8dcc80 Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Sat, 24 Oct 2020 18:29:06 -1000 Subject: [PATCH] Add saves modifier to tweaks Adds the ability for a universal bonus or penalty to saving throws. Addresses issue #30 from @Bobloblah. --- src/lang/en.json | 1 + src/module/actor/entity.js | 2 ++ src/template.json | 3 +++ src/templates/actors/dialogs/tweaks-dialog.html | 7 +++++++ 4 files changed, 13 insertions(+) diff --git a/src/lang/en.json b/src/lang/en.json index 88291e6..480dc94 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -97,6 +97,7 @@ "ACKS.saves.spell.long": "Spells", "ACKS.saves.magic.long": "Bonus vs Magic", "ACKS.saves.magic.short": "vs Magic", + "ACKS.SaveBonus": "Saving Throw Bonus", "ACKS.Health": "Hit Points", "ACKS.HealthMax": "Maximum Hit Points", diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index 4ab8f56..97c147c 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -121,6 +121,8 @@ export class AcksActor extends Actor { rollSave(save, options = {}) { const label = game.i18n.localize(`ACKS.saves.${save}.long`); const rollParts = ["1d20"]; + rollParts.push(this.data.data.save.mod); + let data = {}; if (this.data.type == "character") { diff --git a/src/template.json b/src/template.json index b3df1c8..b7ed9a5 100644 --- a/src/template.json +++ b/src/template.json @@ -53,6 +53,9 @@ "value": 0 } }, + "save": { + "mod": 0 + }, "movement": { "base": 120 }, diff --git a/src/templates/actors/dialogs/tweaks-dialog.html b/src/templates/actors/dialogs/tweaks-dialog.html index 88947b5..fb42f10 100644 --- a/src/templates/actors/dialogs/tweaks-dialog.html +++ b/src/templates/actors/dialogs/tweaks-dialog.html @@ -76,6 +76,13 @@ {{/if}} +
+ +
+ +
+