82 lines
3.5 KiB
C#
82 lines
3.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace IdleSpectator;
|
|
|
|
/// <summary>Authored interest overlay for every live plots_library asset.</summary>
|
|
public static class PlotInterestCatalog
|
|
{
|
|
private static readonly Dictionary<string, DiscreteEventEntry> Entries =
|
|
new Dictionary<string, DiscreteEventEntry>(StringComparer.OrdinalIgnoreCase);
|
|
|
|
static PlotInterestCatalog()
|
|
{
|
|
Add("rebellion", 92f, "Politics", "{a} is plotting a rebellion");
|
|
Add("new_war", 94f, "Politics", "{a} is plotting a war");
|
|
Add("alliance_create", 80f, "Politics", "{a} is plotting an alliance");
|
|
Add("alliance_join", 72f, "Politics", "{a} is joining an alliance");
|
|
Add("alliance_destroy", 86f, "Politics", "{a} is breaking an alliance");
|
|
Add("attacker_stop_war", 78f, "Politics", "{a} is ending a war");
|
|
Add("new_book", 55f, "Culture", "{a} is writing a book");
|
|
Add("new_language", 62f, "Culture", "{a} is forging a language");
|
|
Add("new_religion", 70f, "Culture", "{a} is founding a religion");
|
|
Add("new_culture", 68f, "Culture", "{a} is founding a culture");
|
|
Add("clan_ascension", 82f, "Politics", "{a} is ascending a clan");
|
|
Add("culture_divide", 75f, "Culture", "{a} splits a culture");
|
|
Add("religion_schism", 84f, "Culture", "{a} causes a religion schism");
|
|
Add("language_divergence", 60f, "Culture", "{a} splits a language");
|
|
Add("summon_meteor_rain", 96f, "Spectacle", "{a} summons a meteor rain");
|
|
Add("summon_earthquake", 95f, "Spectacle", "{a} summons an earthquake");
|
|
Add("summon_thunderstorm", 93f, "Spectacle", "{a} summons a thunderstorm");
|
|
Add("summon_stormfront", 93f, "Spectacle", "{a} summons a stormfront");
|
|
Add("summon_hellstorm", 97f, "Spectacle", "{a} summons a hellstorm");
|
|
Add("summon_demons", 96f, "Spectacle", "{a} summons demons");
|
|
Add("summon_angles", 96f, "Spectacle", "{a} summons angels");
|
|
Add("summon_skeletons", 92f, "Spectacle", "{a} summons skeletons");
|
|
Add("summon_living_plants", 90f, "Spectacle", "{a} summons living plants");
|
|
Add("big_cast_coffee", 58f, "Spectacle", "{a} performs a coffee ritual");
|
|
Add("big_cast_bubble_shield", 64f, "Spectacle", "{a} casts a bubble shield");
|
|
Add("big_cast_madness", 80f, "Spectacle", "{a} casts madness");
|
|
Add("big_cast_slowness", 70f, "Spectacle", "{a} casts slowness");
|
|
Add("cause_rebellion", 90f, "Politics", "{a} causes a rebellion");
|
|
}
|
|
|
|
private static void Add(
|
|
string id,
|
|
float strength,
|
|
string category,
|
|
string label)
|
|
{
|
|
Entries[id] = new DiscreteEventEntry
|
|
{
|
|
Id = id,
|
|
EventStrength = strength,
|
|
Category = category,
|
|
CreatesInterest = true,
|
|
LabelTemplate = label
|
|
};
|
|
}
|
|
|
|
public static IEnumerable<string> AuthoredIds => Entries.Keys;
|
|
|
|
public static bool HasAuthored(string id) =>
|
|
!string.IsNullOrEmpty(id) && Entries.ContainsKey(id.Trim());
|
|
|
|
public static DiscreteEventEntry GetOrFallback(string id)
|
|
{
|
|
if (!string.IsNullOrEmpty(id) && Entries.TryGetValue(id.Trim(), out DiscreteEventEntry entry))
|
|
{
|
|
return entry;
|
|
}
|
|
|
|
string key = string.IsNullOrEmpty(id) ? "unknown" : id.Trim();
|
|
return new DiscreteEventEntry
|
|
{
|
|
Id = key,
|
|
EventStrength = 55f,
|
|
Category = "Plot",
|
|
LabelTemplate = "{a} · {id}",
|
|
IsFallback = true
|
|
};
|
|
}
|
|
}
|