From b343a06ef6f541b489ee5c7bbbdc79e3f9418306 Mon Sep 17 00:00:00 2001 From: Jacob Lucas Date: Sat, 3 Jul 2021 01:40:48 +0100 Subject: [PATCH 1/4] Fixed bug that caused power points to not have the mods --- module/actor/entity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/actor/entity.js b/module/actor/entity.js index 101b7e05..a75c0e6d 100644 --- a/module/actor/entity.js +++ b/module/actor/entity.js @@ -669,10 +669,10 @@ export default class Actor5e extends Actor { // TODO: Consider an option for using the variant rule of all powers use the same value ad.attributes.powerForceLightDC = 8 + ad.abilities.wis.mod + ad.attributes.prof ?? 10; ad.attributes.powerForceDarkDC = 8 + ad.abilities.cha.mod + ad.attributes.prof ?? 10; - ad.attributes.powerForceUnivDC = Math.max(ad.attributes.powerForceLightDC,ad.attributes.powerForceDarkDC) ?? 10 + ad.attributes.powerForceUnivDC = Math.max(ad.attributes.powerForceLightDC,ad.attributes.powerForceDarkDC) ?? 10; ad.attributes.powerTechDC = 8 + ad.abilities.int.mod + ad.attributes.prof ?? 10; - if (actorData.type !== 'actor') return; + if (actorData.type !== 'character') return; // Set Force and tech bonus points for PC Actors if (!!ad.attributes.force.level){ From 063d529f09140f50c81fc1878521d7e689ab5f44 Mon Sep 17 00:00:00 2001 From: Jacob Lucas Date: Sat, 3 Jul 2021 01:41:26 +0100 Subject: [PATCH 2/4] Fixed bug that prevented NPCs power DCs from having values --- module/actor/entity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/actor/entity.js b/module/actor/entity.js index a75c0e6d..f5141b73 100644 --- a/module/actor/entity.js +++ b/module/actor/entity.js @@ -661,8 +661,8 @@ export default class Actor5e extends Actor { */ _computeDerivedPowercasting (actorData) { - if ((actorData.type === 'actor') || (actorData.type === 'npc')) return; - + if (!(actorData.type === 'character' || actorData.type === 'npc')) return; + const ad = actorData.data; // Powercasting DC for Actors and NPCs From cac466462b72052646fb5cf5f5d4b87f5b18ce7a Mon Sep 17 00:00:00 2001 From: Jacob Lucas Date: Sat, 3 Jul 2021 01:42:08 +0100 Subject: [PATCH 3/4] Removed unnecessary calculation --- module/actor/entity.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/module/actor/entity.js b/module/actor/entity.js index f5141b73..ad37ab56 100644 --- a/module/actor/entity.js +++ b/module/actor/entity.js @@ -431,13 +431,6 @@ export default class Actor5e extends Actor { const powers = ad.powers; const isNPC = actorData.type === 'npc'; - // Powercasting DC - // TODO: Consider an option for using the variant rule of all powers use the same value - ad.attributes.powerForceLightDC = 8 + ad.abilities.wis.mod + ad.attributes.prof ?? 10; - ad.attributes.powerForceDarkDC = 8 + ad.abilities.cha.mod + ad.attributes.prof ?? 10; - ad.attributes.powerForceUnivDC = Math.max(ad.attributes.powerForceLightDC,ad.attributes.powerForceDarkDC) ?? 10 - ad.attributes.powerTechDC = 8 + ad.abilities.int.mod + ad.attributes.prof ?? 10; - // Translate the list of classes into force and tech power-casting progression const forceProgression = { classes: 0, From 97df236b541c3b34225c4c480c4e4ea30d5e54f4 Mon Sep 17 00:00:00 2001 From: Jacob Lucas Date: Sat, 3 Jul 2021 01:44:38 +0100 Subject: [PATCH 4/4] Incremented version --- system.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system.json b/system.json index ae9d48c4..3a0a82ca 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "sw5e", "title": "SW 5th Edition", "description": "A comprehensive game system for running games of SW 5th Edition in the Foundry VTT environment.", - "version": "1.3.5.R1-A6", + "version": "1.3.5.R1-A7", "author": "Dev Team", "scripts": [], "esmodules": ["sw5e.js"],