From 3c92532601ba5978aa72a659f940c6ad23437ff0 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Tue, 19 May 2026 00:23:20 +0200 Subject: [PATCH] Correction sur bonus armes --- system/scripts/actors/base-character-sheet.js | 1 + system/scripts/actors/character-sheet.js | 2 +- system/scripts/actors/npc-sheet.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/scripts/actors/base-character-sheet.js b/system/scripts/actors/base-character-sheet.js index a112e92..10d2b97 100644 --- a/system/scripts/actors/base-character-sheet.js +++ b/system/scripts/actors/base-character-sheet.js @@ -714,6 +714,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e { return { uuid: item.uuid, skill: item.system.skill, + bonus: parseInt(item.system.bonus || 0), }; } diff --git a/system/scripts/actors/character-sheet.js b/system/scripts/actors/character-sheet.js index 936a146..3ce068a 100644 --- a/system/scripts/actors/character-sheet.js +++ b/system/scripts/actors/character-sheet.js @@ -282,7 +282,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e { const weapon = this._getWeaponInfos(el.data("weapon-id") || null); const skillId = weapon?.skill || el.data("skill"); const ringId = el.data("ring") || this.actor.system?.default_ring || "void"; - new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid }).render(true); + new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid, arcaneBonus: weapon?.bonus ?? 0 }).render(true); } /** diff --git a/system/scripts/actors/npc-sheet.js b/system/scripts/actors/npc-sheet.js index 2e9a62a..08547c7 100644 --- a/system/scripts/actors/npc-sheet.js +++ b/system/scripts/actors/npc-sheet.js @@ -127,6 +127,6 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e { const weapon = this._getWeaponInfos(el.data("weapon-id") || null); const skillId = weapon?.skill || el.data("skill"); const ringId = el.data("ring") || this.actor.system?.default_ring || "void"; - new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid }).render(true); + new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid, arcaneBonus: weapon?.bonus ?? 0 }).render(true); } }