feat: Zapał regen block flag, tests, changelog for 2026-10-26 sync (partial)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E48f1kXhsEbAUxdkNP1yDM
This commit is contained in:
2026-10-29 22:55:34 +01:00
co-authored by Claude Sonnet 5.5
parent 23c1e94ab5
commit d9d94a465c
4 changed files with 61 additions and 1 deletions
+5
View File
@@ -123,7 +123,12 @@ export function registerCombatHooks(): void {
}
// Per-turn Zeal regen (characters) - base 1 + talent bonus from flag.
// Blocked when since the previous turn the actor paid for an extra Action or an extra Immediate Action
// (flag `paidExtra`, set by whoever spends the Zapał; prayers / own-cost Talents never set it).
if (actor.type === 'character') {
const blocked = Boolean(actor.getFlag?.(FLAG_SCOPE, 'paidExtra'));
if (actor.getFlag?.(FLAG_SCOPE, 'paidExtra')) await actor.unsetFlag?.(FLAG_SCOPE, 'paidExtra');
if (blocked) return;
const sys = actor.system as { attributes: { zeal: { value: number; max: number } } };
const regen = getZealRegen(actor);
const next = Math.min(sys.attributes.zeal.max, sys.attributes.zeal.value + regen);