#46 lancer de sort

Fix regressions:
- renommage updatePointsDeReve pas fait partout
- coût de rêve des sort fixes

introduction de RdDItemSort pour grouper les fonctions
liées aux sorts (et tester les sorts variables partout pareil)
This commit is contained in:
2020-11-27 10:21:20 +01:00
parent dca4e28044
commit 759626ebbe
6 changed files with 49 additions and 22 deletions

View File

@ -124,7 +124,7 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
async gererTourbillon( value ) {
this.nbFatigue += value;
await this.actor.updatePointsDeReve( -value );
await this.actor.reveActuelIncDec( -value );
if ( !this.currentRencontre.tourbillonDirection ) {
this.currentRencontre.tourbillonDirection = TMRUtility.getDirectionPattern();
}
@ -512,7 +512,7 @@ export class RdDTMRDialog extends Dialog {
if (this.viewOnly) {
return;
}
await this.actor.updatePointsDeReve((this.tmrdata.isRapide) ? -2 : -1); // 1 point defatigue
await this.actor.reveActuelIncDec((this.tmrdata.isRapide) ? -2 : -1); // 1 point defatigue
this.updateValuesDisplay();
let cellDescr = TMRUtility.getTMRDescription(this.actor.data.data.reve.tmrpos.coord);
await this.manageRencontre(this.actor.data.data.reve.tmrpos.coord, cellDescr);