Une dague est une arme

Mais on trouvait d'abord la compétence
This commit is contained in:
Vincent Vandemeulebrouck 2020-11-11 04:22:31 +01:00
parent c040197d97
commit e4c9e5cfb6

View File

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