forked from public/foundryvtt-reve-de-dragon
Permettre les jets de chance sans astrologie
Quand on fait un jet de chance pour la journée, permettre de ne pas utiliser l'ajustement astrologique
This commit is contained in:
@ -44,6 +44,7 @@ export class RdDRoll extends Dialog {
|
||||
diffLibre: rollData.competence?.system.default_diffLibre ?? 0,
|
||||
perteMoralEchec: false, /* Pour l'affichage dans le chat */
|
||||
use: {
|
||||
astrologique: true,
|
||||
moral: false, /* Est-ce que le joueur demande d'utiliser le moral ? Utile si le joueur change plusieurs fois de carac associée. */
|
||||
libre: true,
|
||||
coeur: undefined,
|
||||
@ -214,6 +215,10 @@ export class RdDRoll extends Dialog {
|
||||
this.rollData[attribute] = event.currentTarget.checked;
|
||||
this.updateRollResult(html);
|
||||
});
|
||||
this.html.find('input.use-astrologique').change((event) => {
|
||||
this.rollData.use.astrologique = event.currentTarget.checked;
|
||||
this.updateRollResult(html);
|
||||
});
|
||||
this.html.find('input.use-encTotal').change((event) => {
|
||||
this.rollData.use.encTotal = event.currentTarget.checked;
|
||||
this.updateRollResult(html);
|
||||
@ -314,6 +319,7 @@ export class RdDRoll extends Dialog {
|
||||
|
||||
HtmlUtility.showControlWhen(this.html.find(".use-encTotal"), rollData.ajustements.encTotal.visible && RdDCarac.isAgiliteOuDerobee(rollData.selectedCarac));
|
||||
HtmlUtility.showControlWhen(this.html.find(".use-surenc"), rollData.ajustements.surenc.visible && RdDCarac.isActionPhysique(rollData.selectedCarac));
|
||||
HtmlUtility.showControlWhen(this.html.find(".use-astrologique"), rollData.ajustements.astrologique.visible);
|
||||
HtmlUtility.showControlWhen(this.html.find(".utilisation-moral"), rollData.use.appelAuMoral);
|
||||
HtmlUtility.showControlWhen(this.html.find(".divAppelAuMoral"), rollData.use.appelAuMoral);
|
||||
HtmlUtility.showControlWhen(this.html.find(".utilisation-coeur"), rollData.ajustements.coeur.visible);
|
||||
|
Reference in New Issue
Block a user