forked from public/foundryvtt-reve-de-dragon
Sync
This commit is contained in:
@ -42,7 +42,8 @@ export class RdDRoll extends Dialog {
|
||||
surencMalusApply: false,
|
||||
isNatation: rollData.competence ? rollData.competence.name.toLowerCase().includes("natation") : false,
|
||||
useEncForNatation: false,
|
||||
encValueForNatation: actor.encombrementTotal ? Math.floor(actor.encombrementTotal) : 0
|
||||
encValueForNatation: actor.encombrementTotal ? Math.floor(actor.encombrementTotal) : 0,
|
||||
ajustementAstrologique: actor.ajustementAstrologique()
|
||||
},
|
||||
{ overwrite: false });
|
||||
}
|
||||
@ -203,7 +204,7 @@ export class RdDRoll extends Dialog {
|
||||
let malusEnc = (rollData.surencMalusApply) ? rollData.surencMalusValue : 0;
|
||||
let diffLibre = Misc.toInt(rollData.diffLibre);
|
||||
let malusEncNatation = (rollData.useEncForNatation) ? -rollData.encValueForNatation : 0;
|
||||
|
||||
let ajustementChance = rollData.selectedCarac.label.toLowerCase().includes('chance') ? rollData.ajustementAstrologique : 0;
|
||||
// Gestion malus armure
|
||||
let malusArmureValue = 0;
|
||||
if (rollData.malusArmureValue != 0 && (rollData.selectedCarac.label == "Agilité" || rollData.selectedCarac.label == "Dérobée")) {
|
||||
@ -213,6 +214,7 @@ export class RdDRoll extends Dialog {
|
||||
$("#addon-message").text("");
|
||||
}
|
||||
|
||||
|
||||
let diffCompetence = 0;
|
||||
if (rollData.competence) {
|
||||
diffCompetence = Misc.toInt(rollData.competence.data.niveau);
|
||||
@ -222,7 +224,7 @@ export class RdDRoll extends Dialog {
|
||||
diffLibre = RdDItemSort.getDifficulte(rollData.selectedSort, diffLibre);
|
||||
}
|
||||
|
||||
return etat + diffCompetence + diffLibre + diffConditions + malusEnc + malusEncNatation + malusArmureValue;
|
||||
return etat + diffCompetence + diffLibre + diffConditions + malusEnc + malusEncNatation + malusArmureValue + ajustementChance;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user