mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
namespace EHR.Roles;
|
|
|
|
public class Agent : RoleBase, IHideAndSeekRole
|
|
{
|
|
public static bool On;
|
|
|
|
public static OptionItem Vision;
|
|
public static OptionItem Speed;
|
|
|
|
public override bool IsEnable => On;
|
|
public Team Team => Team.Impostor;
|
|
public int Chance => CustomRoles.Agent.GetMode();
|
|
public int Count => CustomRoles.Agent.GetCount();
|
|
public float RoleSpeed => Speed.GetFloat();
|
|
public float RoleVision => Vision.GetFloat();
|
|
|
|
public override void SetupCustomOption()
|
|
{
|
|
new TextOptionItem(69_211_2000, "TypeImpostor", TabGroup.ImpostorRoles)
|
|
.SetHeader(true)
|
|
.SetGameMode(CustomGameMode.HideAndSeek);
|
|
|
|
Options.SetupRoleOptions(69_211_2001, TabGroup.ImpostorRoles, CustomRoles.Agent, CustomGameMode.HideAndSeek);
|
|
|
|
Vision = new FloatOptionItem(69_211_2003, "AgentVision", new(0.05f, 5f, 0.05f), 0.25f, TabGroup.ImpostorRoles)
|
|
.SetGameMode(CustomGameMode.HideAndSeek)
|
|
.SetValueFormat(OptionFormat.Multiplier)
|
|
.SetColor(new(255, 143, 143, byte.MaxValue))
|
|
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Agent]);
|
|
|
|
Speed = new FloatOptionItem(69_213_2004, "AgentSpeed", new(0.05f, 5f, 0.05f), 1.5f, TabGroup.ImpostorRoles)
|
|
.SetGameMode(CustomGameMode.HideAndSeek)
|
|
.SetValueFormat(OptionFormat.Multiplier)
|
|
.SetColor(new(255, 143, 143, byte.MaxValue))
|
|
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Agent]);
|
|
}
|
|
|
|
public override void Add(byte playerId)
|
|
{
|
|
On = true;
|
|
}
|
|
|
|
public override void Init()
|
|
{
|
|
On = false;
|
|
}
|
|
} |