private static Action Guess(Assassin role, PlayerVoteArea voteArea) { void Listener() { if ( MeetingHud.Instance.state == MeetingHud.VoteStates.Discussion || IsExempt(voteArea) ) { return; } var targetId = voteArea.TargetPlayerId; var currentGuess = role.Guesses[targetId]; if (currentGuess == "None") { return; } var playerRole = Role.GetRole(voteArea); var toDie = playerRole.Name == currentGuess ? playerRole.Player : role.Player; AssassinKill.RpcMurderPlayer(toDie); role.RemainingKills--; ShowHideButtons.HideSingle(role, targetId, toDie == role.Player); if (toDie.isLover() && CustomGameOptions.BothLoversDie) { var lover = ((Lover)playerRole).OtherLover.Player; ShowHideButtons.HideSingle(role, lover.PlayerId, false); } } return(Listener); }
public static void Postfix(MeetingHud __instance) { if (PlayerControl.LocalPlayer.Is(RoleEnum.Assassin)) { var assassin = Role.GetRole <Assassin>(PlayerControl.LocalPlayer); ShowHideButtons.HideButtons(assassin); } }
public static void MaybeHideButtons() { Assassin assassin = Assassin.AssassinState; if (!assassin.CanKeepGuessing()) { ShowHideButtons.HideButtons(assassin); } }