Skip to content

Narc shares guess access with Crewmates instead of Impostors #1572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: dev_2.3.0
Choose a base branch
from

Conversation

impostor4291
Copy link
Contributor

No description provided.

@MargaretTheFool MargaretTheFool added the Some change Added when small changes are made label May 13, 2025
@@ -119,17 +119,17 @@ public static bool GuesserMsg(PlayerControl pc, string msg, bool isUI = false)
pc.ShowInfoMessage(isUI, GetString("GuessDead"));
return true;
}
if (!pc.Is(CustomRoles.NiceGuesser))
if (!pc.Is(CustomRoles.NiceGuesser) && !(pc.Is(CustomRoles.EvilGuesser) && pc.Is(CustomRoles.Narc)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if someone is evil guessser and not narc (which would also make them not be nice guesser), this would trigger because
!(F) && !(T && F)
T && !(F)
T && T
T

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

umm

@@ -243,7 +243,7 @@ public static bool GuesserMsg(PlayerControl pc, string msg, bool isUI = false)

if (!role.IsEnable() && !role.RoleExist(true) && Options.CanOnlyGuessEnabled.GetBool())
{
pc.ShowInfoMessage(isUI, string.Format(GetString("GuessRoleNotEnabled"), role.ToString()));
pc.ShowInfoMessage(isUI, string.Format(GetString("GuessRoleNotEnabled"), GetString(role.ToString())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

{
if (pc.GetCustomRole().IsCrewmate() && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge))
if ((pc.Is(Custom_Team.Crewmate) || pc.Is(CustomRoles.Narc)) && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this wont be triggered by non-narc evil guesser
nvm narc councillor will trigger this

@NikoCat233 NikoCat233 requested a review from Copilot May 25, 2025 15:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for the Narc role sharing Crewmate guessing permissions instead of Impostors.

  • Introduces a new NarcEGCanGuessCrew option and updates UI hiding logic in EvilGuesser.
  • Extends GuessManager checks to include Narc in Crewmate/Impostor guess permission branches.
  • Adds a localization entry for the new option.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Roles/Impostor/EvilGuesser.cs Adds NarcEGCanGuessCrew option and updates tab/UI logic for Narc.
Resources/Lang/en_US.json Adds localization string for NarcEGCanGuessCrew.
Modules/GuessManager.cs Updates guess permission checks and meeting UI button logic to handle Narc.
Comments suppressed due to low confidence (1)

Modules/GuessManager.cs:652

  • This condition is unreachable because a player cannot simultaneously have the EvilGuesser and Narc roles. You’ll need to adjust the logic to target the intended role combination.
else if ((PlayerControl.LocalPlayer.GetCustomRole() is CustomRoles.EvilGuesser && PlayerControl.LocalPlayer.Is(CustomRoles.Narc)) && !Options.CrewmatesCanGuess.GetBool())

@@ -1577,6 +1577,7 @@
"NarcHasCrewVision": "Narc Has <color=#8cffff>Crewmate</color> Vision",
"MadmateCanBeNarc": "<color=#ff1919>Madmate</color> Roles Can Be Narc",
"ImpsCanKillEachOther": "<color=#ff1919>Impostors</color> Can Kill Each Other",
"NarcEGCanGuessCrew": "<color=#1e90ff>Narc</color> Evil Guesser Can Guess <color=#8cffff>Crewmate</color> Roles</color>",
Copy link
Preview

Copilot AI May 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra closing tag at the end of this string. Remove the unmatched .

Suggested change
"NarcEGCanGuessCrew": "<color=#1e90ff>Narc</color> Evil Guesser Can Guess <color=#8cffff>Crewmate</color> Roles</color>",
"NarcEGCanGuessCrew": "<color=#1e90ff>Narc</color> Evil Guesser Can Guess <color=#8cffff>Crewmate</color> Roles",

Copilot uses AI. Check for mistakes.

{
if (pc.GetCustomRole().IsCrewmate() && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge))
if ((pc.Is(Custom_Team.Crewmate) || pc.Is(CustomRoles.Narc)) && !Options.CrewmatesCanGuess.GetBool())
{ // Don't ask me why this also checks Evil Guesser and Councillor. They can be Narc
Copy link
Preview

Copilot AI May 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This informal comment is unclear and doesn’t explain the rationale. Consider removing it or replacing it with a concise explanation of why those roles need to be included.

Suggested change
{ // Don't ask me why this also checks Evil Guesser and Councillor. They can be Narc
{ // The roles "Evil Guesser" and "Councillor" are checked here because they can also be associated with the "Narc" role in certain game scenarios.

Copilot uses AI. Check for mistakes.

Copy link
Collaborator

@NikoCat233 NikoCat233 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a option to choose to share guesses with imp or crews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Some change Added when small changes are made
Projects
Development

Successfully merging this pull request may close these issues.

3 participants