namespace IdleSpectator; /// Subject-led orange Labels for synthetic story aftermath / epilogue beats. public static class StoryReason { public const string AftermathSurvivor = "aftermath_survivor"; public const string AftermathMourner = "aftermath_mourner"; public const string AftermathWarLinger = "aftermath_war_linger"; public const string AftermathPlotFallout = "aftermath_plot_fallout"; public const string AftermathLoveLinger = "aftermath_love_linger"; public const string EpilogueRelated = "epilogue_related"; public const string EpilogueCrisis = "epilogue_crisis"; public static bool IsStoryAsset(string assetId) { if (string.IsNullOrEmpty(assetId)) { return false; } return assetId.StartsWith("aftermath_", System.StringComparison.OrdinalIgnoreCase) || assetId.StartsWith("epilogue_", System.StringComparison.OrdinalIgnoreCase); } public static bool IsCrisisEpilogue(string assetId) { return string.Equals(assetId, EpilogueCrisis, System.StringComparison.OrdinalIgnoreCase); } public static string AftermathLabel(string assetId, Actor follow, Actor related) { string name = EventFeedUtil.SafeName(follow); if (string.IsNullOrEmpty(name)) { name = "Someone"; } string other = EventFeedUtil.SafeName(related); string id = (assetId ?? "").Trim().ToLowerInvariant(); switch (id) { case AftermathMourner: return string.IsNullOrEmpty(other) ? name + " mourns the fallen" : name + " mourns " + other; case AftermathWarLinger: return name + " lingers on the war front"; case AftermathPlotFallout: return name + " faces the plot's fallout"; case AftermathLoveLinger: return string.IsNullOrEmpty(other) ? name + " stays with their love" : name + " stays beside " + other; case EpilogueRelated: return string.IsNullOrEmpty(other) ? name + " carries on after the story" : name + " seeks " + other + " after the story"; case EpilogueCrisis: return name + " surveys the aftermath of the crisis"; case AftermathSurvivor: default: // Only name a dead theater partner. Never claim "the fallen" while the partner lives // (soak: Norron vs Nerari attack gaps minted false survivor tips). if (related != null) { bool dead = false; try { dead = !related.isAlive(); } catch { dead = true; } if (dead && !string.IsNullOrEmpty(other)) { return name + " stands over " + other; } if (!dead) { return name + " catches their breath"; } } return name + " stands over the fallen"; } } }