namespace NeonSprawl.Server.Game.Mastery; /// Persisted mastery branch picks and unlocked perks per player (NEO-47). public interface IPlayerPerkStateStore { PerkStateSnapshot GetSnapshot(string playerId); /// Whether can receive perk state writes (mirrors skill progression store bucket rules). bool CanWritePlayer(string playerId); /// Fails when pick already exists for (skillId, tierIndex) or player cannot be written. bool TrySetBranchPick(string playerId, string skillId, int tierIndex, string branchId); /// Adds perks not already unlocked; fails when player cannot be written. bool TryAddUnlockedPerks(string playerId, IEnumerable perkIds); /// Removes unlocked perks present in the store; fails when player cannot be written. bool TryRemoveUnlockedPerks(string playerId, IEnumerable perkIds); /// Removes a branch pick (engine rollback when perk unlock fails after pick). bool TryRemoveBranchPick(string playerId, string skillId, int tierIndex); /// Clears all branch picks and unlocked perks for the player (NEO-48 dev fixture API). bool TryResetPerkState(string playerId); /// Replaces branch picks and unlocked perks with (grant rollback). bool TryRestoreSnapshot(string playerId, PerkStateSnapshot snapshot); }