Evader unguessable

This commit is contained in:
Gurge44 committed 2026-08-25 18:46:06 +02:00
1 parent 8ce5b45d04
commit f41617e1e1
4 files changed
+10 -12

No files matched your search

+1
View File
@@ -319,6 +319,7 @@ public static class GuessManager
case CustomRoles.Ankylosaurus:
ShowMessage("GuessAnkylosaurus");
return true;
case CustomRoles.Evader:
case CustomRoles.Tree:
case CustomRoles.Car:
case CustomRoles.DonutDelivery when DonutDelivery.IsUnguessable(pc, target):
+1 -1
View File
@@ -4172,7 +4172,7 @@ public static class Utils
{
LateTask.New(() =>
{
if (GameStates.IsEnded) return;
if (GameStates.IsEnded || !pc || !pc.IsAlive() || Main.Invisible.Contains(pc.PlayerId)) return;
string petId = PetsHelper.GetPetId();
PetsHelper.SetPet(pc, petId);
pc.Data.DefaultOutfit.PetSequenceId += 10;
+8
View File
@@ -1373,6 +1373,14 @@ internal static class MeetingHudOnDestroyPatch
{
GameEndChecker.ShouldNotCheck = true;
LateTask.New(() => GameEndChecker.ShouldNotCheck = false, 15f, "Re-enable GameEndChecker after meeting");
try
{
foreach (PlayerControl pc in Main.CachedAlivePlayerControls())
if (pc.Is(CustomRoles.Evader))
pc.RpcMakeInvisible();
}
catch (Exception e) { Utils.ThrowException(e); }
bool meetingSS = Options.UseMeetingShapeshift.GetBool();
bool meetingSSForGuessing = Options.UseMeetingShapeshiftForGuessing.GetBool();
@@ -6,8 +6,6 @@ public class Evader : RoleBase
public override bool IsEnable => On;
private byte EvaderId;
public override void SetupCustomOption()
{
StartSetup(659800);
@@ -21,14 +19,5 @@ public class Evader : RoleBase
public override void Add(byte playerId)
{
On = true;
EvaderId = playerId;
}
public override void AfterMeetingTasks()
{
if (!Utils.IsAnySabotageActive()) return;
PlayerControl pc = EvaderId.GetPlayer();
if (!pc || !pc.IsAlive()) return;
pc.RpcMakeInvisible();
}
}