Implement the 018-combatant-concentration feature that adds a per-combatant concentration toggle with Brain icon, purple border accent, and damage pulse animation in the encounter tracker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-03-06 14:34:28 +01:00
parent febe892e15
commit e59fd83292
19 changed files with 779 additions and 7 deletions

View File

@@ -72,6 +72,9 @@ export function loadEncounter(): Encounter | null {
? validConditions
: undefined;
// Validate isConcentrating field
const isConcentrating = entry.isConcentrating === true ? true : undefined;
// Validate and attach HP fields if valid
const maxHp = entry.maxHp;
const currentHp = entry.currentHp;
@@ -85,12 +88,13 @@ export function loadEncounter(): Encounter | null {
...base,
ac: validAc,
conditions,
isConcentrating,
maxHp,
currentHp: validCurrentHp ? currentHp : maxHp,
};
}
return { ...base, ac: validAc, conditions };
return { ...base, ac: validAc, conditions, isConcentrating };
});
const result = createEncounter(