forked from public/foundryvtt-reve-de-dragon
Amélioration fenêtre de Tchat #42
This commit is contained in:
@ -121,7 +121,7 @@ export class RdDRoll extends Dialog {
|
||||
HtmlUtility._showControlWhen($(".diffMoral"), rollData.selectedCarac == actor.data.data.carac.volonte);
|
||||
|
||||
HtmlUtility._showControlWhen($("#etat-general"), !dialog._isIgnoreEtatGeneral(rollData));
|
||||
HtmlUtility._showControlWhen($("#ajust-astrologique"), dialog._isAjustementAstrologique(rollData));
|
||||
HtmlUtility._showControlWhen($("#ajust-astrologique"), RdDResolutionTable.isAjustementAstrologique(rollData));
|
||||
|
||||
// Sort management
|
||||
if (rollData.selectedSort) {
|
||||
@ -229,7 +229,7 @@ export class RdDRoll extends Dialog {
|
||||
const malusEnc = (rollData.surencMalusApply) ? rollData.surencMalusValue : 0;
|
||||
const bonusTactique = RdDBonus.bonusAttaque(rollData.tactique);
|
||||
const malusEncTotal = (rollData.useMalusEncTotal) ? -rollData.encTotal : 0;
|
||||
const ajustementChance = this._isAjustementAstrologique(rollData) ? rollData.ajustementAstrologique : 0;
|
||||
const ajustementChance = RdDResolutionTable.isAjustementAstrologique(rollData) ? rollData.ajustementAstrologique : 0;
|
||||
// Gestion malus armure
|
||||
const malusArmureValue = this._computeMalusArmure(rollData);
|
||||
|
||||
@ -240,16 +240,6 @@ export class RdDRoll extends Dialog {
|
||||
return etat + diffCompetence + diffLibre + diffMoral + diffConditions + malusEnc + malusEncTotal + malusArmureValue + ajustementChance + bonusTactique;
|
||||
}
|
||||
|
||||
_isAjustementAstrologique(rollData) {
|
||||
if (rollData.selectedCarac.label.toLowerCase().includes('chance')) {
|
||||
return true;
|
||||
}
|
||||
if (rollData.selectedSort && rollData.selectedSort.data.isrituel) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_computeDiffCompetence(rollData) {
|
||||
if (rollData.competence) {
|
||||
return Misc.toInt(rollData.competence.data.niveau);
|
||||
|
Reference in New Issue
Block a user