Fix sabotages

This commit is contained in:
Gurge44 committed 2024-03-01 22:01:56 +01:00
1 parent 3876cbf6e3
commit a40fa992a3
14 files changed
+109 -102

No files matched your search

+28 -34
View File
@@ -1,13 +1,12 @@
using Assets.CoreScripts;
using HarmonyLib;
using Hazel;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Assets.CoreScripts;
using HarmonyLib;
using Hazel;
using TOHE.Modules;
using TOHE.Roles.Crewmate;
using TOHE.Roles.Impostor;
@@ -24,7 +23,7 @@ internal class ChatCommands
public static bool IsPlayerModerator(string friendCode)
{
if (friendCode == "" || friendCode == string.Empty || !Options.ApplyModeratorList.GetBool()) return false;
var friendCodesFilePath = @"./TOHE_DATA/Moderators.txt";
const string friendCodesFilePath = "./TOHE_DATA/Moderators.txt";
var friendCodes = File.ReadAllLines(friendCodesFilePath);
return friendCodes.Any(code => code.Contains(friendCode, StringComparison.OrdinalIgnoreCase));
}
@@ -45,7 +44,6 @@ internal class ChatCommands
ChatControllerUpdatePatch.CurrentHistorySelection = ChatHistory.Count;
string[] args = text.Split(' ');
string subArgs = string.Empty;
var canceled = false;
var cancelVal = string.Empty;
Main.isChatCommand = true;
@@ -85,11 +83,7 @@ internal class ChatCommands
case "/v":
case "/version":
canceled = true;
string version_text = string.Empty;
foreach (var kvp in Main.playerVersion.OrderBy(pair => pair.Key))
{
version_text += $"{kvp.Key}:{Main.AllPlayerNames[kvp.Key]}:{kvp.Value.forkId}/{kvp.Value.version}({kvp.Value.tag})\n";
}
string version_text = Main.playerVersion.OrderBy(pair => pair.Key).Aggregate(string.Empty, (current, kvp) => current + $"{kvp.Key}:{Main.AllPlayerNames[kvp.Key]}:{kvp.Value.forkId}/{kvp.Value.version}({kvp.Value.tag})\n");
if (version_text != string.Empty) HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, (PlayerControl.LocalPlayer.FriendCode.GetDevUser().HasTag() ? "\n" : string.Empty) + version_text);
break;
@@ -102,6 +96,7 @@ internal class ChatCommands
{
var localPlayerId = PlayerControl.LocalPlayer.PlayerId;
Main.isChatCommand = true;
string subArgs;
switch (args[0])
{
case "/w":
@@ -208,7 +203,6 @@ internal class ChatCommands
case "/up":
canceled = true;
subArgs = text.Remove(0, 3);
if (!PlayerControl.LocalPlayer.FriendCode.GetDevUser().IsUp) break;
Utils.SendMessage($"{GetString("UpReplacedMessage")}", localPlayerId);
//if (!Options.EnableUpMode.GetBool())
@@ -269,11 +263,24 @@ internal class ChatCommands
canceled = true;
Utils.ShowHelp(localPlayerId);
break;
case "/kcount":
canceled = true;
if (GameStates.IsLobby || !Options.EnableKillerLeftCommand.GetBool()) break;
Utils.SendMessage(Utils.GetRemainingKillers(), localPlayerId);
break;
case "/eff":
case "/effect":
canceled = true;
if (args.Length < 2 || !GameStates.IsInTask || !Randomizer.Exists) break;
if (Enum.TryParse(args[1], ignoreCase: true, out Randomizer.Effect enumerable))
{
enumerable.Apply(PlayerControl.LocalPlayer);
}
break;
case "/m":
case "/myrole":
canceled = true;
@@ -526,10 +533,7 @@ internal class ChatCommands
case "/id":
canceled = true;
string msgText = GetString("PlayerIdList");
foreach (PlayerControl pc in Main.AllPlayerControls)
{
msgText += "\n" + pc.PlayerId + " → " + Main.AllPlayerNames[pc.PlayerId];
}
msgText = Main.AllPlayerControls.Aggregate(msgText, (current, pc) => current + ("\n" + pc.PlayerId + " → " + Main.AllPlayerNames[pc.PlayerId]));
Utils.SendMessage(msgText, localPlayerId);
break;
@@ -596,7 +600,6 @@ internal class ChatCommands
case "/sd":
canceled = true;
subArgs = text.Remove(0, 3);
if (args.Length < 1 || !int.TryParse(args[1], out int sound1)) break;
RPC.PlaySoundRPC(localPlayerId, (Sounds)sound1);
break;
@@ -822,10 +825,8 @@ internal class ChatCommands
}
else name = name.Trim().ToLower();
IList list = Enum.GetValues(typeof(CustomRoles));
for (int i = 0; i < list.Count; i++)
foreach (var rl in EnumHelper.GetAllValues<CustomRoles>())
{
CustomRoles rl = (CustomRoles)list[i];
if (rl.IsVanilla()) continue;
var roleName = GetString(rl.ToString()).ToLower().Trim().Replace(" ", string.Empty);
string nameWithoutId = Regex.Replace(name.Replace(" ", string.Empty), @"^\d+", string.Empty);
@@ -871,10 +872,8 @@ internal class ChatCommands
role = FixRoleNameInput(role).ToLower().Trim().Replace(" ", string.Empty);
IList list = Enum.GetValues(typeof(CustomRoles));
for (int i = 0; i < list.Count; i++)
foreach (var rl in EnumHelper.GetAllValues<CustomRoles>())
{
CustomRoles rl = (CustomRoles)list[i];
if (rl.IsVanilla()) continue;
var roleName = GetString(rl.ToString());
if (role == roleName.ToLower().Trim().TrimStart('*').Replace(" ", string.Empty))
@@ -886,8 +885,7 @@ internal class ChatCommands
if (rl.GetCount() < 1 || rl.GetMode() == 0) devMark = string.Empty;
if (isUp)
{
if (devMark == "▲") Utils.SendMessage(string.Format(GetString("Message.YTPlanSelected"), roleName), playerId);
else Utils.SendMessage(string.Format(GetString("Message.YTPlanSelectFailed"), roleName), playerId);
Utils.SendMessage(devMark == "▲" ? string.Format(GetString("Message.YTPlanSelected"), roleName) : string.Format(GetString("Message.YTPlanSelectFailed"), roleName), playerId);
}
if (devMark == "▲")
@@ -920,8 +918,7 @@ internal class ChatCommands
}
}
if (isUp) Utils.SendMessage(GetString("Message.YTPlanCanNotFindRoleThePlayerEnter"), playerId);
else Utils.SendMessage(GetString("Message.CanNotFindRoleThePlayerEnter"), playerId);
Utils.SendMessage(isUp ? GetString("Message.YTPlanCanNotFindRoleThePlayerEnter") : GetString("Message.CanNotFindRoleThePlayerEnter"), playerId);
}
public static void OnReceiveChat(PlayerControl player, string text, out bool canceled)
@@ -939,7 +936,7 @@ internal class ChatCommands
if (text.StartsWith("\n")) text = text[1..];
//if (!text.StartsWith("/")) return;
string[] args = text.Split(' ');
string subArgs = string.Empty;
string subArgs;
//if (text.Length >= 3) if (text[..2] == "/r" && text[..3] != "/rn") args[0] = "/r";
// if (SpamManager.CheckSpam(player, text)) return;
if (GuessManager.GuesserMsg(player, text))
@@ -1148,10 +1145,7 @@ internal class ChatCommands
// break;
case "/id":
string msgText = GetString("PlayerIdList");
foreach (PlayerControl pc in Main.AllPlayerControls)
{
msgText += "\n" + pc.PlayerId + " → " + Main.AllPlayerNames[pc.PlayerId];
}
msgText = Main.AllPlayerControls.Aggregate(msgText, (current, pc) => current + ("\n" + pc.PlayerId + " → " + Main.AllPlayerNames[pc.PlayerId]));
Utils.SendMessage(msgText, player.PlayerId);
break;
@@ -1317,7 +1311,7 @@ internal class ChatCommands
}
if (isCommand) LastSentCommand[player.PlayerId] = now;
if (SpamManager.CheckSpam(player, text)) return;
//if (SpamManager.CheckSpam(player, text)) return;
}
}
@@ -1338,7 +1332,7 @@ internal class ChatUpdatePatch
if (!AmongUsClient.Instance.AmHost || Main.MessagesToSend.Count == 0 || (Main.MessagesToSend[0].RECEIVER_ID == byte.MaxValue && Main.MessageWait.Value > __instance.timeSinceLastMessage) || DoBlockChat) return;
var player = Main.AllAlivePlayerControls.OrderBy(x => x.PlayerId).FirstOrDefault() ?? Main.AllPlayerControls.OrderBy(x => x.PlayerId).FirstOrDefault() ?? PlayerControl.LocalPlayer;
var player = Main.AllAlivePlayerControls.MinBy(x => x.PlayerId) ?? Main.AllPlayerControls.MinBy(x => x.PlayerId) ?? PlayerControl.LocalPlayer;
if (player == null) return;
(string msg, byte sendTo, string title) = Main.MessagesToSend[0];
+1 -1
View File
@@ -280,7 +280,7 @@ public class StringOptionEnablePatch
if (option.Id == Options.UsePets.Id) LoadLangs();
else if (!Options.UsePets.GetBool() && CustomRolesHelper.OnlySpawnsWithPetsRoleList.Any(role => role.ToString().Equals(option.GetName().RemoveHtmlTags().Replace(" ", string.Empty))))
__instance.TitleText.text += GetString("RequiresPetIndicator");
else if (Options.UsePets.GetBool() && Enum.TryParse(option.GetName().RemoveHtmlTags().Replace(" ", string.Empty), out CustomRoles enumerable) && enumerable.PetActivatedAbility())
else if (Options.UsePets.GetBool() && Enum.TryParse(option.GetName().RemoveHtmlTags().Replace(" ", string.Empty), true, out CustomRoles enumerable) && enumerable.PetActivatedAbility())
__instance.TitleText.text += GetString("SupportsPetIndicator");
__instance.Value = __instance.oldValue = option.CurrentValue;
__instance.ValueText.text = option.GetString();
+1 -3
View File
@@ -125,8 +125,6 @@ class RepairSystemPatch
return false;
}
Main.PlayerStates[player.PlayerId].Role.OnSabotage(player);
if (player.Is(CustomRoleTypes.Impostor) && !player.IsAlive() && Options.DeadImpCantSabotage.GetBool()) return false;
if (player.Is(CustomRoleTypes.Impostor) && (player.IsAlive() || !Options.DeadImpCantSabotage.GetBool()) && !player.Is(CustomRoles.Minimalism)) return true;
return player.GetCustomRole() switch
@@ -136,7 +134,7 @@ class RepairSystemPatch
CustomRoles.Traitor when Traitor.CanSabotage.GetBool() => true,
CustomRoles.Parasite when player.IsAlive() => true,
CustomRoles.Refugee when player.IsAlive() => true,
_ => Main.PlayerStates[player.PlayerId].Role.CanUseSabotage(player)
_ => Main.PlayerStates[player.PlayerId].Role.OnSabotage(player)
};
case SystemTypes.Security when amount == 1:
var camerasDisabled = (MapNames)Main.NormalOptions.MapId switch
+54 -54
View File
@@ -49,19 +49,19 @@
"CrewmatesCanGuess": "<color=#8cffff>Crewmates</color> can guess",
"ImpostorsCanGuess": "<color=#ff1919>Impostors</color> can guess",
"NeutralKillersCanGuess": "<color=#7f8c8d>Neutral Killers</color> can guess",
"PassiveNeutralsCanGuess": "Passive <color=#7f8c8d>Neutrals</color> can guess",
"PassiveNeutralsCanGuess": "Passive <color=#ffab1b>Neutrals</color> can guess",
"CovenCanGuess": "<color=#8e44ad>Coven</color> members can guess",
"CanGuessAddons": "Can Guess Add-ons",
"CrewCanGuessCrew": "<color=#8cffff>Crewmates</color> Can Guess <color=#8cffff>Crewmate</color> Roles",
"ImpCanGuessImp": "<color=#ff1919>Impostors</color> Can Guess <color=#ff1919>Impostor</color> Roles",
"AddonSettingsCrew": "<color=#8cffff>Crewmate</color> Configuration",
"AddonSettingsImp": "<color=#ff1919>Impostor</color> Configuration",
"AddonSettingsNeut": "<color=#7f8c8d>Neutral</color> Configuration",
"AddonSettingsNeut": "<color=#ffab1b>Neutral</color> Configuration",
"ClaimAddonSettings": "Can guess claimable add-ons",
"BetrayalAddonSettings": "Can guess betrayal add-ons",
"ImpOnlyAddonSettings": "Can guess <color=#ff1919>Impostor</color> add-ons",
"CrewOnlyAddonSettings": "Can guess <color=#8cffff>Crewmate</color> add-ons",
"NeutralAddonSettings": "Can guess <color=#7f8c8d>Neutral</color> add-ons",
"NeutralAddonSettings": "Can guess <color=#ffab1b>Neutral</color> add-ons",
"BasicAddonSettings": "Can guess global add-ons",
"GM": "Game Master",
"Sunnyboy": "Sunnyboy",
@@ -1020,7 +1020,7 @@
"DisableFungleCamera": "Disable Binoculars",
"IgnoreConditions": "Ignore Conditions",
"IgnoreImpostors": "Ignore <color=#ff1919>Impostors</color>",
"IgnoreNeutrals": "Ignore <color=#7f8c8d>Neutrals</color>",
"IgnoreNeutrals": "Ignore <color=#ffab1b>Neutrals</color>",
"IgnoreCrewmates": "Ignore <color=#8cffff>Crewmates</color>",
"IgnoreAfterAnyoneDied": "Ignore After First Death",
"LightsOutSpecialSettings": "Fix Lights Special Settings",
@@ -1076,8 +1076,8 @@
"NoticeEveryone": "Notify everyone",
"OnlyCancel": "Cancel Action Only",
"CheatResponses": "When a cheating player is found",
"NeutralRoleWinTogether": "<color=#7f8c8d>Neutrals</color> win together",
"NeutralWinTogether": "All <color=#7f8c8d>Neutrals</color> win together",
"NeutralRoleWinTogether": "<color=#ffab1b>Neutrals</color> win together",
"NeutralWinTogether": "All <color=#ffab1b>Neutrals</color> win together",
"MenuTitle.Disable": "★ Disable ★",
"MenuTitle.MapsSettings": "★ Maps ★",
"MenuTitle.Sabotage": "★ Sabotage ★",
@@ -1130,7 +1130,7 @@
"AbilityUseLimit": "Initial Ability Use Limit",
"SniperCanKill": "<color=#ff1919>Sniper</color> can kill with bullets remaining",
"CrewmatesCanBeSidekick": "<color=#8cffff>Crewmates</color> can be <color=#00b4eb>Sidekick</color>",
"NeutralsCanBeSidekick": "<color=#7f8c8d>Neutrals</color> can be <color=#00b4eb>Sidekick</color>",
"NeutralsCanBeSidekick": "<color=#ffab1b>Neutrals</color> can be <color=#00b4eb>Sidekick</color>",
"ImpostorsCanBeSidekick": "<color=#ff1919>Impostors</color> can be <color=#00b4eb>Sidekick</color>",
"JackalCanKillSidekick": "<color=#00b4eb>Jackal</color> can kill <color=#00b4eb>Sidekick</color>",
"SidekickCanKillJackal": "<color=#00b4eb>Sidekick</color> can kill <color=#00b4eb>Jackal</color>",
@@ -1141,10 +1141,10 @@
"CrewpostorKnowsAllies": "Knows <color=#ff1919>Impostors</color>",
"AlliesKnowCrewpostor": "Known to <color=#ff1919>Impostors</color>",
"HasSidekick": "Has <color=#00b4eb>Sidekick</color>",
"NonNeutralKillingRolesMinPlayer": "<color=#00ffff>Minimum</color> amount of <color=#ffff00>Non-Killing</color> <color=#7f8c8d>Neutrals</color>",
"NonNeutralKillingRolesMaxPlayer": "<color=#00a5ff>Maximum</color> amount of <color=#ffff00>Non-Killing</color> <color=#7f8c8d>Neutrals</color>",
"NeutralKillingRolesMinPlayer": "<color=#00ffff>Minimum</color> amount of <color=#7f8c8d>Neutral</color> <color=#ff0000>Killers</color>",
"NeutralKillingRolesMaxPlayer": "<color=#00a5ff>Maximum</color> amount of <color=#7f8c8d>Neutral</color> <color=#ff0000>Killers</color>",
"NonNeutralKillingRolesMinPlayer": "<color=#00ffff>Minimum</color> amount of <color=#ffff00>Non-Killing</color> <color=#ffab1b>Neutrals</color>",
"NonNeutralKillingRolesMaxPlayer": "<color=#00a5ff>Maximum</color> amount of <color=#ffff00>Non-Killing</color> <color=#ffab1b>Neutrals</color>",
"NeutralKillingRolesMinPlayer": "<color=#00ffff>Minimum</color> amount of <color=#ffab1b>Neutral</color> <color=#ff0000>Killers</color>",
"NeutralKillingRolesMaxPlayer": "<color=#00a5ff>Maximum</color> amount of <color=#ffab1b>Neutral</color> <color=#ff0000>Killers</color>",
"CovenRolesMinPlayer": "Minimum Amount of <color=#8e44ad>Coven</color> members",
"CovenRolesMaxPlayer": "Maximum Amount of <color=#8e44ad>Coven</color> members",
"ImpKnowAlliesRole": "<color=#ff1919>Impostors</color> know the roles of other <color=#ff1919>Impostors</color>",
@@ -1195,7 +1195,7 @@
"ScavengerKillDuration": "Time After Kill Completes",
"DeadImpCantSabotage": "<color=#ff1919>Impostors</color> can't sabotage after they've died",
"DeadCrewCantSabotage": "<color=#8cffff>Crewmates</color> can't sabotage after they've died",
"DeadNeutralCantSabotage": "<color=#7f8c8d>Neutrals</color> can't sabotage after they've died",
"DeadNeutralCantSabotage": "<color=#ffab1b>Neutrals</color> can't sabotage after they've died",
"VampireKillDelay": "Bite Kill Delay",
"MareAddSpeedInLightsOut": "Additional Speed During Lights Out",
"MareKillCooldownInLightsOut": "Kill Cooldown During Lights Out",
@@ -1212,8 +1212,8 @@
"SMUsesUsedWhenFixingReactorOrO2": "Uses it takes to fix Reactor/O2",
"SMUsesUsedWhenFixingLightsOrComms": "Uses it takes to fix Lights/Comms",
"SheriffCanKill%role%": "Can Kill %role%",
"SheriffCanKillNeutrals": "Can Kill <color=#7f8c8d>Neutrals</color>",
"SheriffCanKillNeutralsMode": "<color=#7f8c8d>Neutral</color> Configuration",
"SheriffCanKillNeutrals": "Can Kill <color=#ffab1b>Neutrals</color>",
"SheriffCanKillNeutralsMode": "<color=#ffab1b>Neutral</color> Configuration",
"SheriffCanKillAll": "<color=#00fefe>All ON</color>",
"SheriffCanKillSeparately": "Individual Settings",
"In%team%": "(Team %team%)",
@@ -1230,7 +1230,7 @@
"SheriffCanKillContagious": "Can Kill <color=#2E8B57>Contagious</color> players",
"SheriffSetMadCanKill": "Non-<color=#8cffff>Crew</color> <color=#f8cd46>Sheriff</color> Configuration",
"SheriffMadCanKillImp": "Can kill <color=#ff1919>Impostors</color>",
"SheriffMadCanKillNeutral": "Can kill <color=#7f8c8d>Neutrals</color>",
"SheriffMadCanKillNeutral": "Can kill <color=#ffab1b>Neutrals</color>",
"SheriffMadCanKillCrew": "Can kill <color=#8cffff>Crewmates</color>",
"DoctorTaskCompletedBatteryCharge": "Battery Duration",
"SnitchEnableTargetArrow": "See Arrow Towards Target",
@@ -1245,11 +1245,11 @@
"MayorNumOfUseButton": "Max Number of Mobile Emergency Buttons",
"MayorHideVote": "Hide additional vote(s)",
"ExecutionerCanTargetImpostor": "Can Target <color=#ff1919>Impostors</color>",
"ExecutionerCanTargetNeutralKiller": "Can Target <color=#7f8c8d>Neutral</color> <color=#ff1919>Killing</color>",
"ExecutionerCanTargetNeutralKiller": "Can Target <color=#ffab1b>Neutral</color> <color=#ff1919>Killing</color>",
"ExecutionerChangeRolesAfterTargetKilled": "When Target Dies, <color=#c0c0c0>Executioner</color> becomes",
"CanTargetNeutralBenign": "Can Target <color=#7f8c8d>Neutral</color> <color=#046300>Benign</color>",
"CanTargetNeutralEvil": "Can Target <color=#7f8c8d>Neutral</color> <color=#912900>Evil</color>",
"CanTargetNeutralChaos": "Can Target <color=#7f8c8d>Neutral</color> <color=#D4AF37>Chaos</color>",
"CanTargetNeutralBenign": "Can Target <color=#ffab1b>Neutral</color> <color=#046300>Benign</color>",
"CanTargetNeutralEvil": "Can Target <color=#ffab1b>Neutral</color> <color=#912900>Evil</color>",
"CanTargetNeutralChaos": "Can Target <color=#ffab1b>Neutral</color> <color=#D4AF37>Chaos</color>",
"SidekickSheriffCanGoBerserk": "<color=#00b4eb>Recruited</color> <color=#f8cd46>Sheriff</color> Can Go Nuts",
"LawyerCanTargetImpostor": "Can Target <color=#ff1919>Impostors</color>",
"LawyerCanTargetNeutralKiller": "Can Target <color=#7f8c8d>Neutral Killers</color>",
@@ -1282,15 +1282,15 @@
"TrapperBlockMoveTime": "Freeze time",
"ImpCanBeTrapper": "<color=#ff1919>Impostors</color> can become <color=#5a8fd0>Beartrap</color>",
"CrewCanBeTrapper": "<color=#8cffff>Crewmates</color> can become <color=#5a8fd0>Beartrap</color>",
"NeutralCanBeTrapper": "<color=#7f8c8d>Neutrals</color> can become <color=#5a8fd0>Beartrap</color>",
"NeutralCanBeTrapper": "<color=#ffab1b>Neutrals</color> can become <color=#5a8fd0>Beartrap</color>",
"ImpCanBeRogue": "<color=#ff1919>Impostors</color> can become <color=#696969>Rogue</color>",
"CrewCanBeRogue": "<color=#8cffff>Crewmates</color> can become <color=#696969>Rogue</color>",
"NeutralCanBeRogue": "<color=#7f8c8d>Neutrals</color> can become <color=#696969>Rogue</color>",
"NeutralCanBeRogue": "<color=#ffab1b>Neutrals</color> can become <color=#696969>Rogue</color>",
"RogueKnowEachOtherRoles": "<color=#696969>Rogues</color> know the roles of each other",
"RogueKnowEachOther": "<color=#696969>Rogues</color> know each other",
"ImpCanBeGravestone": "<color=#ff1919>Impostors</color> can become <color=#2EA8E7>Gravestone</color>",
"CrewCanBeGravestone": "<color=#8cffff>Crewmates</color> can become <color=#2EA8E7>Gravestone</color>",
"NeutralCanBeGravestone": "<color=#7f8c8d>Neutrals</color> can become <color=#2EA8E7>Gravestone</color>",
"NeutralCanBeGravestone": "<color=#ffab1b>Neutrals</color> can become <color=#2EA8E7>Gravestone</color>",
"TimeThiefDecreaseMeetingTime": "Lower Meeting Time by",
"TimeThiefLowerLimitVotingTime": "Minimum Voting Time",
"TimeThiefReturnStolenTimeUponDeath": "Return Stolen Time Upon Death",
@@ -1304,8 +1304,8 @@
"EvilTrackerTargetMode.EveryMeeting": "Every Meeting",
"EvilTrackerTargetMode.Always": "Any time",
"WitchModeSwitchAction": "Switch Action via",
"NBareRed": "Nice <color=#7f8c8d>Neutrals</color> can be red",
"NEareRed": "Evil <color=#7f8c8d>Neutrals</color> can be red",
"NBareRed": "Nice <color=#ffab1b>Neutrals</color> can be red",
"NEareRed": "Evil <color=#ffab1b>Neutrals</color> can be red",
"CrewKillingRed": "<color=#8cffff>Crewmate</color> Killings can be red",
"PsychicCanSeeNum": "Max number of red names",
"PsychicFresh": "New red names every meeting",
@@ -1317,7 +1317,7 @@
"ZombieSpeedReduce": "After a certain time, decrease the speed of <color=#ff1919>Zombie</color> by",
"MafiaCanKillNum": "Max number of revenges",
"ImpKnowCyberStarDead": "<color=#ff1919>Impostors</color> know when the <color=#ee4a55>Celebrity</color> dies",
"NeutralKnowCyberStarDead": "<color=#7f8c8d>Neutrals</color> know when the <color=#ee4a55>Celebrity</color> dies",
"NeutralKnowCyberStarDead": "<color=#ffab1b>Neutrals</color> know when the <color=#ee4a55>Celebrity</color> dies",
"JesterCanUseButton": "Can call emergency meetings",
"MarioVentNumWin": "Number of Vents to win",
"CanCheckCamera": "Can track camera usage",
@@ -1372,16 +1372,16 @@
"ImpEgoistVisibalToAllies": "<color=#ff1919>Impostors</color> Can See Other <color=#5600ff>Egoist</color> <color=#ff1919>Impostors</color>",
"ImpCanBeSeer": "<color=#ff1919>Impostors</color> can become <color=#61b26c>Seer</color>",
"CrewCanBeSeer": "<color=#8cffff>Crewmates</color> can become <color=#61b26c>Seer</color>",
"NeutralCanBeSeer": "<color=#7f8c8d>Neutrals</color> can become <color=#61b26c>Seer</color>",
"NeutralCanBeSeer": "<color=#ffab1b>Neutrals</color> can become <color=#61b26c>Seer</color>",
"ImpCanBeGuesser": "<color=#ff1919>Impostors</color> can become <color=#ffb347>Guesser</color>",
"CrewCanBeGuesser": "<color=#8cffff>Crewmates</color> can become <color=#ffb347>Guesser</color>",
"NeutralCanBeGuesser": "<color=#7f8c8d>Neutrals</color> can become <color=#ffb347>Guesser</color>",
"NeutralCanBeGuesser": "<color=#ffab1b>Neutrals</color> can become <color=#ffb347>Guesser</color>",
"ImpCanBeWatcher": "<color=#ff1919>Impostors</color> can become <color=#800080>Watcher</color>",
"CrewCanBeWatcher": "<color=#8cffff>Crewmates</color> can become <color=#800080>Watcher</color>",
"NeutralCanBeWatcher": "<color=#7f8c8d>Neutrals</color> can become <color=#800080>Watcher</color>",
"NeutralCanBeWatcher": "<color=#ffab1b>Neutrals</color> can become <color=#800080>Watcher</color>",
"ImpCanBeBait": "<color=#ff1919>Impostors</color> can become <color=#00f7ff>Bait</color>",
"CrewCanBeBait": "<color=#8cffff>Crewmates</color> can become <color=#00f7ff>Bait</color>",
"NeutralCanBeBait": "<color=#7f8c8d>Neutrals</color> can become <color=#00f7ff>Bait</color>",
"NeutralCanBeBait": "<color=#ffab1b>Neutrals</color> can become <color=#00f7ff>Bait</color>",
"BaitDelayMin": "Minimum Report Delay",
"BaitDelayMax": "Maximum Report Delay",
"BaitDelayNotify": "<color=#ffff00>Warn the killer about the upcoming self-report</color>",
@@ -1394,7 +1394,7 @@
"GrenadierSkillCooldown": "Grenade Cooldown",
"GrenadierSkillDuration": "Grenade Duration",
"GrenadierCauseVision": "Lowered vision",
"GrenadierCanAffectNeutral": "Can affect <color=#7f8c8d>Neutrals</color>",
"GrenadierCanAffectNeutral": "Can affect <color=#ffab1b>Neutrals</color>",
"GrenadierSkillMaxOfUseage": "(Initial) Max number of Grenades",
"LighterSkillCooldown": "<color=#eee5be>Light</color> Cooldown",
"LighterSkillDuration": "<color=#eee5be>Light</color> Duration",
@@ -1454,7 +1454,7 @@
"BallLightningConvertTime": "Duration of the transformation to Quantum Ghost",
"BallLightningKillCooldown": "Lightning Cooldown",
"BallLightningKillerConvertGhost": "Killer can transform into Quantum Ghost",
"CanCountNeutralKiller": "When <color=#8cffff>Crewmates</color> win by killing a <color=#7f8c8d>Neutral</color> player, they can snatch the victory",
"CanCountNeutralKiller": "When <color=#8cffff>Crewmates</color> win by killing a <color=#ffab1b>Neutral</color> player, they can snatch the victory",
"OddKillCooldown": "Odd-Numbered kill cooldown",
"EvenKillCooldown": "Even-Numbered kill cooldown",
"WorkaholicCannotWinAtDeath": "Can't win after they died",
@@ -1553,26 +1553,26 @@
"SidekickCanWinWithOriginalTeam": "<color=#00b4eb>Sidekicks</color> can win with original team",
"ImpCanBeNecroview": "<color=#ff1919>Impostors</color> can become <color=#663399>Necroview</color>",
"CrewCanBeNecroview": "<color=#8cffff>Crewmates</color> can become <color=#663399>Necroview</color>",
"NeutralCanBeNecroview": "<color=#7f8c8d>Neutrals</color> can become <color=#663399>Necroview</color>",
"NeutralCanBeNecroview": "<color=#ffab1b>Neutrals</color> can become <color=#663399>Necroview</color>",
"ImpCanBeInLove": "<color=#ff1919>Impostors</color> can be <color=#ff9ace>in love</color>",
"CrewCanBeInLove": "<color=#8cffff>Crewmates</color> can be <color=#ff9ace>in love</color>",
"NeutralCanBeInLove": "<color=#7f8c8d>Neutrals</color> can be <color=#ff9ace>in love</color>",
"NeutralCanBeInLove": "<color=#ffab1b>Neutrals</color> can be <color=#ff9ace>in love</color>",
"ImpCanBeOblivious": "<color=#ff1919>Impostors</color> can become <color=#424242>Oblivious</color>",
"CrewCanBeOblivious": "<color=#8cffff>Crewmates</color> can become <color=#424242>Oblivious</color>",
"NeutralCanBeOblivious": "<color=#7f8c8d>Neutrals</color> can become <color=#424242>Oblivious</color>",
"NeutralCanBeOblivious": "<color=#ffab1b>Neutrals</color> can become <color=#424242>Oblivious</color>",
"ImpCanBeTiebreaker": "<color=#ff1919>Impostors</color> can become <color=#1447af>Tiebreaker</color>",
"CrewCanBeTiebreaker": "<color=#8cffff>Crewmates</color> can become <color=#1447af>Tiebreaker</color>",
"NeutralCanBeTiebreaker": "<color=#7f8c8d>Neutrals</color> can become <color=#1447af>Tiebreaker</color>",
"NeutralCanBeTiebreaker": "<color=#ffab1b>Neutrals</color> can become <color=#1447af>Tiebreaker</color>",
"HexesLookLikeSpells": "<color=#ff00ff>Hexes</color> appear as <color=#ff1919>spells</color>",
"HexButtonText": "Hex",
"EscapeeAbilityButtonText": "TP",
"ObliviousBaitImmune": "Immune to <color=#00f7ff>Bait</color>",
"ImpCanBeOnbound": "<color=#ff1919>Impostors</color> can become <color=#baaae9>Onbound</color>",
"CrewCanBeOnbound": "<color=#8cffff>Crewmates</color> can become <color=#baaae9>Onbound</color>",
"NeutralCanBeOnbound": "<color=#7f8c8d>Neutrals</color> can become <color=#baaae9>Onbound</color>",
"NeutralCanBeOnbound": "<color=#ffab1b>Neutrals</color> can become <color=#baaae9>Onbound</color>",
"ImpCanBeUnreportable": "<color=#ff1919>Impostors</color> can become <color=#FF6347>Disregarded</color>",
"CrewCanBeUnreportable": "<color=#8cffff>Crewmates</color> can become <color=#FF6347>Disregarded</color>",
"NeutralCanBeUnreportable": "<color=#7f8c8d>Neutrals</color> can become <color=#FF6347>Disregarded</color>",
"NeutralCanBeUnreportable": "<color=#ffab1b>Neutrals</color> can become <color=#FF6347>Disregarded</color>",
"MediumshiperContactLimit": "(Initial) Max number of contacts (ability uses)",
"MediumshiperOnlyReceiveMsgFromCrew": "Receive messages only from <color=#8cffff>Crewmates</color> (including <color=#ff1919>Madmates</color> and <color=#cf6acd>Charmed</color> Players)",
"DovesOfNeaceCooldown": "Ability Cooldown",
@@ -1585,13 +1585,13 @@
"LuckyProbability": "Probability of surviving a kill",
"ImpCanBeLucky": "<color=#ff1919>Impostors</color> can become <color=#b8d7a3>Lucky</color>",
"CrewCanBeLucky": "<color=#8cffff>Crewmates</color> can become <color=#b8d7a3>Lucky</color>",
"NeutralCanBeLucky": "<color=#7f8c8d>Neutrals</color> can become <color=#b8d7a3>Lucky</color>",
"NeutralCanBeLucky": "<color=#ffab1b>Neutrals</color> can become <color=#b8d7a3>Lucky</color>",
"ImpCanBeFool": "<color=#ff1919>Impostors</color> can become <color=#e6e7ff>Fool</color>",
"CrewCanBeFool": "<color=#8cffff>Crewmates</color> can become <color=#e6e7ff>Fool</color>",
"NeutralCanBeFool": "<color=#7f8c8d>Neutrals</color> can become <color=#e6e7ff>Fool</color>",
"NeutralCanBeFool": "<color=#ffab1b>Neutrals</color> can become <color=#e6e7ff>Fool</color>",
"ImpCanBeDoubleShot": "<color=#ff1919>Impostors</color> can have <color=#19fa8d>Double Shot</color>",
"CrewCanBeDoubleShot": "<color=#8cffff>Crewmates</color> can have <color=#19fa8d>Double Shot</color>",
"NeutralCanBeDoubleShot": "<color=#7f8c8d>Neutrals</color> can have <color=#19fa8d>Double Shot</color>",
"NeutralCanBeDoubleShot": "<color=#ffab1b>Neutrals</color> can have <color=#19fa8d>Double Shot</color>",
"MimicCanSeeDeadRoles": "<color=#ff1919>Mimic</color> can see the roles of dead players",
"CanBeSoldByMerchant": "Can be sold by <color=#D27D2D>Merchant</color>",
"CanBeGuessed": "Can be guessed",
@@ -1924,12 +1924,12 @@
"MerchantNotifyBribery": "Inform <color=#D27D2D>Merchant</color> when a killer gets bribed",
"MerchantTargetCrew": "Can sell to <color=#8cffff>Crewmates</color>",
"MerchantTargetImpostor": "Can sell to <color=#ff1919>Impostors</color>",
"MerchantTargetNeutral": "Can sell to <color=#7f8c8d>Neutrals</color>",
"MerchantTargetNeutral": "Can sell to <color=#ffab1b>Neutrals</color>",
"MerchantSellHelpful": "Can sell <color=#8cffff>Helpful</color> Add-ons",
"MerchantSellBalanced": "Can sell <color=#00ffa5>Balanced</color> Add-ons",
"MerchantSellOnlyEnabledAddons": "Can Only Sell Enabled Add-ons",
"MerchantSellHarmful": "Can sell <color=#ff1919>Harmful</color> Add-ons",
"MerchantSellNeutral": "Can sell <color=#7f8c8d>Neutral</color> Add-ons",
"MerchantSellNeutral": "Can sell <color=#ffab1b>Neutral</color> Add-ons",
"MerchantSellExperimental": "Can sell <color=#76b8e0>experimental</color> Add-ons",
"MerchantSellHarmfulToEvil": "Can sell <color=#ff1919>Harmful</color> Add-ons only to <color=#ff1919>Evil</color>",
"MerchantSellHelpfulToCrew": "Can sell <color=#8cffff>Helpful</color> Add-ons only to <color=#8cffff>Crew</color>",
@@ -2048,10 +2048,10 @@
"OtherRoles.ImpostorRoles": "★ Impostor Roles",
"OtherRoles.Addons": "★ Add-Ons",
"JudgeCanTrialnCrewKilling": "Can trial <color=#8cffff>Crewmate</color> <color=#ff1919>Killing</color>",
"JudgeCanTrialNeutralB": "Can trial <color=#7f8c8d>Neutral</color> <color=#046300>Benign</color>",
"JudgeCanTrialNeutralK": "Can trial <color=#7f8c8d>Neutral</color> <color=#ff1919>Killing</color>",
"JudgeCanTrialNeutralE": "Can trial <color=#7f8c8d>Neutral</color> <color=#912900>Evil</color>",
"JudgeCanTrialNeutralC": "Can trial <color=#7f8c8d>Neutral</color> <color=#D4AF37>Chaos</color>",
"JudgeCanTrialNeutralB": "Can trial <color=#ffab1b>Neutral</color> <color=#046300>Benign</color>",
"JudgeCanTrialNeutralK": "Can trial <color=#ffab1b>Neutral</color> <color=#ff1919>Killing</color>",
"JudgeCanTrialNeutralE": "Can trial <color=#ffab1b>Neutral</color> <color=#912900>Evil</color>",
"JudgeCanTrialNeutralC": "Can trial <color=#ffab1b>Neutral</color> <color=#D4AF37>Chaos</color>",
"JudgeCanTrialSidekick": "Can trial <color=#00b4eb>Sidekick</color>",
"JudgeCanTrialInfected": "Can trial <color=#7B8968>Infected</color>",
"JudgeCanTrialContagious": "Can trial <color=#2E8B57>Contagious</color>",
@@ -3204,7 +3204,7 @@
"UnderdogKillCooldownWithMorePlayersAlive": "Kill Cooldown when more players are alive",
"ImpCanBeUnlucky": "<color=#ff1919>Impostors</color> can become <color=#b8d7a3>Unlucky</color>",
"CrewCanBeUnlucky": "<color=#8cffff>Crewmates</color> can become <color=#b8d7a3>Unlucky</color>",
"NeutralCanBeUnlucky": "<color=#7f8c8d>Neutrals</color> can become <color=#b8d7a3>Unlucky</color>",
"NeutralCanBeUnlucky": "<color=#ffab1b>Neutrals</color> can become <color=#b8d7a3>Unlucky</color>",
"UnluckyTaskSuicideChance": "Chance to suicide from doing tasks",
"UnluckyKillSuicideChance": "Chance to suicide from killing",
"UnluckyVentSuicideChance": "Chance to suicide from venting",
@@ -3217,14 +3217,14 @@
"GlowVision": "<color=#E2F147>Glow</color> Vision",
"ImpCanBeGlow": "<color=#ff1919>Impostors</color> can become <color=#E2F147>Glow</color>",
"CrewCanBeGlow": "<color=#8cffff>Crewmates</color> can become <color=#E2F147>Glow</color>",
"NeutralCanBeGlow": "<color=#7f8c8d>Neutrals</color> can become <color=#E2F147>Glow</color>",
"NeutralCanBeGlow": "<color=#ffab1b>Neutrals</color> can become <color=#E2F147>Glow</color>",
"ImpCanBeDiseased": "<color=#ff1919>Impostors</color> can become Diseased",
"NeutralCanBeDiseased": "<color=#7f8c8d>Neutrals</color> can become Diseased",
"NeutralCanBeDiseased": "<color=#ffab1b>Neutrals</color> can become Diseased",
"CrewCanBeDiseased": "<color=#8cffff>Crewmates</color> can become Diseased",
"DiseasedCDOpt": "Increase the cooldown by",
"DiseasedCDReset": "Cooldown returns to normal after a meeting",
"ImpCanBeAntidote": "<color=#ff1919>Impostors</color> can become Antidote",
"NeutralCanBeAntidote": "<color=#7f8c8d>Neutrals</color> can become Antidote",
"NeutralCanBeAntidote": "<color=#ffab1b>Neutrals</color> can become Antidote",
"CrewCanBeAntidote": "<color=#8cffff>Crewmates</color> can become Antidote",
"AntidoteCDOpt": "Decrease the cooldown by",
"AntidoteCDReset": "Cooldown returns to normal after a meeting",
@@ -3320,13 +3320,13 @@
"CopyCrewVar": "Can copy evil variants of crew roles",
"ImpCanBeAutopsy": "<color=#ff1919>Impostors</color> can become <color=#80ffdd>Autopsy</color>",
"CrewCanBeAutopsy": "<color=#8cffff>Crewmates</color> can become <color=#80ffdd>Autopsy</color>",
"NeutralCanBeAutopsy": "<color=#7f8c8d>Neutrals</color> can become <color=#80ffdd>Autopsy</color>",
"NeutralCanBeAutopsy": "<color=#ffab1b>Neutrals</color> can become <color=#80ffdd>Autopsy</color>",
"ImpCanBeBewilder": "<color=#ff1919>Impostors</color> can become <color=#c894f5>Bewilder</color>",
"CrewCanBeBewilder": "<color=#8cffff>Crewmates</color> can become <color=#c894f5>Bewilder</color>",
"NeutralCanBeBewilder": "<color=#7f8c8d>Neutrals</color> can become <color=#c894f5>Bewilder</color>",
"NeutralCanBeBewilder": "<color=#ffab1b>Neutrals</color> can become <color=#c894f5>Bewilder</color>",
"ImpCanBeSunglasses": "<color=#ff1919>Impostors</color> can become <color=#E7C12B>Sunglasses</color>",
"CrewCanBeSunglasses": "<color=#8cffff>Crewmates</color> can become <color=#E7C12B>Sunglasses</color>",
"NeutralCanBeSunglasses": "<color=#7f8c8d>Neutrals</color> can become <color=#E7C12B>Sunglasses</color>",
"NeutralCanBeSunglasses": "<color=#ffab1b>Neutrals</color> can become <color=#E7C12B>Sunglasses</color>",
"SunglassesVision": "<color=#E7C12B>Sunglasses</color> Vision",
"ImpCanBeLoyal": "<color=#ff1919>Impostors</color> can become <color=#B71556>Loyal</color>",
"CrewCanBeLoyal": "<color=#8cffff>Crewmates</color> can become <color=#B71556>Loyal</color>",
@@ -3506,7 +3506,7 @@
"DoomsayerAmountOfGuessesToWin": "Amount of Guesses to win",
"DCanGuessImpostors": "Can Guess <color=#ff1919>Impostors</color>",
"DCanGuessCrewmates": "Can Guess <color=#8cffff>Crewmates</color>",
"DCanGuessNeutrals": "Can Guess <color=#7f8c8d>Neutrals</color>",
"DCanGuessNeutrals": "Can Guess <color=#ffab1b>Neutrals</color>",
"DCanGuessAdt": "Can Guess Add-Ons",
"DoomsayerAdvancedSettings": "Advanced Settings",
"DoomsayerMaxNumberOfGuessesPerMeeting": "Max number of guesses per meeting",
+5
View File
@@ -114,6 +114,11 @@ internal class Assassin : RoleBase
return false;
}
public override void OnPet(PlayerControl pc)
{
OnShapeshift(pc, null, true);
}
public override bool OnShapeshift(PlayerControl pc, PlayerControl t, bool shapeshifting)
{
if (!pc.IsAlive() || Pelican.IsEaten(pc.PlayerId) || Medic.ProtectList.Contains(pc.PlayerId)) return false;
+3 -2
View File
@@ -266,11 +266,12 @@ namespace TOHE.Roles.Impostor
SendRPC();
}
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
if (Main.PlayerStates[pc.PlayerId].Role is not Mafioso { IsEnable: true } mo) return;
if (Main.PlayerStates[pc.PlayerId].Role is not Mafioso { IsEnable: true } mo) return true;
mo.XP += RewardForSabotaging.GetInt();
mo.SendRPC();
return true;
}
public static void OnCrewmateEjected()
+2 -1
View File
@@ -58,9 +58,10 @@ namespace TOHE.Roles.Neutral
MarkPosition();
}
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
MarkPosition();
return false;
}
void MarkPosition()
+2 -1
View File
@@ -151,9 +151,10 @@ public class Glitch : RoleBase
Mimic(pc);
}
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
Mimic(pc);
return false;
}
public override bool OnCheckMurder(PlayerControl killer, PlayerControl target)
+2 -1
View File
@@ -75,9 +75,10 @@ namespace TOHE.Roles.Neutral
ExecuteAction();
}
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
ExecuteAction();
return false;
}
void ExecuteAction()
+2 -1
View File
@@ -126,9 +126,10 @@ public class Magician : RoleBase
UseCard(pc);
}
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
UseCard(pc);
return false;
}
public static void UseCard(PlayerControl pc)
+3 -1
View File
@@ -104,12 +104,14 @@ namespace TOHE.Roles.Neutral
}
}
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
if (SpreadAction.GetValue() == 1)
{
SpreadSpores();
}
return false;
}
public override void OnEnterVent(PlayerControl pc, Vent vent)
+2 -1
View File
@@ -87,9 +87,10 @@ namespace TOHE.Roles.Neutral
public override bool CanUseImpostorVentButton(PlayerControl pc) => CanVent.GetBool();
public override bool CanUseSabotage(PlayerControl pc) => true;
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
PlaceTrap();
return false;
}
public override void OnPet(PlayerControl pc)
+2 -1
View File
@@ -100,9 +100,10 @@ public class WeaponMaster : RoleBase
SwitchMode();
}
public override void OnSabotage(PlayerControl pc)
public override bool OnSabotage(PlayerControl pc)
{
SwitchMode();
return false;
}
void SwitchMode()
+2 -1
View File
@@ -84,8 +84,9 @@ namespace TOHE
pc.Notify(Translator.GetString($"NoPetActionMsg{suffix}"));
}
public virtual void OnSabotage(PlayerControl pc)
public virtual bool OnSabotage(PlayerControl pc)
{
return CanUseSabotage(pc);
}
public virtual bool OnCheckMurder(PlayerControl killer, PlayerControl target)