using System.Text.Json.Serialization; namespace Theriapolis.Core.Data; /// /// Loot table — list of weighted drop entries rolled when an NPC with /// matching id falls in combat. /// Each drop entry rolls independently against its ; /// successful drops contribute (qty_min..qty_max) of the item. /// /// Phase 5 M6 keeps this stingy by design — most level-1 fights net 1-3 /// items at most, never enough to obsolete the starting kit. /// public sealed record LootTableDef { [JsonPropertyName("id")] public string Id { get; init; } = ""; [JsonPropertyName("drops")] public LootDrop[] Drops { get; init; } = System.Array.Empty(); } public sealed record LootDrop { [JsonPropertyName("item_id")] public string ItemId { get; init; } = ""; [JsonPropertyName("qty_min")] public int QtyMin { get; init; } = 1; [JsonPropertyName("qty_max")] public int QtyMax { get; init; } = 1; /// 0..1 probability this drop fires. Independent of other drops in the table. [JsonPropertyName("chance")] public float Chance { get; init; } = 1.0f; }