From 3bfc30e05a9abddf495e59669d7542f7f9179581 Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 10 Oct 2022 18:35:35 -0500 Subject: [PATCH] Blank Killer who activates Time Master --- TheOtherRoles/Helpers.cs | 8 +++++++- TheOtherRoles/Patches/RoleAssignmentPatch.cs | 2 +- TheOtherRoles/RoleInfo.cs | 4 ++-- TheOtherRoles/TheOtherRoles.cs | 9 +-------- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/TheOtherRoles/Helpers.cs b/TheOtherRoles/Helpers.cs index 4a67b6e36..4b7a5f275 100644 --- a/TheOtherRoles/Helpers.cs +++ b/TheOtherRoles/Helpers.cs @@ -761,7 +761,13 @@ public static MurderAttemptResult checkMuderAttempt(PlayerControl killer, Player AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.timeMasterRewindTime(); } - return MurderAttemptResult.SuppressKill; + MessageWriter write = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetBlanked, Hazel.SendOption.Reliable, -1); + write.Write(killer.PlayerId); + write.Write((byte)0); + AmongUsClient.Instance.FinishRpcImmediately(write); + RPCProcedure.setBlanked(killer.PlayerId, 0); + + return MurderAttemptResult.BlankKill; } else if (Cursed.cursed != null && Cursed.cursed == target && killer.Data.Role.IsImpostor) { diff --git a/TheOtherRoles/Patches/RoleAssignmentPatch.cs b/TheOtherRoles/Patches/RoleAssignmentPatch.cs index 93de7d356..8bb8470e7 100644 --- a/TheOtherRoles/Patches/RoleAssignmentPatch.cs +++ b/TheOtherRoles/Patches/RoleAssignmentPatch.cs @@ -548,7 +548,7 @@ private static void assignModifiersToPlayers(List modifiers, List crewPlayer = new List(playerList); - crewPlayer.RemoveAll(x => x.Data.Role.IsImpostor || RoleInfo.getRoleInfoForPlayer(x).Any(r => r.isNeutral)); + crewPlayer.RemoveAll(x => x.Data.Role.IsImpostor); playerId = setModifierToRandomPlayer((byte)RoleId.NiceGuesser, crewPlayer); playerList.RemoveAll(x => x.PlayerId == playerId); modifiers.RemoveAll(x => x == RoleId.NiceGuesser); diff --git a/TheOtherRoles/RoleInfo.cs b/TheOtherRoles/RoleInfo.cs index 8277a1cee..b8ef0ae6a 100644 --- a/TheOtherRoles/RoleInfo.cs +++ b/TheOtherRoles/RoleInfo.cs @@ -95,8 +95,8 @@ class RoleInfo { public static RoleInfo cursed = new RoleInfo("Fanatic", Color.yellow, "You are crewmate....for now", "Discover your true potential", RoleId.Cursed, false, true, true); public static RoleInfo invert = new RoleInfo("Invert", Color.yellow, "Your movement is inverted", "Your movement is inverted", RoleId.Invert, false, true); public static RoleInfo blind = new RoleInfo("Blind", Color.yellow, "You cannot see your report button!", "Was that a dead body?", RoleId.Blind, false, true); - public static RoleInfo goodGuesser = new RoleInfo("Nice Guesser", Color.yellow, "Guess and shoot", "Guess and shoot", RoleId.NiceGuesser, false, true); - public static RoleInfo badGuesser = new RoleInfo("Evil Guesser", Color.yellow, "Guess and shoot", "Guess and shoot", RoleId.EvilGuesser, false, true); + public static RoleInfo goodGuesser = new RoleInfo("Guesser", Color.yellow, "Guess and shoot", "Guess and shoot", RoleId.NiceGuesser, false, true); + public static RoleInfo badGuesser = new RoleInfo("Guesser", Color.yellow, "Guess and shoot", "Guess and shoot", RoleId.EvilGuesser, false, true); diff --git a/TheOtherRoles/TheOtherRoles.cs b/TheOtherRoles/TheOtherRoles.cs index 3cea278b6..a69fc52ed 100644 --- a/TheOtherRoles/TheOtherRoles.cs +++ b/TheOtherRoles/TheOtherRoles.cs @@ -1961,14 +1961,7 @@ public static class Cursed { public static PlayerControl cursed; public static Color crewColor = new Color32(0, 247, 255, byte.MaxValue); public static Color impColor = Palette.ImpostorRed; - public Color color { - get { - if (cursed == null || !cursed.Data.Role.IsImpostor) { - return crewColor; - else return impColor; - } - } - + public static Color color = crewColor; public static void clearAndReload() { cursed = null; }