foundryvtt-reve-de-dragon/module/item-meditation.js
Vincent Vandemeulebrouck e22b6c52f1 Fix méditation
- augmentation du malus en cas d'échec particulier/total
- le malus affecte négativement la méditation
- en cas d'échec, aucun signe n'est créé
2022-06-06 23:03:09 +02:00

15 lines
491 B
JavaScript

export class RdDItemMeditation {
static calculDifficulte(rollData) {
if (rollData.meditation) {
// Malus permanent éventuel
let diff = rollData.meditation.data.malus ?? 0;
if (!rollData.conditionMeditation.isHeure) diff -= 2;
if (!rollData.conditionMeditation.isVeture) diff -= 2;
if (!rollData.conditionMeditation.isComportement) diff -= 2;
if (!rollData.conditionMeditation.isPurification) diff -= 2;
return diff;
}
return 0;
}
}