From 5a1e11d0d7979f5ccd35fec31fa01aefda1e84e1 Mon Sep 17 00:00:00 2001 From: Byroks Date: Sat, 27 Apr 2024 18:45:20 +0200 Subject: [PATCH] Sneak update, AP Cost not working correctly --- source/module/items/M5Item.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/module/items/M5Item.ts b/source/module/items/M5Item.ts index 24b7c3f..786d868 100644 --- a/source/module/items/M5Item.ts +++ b/source/module/items/M5Item.ts @@ -343,7 +343,13 @@ export class M5Item extends Item { if (item.type === "spell" || item.type === "kampfkunst") { if (this.actor["system"].ap.value >= item.system.ap) { - this.actor["system"].ap.value -= item.system.ap; + this.actor["update"]({ + data: { + ap: { + value: this.actor["system"].ap.value - item.system.ap, + }, + }, + }); } }