using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Cthangover.Core.Factories;
namespace Cthangover.Core.Characters
{
///
/// JSON-serializable descriptor for an ActionCharacter. The Values list is a
/// flat string array carrying the PropertyData pairs — serialized as a list
/// rather than a dictionary to maintain JSON readability and avoid key
/// escaping issues. Type uses a string enum converter so the JSON reads
/// "ToSelf"/"ToAlias"/"ToEnemy" instead of integers. The Image field is a
/// resource path string, resolved to Texture2D by the factory at load time.
///
[Serializable]
[EntityKind("action")]
public class ActionCharacterInfo : IIdentifiable
{
///
/// Unique action identifier, serialized as "Id" in JSON.
///
[JsonPropertyName("Id")]
public string ID { get; set; }
///
/// Display name for the battle action menu.
///
public string Name { get; set; }
///
/// Description text for the battle action tooltip.
///
public string Description { get; set; }
///
/// Targeting category, serialized as string (e.g. "ToSelf",
/// "ToAlias", "ToEnemy") via
/// for human-readable JSON.
///
[JsonConverter(typeof(JsonStringEnumConverter))]
public ActionCharacterType Type { get; set; }
///
/// Resource path string for the action icon. Resolved to
/// Texture2D by at load
/// time.
///
public string Image { get; set; }
///
/// Flat list of alternating key-value pairs that populate the
/// bag at load time.
/// Index 0 = first key, index 1 = first value, index 2 = second
/// key, etc. Stored as a list rather than a dictionary to
/// simplify JSON authoring and avoid key-escaping issues.
///
public List Values { get; set; }
}
}