Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Sheriff should be able to kill all neutral roles #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ However, if they kill a Crewmate or a Neutral player they can't kill, they inste
| Show Sheriff | Whether everybody can see who the Sheriff is | Toggle | False |
| Sheriff Miskill Kills Crewmate | Whether the other player is killed if the Sheriff Misfires | Toggle | False |
| Sheriff Kills Jester | Whether the Sheriff is able to kill the Jester | Toggle | False |
| Sheriff Kills Shifter | Whether the Sheriff is able to kill the Shifter | Toggle | False |
| Sheriff Kills The Glitch | Whether the Sheriff is able to kill The Glitch | Toggle | False |
| Sheriff Kills the Executioner | Whether the Sheriff is able to kill the Executioner | Toggle | False |
| Sheriff Kills Arsonist | Whether the Sheriff is able to kill the Arsonist | Toggle | False |
| Sheriff Kill Cooldown | The cooldown on the Sheriff's kill button | Time | 25s |
| Sheriff can report who they've killed | Whether the Sheriff is able to report their own kills | Toggle | True |
Expand Down
5 changes: 4 additions & 1 deletion source/Patches/CrewmateRoles/SheriffMod/Kill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ private static bool Prefix(KillButtonManager __instance)

var flag4 = role.ClosestPlayer.Data.IsImpostor ||
role.ClosestPlayer.Is(RoleEnum.Jester) && CustomGameOptions.SheriffKillsJester ||
role.ClosestPlayer.Is(RoleEnum.Shifter) && CustomGameOptions.SheriffKillsShifter ||
role.ClosestPlayer.Is(RoleEnum.Glitch) && CustomGameOptions.SheriffKillsGlitch ||
role.ClosestPlayer.Is(RoleEnum.Arsonist) && CustomGameOptions.SheriffKillsArsonist;
role.ClosestPlayer.Is(RoleEnum.Executioner) && CustomGameOptions.SheriffKillsExecutioner ||
role.ClosestPlayer.Is(RoleEnum.Arsonist) && CustomGameOptions.SheriffKillsArsonist
;
if (!flag4)
{
if (CustomGameOptions.SheriffKillOther)
Expand Down
2 changes: 2 additions & 0 deletions source/Patches/CustomGameOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public static class CustomGameOptions
public static bool ShowSheriff => Generate.ShowSheriff.Get();
public static bool SheriffKillOther => Generate.SheriffKillOther.Get();
public static bool SheriffKillsJester => Generate.SheriffKillsJester.Get();
public static bool SheriffKillsShifter => Generate.SheriffKillsShifter.Get();
public static bool SheriffKillsGlitch => Generate.SheriffKillsGlitch.Get();
public static bool SheriffKillsExecutioner => Generate.SheriffKillsExecutioner.Get();
public static bool SheriffKillsArsonist => Generate.SheriffKillsArsonist.Get();
public static float SheriffKillCd => Generate.SheriffKillCd.Get();
public static int MayorVoteBank => (int) Generate.MayorVoteBank.Get();
Expand Down
6 changes: 6 additions & 0 deletions source/Patches/CustomOption/Generate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public class Generate
public static CustomToggleOption ShowSheriff;
public static CustomToggleOption SheriffKillOther;
public static CustomToggleOption SheriffKillsJester;
public static CustomToggleOption SheriffKillsShifter;
public static CustomToggleOption SheriffKillsGlitch;
public static CustomToggleOption SheriffKillsExecutioner;
public static CustomToggleOption SheriffKillsArsonist;
public static CustomNumberOption SheriffKillCd;
public static CustomToggleOption SheriffBodyReport;
Expand Down Expand Up @@ -294,8 +296,12 @@ public static void GenerateAll()

SheriffKillsJester =
new CustomToggleOption(num++, "Sheriff Kills Jester", false);
SheriffKillsShifter =
new CustomToggleOption(num++, "Sheriff Kills Shifter", false);
SheriffKillsGlitch =
new CustomToggleOption(num++, "Sheriff Kills The Glitch", false);
SheriffKillsExecutioner =
new CustomToggleOption(num++, "Sheriff Kills Executioner", false);
SheriffKillsArsonist =
new CustomToggleOption(num++, "Sheriff Kills Arsonist", false);

Expand Down