Compare commits

..

4 Commits

Author SHA1 Message Date
921e470498 Petit fixes de synchro + essai pour corriger message XP + roll 2025-02-27 22:53:06 +01:00
0009876a6d Merge pull request '12.0.42' (#751) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: public/foundryvtt-reve-de-dragon#751
2025-02-10 07:58:31 +01:00
54785f0c3a Version 12.0.42 2025-02-10 01:54:25 +01:00
df76c4bd78 Corrections automatisations combat
Visiblement des changements sur les callbacks n'avaient pas
été finalisés
2025-02-10 01:54:25 +01:00
3 changed files with 9 additions and 4 deletions

View File

@ -557,7 +557,10 @@ export class RdDActor extends RdDBaseActorSang {
return;
}
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue));
await this.update({ "system.sante.fatigue.value": fatigue });
setTimeout( // On attend un peu pour que le message de récupération de r
async () => {
await this.update({ 'system.sante.fatigue.value': fatigue });
}, 200);
if (fatigue == 0) {
message.content += "Vous êtes complêtement reposé. ";
}
@ -1800,8 +1803,10 @@ export class RdDActor extends RdDBaseActorSang {
};
RollDataAjustements.calcul(rollData, this);
await RdDResolutionTable.rollData(rollData);
this.gererExperience(rollData);
await RdDRollResult.displayRollData(rollData, this)
this.gererExperience(rollData);
return rollData.rolled;
}

View File

@ -747,7 +747,7 @@ export class RdDBaseActor extends Actor {
async jetDeMoral() { this.actionImpossible("jet de moral") }
async resetItemUse() { }
async incDecItemUse(itemId, inc = 1) { }
async incDecItemUse(itemId, shouldIncrease = true) { }
getItemUse(itemId) { return 0; }
async finDeRound(options = { terminer: false }) { }

View File

@ -265,7 +265,7 @@ export class Misc {
const subset = elements.filter(options.preFilter)
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value))
.sort(Misc.ascending(it => options.mapper(it)))
if (subset.length == 0) {
if (subset.length == 0 && options?.onMessage) {
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
}
return subset;