Added props in actor object : isCharacter, isAdversary, isMinion, isArmy, canDoInitiativeRoll

Minion ignore now the DP in init roll
This commit is contained in:
Vlyan
2022-07-31 18:41:50 +02:00
parent 798b0fdf03
commit 40147ae8d3
9 changed files with 83 additions and 28 deletions

View File

@@ -125,9 +125,7 @@ export class GmMonitor extends FormApplication {
...(await super.getData(options)),
data: {
...this.object,
actors: this.object.actors.filter((e) =>
this.object.view === "armies" ? e.type === "army" : e.type !== "army"
),
actors: this.object.actors.filter((a) => (this.object.view === "armies" ? a.isArmy : !a.isArmy)),
},
};
}
@@ -178,7 +176,7 @@ export class GmMonitor extends FormApplication {
case "weapons":
return this._getTooltipWeapons(actor);
case "global":
return actor.type === "army" ? this._getTooltipArmiesGlobal(actor) : this._getTooltipGlobal(actor);
return actor.isArmy ? this._getTooltipArmiesGlobal(actor) : this._getTooltipGlobal(actor);
}
});
}