Fixes pour possession

This commit is contained in:
2022-07-09 09:04:35 +02:00
14 changed files with 236 additions and 105 deletions

View File

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