Fix expérience carac #396

Merged
vincent.vandeme merged 1 commits from master-fixes into master 2021-03-27 14:54:53 +01:00
Showing only changes of commit d5277137dd - Show all commits

View File

@ -2282,7 +2282,7 @@ export class RdDActor extends Actor {
async chanceActuelleIncDec(value, limit = true) { async chanceActuelleIncDec(value, limit = true) {
let chance = Math.max(Misc.templateData(this).compteurs.chance.value + value, 0); let chance = Math.max(Misc.templateData(this).compteurs.chance.value + value, 0);
if (limit) { if (limit) {
chance = Math.min(chance.value, this.getChance()) chance = Math.min(chance, this.getChance())
} }
await this.updateCompteurValue("chance", chance); await this.updateCompteurValue("chance", chance);
} }