forked from public/foundryvtt-reve-de-dragon
Correction typo "optionnelle"
This commit is contained in:
@ -18,7 +18,7 @@ import { RdDAlchimie } from "./rdd-alchimie.js";
|
||||
import { STATUSES, StatusEffects } from "./settings/status-effects.js";
|
||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||
import { RdDItemSigneDraconique } from "./item/signedraconique.js";
|
||||
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||
import { EffetsDraconiques } from "./tmr/effets-draconiques.js";
|
||||
import { Draconique } from "./tmr/draconique.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
@ -134,7 +134,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getFatigueActuelle() {
|
||||
if (ReglesOptionelles.isUsing("appliquer-fatigue") && this.isPersonnage()) {
|
||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue") && this.isPersonnage()) {
|
||||
return this.system.sante.fatigue?.value;
|
||||
}
|
||||
return 0;
|
||||
@ -457,7 +457,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async dormirChateauDormant() {
|
||||
if (!ReglesOptionelles.isUsing("chateau-dormant-gardien") || !this.system.sommeil || this.system.sommeil.nouveaujour) {
|
||||
if (!ReglesOptionnelles.isUsing("chateau-dormant-gardien") || !this.system.sommeil || this.system.sommeil.nouveaujour) {
|
||||
const message = {
|
||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||
content: ""
|
||||
@ -712,7 +712,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async recupererFatigue(message) {
|
||||
if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
|
||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||
let fatigue = this.system.sante.fatigue.value;
|
||||
const fatigueMin = this._computeFatigueMin();
|
||||
if (fatigue <= fatigueMin) {
|
||||
@ -1178,7 +1178,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
}
|
||||
// Pour les autres
|
||||
let state = Math.min(this.system.sante.vie.value - this.system.sante.vie.max, 0);
|
||||
if (ReglesOptionelles.isUsing("appliquer-fatigue") && this.system.sante.fatigue) {
|
||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue") && this.system.sante.fatigue) {
|
||||
state += RdDUtility.currentFatigueMalus(this.system.sante.fatigue.value, this.system.sante.endurance.max);
|
||||
}
|
||||
// Ajout de l'éthylisme
|
||||
@ -1505,7 +1505,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async santeIncDec(name, inc, isCritique = false) {
|
||||
if (name == 'fatigue' && !ReglesOptionelles.isUsing("appliquer-fatigue")) {
|
||||
if (name == 'fatigue' && !ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||
return;
|
||||
}
|
||||
const sante = duplicate(this.system.sante)
|
||||
@ -1547,7 +1547,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
}
|
||||
compteur.value = result.newValue;
|
||||
// If endurance lost, then the same amount of fatigue cannot be recovered
|
||||
if (ReglesOptionelles.isUsing("appliquer-fatigue") && sante.fatigue && fatigue > 0) {
|
||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue") && sante.fatigue && fatigue > 0) {
|
||||
sante.fatigue.value = Math.max(sante.fatigue.value + fatigue, this._computeFatigueMin());
|
||||
}
|
||||
await this.update({ "system.sante": sante })
|
||||
@ -2449,7 +2449,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
/* -------------------------------------------- */
|
||||
async _tacheResult(rollData, options) {
|
||||
// Mise à jour de la tache
|
||||
rollData.appliquerFatigue = ReglesOptionelles.isUsing("appliquer-fatigue");
|
||||
rollData.appliquerFatigue = ReglesOptionnelles.isUsing("appliquer-fatigue");
|
||||
rollData.tache = duplicate(rollData.tache);
|
||||
rollData.tache.system.points_de_tache_courant += rollData.rolled.ptTache;
|
||||
if (rollData.rolled.isETotal) {
|
||||
@ -3230,7 +3230,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
return;
|
||||
}
|
||||
const attackerId = attacker?.id;
|
||||
if (ReglesOptionelles.isUsing('validation-encaissement-gr') && !game.user.isGM) {
|
||||
if (ReglesOptionnelles.isUsing('validation-encaissement-gr') && !game.user.isGM) {
|
||||
RdDBaseActor.remoteActorCall({
|
||||
actorId: this.id,
|
||||
method: 'appliquerEncaissement',
|
||||
@ -3243,7 +3243,7 @@ export class RdDActor extends RdDBaseActor {
|
||||
|
||||
async appliquerEncaissement(rollData, show, attackerId) {
|
||||
const armure = await this.computeArmure(rollData);
|
||||
if (ReglesOptionelles.isUsing('validation-encaissement-gr')) {
|
||||
if (ReglesOptionnelles.isUsing('validation-encaissement-gr')) {
|
||||
DialogValidationEncaissement.validerEncaissement(this, rollData, armure, show, attackerId, (encaissement, show, attackerId) => this._appliquerEncaissement(encaissement, show, attackerId));
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user