Fix: rollCarac pour odorat-goût
Recherche d'abord par clé (name)
This commit is contained in:
parent
d10c86c684
commit
5d32f7e493
@ -3142,7 +3142,11 @@ export class RdDActor extends Actor {
|
|||||||
case 'chance-actuelle': case 'chance actuelle':
|
case 'chance-actuelle': case 'chance actuelle':
|
||||||
return carac.chance;
|
return carac.chance;
|
||||||
}
|
}
|
||||||
let entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[1].label, description: 'caractéristique' });
|
|
||||||
|
let entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[0], description: 'caractéristique' });
|
||||||
|
if (!entry || entry.length ==0) {
|
||||||
|
entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[1].label, description: 'caractéristique' });
|
||||||
|
}
|
||||||
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
|
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user