From d5af9c90c42014acc8a35b0040e0ec2e5232854f Mon Sep 17 00:00:00 2001
From: Johannes Loher <johannes.loher@fg4f.de>
Date: Thu, 18 Feb 2021 13:42:59 +0100
Subject: [PATCH] Simplify active effect application slightly

---
 src/module/actor/actor.ts | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/module/actor/actor.ts b/src/module/actor/actor.ts
index 73dff11f..b82ae5ec 100644
--- a/src/module/actor/actor.ts
+++ b/src/module/actor/actor.ts
@@ -39,15 +39,13 @@ export class DS4Actor extends Actor<DS4ActorData, DS4Item> {
         this.overrides = {};
         this.applyActiveEffectsFiltered(
             (change) =>
-                !this.derivedDataProperties.includes(change.key) && !this.finalDerivedProperties.includes(change.key),
+                !this.derivedDataProperties.includes(change.key) &&
+                !this.finalDerivedDataProperties.includes(change.key),
         );
     }
 
     applyActiveEffectsToDerivedData(): void {
-        this.applyActiveEffectsFiltered(
-            (change) =>
-                this.derivedDataProperties.includes(change.key) && !this.finalDerivedProperties.includes(change.key),
-        );
+        this.applyActiveEffectsFiltered((change) => this.derivedDataProperties.includes(change.key));
     }
 
     /**
@@ -108,9 +106,7 @@ export class DS4Actor extends Actor<DS4ActorData, DS4Item> {
      * The list of properties that are derived from others, given in dot notation.
      */
     get derivedDataProperties(): Array<string> {
-        return Object.keys(DS4.i18n.combatValues)
-            .map((combatValue) => `data.combatValues.${combatValue}.total`)
-            .concat("data.combatValues.hitPoints.max");
+        return Object.keys(DS4.i18n.combatValues).map((combatValue) => `data.combatValues.${combatValue}.total`);
     }
 
     /**
@@ -124,7 +120,7 @@ export class DS4Actor extends Actor<DS4ActorData, DS4Item> {
      * The list of properties that are completely derived (i.e. {@link ActiveEffect}s cannot be applied to them),
      * given in dot notation.
      */
-    get finalDerivedProperties(): string[] {
+    get finalDerivedDataProperties(): string[] {
         return ["data.combatValues.hitPoints.max"];
     }