From fb676896ae613e4d2db99f0b0286a36a317655c4 Mon Sep 17 00:00:00 2001 From: Eligarf Date: Wed, 14 Aug 2024 19:30:49 -0700 Subject: [PATCH] Add the missing 'token.' on use of actor in bank value functions --- ChangeLog.md | 3 +++ scripts/engine.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index b81625e..34000eb 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,6 @@ +# v4.6.2 +* Fix the fix in 4.6.1 + # v4.6.1 * Update pt-BR.json (thanks Kharmans) * Handle the case where banking is changed from actor to token while a stealth effect is still active on tokens. In this case, the effect will continue to hold the banked values until it is removed. diff --git a/scripts/engine.js b/scripts/engine.js index 672b6e6..1d8c3ed 100644 --- a/scripts/engine.js +++ b/scripts/engine.js @@ -523,7 +523,7 @@ export default class Engine { async bankStealth(token, value) { while (!stealthy.stealthToActor) { - if (this.findStealthEffect(actor)) break; + if (this.findStealthEffect(token.actor)) break; await this.bankRollOnToken(token, 'stealth', value); return; } @@ -532,7 +532,7 @@ export default class Engine { async bankPerception(token, value) { while (!stealthy.perceptionToActor) { - if (this.findPerceptionEffect(actor)) break; + if (this.findPerceptionEffect(token.actor)) break; await this.bankRollOnToken(token, 'perception', value); return; }