28 lines
930 B
C#
28 lines
930 B
C#
namespace NeonSprawl.Server.Game.Npc;
|
|
|
|
/// <summary>Prototype NPC behavior states (NEO-93). Wire names are stable for NEO-94 JSON.</summary>
|
|
public enum NpcBehaviorState
|
|
{
|
|
Idle,
|
|
Aggro,
|
|
TelegraphWindup,
|
|
AttackExecute,
|
|
Recover,
|
|
}
|
|
|
|
/// <summary>Stable snake_case wire names for <see cref="NpcBehaviorState"/>.</summary>
|
|
public static class NpcBehaviorStateWire
|
|
{
|
|
/// <summary>Returns the JSON wire name for <paramref name="state"/>.</summary>
|
|
public static string ToWireName(NpcBehaviorState state) =>
|
|
state switch
|
|
{
|
|
NpcBehaviorState.Idle => "idle",
|
|
NpcBehaviorState.Aggro => "aggro",
|
|
NpcBehaviorState.TelegraphWindup => "telegraph_windup",
|
|
NpcBehaviorState.AttackExecute => "attack_execute",
|
|
NpcBehaviorState.Recover => "recover",
|
|
_ => throw new ArgumentOutOfRangeException(nameof(state), state, null),
|
|
};
|
|
}
|