From e089bdf9c8b150358969b01df02fdeb532ccf6da Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 24 Oct 2023 22:32:49 +0200 Subject: [PATCH] Surencombrement seulement sur actions physiques CF p70 --- module/rdd-roll.js | 2 -- module/rolldata-ajustements.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/module/rdd-roll.js b/module/rdd-roll.js index 6a65684e..5925d076 100644 --- a/module/rdd-roll.js +++ b/module/rdd-roll.js @@ -50,8 +50,6 @@ export class RdDRoll extends Dialog { encTotal: true }, isMalusEncombrementTotal: RdDItemCompetence.isMalusEncombrementTotal(rollData.competence), - malusArmureValue: actor.getMalusArmure(), - surencMalusValue: actor.computeMalusSurEncombrement(), encTotal: actor.getEncTotal(), ajustementAstrologique: actor.ajustementAstrologique(), surprise: actor.getSurprise(false), diff --git a/module/rolldata-ajustements.js b/module/rolldata-ajustements.js index 4d313a72..5eab750d 100644 --- a/module/rolldata-ajustements.js +++ b/module/rolldata-ajustements.js @@ -69,8 +69,8 @@ export const referenceAjustements = { getValue: (rollData, actor) => -actor.getEncTotal() }, surenc: { - isVisible: (rollData, actor) => actor.isSurenc(), - isUsed: (rollData, actor) => rollData.use?.surenc, + isVisible: (rollData, actor) => RdDCarac.isActionPhysique(rollData.selectedCarac) && actor.isSurenc(), + isUsed: (rollData, actor) => rollData.use?.surenc && RdDCarac.isActionPhysique(rollData.selectedCarac), getLabel: (rollData, actor) => 'Sur-encombrement', getValue: (rollData, actor) => actor.computeMalusSurEncombrement() },