ClubCosmetics.cs

Static cosmetics catalog for the football game. Holds the kit and ball designs with colors, prices, unlock divisions and pack tiers, plus lookup and drop-list helpers used by the dressing room and match.

using System;
using System.Collections.Generic;
using System.Linq;

namespace Socer;

// Original procedural palettes shared by the dressing room and live match.
public sealed record KitDesign(string Id,string Name,string Shirt,string Shorts,string Socks,string Trim,int Price,int UnlockDivision,int PackTier);
public sealed record BallDesign(string Id,string Name,string Base,string Panels,string Trim,int Price,int UnlockDivision,int PackTier);

public static class ClubCosmetics
{
    public static readonly KitDesign[] Kits={
        new("north","North Classic","#46c7ed","#193d60","#8fe5f2","#ffffff",0,1,0),
        new("ice","Polar Stripe","#e9f8f0","#235a69","#d3eee7","#54c4db",450,1,0),
        new("ember","Ember Away","#ef735b","#452d41","#f0b591","#ffe1a2",750,2,0),
        new("midnight","Midnight Eleven","#243250","#101a2c","#8f9cbb","#c4d9fb",1200,3,1),
        new("aurora","Aurora","#68d7bb","#2b4076","#a8e4eb","#f6d98b",1800,4,1),
        new("crown","Crown Edition","#d4b569","#26293e","#e8d7a0","#fff5cf",2600,5,2)
    };
    public static readonly BallDesign[] Balls={
        new("classic","Classic Match","#f4f4df","#233b43","#9accc5",0,1,0),
        new("coral","Coral Flight","#fff1dc","#d35b4b","#f0ab71",350,1,0),
        new("volt","Volt Match","#d9ee7d","#213b48","#ffffff",650,2,0),
        new("night","Night League","#28394f","#b9d8e8","#82a8d9",900,3,1),
        new("prism","Prism","#d4edf6","#6f6db8","#b1ecdf",1400,4,1),
        new("diamond","Diamond Final","#efffff","#65c8c9","#c7a5f4",2100,5,2)
    };
    public static KitDesign Kit(string id)=>Kits.FirstOrDefault(x=>x.Id==id)??Kits[0];
    public static BallDesign Ball(string id)=>Balls.FirstOrDefault(x=>x.Id==id)??Balls[0];
    public static IReadOnlyList<KitDesign> KitDrops(int tier,IEnumerable<string> owned)
    {
        var seen=new HashSet<string>(owned??Array.Empty<string>(),StringComparer.Ordinal);
        return Kits.Where(x=>x.Price>0 && x.PackTier<=tier && !seen.Contains(x.Id)).ToArray();
    }
    public static IReadOnlyList<BallDesign> BallDrops(int tier,IEnumerable<string> owned)
    {
        var seen=new HashSet<string>(owned??Array.Empty<string>(),StringComparer.Ordinal);
        return Balls.Where(x=>x.Price>0 && x.PackTier<=tier && !seen.Contains(x.Id)).ToArray();
    }
}