using System.Collections.Generic; namespace RynthCore.CreatureSeed; /// /// Monster damage-type seed derived from UtilityBelt's mob_damage_insights.ldb. /// Written by the Monster Editor ("Import UB damage insights"); read (never written) /// by the RynthAi plugin as a fallback for the "Auto" damage type when a monster /// has no appraised resists yet. /// File: <SuiteDir>\RynthAi\CreatureData\ub-mob-seed.json. /// Compiled into both projects so the schema cannot drift; plain properties with /// defaults keep it source-generator (NativeAOT) friendly. /// public sealed class UbMobSeedFile { /// Current schema version written by the importer. public const int CurrentVersion = 1; /// File name inside RynthAi\CreatureData. public const string FileName = "ub-mob-seed.json"; /// Schema version of this file; readers ignore files with a newer major version. public int Version { get; set; } = CurrentVersion; /// UTC time the importer produced the file (ISO-8601). public string GeneratedUtc { get; set; } = string.Empty; /// Most common UB world name across the imported rows (e.g. "InfiniteLeaftide"). public string World { get; set; } = string.Empty; /// Hits a damage type needs before it is ranked at all. public int MinHitsPerType { get; set; } /// Source databases that contributed rows (full paths, for traceability). public List Sources { get; set; } = new(); /// One entry per monster with at least two comparable damage types. public List Entries { get; set; } = new(); } /// Seeded damage-type ranking for one monster. public sealed class UbMobSeedEntry { /// Weenie class id; 0 for name-only rows imported from Mag-Tools. public uint Wcid { get; set; } /// Last display name UB saw for this monster. public string Name { get; set; } = string.Empty; /// "ub" (live UB wcid rows) or "magtools" (name-keyed Mag-Tools XML imports). public string Source { get; set; } = string.Empty; /// All hits UB recorded against this monster (every type, including unranked ones). public long TotalHits { get; set; } /// Ranked damage types, best first. Only types meeting the hit threshold are listed. public List Elements { get; set; } = new(); } /// Observed outgoing-damage statistics for one damage type against one monster. public sealed class UbMobSeedElement { /// RynthAi element name: Slash, Pierce, Bludgeon, Fire, Cold, Lightning, Acid or Nether. public string Element { get; set; } = string.Empty; /// Hits recorded with this damage type. public int Hits { get; set; } /// Average damage per hit with this damage type. public double AvgDamage { get; set; } /// Largest single hit (0 for Mag-Tools rows, which do not record it). public long MaxHit { get; set; } /// Relative effectiveness 0..1 (1 = best type for this monster); used for the ranking. public double Score { get; set; } }