Fix danses
This commit is contained in:
parent
5e53dc5262
commit
98c6133938
@ -2087,11 +2087,13 @@ export class RdDActor extends Actor {
|
|||||||
diffLibre: - (oeuvre.data.niveau ?? 0),
|
diffLibre: - (oeuvre.data.niveau ?? 0),
|
||||||
diffConditions: 0,
|
diffConditions: 0,
|
||||||
use: { libre: false, conditions: true },
|
use: { libre: false, conditions: true },
|
||||||
selectedCarac: duplicate(this.data.data.carac[selected]),
|
selectedCarac: duplicate(this.data.data.carac[selected])
|
||||||
forceCarac: {}
|
|
||||||
});
|
});
|
||||||
artData.competence.data.defaut_carac = selected;
|
artData.competence.data.defaut_carac = selected;
|
||||||
artData.forceCarac[selected] = duplicate(this.data.data.carac[selected]);
|
if ( !artData.forceCarac ) {
|
||||||
|
artData.forceCarac = {};
|
||||||
|
artData.forceCarac[selected] = duplicate(this.data.data.carac[selected]);
|
||||||
|
}
|
||||||
|
|
||||||
console.log("rollArt !!!", artData);
|
console.log("rollArt !!!", artData);
|
||||||
|
|
||||||
@ -2122,15 +2124,23 @@ export class RdDActor extends Actor {
|
|||||||
const oeuvre = duplicate(this.getChant(id));
|
const oeuvre = duplicate(this.getChant(id));
|
||||||
await this._rollArt(artData, "ouie", oeuvre);
|
await this._rollArt(artData, "ouie", oeuvre);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async rollDanse(id) {
|
async rollDanse(id) {
|
||||||
const artData = { art: 'danse', verbe: 'Danser' };
|
const artData = { art: 'danse', verbe: 'Danser', forceCarac: {} };
|
||||||
const oeuvre = duplicate(this.getOeuvre(id, artData.art));
|
const oeuvre = duplicate(this.getOeuvre(id, artData.art));
|
||||||
const selectedCarac = this._getCaracDanse(oeuvre,);
|
const selectedCarac = this._getCaracDanse(oeuvre);
|
||||||
|
if ( oeuvre.data.agilite) {
|
||||||
|
artData.forceCarac['agilite'] = duplicate(this.data.data.carac.agilite );
|
||||||
|
}
|
||||||
|
if ( oeuvre.data.apparence) {
|
||||||
|
artData.forceCarac['apparence'] = duplicate(this.data.data.carac.apparence );
|
||||||
|
}
|
||||||
await this._rollArt(artData, selectedCarac, oeuvre);
|
await this._rollArt(artData, selectedCarac, oeuvre);
|
||||||
}
|
}
|
||||||
|
|
||||||
_getCaracDanse(oeuvre) {
|
/* -------------------------------------------- */
|
||||||
|
_getCaracDanse(oeuvre) {
|
||||||
if (oeuvre.data.agilite) { return "agilite"; }
|
if (oeuvre.data.agilite) { return "agilite"; }
|
||||||
else if (oeuvre.data.apparence) { return "apparence"; }
|
else if (oeuvre.data.apparence) { return "apparence"; }
|
||||||
const competence = this.getCompetence(oeuvre.data.competence);
|
const competence = this.getCompetence(oeuvre.data.competence);
|
||||||
|
Loading…
Reference in New Issue
Block a user