forked from public/foundryvtt-reve-de-dragon
Cleanup
Construction du message de jet de constitution par template hbs
This commit is contained in:
@ -590,11 +590,14 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _jetRecuperationConstitution(bonusSoins, message = undefined) {
|
||||
const tData = this.system;
|
||||
let difficulte = Misc.toInt(bonusSoins) + Math.min(0, tData.sante.vie.value - tData.sante.vie.max);
|
||||
let rolled = await RdDResolutionTable.roll(tData.carac.constitution.value, difficulte);
|
||||
let difficulte = Misc.toInt(bonusSoins) + Math.min(0, this.system.sante.vie.value - this.system.sante.vie.max);
|
||||
let rolled = await RdDResolutionTable.roll(this.system.carac.constitution.value, difficulte);
|
||||
if (message) {
|
||||
message.content += RdDResolutionTable.explain(rolled).replace(/Jet :/, "Constitution :");
|
||||
message.content = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/roll/explain.hbs", {
|
||||
actor: this,
|
||||
carac: this.system.carac.constitution,
|
||||
rolled
|
||||
})
|
||||
}
|
||||
return rolled;
|
||||
}
|
||||
|
Reference in New Issue
Block a user