From b12ec3c5b75df498538569272c3b94c57f42d822 Mon Sep 17 00:00:00 2001 From: Mykhailo Budiakov Date: Thu, 3 Jul 2025 15:24:32 +0300 Subject: [PATCH 1/4] add calculated target proficiency field need for support future effects --- css/deltagreen.css | 4 ++++ module/actor/actor.js | 3 +++ module/roll/roll.js | 3 ++- templates/actor/actor-sheet.html | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/css/deltagreen.css b/css/deltagreen.css index d1831a4..e0d71f8 100644 --- a/css/deltagreen.css +++ b/css/deltagreen.css @@ -1233,3 +1233,7 @@ body:not(.no-theme) #interface:not(.theme-light) .ui-control { body:not(.no-theme) #interface:not(.theme-light) #action-bar .slot.full:hover { border: 2px solid #215112; } + +.targetProficiencyModification { + color: #247c14; +} \ No newline at end of file diff --git a/module/actor/actor.js b/module/actor/actor.js index baa5697..d9e0b10 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -215,6 +215,9 @@ export default class DeltaGreenActor extends Actor { } else { skill.isCalculatedValue = false; } + + // Add field for calculation + skill.targetProficiency = skill.proficiency; } system.wp.max = system.statistics.pow.value; diff --git a/module/roll/roll.js b/module/roll/roll.js index 6aec751..574641e 100644 --- a/module/roll/roll.js +++ b/module/roll/roll.js @@ -388,7 +388,8 @@ export class DGPercentileRoll extends DGRoll { localizedKey = game.i18n.localize(`DG.Attributes.${this.key}`); } if (skillKeys.includes(this.key)) { - target = actorData.skills[this.key].proficiency; + // use calculated target proficiency (effects and etc like aim + 20%) + target = actorData.skills[this.key].targetProficiency || actorData.skills[this.key].proficiency; localizedKey = game.i18n.localize(`DG.Skills.${this.key}`); } if (typedSkillKeys.includes(this.key)) { diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index 8f6ffb7..d2a70ca 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -99,7 +99,7 @@
{{#each actor.system.sortedSkills as |skill key|}}
-