worldbox-observer-mod/IdleSpectator/Story/CrisisChapter.cs
DazedAnon c23b2b9c1e feat(spectator): add crisis chapters and harden combat theater truth
- Open war/disaster/outbreak crisis overlays with epilogue_crisis closers
- Keep Duel pairs hot only on owned cast; park sleep/freeze; drop ambient scrap pins
- Require a fallen theater partner for survivor aftermath; let king_killed cut mid-fight
- Gate crisis, combat cold, king cut-in, and living-partner aftermath in harness
2026-07-21 22:05:38 -05:00

50 lines
1.3 KiB
C#

namespace IdleSpectator;
/// <summary>Parallel multi-minute chapter over war / disaster / outbreak (not a short StoryArc).</summary>
public enum CrisisKind
{
None = 0,
War = 1,
Disaster = 2,
Outbreak = 3
}
public enum CrisisPhase
{
Active = 0,
Epilogue = 1,
Done = 2
}
/// <summary>
/// Long bias overlay: ownership boost, ambient suppress, forced closer.
/// Lives beside short <see cref="StoryArc"/> so unrelated tips do not thrash chapter state.
/// </summary>
public sealed class CrisisChapter
{
public CrisisKind Kind = CrisisKind.None;
public CrisisPhase Phase = CrisisPhase.Done;
public string AnchorKey = "";
public string Id = "";
public float StartedAt;
public float LastSignalAt;
public float PhaseStartedAt;
public long FollowId;
public bool EpilogueInjected;
/// <summary>Unordered kingdom theater pair for war chapters (matches local Mass scraps).</summary>
public string TheaterKeyA = "";
public string TheaterKeyB = "";
public bool IsLive => Phase == CrisisPhase.Active || Phase == CrisisPhase.Epilogue;
public void Advance(CrisisPhase next, float now)
{
if (Phase == next)
{
return;
}
Phase = next;
PhaseStartedAt = now;
}
}