neon-sprawl/server/NeonSprawl.Server/Game/Encounters/IEncounterProgressStore.cs

23 lines
1.1 KiB
C#

namespace NeonSprawl.Server.Game.Encounters;
/// <summary>Per-player encounter activation and defeat-target progress (NEO-104).</summary>
public interface IEncounterProgressStore
{
/// <summary>Returns <c>false</c> when no row exists for the player+encounter pair.</summary>
bool TryGetProgress(string playerId, string encounterId, out EncounterProgressSnapshot snapshot);
/// <summary>
/// Creates a started row with an empty defeated set.
/// Returns <c>true</c> on first activation; <c>false</c> when already started.
/// Does not consult <see cref="IEncounterCompletionStore"/> — callers that must block activation after completion
/// (e.g. <see cref="EncounterProgressOperations.TryActivateOnFirstEngagement"/>) must gate before calling this method.
/// </summary>
bool TryActivate(string playerId, string encounterId);
/// <summary>
/// Adds one defeated NPC id to an existing started row.
/// Returns <c>true</c> when newly added; <c>false</c> when duplicate, not started, or invalid ids.
/// </summary>
bool TryAddDefeatedTarget(string playerId, string encounterId, string npcInstanceId);
}