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

@@ -250,7 +250,7 @@ export class RollnKeepDialog extends FormApplication {
...(await super.getData(options)),
isGM: game.user.isGM,
showChoices: options.editable && !rollData.rnkEnded,
showStrifeBt: options.editable && rollData.summary.strife > 0 && rollData.actor?.isCharacter,
showStrifeBt: options.editable && rollData.summary.strife > 0 && rollData.actor?.isCharacterType,
cssClass: this.options.classes.join(" "),
data: this.object,
l5r5e: rollData,
@@ -713,7 +713,7 @@ export class RollnKeepDialog extends FormApplication {
// Apply strife to actor
const strifeApplied = Math.min(this.roll.l5r5e.summary.strife, Math.max(0, formData.strifeApplied));
const actorMod = strifeApplied - this.roll.l5r5e.strifeApplied;
if (actorMod !== 0 && this.roll.l5r5e.actor?.isCharacter) {
if (actorMod !== 0 && this.roll.l5r5e.actor?.isCharacterType) {
await this.roll.l5r5e.actor.update({
system: {
strife: {