some fixes + buff Saboteur & add Inhibitor speed setting

This commit is contained in:
Gurge44 committed 2025-06-17 14:00:30 +02:00
1 parent 9cc454f37e
commit 0105ce9f92
13 files changed
+137 -33

No files matched your search

+2 -1
View File
@@ -137,7 +137,8 @@ public static class CaptureTheFlag
RoundsToPlay.SetHidden(args.CurrentValue != 0);
PointsToWin.SetHidden(args.CurrentValue != 1);
TimeLimit.SetHidden(args.CurrentValue != 2);
});
})
.SetRunEventOnLoad(true);
RoundsToPlay = new IntegerOptionItem(id + 9, "CTF_RoundsToPlay", new(1, 10, 1), 3, TabGroup.GameSettings)
.SetParent(GameEndCriteria)
+4 -2
View File
@@ -164,7 +164,8 @@ public static class KingOfTheZones
{
if (!GameEndsByTimeLimit.GetBool() && !GameEndsByPoints.GetBool())
GameEndsByTimeLimit.SetValue(1);
});
})
.SetRunEventOnLoad(true);
PointsToWin = new IntegerOptionItem(id++, "KingOfTheZones.PointsToWin", new(30, 300, 10), 120, TabGroup.GameSettings)
.SetParent(GameEndsByPoints)
@@ -179,7 +180,8 @@ public static class KingOfTheZones
{
if (!GameEndsByTimeLimit.GetBool() && !GameEndsByPoints.GetBool())
GameEndsByPoints.SetValue(1);
});
})
.SetRunEventOnLoad(true);
MaxGameLength = new IntegerOptionItem(id++, "KingOfTheZones.MaxGameLength", new(10, 900, 10), 300, TabGroup.GameSettings)
.SetParent(GameEndsByTimeLimit)
+23 -2
View File
@@ -415,8 +415,6 @@ public static class Options
public static OptionItem AutoPlayAgainCountdown;
public static OptionItem AutoStartTimer;
public static OptionItem InhibitorCD;
public static OptionItem InhibitorCDAfterMeetings;
public static OptionItem SaboteurCD;
public static OptionItem SaboteurCDAfterMeetings;
public static OptionItem PhantomCanVent;
@@ -442,7 +440,9 @@ public static class Options
public static OptionItem DoorsResetMode;
public static OptionItem ChangeDecontaminationTime;
public static OptionItem DecontaminationTimeOnMiraHQ;
public static OptionItem DecontaminationDoorOpenTimeOnMiraHQ;
public static OptionItem DecontaminationTimeOnPolus;
public static OptionItem DecontaminationDoorOpenTimeOnPolus;
public static OptionItem ExtraKillCooldownOnPolus;
public static OptionItem ExtraKillCooldownOnAirship;
public static OptionItem ExtraKillCooldownOnFungle;
@@ -906,6 +906,15 @@ public static class Options
CompileAutoGMRotationSettings();
foreach (OptionItem optionItem in OptionItem.AllOptions)
{
if (optionItem.UpdateValueEventRunsOnLoad)
{
int value = optionItem.CurrentValue;
optionItem.CallUpdateValueEvent(value, value);
}
}
#if DEBUG
// Used for generating the table of roles for the README
try
@@ -1856,12 +1865,24 @@ public static class Options
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
// Decontamination door open time on MiraHQ
DecontaminationDoorOpenTimeOnMiraHQ = new FloatOptionItem(60509, "DecontaminationDoorOpenTimeOnMiraHQ", new(0.5f, 10f, 0.25f), 3f, TabGroup.GameSettings)
.SetParent(ChangeDecontaminationTime)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
// Decontamination time on Polus
DecontaminationTimeOnPolus = new FloatOptionItem(60505, "DecontaminationTimeOnPolus", new(0.5f, 10f, 0.25f), 3f, TabGroup.GameSettings)
.SetParent(ChangeDecontaminationTime)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
// Decontamination door open time on Polus
DecontaminationDoorOpenTimeOnPolus = new FloatOptionItem(60510, "DecontaminationDoorOpenTimeOnPolus", new(0.5f, 10f, 0.25f), 3f, TabGroup.GameSettings)
.SetParent(ChangeDecontaminationTime)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
ExtraKillCooldownOnPolus = new FloatOptionItem(60506, "ExtraKillCooldownOnPolus", new(0f, 60f, 0.5f), 0f, TabGroup.GameSettings)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new Color32(19, 188, 233, byte.MaxValue));
+7 -1
View File
@@ -89,6 +89,7 @@ public abstract class OptionItem
public OptionItem Parent { get; private set; }
public event EventHandler<UpdateValueEventArgs> UpdateValueEvent;
public bool UpdateValueEventRunsOnLoad { get; private set; }
// Setter
private OptionItem Do(Action<OptionItem> action)
@@ -166,6 +167,11 @@ public abstract class OptionItem
return Do(_ => UpdateValueEvent += handler);
}
public OptionItem SetRunEventOnLoad(bool value)
{
return Do(_ => UpdateValueEventRunsOnLoad = value);
}
public OptionItem AddReplacement((string key, string value) kvp)
{
return Do(_ =>
@@ -321,7 +327,7 @@ public abstract class OptionItem
// EventArgs
private void CallUpdateValueEvent(int beforeValue, int currentValue)
public void CallUpdateValueEvent(int beforeValue, int currentValue)
{
if (UpdateValueEvent == null) return;
+4 -4
View File
@@ -2508,12 +2508,14 @@ internal static class ChatCommands
if (args.Length < 2) return;
if (args[1].Length is > 15 or < 1)
string name = string.Join(' ', args[1..]);
if (name.Length is > 15 or < 1)
Utils.SendMessage(GetString("Message.AllowNameLength"), player.PlayerId);
else
{
if (player.IsLocalPlayer())
Main.NickName = args[1];
Main.NickName = name;
else
{
if (!Options.PlayerCanSetName.GetBool() && !IsPlayerVIP(player.FriendCode) && !player.FriendCode.GetDevUser().up)
@@ -2528,8 +2530,6 @@ internal static class ChatCommands
return;
}
string name = string.Join(' ', args[1..]);
if (name.Length is > 50 or < 1)
{
Utils.SendMessage(GetString("Message.AllowNameLength"), player.PlayerId, sendOption: SendOption.None);
+8 -4
View File
@@ -11,15 +11,19 @@ public static class DeconSystemUpdateSystemPatch
if (Options.ChangeDecontaminationTime.GetBool())
{
float deconTime = Main.CurrentMap switch
__instance.DoorOpenTime = Main.CurrentMap switch
{
MapNames.MiraHQ => Options.DecontaminationDoorOpenTimeOnMiraHQ.GetFloat(),
MapNames.Polus => Options.DecontaminationDoorOpenTimeOnPolus.GetFloat(),
_ => 3f
};
__instance.DeconTime = Main.CurrentMap switch
{
MapNames.MiraHQ => Options.DecontaminationTimeOnMiraHQ.GetFloat(),
MapNames.Polus => Options.DecontaminationTimeOnPolus.GetFloat(),
_ => 3f
};
__instance.DoorOpenTime = deconTime;
__instance.DeconTime = deconTime;
}
else
{
+4
View File
@@ -501,6 +501,9 @@ internal static class StartGameHostPatch
private static IEnumerator StartGameHost()
{
try { PlayerControl.LocalPlayer.RpcSetName(Main.AllPlayerNames[0]); }
catch (Exception e) { Utils.ThrowException(e); }
string loadingTextText1 = GetString("LoadingBarText.1");
LoadingBarManager loadingBarManager = FastDestroyableSingleton<LoadingBarManager>.Instance;
@@ -569,6 +572,7 @@ internal static class StartGameHostPatch
lock (AUClient.allClients)
{
// ReSharper disable once ForCanBeConvertedToForeach <- foreach would throw an exception in case of a disconnect
for (var index = 0; index < AUClient.allClients.Count; ++index)
{
ClientData allClient = AUClient.allClients[index];
+17 -14
View File
@@ -686,17 +686,17 @@
"TrackerEHRInfoLong": "(Crewmates):\\nAs the Tracker, you can track players by placing a tracker on them using your track button.",
"PhantomEHRInfoLong": "(Impostors):\\nAs the Phantom, you can go invisible for a short period. During this time, you can't be seen by Crewmates.",
"BountyHunterInfoLong": "(Impostors):\\nIf you successfully eliminate your assigned target, your next kill cooldown will decrease, but if you eliminate anyone else, your next kill cooldown will increase; the target will switch after a predetermined time.",
"FireWorksInfoLong": "(Impostors):\\nAs a Fireworker, you can plant up to three firework bombs using shapeshift/by petting. If you're the last impostor standing, you can use shapeshift/pet to detonate the bombs and cause area damage. But be careful, the bombs can also harm you. If the bombs eliminate all surviving players, it's a victory for the impostors.",
"FireWorksInfoLong": "(Impostors):\\nAs a Fireworker, you can plant up to three firework bombs using vanish/by petting. If you're the last impostor standing, you can use vanish/pet to detonate the bombs and cause area damage. But be careful, the bombs can also harm you. If the bombs eliminate all surviving players, it's a victory for the impostors.",
"SerialKillerInfoLong": "(Impostors):\\nYou have a shorter kill cooldown than other impostors, but you will die if you don't kill before the end of your shapeshift cooldown.",
"MareInfoLong": "(Add-ons):\\nAs the Mare, you have a low kill cooldown but can only kill during lights. Additionally, your name will appear in red during lights. Only assigned to Impostors and cannot be guessed.",
"VampireInfoLong": "(Impostors):\\nVampire bites delay death. Meeting kills bitten. Biting Bait = normal kill, self-report.",
"WarlockInfoLong": "(Impostors):\\nWarlock can curse a player while not Shapeshifted. If they Shapeshift/Pet after cursing, the closest player to the cursed one is killed, regardless of distance. Only one player can be cursed at a time.\\n\\nKilling, shapeshifting/petting, and cursing all have separate cooldowns. The Warlock may freeze in place for a few seconds after killing via cursed player.",
"WarlockInfoLong": "(Impostors):\\nWarlock can curse a player while not Shapeshifted. If they vanish/pet after cursing, the closest player to the cursed one is killed, regardless of distance. Only one player can be cursed at a time.\\n\\nKilling, shapeshifting/petting, and cursing all have separate cooldowns. The Warlock may freeze in place for a few seconds after killing via cursed player.",
"ZombieInfoLong": "(Impostors):\\nZombie has a short kill cooldown but moves very slowly and has very little vision. Zombie will not be voted out by anyone other than the Dictator, and the movement speed of Zombie will gradually slow down as they make kills or time passes.",
"AssassinInfoLong": "(Impostors):\\nThe Ninja can use the kill button to mark a target, and if the mark is successful, a shield animation will show as a reminder. The Ninja can then use the shapeshift/pet to teleport to the marked person and kill the marked person. Ninja cannot kill regularly, but may be able to kill regularly after assassination according to the host's settings.",
"AssassinInfoLong": "(Impostors):\\nThe Ninja can use the kill button to mark a target, and if the mark is successful, a shield animation will show as a reminder. The Ninja can then use the vanish/pet to teleport to the marked person and kill the marked person. Ninja cannot kill regularly, but may be able to kill regularly after assassination according to the host's settings.",
"HackerInfoLong": "(Impostors):\\nAnonymous can use Shapeshift to hack into a target. The hacked target will report the body killed by Anonymous or its own if there is none. Hacking ignores whether a body can be reported. Hacking Lazy Guy is a waste of time.",
"MinerInfoLong": "(Impostors):\\nMiner can shapeshift/pet to teleport back to the last vent they were in.",
"MinerInfoLong": "(Impostors):\\nMiner can vanish/pet to teleport back to the last vent they were in.",
"MinimalismInfoLong": "(Impostors):\\nThe Killing Machine has a very short kill cooldown, but cannot vent, has lower vision, cannot sabotage, cannot report, and cannot call emergency meetings.",
"EscapeeInfoLong": "(Impostors):\\nEscapist can mark a location by shapeshifting/petting, and they will be teleported to the marked location when they shapeshift/pet again (not when unshifting).",
"EscapeeInfoLong": "(Impostors):\\nEscapist can mark a location by shapeshifting/petting, and they will be teleported to the marked location when they vanish/pet again (not when unshifting).",
"WitchInfoLong": "(Impostors):\\nThe Witch can kill players directly or cast spells by tapping the kill button once or twice, respectively. Spelled players will have a 「†」 mark next to their name in the next meeting. If the Witch survives until the meeting's end, all spelled players die.",
"MafiaInfoLong": "(Impostors):\\nNemesis can't kill while there are other Impostors alive in the game, but can use /rv [player id] after death to kill the specified player.",
"GodfatherInfoLong": "(Impostors):\\nAs a Godfather, you vote for someone to make them your target. In the next round if someone kills the target, the killer will turn into a refugee",
@@ -707,7 +707,7 @@
"EvilGuesserInfoLong": "(Impostors):\\nThe Evil Guesser can guess a player's role during the meeting using the command /bt [player id] [role]. If the guess is correct, the target dies; if wrong, the Evil Guesser dies. Use the /id command to view the ID of all players.",
"AntiAdminerInfoLong": "(Impostors):\\nAnti-Adminer can detect nearby crewmates or neutrals around devices such as Cameras, Admin Table, Vitals, DoorLog, etc. Note that they cannot confirm if the player is using the device, only that someone is close to it.\\n\\nDepending on a setting, you may have an additional ability: You can shapeshift to alert every player using a device to leave it. They have a few seconds to step away from the devices, or else they die.",
"SansInfoLong": "(Impostors):\\nThe Arrogance reduces their kill cooldown with each successful kill of theirs.",
"BomberInfoLong": "(Impostors):\\nThe Bomber can use the shapeshift/pet button to self-explode, killing players within a certain range. But as a price, the Bomber will also die. Note: All players will see a kill flash when the Bomber explodes.",
"BomberInfoLong": "(Impostors):\\nThe Bomber can use the vanish/pet button to self-explode, killing players within a certain range. But as a price, the Bomber will also die. Note: All players will see a kill flash when the Bomber explodes.",
"ScavengerInfoLong": "(Impostors):\\nScavenger kills do not leave dead bodies behind. In addition, if the victim is a bait, no self-report will be made. To kill someone, you must click your kill button on them, then stay near that person for a few seconds, similar to an Arsonist douse.",
"BoobyTrapInfoLong": "(Impostors):\\nIn the game, the Trapster kills a player and then puts a trap on their body. If another player reports the dead body and it has the Trapster's trap on it, the player who reports will die instantly without the body getting reported. The player killed by the Trapster's trap will also become a Trapster. This chain reaction continues until no more players are left to become Trapsters. However, the Trapster will die immediately after making a kill. It's worth noting that the Trapster's own dead body cannot trigger their trap.",
"CapitalismInfoLong": "(Impostors):\\nCapitalists can add a short task to a player by pressing the kill button. Note: using this ability on players who have no tasks or have completed tasks will not take effect.",
@@ -728,9 +728,9 @@
"TricksterInfoLong": "(Impostors):\\nAs the Trickster, you function as a regular Impostor but with one key difference. You appear crewmate to crewmate roles.\\n\\nThe Sheriff cannot kill you.\\nPsychic does not see you as evil.\\nSnitch cannot find you.",
"VindicatorInfoLong": "(Impostors):\\nAs the Vindicator, you have extra votes like a Mayor.",
"ParasiteInfoLong": "(Team Impostor):\\nAs the Parasite, you are an Impostor that does not know the other Impostors. You may kill, vent, sabotage, whatever. Just know that you are an Impostor.",
"DisperserInfoLong": "(Impostors):\\nDisperser can use Shapeshift/Pet to teleport all players to random vents.\\n\\nNote: the Disperser itself will not be teleported with shapeshift/pet and players who are in the vent cannot be teleported.",
"InhibitorInfoLong": "(Impostors):\\nAs the Inhibitor, you can only kill when there is not a critical sabotage active.\\n\\nIf a critical sabotage is active (e.g., Lights or Reactor), you cannot kill.",
"SaboteurInfoLong": "(Impostors):\\nAs the Saboteur, you can only kill when there is a critical sabotage active.\\n\\nIf a critical sabotage is active (e.g., Comms or O2), then you can kill.",
"DisperserInfoLong": "(Impostors):\\nDisperser can use vanish/pet to teleport all players to random vents.\\n\\nNote: the Disperser itself will not be teleported with vanish/pet and players who are in the vent cannot be teleported.",
"InhibitorInfoLong": "(Impostors):\\nAs the Inhibitor, you can only kill when there is not a critical sabotage active (e.g., Lights or Reactor).",
"SaboteurInfoLong": "(Impostors):\\nAs the Saboteur, you can only kill when there is a critical sabotage active (e.g., Comms or O2). Whenever you kill, another random critical sabotage will be activated on top of the ongoing one.",
"CouncillorInfoLong": "(Impostors):\\nAs the Councillor, you can kill players during a meeting like a Judge.\\n\\nWhen killing in a meeting, those kills will appear as a trial from a Judge.\\n\\nThe kill command is /tl [player id]\\nYou can see the player's id before the player's name, or use the /id command to view the id of all players.",
"DazzlerInfoLong": "(Impostors):\\nAs the Dazzler, you can reduce the vision of the target of your Shapeshift permanently. When you die, their vision will turn back to normal.",
"DeathpactInfoLong": "(Impostors):\\nAs the Deathpact, the targets of your shapeshifting are marked for a deathpact. When enough players are marked for a death pact, the marked players must meet within a defined period; if they fail to do so, they die.\\n\\nIf a marked player dies before the death pact is completed, the pact is withdrawn.",
@@ -900,7 +900,7 @@
"GMInfoLong": "(None):\\nThe Game Master is an observer role. Their presence does not affect the game; all players know who the Game Master is. The Game Master role will be assigned to the host, who will automatically become a ghost at the start of the game.",
"SunnyboyInfoLong": "(Neutrals):\\nThe Sunnyboy can check the life status of others through the life panel. When the Sunnyboy is alive, the game will not end due to a numerical advantage (for example, the number of Impostors is greater than the crew, or there are no survivors). If the Sunnyboy dies at the end of the game, the Sunnyboy will win with the winning team.",
"BardInfoLong": "(Impostors):\\nWhen a bard is alive, the exile confirmation will display a sentence composed by the bard. Whenever the bard completes a creation, the bard's kill cooldown is permanently halved.",
"NukerInfoLong": "(Impostors):\\nAs the Nuker, you're a stronger Bomber. Shapeshift/Pet to nuke everyone. You can't kill, and you die in your explosion.",
"NukerInfoLong": "(Impostors):\\nAs the Nuker, you're a stronger Bomber. vanish/pet to nuke everyone. You can't kill, and you die in your explosion.",
"DisableMeeting": "Disable Meetings",
"DisableCloseDoor": "Disable Doors sabotage",
"DisableSabotage": "Disable Sabotages",
@@ -1113,7 +1113,9 @@
"DecreasedSpeed": "Decreased Speed",
"ChangeDecontaminationTime": "Change Decontamination Time (<color=#e84b56>MIRA HQ</color>/<color=#a167c0>Polus</color>)",
"DecontaminationTimeOnMiraHQ": "Decontamination Time On <color=#e84b56>MIRA HQ</color>",
"DecontaminationDoorOpenTimeOnMiraHQ": "Decontamination Door Open Time On <color=#e84b56>MIRA HQ</color>",
"DecontaminationTimeOnPolus": "Decontamination Time On <color=#a167c0>Polus</color>",
"DecontaminationDoorOpenTimeOnPolus": "Decontamination Door Open Time On <color=#a167c0>Polus</color>",
"KickAndroidPlayer": "Kick mobile players",
"ShareLobby": "Allow EHR-Chan Shares Lobby Code To Discord",
"ShareLobbyMinPlayer": "Share Lobby Code When The Number Of Players Reaches",
@@ -1568,6 +1570,7 @@
"MimicDur": "<color=#ffff00>Mimic Duration:</color> <color=#ffffff><b>{0}</b>s</color>",
"KCD": "<color=#ff1919>Kill Cooldown:</color> <color=#ffffff><b>{0}</b>s</color>",
"AfterMeetingKillCooldown": "Kill Cooldown after meetings",
"Speed": "Speed",
"CanVote": "Can Vote",
"WaitFor1Kill": "Suicide Timer starts after First Kill",
"TriggerVent": "Vent",
@@ -1963,7 +1966,7 @@
"DeputyHandcuffDelay": "Handcuff apply delay",
"Undertaker": "Undertaker",
"UndertakerInfo": "Take bodies whereever you want to",
"UndertakerInfoLong": "(Impostors):\\nAs the Undertaker, you can mark your target using your kill button, then shapeshift/pet to kill them. However, the person you assassinate will teleport to your location when you shapeshift, so their body will be wherever you are! Use this well to hide bodies!",
"UndertakerInfoLong": "(Impostors):\\nAs the Undertaker, you can mark your target using your kill button, then vanish/pet to kill them. However, the person you assassinate will teleport to your location when you shapeshift, so their body will be wherever you are! Use this well to hide bodies!",
"Romantic": "Romantic",
"RomanticInfo": "Select your partner and win with them",
"RomanticInfoLong": "(Neutral):\\nAs the Romantic, you can first use your kill button on someone to select them as your partner.\\nAfter that, as long as both you and your partner are alive, you can use your kill button on anyone to give your partner a temporarily shield. If your partner wins, you win too.\\n\\nIf your partner dies, your role will change according to the following conditions:\\nIf your partner had a kill button of any type, you will get the same role as they were.\\nIf your partner was a Non-Killing Neutral or your partner died by themselves (suicided or has no real killer), you will turn into the Ruthless Romantic, which is a basic neutral killer: Be the last one standing to win. If you win, your partner wins too.\\nIf your target was an Impostor, you become a Renegade. Your job is now to help the impostors (and thus your partner) win.\\nIn every other case, you become the Vengeful Romantic. Your goal is to kill the killer of your partner. If you do so, you and your partner win with the winning team. If you try to kill anyone else, you will die.",
@@ -3590,7 +3593,7 @@
"GuessAnkylosaurus": "You cannot guess the Ankylosaurus",
"Hypnotist": "Hypnotist",
"HypnotistInfo": "Prevent Body Reports",
"HypnotistInfoLong": "(Impostors):\\nAs the Hypnotist, you can prevent all players from reporting bodies by using your ability (shapeshift/pet).",
"HypnotistInfoLong": "(Impostors):\\nAs the Hypnotist, you can prevent all players from reporting bodies by using your ability (vanish/pet).",
"Hypnotist.DoReportAfterHypnosisEnds": "Process reports that were blocked during hypnosis after the hypnosis expires",
"Bane": "Bane",
"BaneInfo": "Erase your killer's role",
@@ -4091,7 +4094,7 @@
"HHMinKCD": "Minimum Kill Cooldown",
"Stasis": "Stasis",
"StasisInfo": "Freeze Time",
"StasisInfoLong": "(Impostors):\\nAs the Stasis, you can shapeshift/pet/vanish to 'freeze time'. That means, all players will be frozen and blind, and no one will be able to do anything. Depending on the settings, the blinding and freezing may exclude other impostor-teamed players.",
"StasisInfoLong": "(Impostors):\\nAs the Stasis, you can vanish/pet/vanish to 'freeze time'. That means, all players will be frozen and blind, and no one will be able to do anything. Depending on the settings, the blinding and freezing may exclude other impostor-teamed players.",
"Stasis.AffectsOtherImpostors": "Time Freezing Affects Other <#ff1919>Impostors</color>",
"Stasis.TimeFrozenNotify": "Time Frozen",
"Stasis.TimeFreezeEndNotify": "Time Unfrozen",
@@ -4233,7 +4236,7 @@
"HitmanLowKCD": "Lower Kill Cooldown",
"Sapper": "Sapper",
"SapperInfo": "Blow up Everyone with Timed Bombs!",
"SapperInfoLong": "(Impostors):\\nAs the Sapper, you can not kill with your kill button. Instead, you can pet/shapeshift to plant time bombs which explode after a specified delay (set by host), killing everyone nearby.\\n\\nNote: If you're in the radius of the explosion, you will die too!",
"SapperInfoLong": "(Impostors):\\nAs the Sapper, you can not kill with your kill button. Instead, you can pet/vanish to plant time bombs which explode after a specified delay (set by host), killing everyone nearby.\\n\\nNote: If you're in the radius of the explosion, you will die too!",
"SapperRadius": "Bomb Explosion Radius",
"SapperCD": "Bomb Place Cooldown",
"SapperDelay": "Bomb Explode Delay",
+2 -1
View File
@@ -99,7 +99,8 @@ internal class Lovers : IAddon
LegacyLovers = new BooleanOptionItem(id + 10, "LegacyLovers", false, TabGroup.Addons)
.SetParent(spawnOption)
.SetGameMode(customGameMode)
.RegisterUpdateValueEvent((_, _) => new[] { ImpCanBeInLove, CrewCanBeInLove, NeutralCanBeInLove }.Do(x => x.SetHidden(LegacyLovers.GetBool())));
.RegisterUpdateValueEvent((_, _) => new[] { ImpCanBeInLove, CrewCanBeInLove, NeutralCanBeInLove, CovenCanBeInLove }.Do(x => x.SetHidden(LegacyLovers.GetBool())))
.SetRunEventOnLoad(true);
LovingImpostorSpawnChance = new FloatOptionItem(id + 11, "LovingImpostorSpawnChance", new(0, 100, 5), 25, TabGroup.Addons)
.SetParent(LegacyLovers)
+1 -1
View File
@@ -189,7 +189,7 @@ public class SabotageMaster : RoleBase
if (amount.HasAnyBit(ReactorSystemType.AddUserOp))
{
ShipStatus.Instance.UpdateSystem((MapNames)Main.NormalOptions.MapId == MapNames.Polus ? SystemTypes.Laboratory : SystemTypes.Reactor, playerId.GetPlayer(), ReactorSystemType.ClearCountdown);
ShipStatus.Instance.UpdateSystem(Main.CurrentMap == MapNames.Polus ? SystemTypes.Laboratory : SystemTypes.Reactor, playerId.GetPlayer(), ReactorSystemType.ClearCountdown);
sm.UsedSkillCount += UsesUsedWhenFixingReactorOrO2.GetFloat();
sm.SendRPC();
}
+15 -1
View File
@@ -1,4 +1,5 @@
using System;
using AmongUs.GameOptions;
using static EHR.Options;
namespace EHR.Impostor;
@@ -9,17 +10,25 @@ internal class Inhibitor : RoleBase
private byte InhibitorId;
public override bool IsEnable => On;
public static OptionItem InhibitorCD;
public static OptionItem InhibitorCDAfterMeetings;
public static OptionItem InhibitorSpeed;
public override void SetupCustomOption()
{
SetupRoleOptions(1500, TabGroup.ImpostorRoles, CustomRoles.Inhibitor);
InhibitorCD = new FloatOptionItem(1510, "KillCooldown", new(0f, 180f, 0.5f), 20f, TabGroup.ImpostorRoles)
InhibitorCD = new FloatOptionItem(1510, "KillCooldown", new(0f, 180f, 0.5f), 10f, TabGroup.ImpostorRoles)
.SetParent(CustomRoleSpawnChances[CustomRoles.Inhibitor])
.SetValueFormat(OptionFormat.Seconds);
InhibitorCDAfterMeetings = new FloatOptionItem(1511, "AfterMeetingKillCooldown", new(0f, 180f, 0.5f), 22.5f, TabGroup.ImpostorRoles)
.SetParent(CustomRoleSpawnChances[CustomRoles.Inhibitor])
.SetValueFormat(OptionFormat.Seconds);
InhibitorSpeed = new FloatOptionItem(1512, "Speed", new(0.05f, 3f, 0.05f), 1.75f, TabGroup.ImpostorRoles)
.SetParent(CustomRoleSpawnChances[CustomRoles.Inhibitor])
.SetValueFormat(OptionFormat.Multiplier);
}
public override void Add(byte playerId)
@@ -34,6 +43,11 @@ internal class Inhibitor : RoleBase
InhibitorId = byte.MaxValue;
}
public override void ApplyGameOptions(IGameOptions opt, byte playerId)
{
Main.AllPlayerSpeed[playerId] = InhibitorSpeed.GetFloat();
}
public override bool CanUseKillButton(PlayerControl pc)
{
return base.CanUseKillButton(pc) && !Utils.IsActive(SystemTypes.Electrical) && !Utils.IsActive(SystemTypes.Comms) && !Utils.IsActive(SystemTypes.MushroomMixupSabotage) && !Utils.IsActive(SystemTypes.Laboratory) && !Utils.IsActive(SystemTypes.LifeSupp) && !Utils.IsActive(SystemTypes.Reactor) && !Utils.IsActive(SystemTypes.HeliSabotage);
+49 -1
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using static EHR.Options;
namespace EHR.Impostor;
@@ -13,7 +14,7 @@ internal class Saboteur : RoleBase
{
SetupRoleOptions(10005, TabGroup.ImpostorRoles, CustomRoles.Saboteur);
SaboteurCD = new FloatOptionItem(10015, "KillCooldown", new(0f, 180f, 0.5f), 17.5f, TabGroup.ImpostorRoles)
SaboteurCD = new FloatOptionItem(10015, "KillCooldown", new(0f, 180f, 0.5f), 15f, TabGroup.ImpostorRoles)
.SetParent(CustomRoleSpawnChances[CustomRoles.Saboteur])
.SetValueFormat(OptionFormat.Seconds);
@@ -55,6 +56,53 @@ internal class Saboteur : RoleBase
return base.OnCheckMurder(killer, target);
}
public override void OnMurder(PlayerControl killer, PlayerControl target)
{
MapNames map = Main.CurrentMap;
List<SystemTypes> availableSystems =
[
SystemTypes.Comms,
map == MapNames.Fungle ? SystemTypes.MushroomMixupSabotage : SystemTypes.Electrical,
map switch
{
MapNames.Polus => SystemTypes.Laboratory,
MapNames.Airship => SystemTypes.HeliSabotage,
_ => SystemTypes.Reactor
}
];
if (map is MapNames.Skeld or MapNames.Dleks or MapNames.MiraHQ)
availableSystems.Add(SystemTypes.LifeSupp);
SystemTypes sabo = availableSystems.RandomElement();
switch (sabo)
{
case SystemTypes.Reactor:
case SystemTypes.LifeSupp:
case SystemTypes.Comms:
case SystemTypes.Laboratory:
case SystemTypes.HeliSabotage:
ShipStatus.Instance.UpdateSystem(sabo, killer, 128);
break;
case SystemTypes.MushroomMixupSabotage:
ShipStatus.Instance.UpdateSystem(sabo, killer, 1);
break;
case SystemTypes.Electrical:
byte num = 4;
for (var index = 0; index < 5; ++index)
{
if (BoolRange.Next())
num |= (byte)(1 << index);
}
ShipStatus.Instance.RpcUpdateSystem(sabo, (byte)(num | 128U));
break;
}
}
public override void OnReportDeadBody()
{
Main.AllPlayerKillCooldown[SaboteurId] = SaboteurCDAfterMeetings.GetFloat();
+1 -1
View File
@@ -117,7 +117,7 @@ public class DarkHide : RoleBase
{
CustomRoles targetRole = Ktarget.GetCustomRole();
bool succeeded = targetRole.IsImpostor();
if (CanCountNeutralKiller.GetBool() && !Ktarget.Is(CustomRoles.Arsonist) && !Ktarget.Is(CustomRoles.Revolutionist)) succeeded = succeeded || Ktarget.IsNeutralKiller();
if (CanCountNeutralKiller.GetBool()) succeeded |= Ktarget.IsNeutralKiller();
if (succeeded && SnatchesWin.GetBool()) IsWinKill = true;