From e4c9e5cfb67b173b8b56dfc7edc75c7bccdc6e14 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 11 Nov 2020 04:22:31 +0100 Subject: [PATCH] Une dague est une arme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mais on trouvait d'abord la compétence --- module/actor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/actor.js b/module/actor.js index 369ee973..ffbb33b7 100644 --- a/module/actor.js +++ b/module/actor.js @@ -716,8 +716,8 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ rollArme( armeName ) - { - let armeItem = RdDUtility.findCompetence( this.data.items, armeName ); + { + let armeItem = this.data.items.find(item=>item.type==="arme" && (item.name === armeName)); if ( armeItem && armeItem.data.competence ) this.rollCompetence( armeItem.data.competence, armeItem ); else