Roll : Added target info in Roll

This commit is contained in:
Vlyan
2022-02-17 15:24:50 +01:00
parent 448fadeca7
commit efe1e088ed
18 changed files with 148 additions and 68 deletions

View File

@@ -235,7 +235,7 @@ export class RollnKeepDialog extends FormApplication {
return {
...super.getData(options),
isGM: game.user.isGM,
showStrifeBt: rollData.summary.strife > 0 && rollData.actor,
showStrifeBt: rollData.summary.strife > 0 && rollData.actor?.isCharacter,
cssClass: this.options.classes.join(" "),
data: this.object,
l5r5e: rollData,
@@ -706,7 +706,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) {
if (actorMod !== 0 && this.roll.l5r5e.actor?.isCharacter) {
await this.roll.l5r5e.actor.update({
data: {
strife: {