Files
EndlessHostRoles/Roles/Standard/Impostor/Vanilla/PhantomEHR.cs
T
2026-05-18 13:14:55 +02:00

37 lines
872 B
C#

namespace EHR.Roles;
public class PhantomEHR : RoleBase
{
public static bool On;
public override bool IsEnable => On;
public override void SetupCustomOption() { }
public override void Init()
{
On = false;
}
public override void Add(byte playerId)
{
On = true;
}
public override bool OnVanish(PlayerControl pc)
{
pc.RpcMakeInvisible(phantom: true);
LateTask.New(() =>
{
if (ReportDeadBodyPatch.MeetingStarted || GameStates.IsMeeting) return;
pc.RpcMakeVisible(phantom: true);
pc.RpcResetAbilityCooldown();
}, ImpostorVanillaRoles.PhantomDuration.GetFloat(), "PhantomEHR Appear");
return false;
}
public override bool CanUseKillButton(PlayerControl pc)
{
return !Main.Invisible.Contains(pc.PlayerId);
}
}