using NeonSprawl.Server.Game.Npc; namespace NeonSprawl.Server.Game.Combat; /// Dev-only route to reset prototype combat dummy HP for Bruno and manual QA (NEO-83). public static class CombatTargetFixtureApi { public static WebApplication MapCombatTargetFixtureApi(this WebApplication app) { app.MapPost( "/game/__dev/combat-targets-fixture", (CombatTargetFixtureRequest? body, ICombatEntityHealthStore healthStore) => { if (body is null || body.SchemaVersion != CombatTargetFixtureRequest.CurrentSchemaVersion) { return Results.BadRequest(); } foreach (var id in PrototypeNpcRegistry.GetInstanceIdsInOrder()) { if (!healthStore.TryResetToFull(id, out _)) { return Results.NotFound(); } } return Results.Json( new CombatTargetFixtureResponse { Applied = true, }); }); return app; } }