Closed Stivek16 closed 1 year ago
the only neutrals capable of winning from tasks are survivors and guardian angels with crew targets
I won with pestilence by tasks once
were you amnesiac turned plaguebearer by any chance?
No, but it dosent happen anymore idk why
then it's probably a rare unintentional bug, try repeating the events of the game to see what might be causing it in case it happens again
This isn't the only way for neutrals to win with crewmates. This bug has existed since the beginning of Town of Us (even before I took over). The same goes for GA/Surv sometimes not winning with Imps when they should.
It seems game never finished by humansTask. I add logs in EndGame.cs.
namespace TownOfUs.NeutralRoles.GlitchMod
{
[HarmonyPatch(typeof(GameManager), nameof(GameManager.RpcEndGame))]
public class EndGame
{
public static bool Prefix(GameManager __instance, [HarmonyArgument(0)] GameOverReason reason)
{
PluginSingleton<TownOfUs>.Instance.Log.LogMessage("Game Over Reason:" + reason.ToString());
if (reason != GameOverReason.HumansByVote && reason != GameOverReason.HumansByTask) return true;
foreach (var role in Role.AllRoles)
if (role.RoleType == RoleEnum.Glitch)
((Glitch) role).Loses();
var writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId,
(byte) CustomRPC.GlitchLose,
SendOption.Reliable, -1);
AmongUsClient.Instance.FinishRpcImmediately(writer);
return true;
}
}
}
[Message:Town Of Us] Game Over Reason:ImpostorByKill
[Message:Town Of Us] Game Over Reason:HumansByVote
.I try to fix this bug below, it solves all the problems and not affects haunter and phantom, but I'm not sure that's best practice.
if (GameData.Instance.TotalTasks <= GameData.Instance.CompletedTasks)
{
GameManager.Instance.RpcEndGame(GameOverReason.HumansByTask, false);
}
Fixed in v5.0.0.
Im pretty sure that neutral roles shouldnt win when tasks are finished, esspecially the neutral killing roles.