using Microsoft.EntityFrameworkCore; namespace SVSim.Database.Models.Config; /// /// Tunables for pack-opening RNG. Defaults reproduce the original Shadowverse Classic rates /// exactly so the cutover from hardcoded magic numbers is zero-behavior-change. /// [Owned] public class PackRateConfig { /// /// Per-card-slot probability of upgrading any drawn card to its foil/animated twin. /// Applied AFTER rarity selection — independent of rarity, slot position, and pack category. /// Default 0.08 (8%). Cards without a foil twin in master data keep the non-foil silently. /// public double AnimatedRate { get; set; } = 0.08; /// /// Global default rarity weights, used for any slot that has no entry in /// . Defaults match SV Classic main-slot. Weights sum to 0.9994; /// the 0.06% slack absorbs into Bronze via the PickRarity catch-all band. /// public SlotRarityWeights Default { get; set; } = new() { Bronze = 0.6744, Silver = 0.25, Gold = 0.06, Legendary = 0.015, }; /// /// Per-slot overrides (1-based slot index) applied to all packs. A missing slot falls back /// to . Each entry is a FULL OVERRIDE, not a delta — if you change /// , existing PerSlot entries do NOT auto-recompute. The slot-8 default /// expresses the SV Classic "Silver-or-better guarantee" as data (Bronze=0) instead of a /// separate code path. /// /// /// Per-slot overrides keyed by 1-based slot index (stored as a list for EF Core 8 json /// compatibility — Dictionary<string,T> of complex owned types is not supported). /// Look up by . A missing slot falls back to /// . Slot-8 entry expresses the SV Classic "Silver-or-better /// guarantee" as data (Bronze=0). /// public List PerSlot { get; set; } = [ new() { Slot = "8", Bronze = 0, Silver = 0.7692, Gold = 0.1846, Legendary = 0.0462 }, ]; }