Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Blank Killer who activates Time Master
Browse files Browse the repository at this point in the history
  • Loading branch information
ismywb committed Oct 10, 2022
1 parent 0e24a83 commit 3bfc30e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
8 changes: 7 additions & 1 deletion TheOtherRoles/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Patches/RoleAssignmentPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ private static void assignModifiersToPlayers(List<RoleId> modifiers, List<Player

if (modifiers.Contains(RoleId.NiceGuesser)) {
List<PlayerControl> crewPlayer = new List<PlayerControl>(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);
Expand Down
4 changes: 2 additions & 2 deletions TheOtherRoles/RoleInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);



Expand Down
9 changes: 1 addition & 8 deletions TheOtherRoles/TheOtherRoles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3bfc30e

Please sign in to comment.