namespace Scry.Core.Models;

/// <summary>
/// Represents an abstract game card - the rules object shared across all printings.
/// Maps to Scryfall's oracle_id concept.
/// </summary>
public record Oracle
{
    /// <summary>
    /// Scryfall's oracle_id - unique identifier for this game card across all printings.
    /// </summary>
    public required string Id { get; init; }
    
    /// <summary>
    /// The card name (e.g., "Lightning Bolt").
    /// </summary>
    public required string Name { get; init; }
    
    /// <summary>
    /// Mana cost in Scryfall notation (e.g., "{2}{U}{U}").
    /// </summary>
    public string? ManaCost { get; init; }
    
    /// <summary>
    /// Mana value (converted mana cost).
    /// </summary>
    public double? Cmc { get; init; }
    
    /// <summary>
    /// Full type line (e.g., "Legendary Creature — Human Wizard").
    /// </summary>
    public string? TypeLine { get; init; }
    
    /// <summary>
    /// Official Oracle rules text.
    /// </summary>
    public string? OracleText { get; init; }
    
    /// <summary>
    /// Card colors as JSON array (e.g., ["U", "R"]).
    /// </summary>
    public string? Colors { get; init; }
    
    /// <summary>
    /// Color identity for Commander as JSON array.
    /// </summary>
    public string? ColorIdentity { get; init; }
    
    /// <summary>
    /// Keywords as JSON array (e.g., ["Flying", "Trample"]).
    /// </summary>
    public string? Keywords { get; init; }
    
    /// <summary>
    /// Whether this card is on the Reserved List.
    /// </summary>
    public bool Reserved { get; init; }
    
    /// <summary>
    /// Format legalities as JSON object.
    /// </summary>
    public string? Legalities { get; init; }
    
    /// <summary>
    /// Power for creatures (may contain non-numeric values like "*").
    /// </summary>
    public string? Power { get; init; }
    
    /// <summary>
    /// Toughness for creatures (may contain non-numeric values like "*").
    /// </summary>
    public string? Toughness { get; init; }
}
