Add combatant side assignment for encounter difficulty
CI / check (push) Successful in 2m18s
CI / build-image (push) Successful in 17s

Combatants can now be assigned to party or enemy side via a toggle
in the difficulty breakdown panel. Party-side NPCs subtract their XP
from the encounter total, letting allied NPCs reduce difficulty.
PCs default to party, non-PCs to enemy — users who don't use sides
see no change. Side persists across reload and export/import.

Closes #22

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-04-03 14:15:12 +02:00
co-authored by Claude Opus 4.6
parent 30e7ed4121
commit 94e1806112
23 changed files with 1359 additions and 455 deletions
+3
View File
@@ -49,6 +49,7 @@ export {
editPlayerCharacter,
} from "./edit-player-character.js";
export {
type CombatantDescriptor,
calculateEncounterDifficulty,
crToXp,
type DifficultyResult,
@@ -75,6 +76,7 @@ export type {
PlayerCharacterUpdated,
RoundAdvanced,
RoundRetreated,
SideSet,
TempHpSet,
TurnAdvanced,
TurnRetreated,
@@ -115,6 +117,7 @@ export {
type SetInitiativeSuccess,
setInitiative,
} from "./set-initiative.js";
export { type SetSideSuccess, setSide } from "./set-side.js";
export { type SetTempHpSuccess, setTempHp } from "./set-temp-hp.js";
export {
type ToggleConcentrationSuccess,