Fix commande /rdd sans compétence

On peut maintenant faire /rdd Vue -2
This commit is contained in:
Vincent Vandemeulebrouck 2022-12-16 20:45:01 +01:00
parent bb6bf3387e
commit 944120b524

View File

@ -331,7 +331,7 @@ export class RdDCommands {
diff = 0; diff = 0;
} }
const caracName = params[0]; const caracName = params[0];
let competence = length > 1 ? actors[0].getCompetence(Misc.join(params.slice(1, length), ' ')) : undefined; let competence = length > 1 ? actors[0].getCompetence(Misc.join(params.slice(1, length), ' ')) : {name:undefined};
if (competence) { if (competence) {
for (let actor of actors) { for (let actor of actors) {
await actor.rollCaracCompetence(caracName, competence.name, diff); await actor.rollCaracCompetence(caracName, competence.name, diff);