This commit was merged in pull request #820.
This commit is contained in:
@@ -22,15 +22,14 @@ export class RollTypeTache extends RollType {
|
||||
|
||||
static async $onRollTache(rollData) {
|
||||
const actor = rollData.active.actor
|
||||
const tache = rollData.current[PART_TACHE].tache
|
||||
const tache = rollData.current[PART_TACHE].tache.getTacheOuCommune()
|
||||
|
||||
rollData.current[PART_TACHE].tache = await tache.update({
|
||||
await tache.update({
|
||||
'system.points_de_tache_courant': tache.system.points_de_tache_courant + rollData.rolled.ptTache,
|
||||
'system.nb_jet_succes': tache.system.nb_jet_succes + (rollData.rolled.isSuccess ? 1 : 0),
|
||||
'system.nb_jet_echec': tache.system.nb_jet_echec + (rollData.rolled.isSuccess ? 0 : 1),
|
||||
'system.difficulte': tache.system.difficulte - (rollData.rolled.isETotal ? 1 : 0),
|
||||
}, { render: true })
|
||||
|
||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||
await actor.santeIncDec("fatigue", tache.system.fatigue)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user