diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c65535..cfd5203 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog Date format : day/month/year +## 1.9.5 - 11/01/2023 - Adding Modifiers +- Characters can now have bonus endurance/composure/focus/vigilance from conditions (thx to Perkuns). + ## 1.9.4 - 31/12/2022 - Last bugfixes of the Year ! - Fix prepared settings bugs (trackers icons sometimes disappears). - GM Toolbox : Left clic do only actors with an active player as owner. diff --git a/system/scripts/actor.js b/system/scripts/actor.js index 4ed5d07..3194baf 100644 --- a/system/scripts/actor.js +++ b/system/scripts/actor.js @@ -138,13 +138,6 @@ export class ActorL5r5e extends Actor { ActorL5r5e.computeDerivedAttributes(system); } - // Modifiers from conditions - const modifiers = system.modifiers?.character; - system.endurance = system.endurance + (Number(modifiers?.endurance) || 0); - system.composure = system.composure + (Number(modifiers?.composure) || 0); - system.focus = system.focus + (Number(modifiers?.focus) || 0); - system.vigilance = system.vigilance + (Number(modifiers?.vigilance) || 0); - // Attributes bars system.fatigue.max = system.endurance; system.strife.max = system.composure; @@ -169,6 +162,13 @@ export class ActorL5r5e extends Actor { system.composure = (Number(system.rings.earth) + Number(system.rings.water)) * 2; system.focus = Number(system.rings.air) + Number(system.rings.fire); system.vigilance = Math.ceil((Number(system.rings.air) + Number(system.rings.water)) / 2); + + // Modifiers from conditions + const modifiers = system.modifiers?.character; + system.endurance = system.endurance + (Number(modifiers?.endurance) || 0); + system.composure = system.composure + (Number(modifiers?.composure) || 0); + system.focus = system.focus + (Number(modifiers?.focus) || 0); + system.vigilance = system.vigilance + (Number(modifiers?.vigilance) || 0); } /** diff --git a/system/system.json b/system/system.json index b8f8f4a..ccc0353 100644 --- a/system/system.json +++ b/system/system.json @@ -7,8 +7,8 @@ "changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md", "license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md", "manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json", - "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.4/raw/l5r5e.zip?job=build", - "version": "1.9.4", + "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.5/raw/l5r5e.zip?job=build", + "version": "1.9.5", "compatibility": { "minimum": 10, "verified": "10.291"