mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Start Nullifier, Fix bugs, Add settings
This commit is contained in:
1 parent
5ae28d56a2
commit
25a7d14ea0
19 files changed
+358
-94
No files matched your search
@@ -50,6 +50,8 @@ internal static class CustomRolesHelper
|
||||
CustomRoles.SpeedBooster => CustomRoles.Crewmate,
|
||||
CustomRoles.Dictator => CustomRoles.Crewmate,
|
||||
CustomRoles.Inhibitor => CustomRoles.Impostor,
|
||||
CustomRoles.Chronomancer => CustomRoles.Impostor,
|
||||
CustomRoles.Nullifier => CustomRoles.Impostor,
|
||||
CustomRoles.Stealth => CustomRoles.Impostor,
|
||||
CustomRoles.Penguin => CustomRoles.Shapeshifter,
|
||||
CustomRoles.Sapper => Options.UsePets.GetBool() ? CustomRoles.Impostor : CustomRoles.Shapeshifter,
|
||||
@@ -691,6 +693,8 @@ internal static class CustomRolesHelper
|
||||
CustomRoles.SerialKiller or
|
||||
CustomRoles.Underdog or
|
||||
CustomRoles.Inhibitor or
|
||||
CustomRoles.Nullifier or
|
||||
CustomRoles.Chronomancer or
|
||||
CustomRoles.Stealth or
|
||||
CustomRoles.Penguin or
|
||||
CustomRoles.Sapper or
|
||||
|
||||
@@ -467,6 +467,8 @@ static class ExtendedPlayerControl
|
||||
CustomRoles.RiftMaker => true,
|
||||
CustomRoles.Hitman => true,
|
||||
CustomRoles.Inhibitor => true,
|
||||
CustomRoles.Chronomancer => true,
|
||||
CustomRoles.Nullifier => true,
|
||||
CustomRoles.Stealth => true,
|
||||
CustomRoles.Penguin => true,
|
||||
CustomRoles.Sapper => true,
|
||||
@@ -571,6 +573,8 @@ static class ExtendedPlayerControl
|
||||
CustomRoles.Sapper => false,
|
||||
CustomRoles.Penguin => pc.IsAlive(),
|
||||
CustomRoles.Stealth => pc.IsAlive(),
|
||||
CustomRoles.Nullifier => pc.IsAlive(),
|
||||
CustomRoles.Chronomancer => pc.IsAlive(),
|
||||
CustomRoles.Inhibitor => !Utils.IsActive(SystemTypes.Electrical) && !Utils.IsActive(SystemTypes.Laboratory) && !Utils.IsActive(SystemTypes.Comms) && !Utils.IsActive(SystemTypes.LifeSupp) && !Utils.IsActive(SystemTypes.Reactor),
|
||||
CustomRoles.Saboteur => Utils.IsActive(SystemTypes.Electrical) || Utils.IsActive(SystemTypes.Laboratory) || Utils.IsActive(SystemTypes.Comms) || Utils.IsActive(SystemTypes.LifeSupp) || Utils.IsActive(SystemTypes.Reactor),
|
||||
CustomRoles.Sniper => Sniper.CanUseKillButton(pc),
|
||||
@@ -888,6 +892,12 @@ static class ExtendedPlayerControl
|
||||
case CustomRoles.Inhibitor:
|
||||
Main.AllPlayerKillCooldown[player.PlayerId] = Options.InhibitorCDAfterMeetings.GetFloat();
|
||||
break;
|
||||
case CustomRoles.Chronomancer:
|
||||
Chronomancer.SetKillCooldown(player.PlayerId);
|
||||
break;
|
||||
case CustomRoles.Nullifier:
|
||||
Nullifier.SetKillCooldown(player.PlayerId);
|
||||
break;
|
||||
case CustomRoles.Stealth:
|
||||
Stealth.SetKillCooldown(player.PlayerId);
|
||||
break;
|
||||
|
||||
@@ -563,7 +563,7 @@ public static class GuessManager
|
||||
|
||||
_ = new LateTask(() =>
|
||||
{
|
||||
Utils.SendMessage(string.Format(GetString("DoomsayerGuessCountMsg"), Doomsayer.GuessesCount), pc.PlayerId, Utils.ColorString(Utils.GetRoleColor(CustomRoles.Doomsayer), GetString("DoomsayerGuessCountTitle")));
|
||||
Utils.SendMessage(string.Format(GetString("DoomsayerGuessCountMsg"), Doomsayer.GuessingToWin[pc.PlayerId]), pc.PlayerId, Utils.ColorString(Utils.GetRoleColor(CustomRoles.Doomsayer), GetString("DoomsayerGuessCountTitle")));
|
||||
}, 0.7f, "Doomsayer Guess Msg 1");
|
||||
}
|
||||
|
||||
|
||||
+100
-7
@@ -547,6 +547,25 @@ public static class Options
|
||||
public static OptionItem DisableFuelEngines;
|
||||
public static OptionItem DisableDivertPower;
|
||||
public static OptionItem DisableActivateWeatherNodes;
|
||||
public static OptionItem DisableRoastMarshmallow;
|
||||
public static OptionItem DisableCollectSamples;
|
||||
public static OptionItem DisableReplaceParts;
|
||||
public static OptionItem DisableCollectVegetables;
|
||||
public static OptionItem DisableMineOres;
|
||||
public static OptionItem DisableExtractFuel;
|
||||
public static OptionItem DisableCatchFish;
|
||||
public static OptionItem DisablePolishGem;
|
||||
public static OptionItem DisableHelpCritter;
|
||||
public static OptionItem DisableHoistSupplies;
|
||||
public static OptionItem DisableFixAntenna;
|
||||
public static OptionItem DisableBuildSandcastle;
|
||||
public static OptionItem DisableCrankGenerator;
|
||||
public static OptionItem DisableMonitorMushroom;
|
||||
public static OptionItem DisablePlayVideoGame;
|
||||
public static OptionItem DisableFindSignal;
|
||||
public static OptionItem DisableThrowFisbee;
|
||||
public static OptionItem DisableLiftWeights;
|
||||
public static OptionItem DisableCollectShells;
|
||||
|
||||
// Merchant Filters //
|
||||
public static OptionItem BaitCanBeSold;
|
||||
@@ -606,6 +625,9 @@ public static class Options
|
||||
public static OptionItem DisableZiplineOnFungle;
|
||||
public static OptionItem DisableZiplineFromTop;
|
||||
public static OptionItem DisableZiplineFromUnder;
|
||||
public static OptionItem DisableZiplineForImps;
|
||||
public static OptionItem DisableZiplineForNeutrals;
|
||||
public static OptionItem DisableZiplineForCrew;
|
||||
public static OptionItem ZiplineTravelTimeFromBottom;
|
||||
public static OptionItem ZiplineTravelTimeFromTop;
|
||||
|
||||
@@ -1118,6 +1140,10 @@ public static class Options
|
||||
InhibitorCDAfterMeetings = FloatOptionItem.Create(1511, "AfterMeetingKillCooldown", new(0f, 180f, 2.5f), 22.5f, TabGroup.ImpostorRoles, false)
|
||||
.SetParent(CustomRoleSpawnChances[CustomRoles.Inhibitor])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
RoleLoadingText = "Impostor roles\nNullifier";
|
||||
Nullifier.SetupCustomOption();
|
||||
RoleLoadingText = "Impostor roles\nChronomancer";
|
||||
Chronomancer.SetupCustomOption();
|
||||
RoleLoadingText = "Impostor roles\nStealth";
|
||||
Stealth.SetupCustomOption();
|
||||
RoleLoadingText = "Impostor roles\nPenguin";
|
||||
@@ -2669,6 +2695,16 @@ public static class Options
|
||||
.SetParent(DisableZiplineOnFungle)
|
||||
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
|
||||
|
||||
DisableZiplineForCrew = BooleanOptionItem.Create(22316, "DisableZiplineForCrew", false, TabGroup.GameSettings, false)
|
||||
.SetParent(DisableZiplineOnFungle)
|
||||
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
|
||||
DisableZiplineForImps = BooleanOptionItem.Create(22318, "DisableZiplineForImps", false, TabGroup.GameSettings, false)
|
||||
.SetParent(DisableZiplineOnFungle)
|
||||
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
|
||||
DisableZiplineForNeutrals = BooleanOptionItem.Create(22320, "DisableZiplineForNeutrals", false, TabGroup.GameSettings, false)
|
||||
.SetParent(DisableZiplineOnFungle)
|
||||
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
|
||||
|
||||
ZiplineTravelTimeFromBottom = FloatOptionItem.Create(22312, "ZiplineTravelTimeFromBottom", new(0.5f, 10f, 0.5f), 4f, TabGroup.GameSettings, false)
|
||||
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
|
||||
ZiplineTravelTimeFromTop = FloatOptionItem.Create(22314, "ZiplineTravelTimeFromTop", new(0.5f, 10f, 0.5f), 2f, TabGroup.GameSettings, false)
|
||||
@@ -3019,6 +3055,15 @@ public static class Options
|
||||
DisableDressMannequin = BooleanOptionItem.Create(23029, "DisableDressMannequin", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableShortTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableRoastMarshmallow = BooleanOptionItem.Create(23030, "DisableRoastMarshmallow", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableShortTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableCollectSamples = BooleanOptionItem.Create(23031, "DisableCollectSamples", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableShortTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableReplaceParts = BooleanOptionItem.Create(23032, "DisableReplaceParts", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableShortTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 84;
|
||||
|
||||
@@ -3042,6 +3087,27 @@ public static class Options
|
||||
DisableScanBoardingPass = BooleanOptionItem.Create(23105, "DisableScanBoardingPass", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableCollectVegetables = BooleanOptionItem.Create(23106, "DisableCollectVegetables", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableMineOres = BooleanOptionItem.Create(23107, "DisableMineOres", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableExtractFuel = BooleanOptionItem.Create(23108, "DisableExtractFuel", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableCatchFish = BooleanOptionItem.Create(23109, "DisableCatchFish", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisablePolishGem = BooleanOptionItem.Create(23110, "DisablePolishGem", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableHelpCritter = BooleanOptionItem.Create(23111, "DisableHelpCritter", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableHoistSupplies = BooleanOptionItem.Create(23112, "DisableHoistSupplies", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableCommonTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 85;
|
||||
|
||||
@@ -3055,24 +3121,21 @@ public static class Options
|
||||
DisableUnlockSafe = BooleanOptionItem.Create(23152, "DisableUnlockSafeTask", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 86;
|
||||
|
||||
DisableStartReactor = BooleanOptionItem.Create(23153, "DisableStartReactorTask", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableResetBreaker = BooleanOptionItem.Create(23154, "DisableResetBreakerTask", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 86;
|
||||
|
||||
DisableAlignEngineOutput = BooleanOptionItem.Create(23155, "DisableAlignEngineOutput", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableInspectSample = BooleanOptionItem.Create(23156, "DisableInspectSample", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 87;
|
||||
|
||||
DisableEmptyChute = BooleanOptionItem.Create(23157, "DisableEmptyChute", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
@@ -3086,7 +3149,7 @@ public static class Options
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 88;
|
||||
LoadingPercentage = 87;
|
||||
|
||||
DisableReplaceWaterJug = BooleanOptionItem.Create(23161, "DisableReplaceWaterJug", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
@@ -3103,6 +3166,36 @@ public static class Options
|
||||
DisableStartFans = BooleanOptionItem.Create(23165, "DisableStartFans", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableFixAntenna = BooleanOptionItem.Create(23166, "DisableFixAntenna", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableBuildSandcastle = BooleanOptionItem.Create(23167, "DisableBuildSandcastle", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 88;
|
||||
|
||||
DisableCrankGenerator = BooleanOptionItem.Create(23168, "DisableCrankGenerator", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableMonitorMushroom = BooleanOptionItem.Create(23169, "DisableMonitorMushroom", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisablePlayVideoGame = BooleanOptionItem.Create(23170, "DisablePlayVideoGame", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableFindSignal = BooleanOptionItem.Create(23171, "DisableFindSignal", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableThrowFisbee = BooleanOptionItem.Create(23172, "DisableThrowFisbee", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableLiftWeights = BooleanOptionItem.Create(23173, "DisableLiftWeights", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
DisableCollectShells = BooleanOptionItem.Create(23174, "DisableCollectShells", false, TabGroup.TaskSettings, false)
|
||||
.SetParent(DisableLongTasks)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
LoadingPercentage = 89;
|
||||
|
||||
|
||||
+2
-2
@@ -90,12 +90,12 @@ public static class Utils
|
||||
}
|
||||
|
||||
// Modded
|
||||
nt.SnapTo(location, (ushort)(nt.lastSequenceId + 8));
|
||||
if (AmongUsClient.Instance.AmHost) nt.SnapTo(location, (ushort)(nt.lastSequenceId + 8));
|
||||
|
||||
// Vanilla
|
||||
MessageWriter messageWriter = AmongUsClient.Instance.StartRpcImmediately(nt.NetId, (byte)RpcCalls.SnapTo, SendOption.Reliable);
|
||||
NetHelpers.WriteVector2(location, messageWriter);
|
||||
messageWriter.Write(nt.lastSequenceId + 10U);
|
||||
messageWriter.Write(nt.lastSequenceId + 100U);
|
||||
AmongUsClient.Instance.FinishRpcImmediately(messageWriter);
|
||||
|
||||
Logger.Info($"{pc.GetNameWithRole().RemoveHtmlTags()} => {location}", "TP");
|
||||
|
||||
@@ -253,6 +253,12 @@ class CheckMurderPatch
|
||||
killer.SyncSettings();
|
||||
}
|
||||
break;
|
||||
case CustomRoles.Nullifier:
|
||||
if (Nullifier.OnCheckMurder(killer, target)) return false;
|
||||
break;
|
||||
case CustomRoles.Chronomancer:
|
||||
Chronomancer.OnCheckMurder(killer, target);
|
||||
break;
|
||||
case CustomRoles.Penguin:
|
||||
if (!Penguin.OnCheckMurderAsKiller(killer, target)) return false;
|
||||
break;
|
||||
@@ -3663,6 +3669,10 @@ public static class PlayerControlCheckUseZiplinePatch
|
||||
{
|
||||
if (Options.DisableZiplineFromTop.GetBool() && fromTop) return false;
|
||||
if (Options.DisableZiplineFromUnder.GetBool() && !fromTop) return false;
|
||||
|
||||
if (__instance.GetCustomRole().IsImpostor() && Options.DisableZiplineForImps.GetBool()) return false;
|
||||
if (__instance.GetCustomRole().IsNeutral() && Options.DisableZiplineForNeutrals.GetBool()) return false;
|
||||
if (__instance.GetCustomRole().IsCrewmate() && Options.DisableZiplineForCrew.GetBool()) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
+80
-54
@@ -19,60 +19,86 @@ class AddTasksFromListPatch
|
||||
for (var i = 0; i < unusedTasks.Count; i++)
|
||||
{
|
||||
var task = unusedTasks[i];
|
||||
if (task.TaskType == TaskTypes.SwipeCard && Options.DisableSwipeCard.GetBool()) disabledTasks.Add(task);//SwipeCard task
|
||||
if (task.TaskType == TaskTypes.SubmitScan && Options.DisableSubmitScan.GetBool()) disabledTasks.Add(task);//SubmitScan tast
|
||||
if (task.TaskType == TaskTypes.UnlockSafe && Options.DisableUnlockSafe.GetBool()) disabledTasks.Add(task);//UnlockSafe task
|
||||
if (task.TaskType == TaskTypes.UploadData && Options.DisableUploadData.GetBool()) disabledTasks.Add(task);//UploadData task
|
||||
if (task.TaskType == TaskTypes.StartReactor && Options.DisableStartReactor.GetBool()) disabledTasks.Add(task);//StartReactor task
|
||||
if (task.TaskType == TaskTypes.ResetBreakers && Options.DisableResetBreaker.GetBool()) disabledTasks.Add(task);//ResetBreakers task
|
||||
if (task.TaskType == TaskTypes.VentCleaning && Options.DisableCleanVent.GetBool()) disabledTasks.Add(task);//CleanVent task
|
||||
if (task.TaskType == TaskTypes.CalibrateDistributor && Options.DisableCalibrateDistributor.GetBool()) disabledTasks.Add(task);//CalibrateDistributor task
|
||||
if (task.TaskType == TaskTypes.ChartCourse && Options.DisableChartCourse.GetBool()) disabledTasks.Add(task);//ChartCourse task
|
||||
if (task.TaskType == TaskTypes.StabilizeSteering && Options.DisableStabilizeSteering.GetBool()) disabledTasks.Add(task);//StabilizeSteering task
|
||||
if (task.TaskType == TaskTypes.CleanO2Filter && Options.DisableCleanO2Filter.GetBool()) disabledTasks.Add(task);//CleanO2Filter task
|
||||
if (task.TaskType == TaskTypes.UnlockManifolds && Options.DisableUnlockManifolds.GetBool()) disabledTasks.Add(task);//UnlockManifolds task
|
||||
if (task.TaskType == TaskTypes.PrimeShields && Options.DisablePrimeShields.GetBool()) disabledTasks.Add(task);//PrimeShields task
|
||||
if (task.TaskType == TaskTypes.MeasureWeather && Options.DisableMeasureWeather.GetBool()) disabledTasks.Add(task);//MeasureWeather task
|
||||
if (task.TaskType == TaskTypes.BuyBeverage && Options.DisableBuyBeverage.GetBool()) disabledTasks.Add(task);//BuyBeverage task
|
||||
if (task.TaskType == TaskTypes.AssembleArtifact && Options.DisableAssembleArtifact.GetBool()) disabledTasks.Add(task);//AssembleArtifact task
|
||||
if (task.TaskType == TaskTypes.SortSamples && Options.DisableSortSamples.GetBool()) disabledTasks.Add(task);//SortSamples task
|
||||
if (task.TaskType == TaskTypes.ProcessData && Options.DisableProcessData.GetBool()) disabledTasks.Add(task);//ProcessData task
|
||||
if (task.TaskType == TaskTypes.RunDiagnostics && Options.DisableRunDiagnostics.GetBool()) disabledTasks.Add(task);//RunDiagnostics task
|
||||
if (task.TaskType == TaskTypes.RepairDrill && Options.DisableRepairDrill.GetBool()) disabledTasks.Add(task);//RepairDrill task
|
||||
if (task.TaskType == TaskTypes.AlignTelescope && Options.DisableAlignTelescope.GetBool()) disabledTasks.Add(task);//AlignTelescope task
|
||||
if (task.TaskType == TaskTypes.RecordTemperature && Options.DisableRecordTemperature.GetBool()) disabledTasks.Add(task);//RecordTemperature task
|
||||
if (task.TaskType == TaskTypes.FillCanisters && Options.DisableFillCanisters.GetBool()) disabledTasks.Add(task);//FillCanisters task
|
||||
if (task.TaskType == TaskTypes.MonitorOxygen && Options.DisableMonitorTree.GetBool()) disabledTasks.Add(task);//MonitorTree task
|
||||
if (task.TaskType == TaskTypes.StoreArtifacts && Options.DisableStoreArtifacts.GetBool()) disabledTasks.Add(task);//StoreArtifacts task
|
||||
if (task.TaskType == TaskTypes.PutAwayPistols && Options.DisablePutAwayPistols.GetBool()) disabledTasks.Add(task);//PutAwayPistols task
|
||||
if (task.TaskType == TaskTypes.PutAwayRifles && Options.DisablePutAwayRifles.GetBool()) disabledTasks.Add(task);//PutAwayRifles task
|
||||
if (task.TaskType == TaskTypes.MakeBurger && Options.DisableMakeBurger.GetBool()) disabledTasks.Add(task);//MakeBurger task
|
||||
if (task.TaskType == TaskTypes.CleanToilet && Options.DisableCleanToilet.GetBool()) disabledTasks.Add(task);//CleanToilet task
|
||||
if (task.TaskType == TaskTypes.Decontaminate && Options.DisableDecontaminate.GetBool()) disabledTasks.Add(task);//Decontaminate task
|
||||
if (task.TaskType == TaskTypes.SortRecords && Options.DisableSortRecords.GetBool()) disabledTasks.Add(task);//SortRecords task
|
||||
if (task.TaskType == TaskTypes.FixShower && Options.DisableFixShower.GetBool()) disabledTasks.Add(task);//FixShower task
|
||||
if (task.TaskType == TaskTypes.PickUpTowels && Options.DisablePickUpTowels.GetBool()) disabledTasks.Add(task);//PickUpTowels task
|
||||
if (task.TaskType == TaskTypes.PolishRuby && Options.DisablePolishRuby.GetBool()) disabledTasks.Add(task);//PolishRuby task
|
||||
if (task.TaskType == TaskTypes.DressMannequin && Options.DisableDressMannequin.GetBool()) disabledTasks.Add(task);//DressMannequin task
|
||||
if (task.TaskType == TaskTypes.AlignEngineOutput && Options.DisableAlignEngineOutput.GetBool()) disabledTasks.Add(task);//AlignEngineOutput task
|
||||
if (task.TaskType == TaskTypes.InspectSample && Options.DisableInspectSample.GetBool()) disabledTasks.Add(task);//InspectSample task
|
||||
if (task.TaskType == TaskTypes.EmptyChute && Options.DisableEmptyChute.GetBool()) disabledTasks.Add(task);//EmptyChute task
|
||||
if (task.TaskType == TaskTypes.ClearAsteroids && Options.DisableClearAsteroids.GetBool()) disabledTasks.Add(task);//ClearAsteroids task
|
||||
if (task.TaskType == TaskTypes.WaterPlants && Options.DisableWaterPlants.GetBool()) disabledTasks.Add(task);//WaterPlants task
|
||||
if (task.TaskType == TaskTypes.OpenWaterways && Options.DisableOpenWaterways.GetBool()) disabledTasks.Add(task);//OpenWaterways task
|
||||
if (task.TaskType == TaskTypes.ReplaceWaterJug && Options.DisableReplaceWaterJug.GetBool()) disabledTasks.Add(task);//ReplaceWaterJug task
|
||||
if (task.TaskType == TaskTypes.RebootWifi && Options.DisableRebootWifi.GetBool()) disabledTasks.Add(task);//RebootWifi task
|
||||
if (task.TaskType == TaskTypes.DevelopPhotos && Options.DisableDevelopPhotos.GetBool()) disabledTasks.Add(task);//DevelopPhotos task
|
||||
if (task.TaskType == TaskTypes.RewindTapes && Options.DisableRewindTapes.GetBool()) disabledTasks.Add(task);//RewindTapes task
|
||||
if (task.TaskType == TaskTypes.StartFans && Options.DisableStartFans.GetBool()) disabledTasks.Add(task);//StartFans task
|
||||
if (task.TaskType == TaskTypes.FixWiring && Options.DisableFixWiring.GetBool()) disabledTasks.Add(task);//FixWiring task (nightmare)
|
||||
if (task.TaskType == TaskTypes.EnterIdCode && Options.DisableEnterIdCode.GetBool()) disabledTasks.Add(task);//EnterIdCode task
|
||||
if (task.TaskType == TaskTypes.InsertKeys && Options.DisableInsertKeys.GetBool()) disabledTasks.Add(task);//InsertKeys task
|
||||
if (task.TaskType == TaskTypes.ScanBoardingPass && Options.DisableScanBoardingPass.GetBool()) disabledTasks.Add(task);//ScanBoardingPass task
|
||||
if (task.TaskType == TaskTypes.EmptyGarbage && Options.DisableEmptyGarbage.GetBool()) disabledTasks.Add(task);//EmptyGarbage task
|
||||
if (task.TaskType == TaskTypes.FuelEngines && Options.DisableFuelEngines.GetBool()) disabledTasks.Add(task);//FuelEngines task
|
||||
if (task.TaskType == TaskTypes.DivertPower && Options.DisableDivertPower.GetBool()) disabledTasks.Add(task);//DivertPower task v1.0a
|
||||
if (task.TaskType == TaskTypes.FixWeatherNode && Options.DisableActivateWeatherNodes.GetBool()) disabledTasks.Add(task);//ActivateWeatherNodes task
|
||||
switch (task.TaskType)
|
||||
{
|
||||
case TaskTypes.SwipeCard when Options.DisableSwipeCard.GetBool():
|
||||
case TaskTypes.SubmitScan when Options.DisableSubmitScan.GetBool():
|
||||
case TaskTypes.UnlockSafe when Options.DisableUnlockSafe.GetBool():
|
||||
case TaskTypes.UploadData when Options.DisableUploadData.GetBool():
|
||||
case TaskTypes.StartReactor when Options.DisableStartReactor.GetBool():
|
||||
case TaskTypes.ResetBreakers when Options.DisableResetBreaker.GetBool():
|
||||
case TaskTypes.VentCleaning when Options.DisableCleanVent.GetBool():
|
||||
case TaskTypes.CalibrateDistributor when Options.DisableCalibrateDistributor.GetBool():
|
||||
case TaskTypes.ChartCourse when Options.DisableChartCourse.GetBool():
|
||||
case TaskTypes.StabilizeSteering when Options.DisableStabilizeSteering.GetBool():
|
||||
case TaskTypes.CleanO2Filter when Options.DisableCleanO2Filter.GetBool():
|
||||
case TaskTypes.UnlockManifolds when Options.DisableUnlockManifolds.GetBool():
|
||||
case TaskTypes.PrimeShields when Options.DisablePrimeShields.GetBool():
|
||||
case TaskTypes.MeasureWeather when Options.DisableMeasureWeather.GetBool():
|
||||
case TaskTypes.BuyBeverage when Options.DisableBuyBeverage.GetBool():
|
||||
case TaskTypes.AssembleArtifact when Options.DisableAssembleArtifact.GetBool():
|
||||
case TaskTypes.SortSamples when Options.DisableSortSamples.GetBool():
|
||||
case TaskTypes.ProcessData when Options.DisableProcessData.GetBool():
|
||||
case TaskTypes.RunDiagnostics when Options.DisableRunDiagnostics.GetBool():
|
||||
case TaskTypes.RepairDrill when Options.DisableRepairDrill.GetBool():
|
||||
case TaskTypes.AlignTelescope when Options.DisableAlignTelescope.GetBool():
|
||||
case TaskTypes.RecordTemperature when Options.DisableRecordTemperature.GetBool():
|
||||
case TaskTypes.FillCanisters when Options.DisableFillCanisters.GetBool():
|
||||
case TaskTypes.MonitorOxygen when Options.DisableMonitorTree.GetBool():
|
||||
case TaskTypes.StoreArtifacts when Options.DisableStoreArtifacts.GetBool():
|
||||
case TaskTypes.PutAwayPistols when Options.DisablePutAwayPistols.GetBool():
|
||||
case TaskTypes.PutAwayRifles when Options.DisablePutAwayRifles.GetBool():
|
||||
case TaskTypes.MakeBurger when Options.DisableMakeBurger.GetBool():
|
||||
case TaskTypes.CleanToilet when Options.DisableCleanToilet.GetBool():
|
||||
case TaskTypes.Decontaminate when Options.DisableDecontaminate.GetBool():
|
||||
case TaskTypes.SortRecords when Options.DisableSortRecords.GetBool():
|
||||
case TaskTypes.FixShower when Options.DisableFixShower.GetBool():
|
||||
case TaskTypes.PickUpTowels when Options.DisablePickUpTowels.GetBool():
|
||||
case TaskTypes.PolishRuby when Options.DisablePolishRuby.GetBool():
|
||||
case TaskTypes.DressMannequin when Options.DisableDressMannequin.GetBool():
|
||||
case TaskTypes.AlignEngineOutput when Options.DisableAlignEngineOutput.GetBool():
|
||||
case TaskTypes.InspectSample when Options.DisableInspectSample.GetBool():
|
||||
case TaskTypes.EmptyChute when Options.DisableEmptyChute.GetBool():
|
||||
case TaskTypes.ClearAsteroids when Options.DisableClearAsteroids.GetBool():
|
||||
case TaskTypes.WaterPlants when Options.DisableWaterPlants.GetBool():
|
||||
case TaskTypes.OpenWaterways when Options.DisableOpenWaterways.GetBool():
|
||||
case TaskTypes.ReplaceWaterJug when Options.DisableReplaceWaterJug.GetBool():
|
||||
case TaskTypes.RebootWifi when Options.DisableRebootWifi.GetBool():
|
||||
case TaskTypes.DevelopPhotos when Options.DisableDevelopPhotos.GetBool():
|
||||
case TaskTypes.RewindTapes when Options.DisableRewindTapes.GetBool():
|
||||
case TaskTypes.StartFans when Options.DisableStartFans.GetBool():
|
||||
case TaskTypes.FixWiring when Options.DisableFixWiring.GetBool():
|
||||
case TaskTypes.EnterIdCode when Options.DisableEnterIdCode.GetBool():
|
||||
case TaskTypes.InsertKeys when Options.DisableInsertKeys.GetBool():
|
||||
case TaskTypes.ScanBoardingPass when Options.DisableScanBoardingPass.GetBool():
|
||||
case TaskTypes.EmptyGarbage when Options.DisableEmptyGarbage.GetBool():
|
||||
case TaskTypes.FuelEngines when Options.DisableFuelEngines.GetBool():
|
||||
case TaskTypes.DivertPower when Options.DisableDivertPower.GetBool():
|
||||
case TaskTypes.FixWeatherNode when Options.DisableActivateWeatherNodes.GetBool():
|
||||
case TaskTypes.RoastMarshmallow when Options.DisableRoastMarshmallow.GetBool():
|
||||
case TaskTypes.CollectSamples when Options.DisableCollectSamples.GetBool():
|
||||
case TaskTypes.ReplaceParts when Options.DisableReplaceParts.GetBool():
|
||||
case TaskTypes.CollectVegetables when Options.DisableCollectVegetables.GetBool():
|
||||
case TaskTypes.MineOres when Options.DisableMineOres.GetBool():
|
||||
case TaskTypes.ExtractFuel when Options.DisableExtractFuel.GetBool():
|
||||
case TaskTypes.CatchFish when Options.DisableCatchFish.GetBool():
|
||||
case TaskTypes.PolishGem when Options.DisablePolishGem.GetBool():
|
||||
case TaskTypes.HelpCritter when Options.DisableHelpCritter.GetBool():
|
||||
case TaskTypes.HoistSupplies when Options.DisableHoistSupplies.GetBool():
|
||||
case TaskTypes.FixAntenna when Options.DisableFixAntenna.GetBool():
|
||||
case TaskTypes.BuildSandcastle when Options.DisableBuildSandcastle.GetBool():
|
||||
case TaskTypes.CrankGenerator when Options.DisableCrankGenerator.GetBool():
|
||||
case TaskTypes.MonitorMushroom when Options.DisableMonitorMushroom.GetBool():
|
||||
case TaskTypes.PlayVideogame when Options.DisablePlayVideoGame.GetBool():
|
||||
case TaskTypes.TuneRadio when Options.DisableFindSignal.GetBool():
|
||||
case TaskTypes.TestFrisbee when Options.DisableThrowFisbee.GetBool():
|
||||
case TaskTypes.LiftWeights when Options.DisableLiftWeights.GetBool():
|
||||
case TaskTypes.CollectShells when Options.DisableCollectShells.GetBool():
|
||||
disabledTasks.Add(task);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < disabledTasks.Count; i++)
|
||||
{
|
||||
|
||||
@@ -62,6 +62,9 @@ tilesteep#2740,Engineer
|
||||
imagetense#5619,Chinese//Non aum hacker
|
||||
gabledebb#2717.部屋潰しガチ勢SEX
|
||||
coopfunny#1119,Terklom
|
||||
lawnhoppy#4726,封禁
|
||||
larkyprow#0965,9eb11d42b,hacker
|
||||
rapidmatch#3120,7a320d676,rawpotato6
|
||||
|
||||
## Griefer
|
||||
setmolar#4374,藏族顶针
|
||||
@@ -71,6 +74,7 @@ whipsame#5558,齐心 习母
|
||||
epicdoer#2966,毛泽车
|
||||
ternaryjog#6069,习皇帝万岁
|
||||
bigtunnel#1506,카제하야가꿈 //Discrimination against Chinese
|
||||
feeprim#7337,Athena //Racism
|
||||
|
||||
## 冒充开发者
|
||||
polkaoval#0453,自作Modな橋本環奈
|
||||
|
||||
@@ -2463,8 +2463,8 @@
|
||||
"DivinatorCheck.Result25","<b>{0}</b>是扫把星、骑士、老兵或刽子手其中之一","<b>{0}</b> is either Jinx, Vigilante, Veteran, Enigma, Task Manager, Pyromaniac, or Hangman","","",""
|
||||
"DivinatorCheck.Result26","<b>{0}</b>是通灵师、灵魂召唤师、灵魂论者、寄生虫、隐匿者或魅影其中之一","<b>{0}</b> is either Medium, Camera Man, Spiritcaller, Spiritualist, Parasite, Swooper, or Wraith","","",""
|
||||
"DivinatorCheck.Result27","<b>{0}</b>可能是时间操控者, 时间之主, 蚀时者, 千面鬼, 或者狙击手其中之一","<b>{0}</b> is either Time Manager, Curse, Time Master, Time Thief, Tether, Shapemaster, or Sniper"
|
||||
"DivinatorCheck.Result28","<b>{0}</b>可能是傀儡师, 巫婆, 捕快, 传送师, 龙卷风, 或者嗜血杀手其中之一","<b>{0}</b> is either Puppeteer, Deputy, Aid, Transporter, Twister, Mercenary","","",""
|
||||
"DivinatorCheck.Result29","<b>{0}</b>可能是船鬼, 展现者, 工作狂, 幻影, 或者恐怖分子其中之一","<b>{0}</b> is either Crewpostor, Marshall, Workaholic, Phantom, Speedrunner, or Terrorist","","",""
|
||||
"DivinatorCheck.Result28","<b>{0}</b>可能是傀儡师, 巫婆, 捕快, 传送师, 龙卷风, 或者嗜血杀手其中之一","<b>{0}</b> is either Puppeteer, Chronomancer, Deputy, Aid, Transporter, Twister, Mercenary","","",""
|
||||
"DivinatorCheck.Result29","<b>{0}</b>可能是船鬼, 展现者, 工作狂, 幻影, 或者恐怖分子其中之一","<b>{0}</b> is either Crewpostor, Marshall, Nullifier, Workaholic, Phantom, Speedrunner, or Terrorist","","",""
|
||||
|
||||
"## Hidden Role Chances"
|
||||
"SunnyboyChance","<color=#ff9902>阳光开朗大男孩</color>概率","<color=#ff9902>Sunnyboy</color> Chance","","",""
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -14,7 +14,7 @@ public static class Admirer
|
||||
|
||||
public static OptionItem AdmireCooldown;
|
||||
public static OptionItem KnowTargetRole;
|
||||
private static int AdmireLimit;
|
||||
public static int AdmireLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
@@ -39,7 +39,7 @@ public static class Admirer
|
||||
}
|
||||
public static bool IsEnable => playerIdList.Any();
|
||||
|
||||
private static void SendRPC()
|
||||
public static void SendRPC()
|
||||
{
|
||||
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetAdmireLimit, SendOption.Reliable, -1);
|
||||
writer.Write(AdmireLimit);
|
||||
|
||||
@@ -55,7 +55,7 @@ public static class Cleanser
|
||||
else x = Color.gray;
|
||||
return Utils.ColorString(x, $"({CleanserUsesOpt.GetInt() - CleanserUses[playerId]})");
|
||||
}
|
||||
private static void SendRPC(byte playerId)
|
||||
public static void SendRPC(byte playerId)
|
||||
{
|
||||
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetCleanserCleanLimit, SendOption.Reliable, -1);
|
||||
writer.Write(playerId);
|
||||
|
||||
@@ -17,7 +17,7 @@ public static class Deputy
|
||||
public static OptionItem DeputyHandcuffCDForTarget;
|
||||
private static OptionItem DeputyHandcuffDelay;
|
||||
|
||||
private static int HandcuffLimit;
|
||||
public static int HandcuffLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
@@ -47,12 +47,12 @@ public static class Deputy
|
||||
}
|
||||
public static bool IsEnable => playerIdList.Any();
|
||||
|
||||
//private static void SendRPC()
|
||||
//{
|
||||
// MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetDeputyHandcuffLimit, SendOption.Reliable, -1);
|
||||
// writer.Write(HandcuffLimit);
|
||||
// AmongUsClient.Instance.FinishRpcImmediately(writer);
|
||||
//}
|
||||
public static void SendRPC()
|
||||
{
|
||||
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetDeputyHandcuffLimit, SendOption.Reliable, -1);
|
||||
writer.Write(HandcuffLimit);
|
||||
AmongUsClient.Instance.FinishRpcImmediately(writer);
|
||||
}
|
||||
public static void ReceiveRPC(MessageReader reader)
|
||||
{
|
||||
HandcuffLimit = reader.ReadInt32();
|
||||
@@ -65,6 +65,7 @@ public static class Deputy
|
||||
if (CanBeHandcuffed(target))
|
||||
{
|
||||
HandcuffLimit--;
|
||||
SendRPC();
|
||||
|
||||
killer.Notify(Utils.ColorString(Utils.GetRoleColor(CustomRoles.Deputy), GetString("DeputyHandcuffedPlayer")));
|
||||
|
||||
|
||||
@@ -344,9 +344,9 @@ public static class Divinator
|
||||
=> "Result27",
|
||||
|
||||
CustomRoles.Puppeteer or
|
||||
//CustomRoles.NWitch or
|
||||
CustomRoles.Deputy or
|
||||
CustomRoles.Transporter or
|
||||
CustomRoles.Chronomancer or
|
||||
CustomRoles.Twister or
|
||||
CustomRoles.Aid or
|
||||
CustomRoles.SerialKiller
|
||||
@@ -355,6 +355,7 @@ public static class Divinator
|
||||
CustomRoles.Crewpostor or
|
||||
CustomRoles.Marshall or
|
||||
CustomRoles.Workaholic or
|
||||
CustomRoles.Nullifier or
|
||||
CustomRoles.Phantom or
|
||||
CustomRoles.Speedrunner or
|
||||
CustomRoles.Terrorist
|
||||
|
||||
@@ -16,7 +16,7 @@ public static class Monarch
|
||||
public static OptionItem KnightMax;
|
||||
|
||||
|
||||
private static int KnightLimit;
|
||||
public static int KnightLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
@@ -42,12 +42,12 @@ public static class Monarch
|
||||
}
|
||||
public static bool IsEnable => playerIdList.Any();
|
||||
|
||||
//private static void SendRPC()
|
||||
//{
|
||||
// MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetMonarchKnightLimit, SendOption.Reliable, -1);
|
||||
// writer.Write(KnightLimit);
|
||||
// AmongUsClient.Instance.FinishRpcImmediately(writer);
|
||||
//}
|
||||
public static void SendRPC()
|
||||
{
|
||||
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetMonarchKnightLimit, SendOption.Reliable, -1);
|
||||
writer.Write(KnightLimit);
|
||||
AmongUsClient.Instance.FinishRpcImmediately(writer);
|
||||
}
|
||||
public static void ReceiveRPC(MessageReader reader)
|
||||
{
|
||||
KnightLimit = reader.ReadInt32();
|
||||
@@ -60,6 +60,7 @@ public static class Monarch
|
||||
if (CanBeKnighted(target))
|
||||
{
|
||||
KnightLimit--;
|
||||
SendRPC();
|
||||
target.RpcSetCustomRole(CustomRoles.Knighted);
|
||||
|
||||
killer.Notify(Utils.ColorString(Utils.GetRoleColor(CustomRoles.Monarch), GetString("MonarchKnightedPlayer")));
|
||||
@@ -87,11 +88,5 @@ public static class Monarch
|
||||
return false;
|
||||
}
|
||||
public static string GetKnightLimit() => Utils.ColorString(KnightLimit >= 1 ? Utils.GetRoleColor(CustomRoles.Monarch).ShadeColor(0.25f) : Color.gray, $"({KnightLimit})");
|
||||
public static bool CanBeKnighted(this PlayerControl pc)
|
||||
{
|
||||
return pc != null && !pc.GetCustomRole().IsNotKnightable() && !pc.Is(CustomRoles.Knighted) && !pc.Is(CustomRoles.TicketsStealer)
|
||||
&& !
|
||||
false
|
||||
;
|
||||
}
|
||||
public static bool CanBeKnighted(this PlayerControl pc) => pc != null && !pc.GetCustomRole().IsNotKnightable() && !pc.Is(CustomRoles.Knighted) && !pc.Is(CustomRoles.TicketsStealer);
|
||||
}
|
||||
@@ -107,6 +107,8 @@ public static class Oracle
|
||||
CustomRoles.SerialKiller or
|
||||
// CustomRoles.Mare or
|
||||
CustomRoles.Inhibitor or
|
||||
CustomRoles.Nullifier or
|
||||
CustomRoles.Chronomancer or
|
||||
CustomRoles.Stealth or
|
||||
CustomRoles.Penguin or
|
||||
CustomRoles.Sapper or
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TOHE.Roles.Impostor
|
||||
{
|
||||
public static class Chronomancer
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TOHE.Roles.Crewmate;
|
||||
using TOHE.Roles.Neutral;
|
||||
using static TOHE.Options;
|
||||
|
||||
namespace TOHE.Roles.Impostor
|
||||
{
|
||||
internal class Nullifier
|
||||
{
|
||||
private static readonly int Id = 643000;
|
||||
public static List<byte> playerIdList = new();
|
||||
|
||||
public static OptionItem NullCD;
|
||||
private static OptionItem KCD;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
SetupRoleOptions(Id, TabGroup.ImpostorRoles, CustomRoles.Nullifier);
|
||||
NullCD = FloatOptionItem.Create(Id + 10, "NullCD", new(0f, 180f, 2.5f), 30f, TabGroup.ImpostorRoles, false)
|
||||
.SetParent(CustomRoleSpawnChances[CustomRoles.Nullifier])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
KCD = FloatOptionItem.Create(Id + 11, "KillCooldown", new(0f, 180f, 2.5f), 25f, TabGroup.ImpostorRoles, false)
|
||||
.SetParent(CustomRoleSpawnChances[CustomRoles.Nullifier])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
}
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
playerIdList = new();
|
||||
}
|
||||
|
||||
public static void Add(byte playerId)
|
||||
{
|
||||
playerIdList.Add(playerId);
|
||||
}
|
||||
|
||||
public static bool IsEnable => playerIdList.Any();
|
||||
|
||||
public static bool OnCheckMurder(PlayerControl killer, PlayerControl target)
|
||||
{
|
||||
if (killer == null) return false;
|
||||
if (target == null) return false;
|
||||
|
||||
return killer.CheckDoubleTrigger(target, () =>
|
||||
{
|
||||
switch (target.GetCustomRole())
|
||||
{
|
||||
case CustomRoles.Admirer:
|
||||
Admirer.AdmireLimit--;
|
||||
Admirer.SendRPC();
|
||||
break;
|
||||
case CustomRoles.Aid:
|
||||
Aid.UseLimit[target.PlayerId]--;
|
||||
break;
|
||||
case CustomRoles.Bloodhound:
|
||||
Bloodhound.UseLimit[target.PlayerId]--;
|
||||
Bloodhound.SendRPCPlus(target.PlayerId, true);
|
||||
break;
|
||||
case CustomRoles.CameraMan:
|
||||
CameraMan.UseLimit[target.PlayerId]--;
|
||||
CameraMan.SendRPC(target.PlayerId, true);
|
||||
break;
|
||||
case CustomRoles.Chameleon:
|
||||
Chameleon.UseLimit[target.PlayerId]--;
|
||||
Chameleon.SendRPCPlus(target.PlayerId, true);
|
||||
break;
|
||||
case CustomRoles.Cleanser:
|
||||
Cleanser.CleanserUses[target.PlayerId]--;
|
||||
Cleanser.SendRPC(target.PlayerId);
|
||||
break;
|
||||
case CustomRoles.Crusader:
|
||||
Crusader.CrusaderLimit[target.PlayerId]--;
|
||||
break;
|
||||
case CustomRoles.Deputy:
|
||||
Deputy.HandcuffLimit--;
|
||||
Deputy.SendRPC();
|
||||
break;
|
||||
case CustomRoles.Divinator:
|
||||
Divinator.CheckLimit[target.PlayerId]--;
|
||||
Divinator.SendRPC(target.PlayerId, true);
|
||||
break;
|
||||
case CustomRoles.Doormaster:
|
||||
Doormaster.UseLimit[target.PlayerId]--;
|
||||
Doormaster.SendRPC(target.PlayerId, true);
|
||||
break;
|
||||
case CustomRoles.Mediumshiper:
|
||||
Mediumshiper.ContactLimit[target.PlayerId]--;
|
||||
Mediumshiper.SendRPC(target.PlayerId, true);
|
||||
break;
|
||||
case CustomRoles.Monarch:
|
||||
Monarch.KnightLimit--;
|
||||
Monarch.SendRPC();
|
||||
break;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace TOHE.Roles.Impostor
|
||||
{
|
||||
public static class Stealth
|
||||
{
|
||||
private static readonly int Id = 641800;
|
||||
private static readonly int Id = 641900;
|
||||
private static List<byte> playerIdList = new();
|
||||
|
||||
private static OptionItem optionExcludeImpostors;
|
||||
|
||||
@@ -33,8 +33,8 @@ public class Main : BasePlugin
|
||||
public static ConfigEntry<string> DebugKeyInput { get; private set; }
|
||||
public static readonly string MainMenuText = " ";
|
||||
public const string PluginGuid = "com.gurge44.toheplus";
|
||||
public const string PluginVersion = "1.3.0";
|
||||
public const string PluginDisplayVersion = "1.3.0";
|
||||
public const string PluginVersion = "1.3.1";
|
||||
public const string PluginDisplayVersion = "1.3.1";
|
||||
public static readonly string SupportedAUVersion = "2023.10.24";
|
||||
public const int PluginCreate = 3;
|
||||
public const bool Canary = false;
|
||||
@@ -634,6 +634,8 @@ public enum CustomRoles
|
||||
Miner,
|
||||
Escapee,
|
||||
Inhibitor,
|
||||
Chronomancer,
|
||||
Nullifier,
|
||||
Stealth,
|
||||
Penguin,
|
||||
Sapper,
|
||||
|
||||
Reference in new issue
Block a user