Practice battles work

This commit is contained in:
gamer147
2026-05-23 22:46:11 -04:00
parent 704542786a
commit 21b97269ff
15 changed files with 34968 additions and 82 deletions

View File

@@ -45,9 +45,9 @@ public class PracticeOpponent
[JsonPropertyName("battle3dfield_id")]
[Key("battle3dfield_id")] public string Battle3dFieldId { get; set; } = "1";
/// <summary>Optional. true => entry disabled, client prepends maintenance suffix.</summary>
/// <summary>true => entry disabled, client prepends maintenance suffix. Must always be emitted: client reads with `data["is_maintenance"] != null` but LitJson throws KeyNotFoundException on a missing key.</summary>
[JsonPropertyName("is_maintenance")]
[Key("is_maintenance")] public bool? IsMaintenance { get; set; }
[Key("is_maintenance")] public bool IsMaintenance { get; set; }
/// <summary>true => entry is a special "campaign" practice (event-tied).</summary>
[JsonPropertyName("is_campaign_practice")]

View File

@@ -7,10 +7,11 @@ namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.Practice;
public class PracticeStartResponse
{
/// <summary>
/// Optional mission/achievement evaluation snapshot. Spec: safe to omit entirely;
/// client tolerates absence (defensive `Keys.Contains` check). Always null in our
/// minimal impl 窶・we don't model missions.
/// Mission/achievement evaluation snapshot. Client reads it via
/// `data.Keys.Contains("mission_parameter")` so omitting the key is technically
/// safe — but prod always emits `mission_parameter: []` and matching prod exactly
/// avoids surprises if any other code path drops the defensive check.
/// </summary>
[JsonPropertyName("mission_parameter")]
[Key("mission_parameter")] public object? MissionParameter { get; set; }
[Key("mission_parameter")] public List<object> MissionParameter { get; set; } = new();
}