using System.Text.Json.Serialization;
namespace NeonSprawl.Server.Game.AbilityInput;
/// POST body for ability cast intent (NEO-31).
public sealed class AbilityCastRequest
{
public const int CurrentSchemaVersion = 1;
[JsonPropertyName("schemaVersion")]
public int SchemaVersion { get; init; }
[JsonPropertyName("slotIndex")]
public int SlotIndex { get; init; }
[JsonPropertyName("abilityId")]
public string? AbilityId { get; init; }
/// Optional; mirrors lockedTargetId from target state v1.
[JsonPropertyName("targetId")]
public string? TargetId { get; init; }
}
/// POST response for cast submit (prototype accept/deny only; NEO-31).
public sealed class AbilityCastResponse
{
public const int CurrentSchemaVersion = 1;
[JsonPropertyName("schemaVersion")]
public int SchemaVersion { get; init; } = CurrentSchemaVersion;
[JsonPropertyName("accepted")]
public bool Accepted { get; init; }
[JsonPropertyName("reasonCode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ReasonCode { get; init; }
}