33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace NeonSprawl.Server.Game.Combat;
|
|
|
|
/// <summary>JSON body for <c>GET /game/world/combat-targets</c> (NEO-83).</summary>
|
|
public sealed class CombatTargetsListResponse
|
|
{
|
|
public const int CurrentSchemaVersion = 1;
|
|
|
|
[JsonPropertyName("schemaVersion")]
|
|
public int SchemaVersion { get; init; } = CurrentSchemaVersion;
|
|
|
|
/// <summary>Prototype combat dummies ordered by stable <c>targetId</c> (ordinal).</summary>
|
|
[JsonPropertyName("targets")]
|
|
public required IReadOnlyList<CombatTargetJson> Targets { get; init; }
|
|
}
|
|
|
|
/// <summary>One row in the read-only combat target HP projection.</summary>
|
|
public sealed class CombatTargetJson
|
|
{
|
|
[JsonPropertyName("targetId")]
|
|
public required string TargetId { get; init; }
|
|
|
|
[JsonPropertyName("maxHp")]
|
|
public required int MaxHp { get; init; }
|
|
|
|
[JsonPropertyName("currentHp")]
|
|
public required int CurrentHp { get; init; }
|
|
|
|
[JsonPropertyName("defeated")]
|
|
public required bool Defeated { get; init; }
|
|
}
|