Automated exhausted condition

This commit is contained in:
Putty
2025-09-05 08:34:20 +00:00
committed by GitLab
parent 1357ec9b6d
commit 86f73a96d0
3 changed files with 21 additions and 1 deletions

View File

@@ -205,6 +205,7 @@ export class GmToolbox extends HandlebarsApplicationMixin(ApplicationV2) {
}
},
});
await actor.removeConditions(new Set(["exhausted"]));
}
GmToolbox.#uiNotification(allActors, "sleep");
@@ -216,7 +217,8 @@ export class GmToolbox extends HandlebarsApplicationMixin(ApplicationV2) {
static async #onSceneEnd(event) {
const allActors = event.button !== 0;
for await (const actor of game.actors.contents) {
if (!GmToolbox.#updatableCharacter(allActors, actor)) {
if (!GmToolbox.#updatableCharacter(allActors, actor)
|| actor.statuses.has("exhausted")) {
continue;
}