Characters can now have bonus endurance/composure/focus/vigilance from conditions (thx to Perkuns).

This commit is contained in:
Vlyan
2023-01-11 10:18:04 +01:00
parent d6ba994ae6
commit 71c03b8a5d
3 changed files with 12 additions and 9 deletions

View File

@@ -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);
}
/**

View File

@@ -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"