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; } /// /// Must match the server's current combat lock (same string as GET …/target lockedTargetId) for /// accepted: true; NEO-28 adds invalid_target / out_of_range denies when it does not. /// [JsonPropertyName("targetId")] public string? TargetId { get; init; } } /// POST response for cast submit (prototype accept/deny; NEO-31 + NEO-28 target rules). 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; } }