Compare commits

...
23 Commits
Author SHA1 Message Date
Gurge44 ab17883b19 Update version and string 2024-04-07 23:06:32 +02:00
Gurge44 73e53e5afd Fix Bargainer 2024-04-07 22:58:19 +02:00
Gurge44 95bc96f877 I stg this just disappeared somehow 2024-04-07 22:33:36 +02:00
Gurge44 041c54303b Fix Disable All SS Anims, Change Sentry Behaviour, Change Adventurer Behaviour, Fix FFA, Fix Enigma 2024-04-07 22:32:05 +02:00
Gurge44 732ba9ec01 Add Bargainer (not simple, to say the least), Code Cleaup, Fix FFA 2024-04-07 15:25:44 +02:00
Gurge44 c8ef3f0a9f Fixes & Cat becomes Amnesiac if copied role is single 2024-04-06 22:30:24 +02:00
Gurge44 28d448a93a Fix duplicate IDs & missing strings 2024-04-06 20:46:56 +02:00
Gurge44 8614486bb7 Code Cleanup 2024-04-06 20:38:36 +02:00
Gurge44 0ca51a468b bruh 2024-04-06 20:35:04 +02:00
Gurge44 b614ec7dfa Some settings 2024-04-06 20:34:47 +02:00
Gurge44 8df2c8fa81 Add Schrödinger's Cat & Cherokious 2024-04-06 20:14:06 +02:00
Gurge44 21b4a1ead8 Merge branch 'main' of https://github.com/Gurge44/TOHE_PLUS 2024-04-06 19:07:13 +02:00
Gurge44 6f1bc6a415 fix FFA win condition (again) 2024-04-06 19:07:08 +02:00
PHGaming121 339fabc04b bro put analyst on role name, but forgot to but analyst on info and infolong 💀 (#51)
* Update en_US.json

* Update pt_BR.json
2024-04-06 18:43:40 +02:00
Gurge44 026ee4d322 Add Generator & Sentry 2024-04-06 14:50:25 +02:00
Gurge44 91e2748156 Fix FFA, Fix Moderator tags, New timer font for S&G 2024-04-05 19:04:05 +02:00
Gurge44 dbb5c39dea Minor fixes 2024-04-03 21:25:25 +02:00
Gurge44 a13cbd9f88 Merge branch 'main' of https://github.com/Gurge44/TOHE_PLUS 2024-04-03 20:24:12 +02:00
Gurge44 333dfbee6f Teamed FFA 2024-04-03 20:24:03 +02:00
PHGaming121 0431d18127 make adventurer things translatable + a little fix 💀 (#50)
* Update Adventurer.cs

* Update en_US.json

* also, heres a little fix lol
2024-04-03 12:06:55 +02:00
Gurge44 2db423411f Merge branch 'main' of https://github.com/Gurge44/TOHE_PLUS 2024-04-02 19:58:39 +02:00
Gurge44 3d120a5924 New role Adventurer & Bug Fixes 2024-04-02 19:58:34 +02:00
Gurge44 f91f0cd09c Translation (#48)
* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Portuguese, Brazilian)
2024-04-02 15:51:54 +02:00
372 changed files with 4056 additions and 2440 deletions

No files matched your search

+20 -14
View File
@@ -3,10 +3,10 @@ namespace EHR;
public enum CustomRoles
{
//Default
// Default
Crewmate = 0,
//Impostors (Vanilla)
// Impostors (Vanilla)
Impostor,
Shapeshifter,
@@ -14,7 +14,7 @@ public enum CustomRoles
ImpostorEHR,
ShapeshifterEHR,
//Impostors
// Impostors
Hacker, // Anonymous
AntiAdminer,
@@ -49,6 +49,7 @@ public enum CustomRoles
Freezer,
Gambler,
Gangster,
Generator,
Godfather,
Greedier,
Hangman,
@@ -100,7 +101,7 @@ public enum CustomRoles
YinYanger,
Zombie,
//Crewmates (Vanilla)
// Crewmates (Vanilla)
Engineer,
GuardianAngel,
Scientist,
@@ -111,13 +112,14 @@ public enum CustomRoles
GuardianAngelEHR,
ScientistEHR,
// Crewmate
// Crewmates
Addict,
Adventurer,
Aid,
Alchemist,
Altruist,
Analyzer,
Analyst,
Autocrat,
Beacon,
Benefactor,
@@ -186,8 +188,9 @@ public enum CustomRoles
Rabbit,
Randomizer,
Ricochet,
Sentinel,
SecurityGuard,
Sentinel,
Sentry,
Sheriff,
Shiftguard,
Snitch,
@@ -211,14 +214,16 @@ public enum CustomRoles
SwordsMan, // Vigilante
Witness,
//Neutrals
// Neutrals
Agitater,
Amnesiac,
Arsonist,
Bandit,
Bargainer,
BloodKnight,
Bubble,
Cherokious,
Collector,
Deathknight,
Gamer, // Demon
@@ -267,6 +272,7 @@ public enum CustomRoles
Ritualist,
Romantic,
RuthlessRomantic,
SchrodingersCat,
NSerialKiller, // Serial Killer
Sidekick,
SoulHunter,
@@ -287,25 +293,25 @@ public enum CustomRoles
WeaponMaster,
Workaholic,
//SoloKombat
// Solo Kombat
KB_Normal,
//FFA
// FFA
Killer,
//MoveAndStop
// Move And Stop
Tasker,
//HotPotato
// Hot Potato
Potato,
//H&S
// H&S
Hider,
Seeker,
Fox,
Troll,
//GM
// GM
GM,
// ????
+20 -14
View File
@@ -3,10 +3,10 @@ namespace EHR;
public enum CustomRoles
{
//Default
// Default
Crewmate = 0,
//Impostors (Vanilla)
// Impostors (Vanilla)
Impostor,
Shapeshifter,
@@ -14,7 +14,7 @@ public enum CustomRoles
ImpostorEHR,
ShapeshifterEHR,
//Impostors
// Impostors
Hacker, // Anonymous
AntiAdminer,
@@ -49,6 +49,7 @@ public enum CustomRoles
Freezer,
Gambler,
Gangster,
Generator,
Godfather,
Greedier,
Hangman,
@@ -100,7 +101,7 @@ public enum CustomRoles
YinYanger,
Zombie,
//Crewmates (Vanilla)
// Crewmates (Vanilla)
Engineer,
GuardianAngel,
Scientist,
@@ -111,13 +112,14 @@ public enum CustomRoles
GuardianAngelEHR,
ScientistEHR,
// Crewmate
// Crewmates
Addict,
Adventurer,
Aid,
Alchemist,
Altruist,
Analyzer,
Analyst,
Autocrat,
Beacon,
Benefactor,
@@ -186,8 +188,9 @@ public enum CustomRoles
Rabbit,
Randomizer,
Ricochet,
Sentinel,
SecurityGuard,
Sentinel,
Sentry,
Sheriff,
Shiftguard,
Snitch,
@@ -211,14 +214,16 @@ public enum CustomRoles
SwordsMan, // Vigilante
Witness,
//Neutrals
// Neutrals
Agitater,
Amnesiac,
Arsonist,
Bandit,
Bargainer,
BloodKnight,
Bubble,
Cherokious,
Collector,
Deathknight,
Gamer, // Demon
@@ -267,6 +272,7 @@ public enum CustomRoles
Ritualist,
Romantic,
RuthlessRomantic,
SchrodingersCat,
NSerialKiller, // Serial Killer
Sidekick,
SoulHunter,
@@ -287,25 +293,25 @@ public enum CustomRoles
WeaponMaster,
Workaholic,
//SoloKombat
// Solo Kombat
KB_Normal,
//FFA
// FFA
Killer,
//MoveAndStop
// Move And Stop
Tasker,
//HotPotato
// Hot Potato
Potato,
//H&S
// H&S
Hider,
Seeker,
Fox,
Troll,
//GM
// GM
GM,
// ????
+5
View File
@@ -10,13 +10,18 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FPS/@EntryIndexedValue">FPS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GM/@EntryIndexedValue">GM</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HUD/@EntryIndexedValue">HUD</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=KCD/@EntryIndexedValue">KCD</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NB/@EntryIndexedValue">NB</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NC/@EntryIndexedValue">NC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NE/@EntryIndexedValue">NE</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NK/@EntryIndexedValue">NK</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NNK/@EntryIndexedValue">NNK</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PC/@EntryIndexedValue">PC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RNG/@EntryIndexedValue">RNG</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RPC/@EntryIndexedValue">RPC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SK/@EntryIndexedValue">SK</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SS/@EntryIndexedValue">SS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=TMP/@EntryIndexedValue">TMP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EHR/@EntryIndexedValue">EHR</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=VN/@EntryIndexedValue">VN</s:String></wpf:ResourceDictionary>
+6 -6
View File
@@ -1,11 +1,11 @@
using AmongUs.GameOptions;
using EHR.GameMode.HideAndSeekRoles;
using EHR.Modules;
using HarmonyLib;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using AmongUs.GameOptions;
using EHR.GameMode.HideAndSeekRoles;
using EHR.Modules;
using HarmonyLib;
using UnityEngine;
namespace EHR
@@ -22,7 +22,7 @@ namespace EHR
const int id = 69_211_001;
Color color = new(52, 94, 235, byte.MaxValue);
MaxGameLength = IntegerOptionItem.Create(id, "FFA_GameTime", new(0, 1200, 10), 600, TabGroup.GameSettings, false)
MaxGameLength = IntegerOptionItem.Create(id, "FFA_GameTime", new(0, 1200, 10), 600, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(color);
+160 -109
View File
@@ -1,9 +1,9 @@
using EHR.Modules;
using HarmonyLib;
using Hazel;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using EHR.Modules;
using HarmonyLib;
using Hazel;
using UnityEngine;
using static EHR.Translator;
@@ -22,6 +22,20 @@ internal static class FFAManager
public static string LatestChatMessage = string.Empty;
public static Dictionary<byte, int> PlayerTeams = [];
public static readonly Dictionary<int, string> TeamColors = new()
{
{ 0, "#00ffff" },
{ 1, "#ffff00" },
{ 2, "#ff00ff" },
{ 3, "#ff0000" },
{ 4, "#00ff00" },
{ 5, "#0000ff" },
{ 6, "#ffffff" },
{ 7, "#000000" }
};
public static OptionItem FFAGameTime;
public static OptionItem FFAKcd;
public static OptionItem FFALowerVision;
@@ -36,52 +50,62 @@ internal static class FFAManager
public static OptionItem FFAEnableRandomTwists;
public static OptionItem FFAShieldIsOneTimeUse;
public static OptionItem FFAChatDuringGame;
public static OptionItem FFATeamMode;
public static OptionItem FFATeamNumber;
public static void SetupCustomOption()
{
FFAGameTime = IntegerOptionItem.Create(67_223_001, "FFA_GameTime", new(30, 600, 10), 300, TabGroup.GameSettings, false)
FFAGameTime = IntegerOptionItem.Create(67_223_001, "FFA_GameTime", new(30, 600, 10), 300, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds)
.SetHeader(true);
FFAKcd = FloatOptionItem.Create(67_223_002, "FFA_KCD", new(1f, 60f, 1f), 10f, TabGroup.GameSettings, false)
FFAKcd = FloatOptionItem.Create(67_223_002, "FFA_KCD", new(1f, 60f, 1f), 10f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds);
FFADisableVentingWhenTwoPlayersAlive = BooleanOptionItem.Create(67_223_003, "FFA_DisableVentingWhenTwoPlayersAlive", true, TabGroup.GameSettings, false)
FFADisableVentingWhenTwoPlayersAlive = BooleanOptionItem.Create(67_223_003, "FFA_DisableVentingWhenTwoPlayersAlive", true, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
FFADisableVentingWhenKcdIsUp = BooleanOptionItem.Create(67_223_004, "FFA_DisableVentingWhenKCDIsUp", true, TabGroup.GameSettings, false)
FFADisableVentingWhenKcdIsUp = BooleanOptionItem.Create(67_223_004, "FFA_DisableVentingWhenKCDIsUp", true, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
FFAEnableRandomAbilities = BooleanOptionItem.Create(67_223_005, "FFA_EnableRandomAbilities", true, TabGroup.GameSettings, false)
FFAEnableRandomAbilities = BooleanOptionItem.Create(67_223_005, "FFA_EnableRandomAbilities", true, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
FFAShieldDuration = FloatOptionItem.Create(67_223_006, "FFA_ShieldDuration", new(1f, 70f, 1f), 7f, TabGroup.GameSettings, false)
FFAShieldDuration = FloatOptionItem.Create(67_223_006, "FFA_ShieldDuration", new(1f, 70f, 1f), 7f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds);
FFAIncreasedSpeed = FloatOptionItem.Create(67_223_007, "FFA_IncreasedSpeed", new(0.1f, 5f, 0.1f), 1.5f, TabGroup.GameSettings, false)
FFAIncreasedSpeed = FloatOptionItem.Create(67_223_007, "FFA_IncreasedSpeed", new(0.1f, 5f, 0.1f), 1.5f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Multiplier);
FFADecreasedSpeed = FloatOptionItem.Create(67_223_008, "FFA_DecreasedSpeed", new(0.1f, 5f, 0.1f), 1f, TabGroup.GameSettings, false)
FFADecreasedSpeed = FloatOptionItem.Create(67_223_008, "FFA_DecreasedSpeed", new(0.1f, 5f, 0.1f), 1f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Multiplier);
FFAModifiedSpeedDuration = FloatOptionItem.Create(67_223_009, "FFA_ModifiedSpeedDuration", new(1f, 60f, 1f), 10f, TabGroup.GameSettings, false).SetGameMode(CustomGameMode.FFA).SetColor(new Color32(0, 255, 165, byte.MaxValue))
FFAModifiedSpeedDuration = FloatOptionItem.Create(67_223_009, "FFA_ModifiedSpeedDuration", new(1f, 60f, 1f), 10f, TabGroup.GameSettings).SetGameMode(CustomGameMode.FFA).SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds);
FFALowerVision = FloatOptionItem.Create(67_223_010, "FFA_LowerVision", new(0f, 1f, 0.05f), 0.5f, TabGroup.GameSettings, false).SetGameMode(CustomGameMode.FFA).SetColor(new Color32(0, 255, 165, byte.MaxValue))
FFALowerVision = FloatOptionItem.Create(67_223_010, "FFA_LowerVision", new(0f, 1f, 0.05f), 0.5f, TabGroup.GameSettings).SetGameMode(CustomGameMode.FFA).SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Multiplier);
FFAModifiedVisionDuration = FloatOptionItem.Create(67_223_011, "FFA_ModifiedVisionDuration", new(1f, 70f, 1f), 5f, TabGroup.GameSettings, false).SetGameMode(CustomGameMode.FFA).SetColor(new Color32(0, 255, 165, byte.MaxValue))
FFAModifiedVisionDuration = FloatOptionItem.Create(67_223_011, "FFA_ModifiedVisionDuration", new(1f, 70f, 1f), 5f, TabGroup.GameSettings).SetGameMode(CustomGameMode.FFA).SetColor(new Color32(0, 255, 165, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds);
FFAEnableRandomTwists = BooleanOptionItem.Create(67_223_012, "FFA_EnableRandomTwists", true, TabGroup.GameSettings, false)
FFAEnableRandomTwists = BooleanOptionItem.Create(67_223_012, "FFA_EnableRandomTwists", true, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
FFAShieldIsOneTimeUse = BooleanOptionItem.Create(67_223_013, "FFA_ShieldIsOneTimeUse", true, TabGroup.GameSettings, false)
FFAShieldIsOneTimeUse = BooleanOptionItem.Create(67_223_013, "FFA_ShieldIsOneTimeUse", true, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
FFAChatDuringGame = BooleanOptionItem.Create(67_223_014, "FFA_ChatDuringGame", false, TabGroup.GameSettings, false)
FFAChatDuringGame = BooleanOptionItem.Create(67_223_014, "FFA_ChatDuringGame", false, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
FFATeamMode = BooleanOptionItem.Create(67_223_015, "FFA_TeamMode", false, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.FFA)
.SetHeader(true)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
FFATeamNumber = IntegerOptionItem.Create(67_223_016, "FFA_TeamNumber", new(2, 7, 1), 2, TabGroup.GameSettings)
.SetParent(FFATeamMode)
.SetGameMode(CustomGameMode.FFA)
.SetColor(new Color32(0, 255, 165, byte.MaxValue));
}
@@ -99,10 +123,32 @@ internal static class FFAManager
KillCount = [];
RoundTime = FFAGameTime.GetInt() + 8;
foreach (PlayerControl pc in Main.AllAlivePlayerControls)
PlayerTeams = [];
var allPlayers = Main.AllAlivePlayerControls;
foreach (PlayerControl pc in allPlayers)
{
KillCount[pc.PlayerId] = 0;
}
if (FFATeamMode.GetBool())
{
var teamNum = FFATeamNumber.GetInt();
var playerNum = allPlayers.Length;
int memberNum = (teamNum > 5 && playerNum == 15) || playerNum % teamNum == 0 ? playerNum / teamNum : playerNum / teamNum + 1;
var teamMembers = allPlayers.Select(x => x.PlayerId).Shuffle(IRandom.Instance).Chunk(memberNum).ToList();
for (int i = 0; i < teamMembers.Count; i++)
{
foreach (var id in teamMembers[i])
{
PlayerTeams.Add(id, i);
}
}
_ = new LateTask(() => { Utils.NotifyRoles(NoCache: true, ForceLoop: true); }, 10f, log: false);
}
}
private static void SendRPCSyncFFAPlayer(byte playerId)
@@ -146,15 +192,6 @@ internal static class FFAManager
}
}
public static string GetDisplayScore(byte playerId)
{
int rank = GetRankOfScore(playerId);
string score = KillCount.TryGetValue(playerId, out var s) ? $"{s}" : "Invalid";
string text = string.Format(GetString("KBDisplayScore"), rank.ToString(), score);
Color color = Utils.GetRoleColor(CustomRoles.Killer);
return Utils.ColorString(color, text);
}
public static int GetRankOfScore(byte playerId)
{
try
@@ -184,6 +221,12 @@ internal static class FFAManager
return;
}
if (FFATeamMode.GetBool() && PlayerTeams[killer.PlayerId] == PlayerTeams[target.PlayerId])
{
Logger.Info("Killer and Target are in the same team, attack blocked", "FFA");
return;
}
var totalalive = Main.AllAlivePlayerControls.Length;
if (FFAShieldedList.TryGetValue(target.PlayerId, out var dur))
{
@@ -206,7 +249,7 @@ internal static class FFAManager
if (totalalive == 3)
{
PlayerControl otherPC = null;
foreach (var pc in Main.AllAlivePlayerControls.Where(a => a.PlayerId != killer.PlayerId && a.PlayerId != target.PlayerId && a.IsAlive()).ToArray())
foreach (var pc in Main.AllAlivePlayerControls.Where(a => a.PlayerId != killer.PlayerId && a.PlayerId != target.PlayerId && a.IsAlive()))
{
TargetArrow.Add(killer.PlayerId, pc.PlayerId);
TargetArrow.Add(pc.PlayerId, killer.PlayerId);
@@ -222,90 +265,99 @@ internal static class FFAManager
bool mark = false;
var nowKCD = Main.AllPlayerKillCooldown[killer.PlayerId];
byte EffectType;
if (Main.NormalOptions.MapId != 4) EffectType = (byte)HashRandom.Next(0, 10);
else EffectType = (byte)HashRandom.Next(4, 10);
if (EffectType <= 7) // Buff
if (Main.NormalOptions.MapId != 4) EffectType = (byte)IRandom.Instance.Next(0, 10);
else EffectType = (byte)IRandom.Instance.Next(4, 10);
switch (EffectType)
{
byte EffectID = (byte)HashRandom.Next(0, 3);
if (Main.NormalOptions.MapId == 4) EffectID = 2;
switch (EffectID)
// Buff
case <= 7:
{
case 0:
FFAShieldedList.TryAdd(killer.PlayerId, Utils.TimeStamp);
killer.Notify(GetString("FFA-Event-GetShield"), FFAShieldDuration.GetFloat());
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
break;
case 1:
if (FFAIncreasedSpeedList.ContainsKey(killer.PlayerId))
{
FFAIncreasedSpeedList.Remove(killer.PlayerId);
FFAIncreasedSpeedList.Add(killer.PlayerId, Utils.TimeStamp);
}
else
{
FFAIncreasedSpeedList.TryAdd(killer.PlayerId, Utils.TimeStamp);
originalSpeed.TryAdd(killer.PlayerId, Main.AllPlayerSpeed[killer.PlayerId]);
Main.AllPlayerSpeed[killer.PlayerId] = FFAIncreasedSpeed.GetFloat();
}
byte EffectID = (byte)IRandom.Instance.Next(0, 3);
if (Main.NormalOptions.MapId == 4) EffectID = 2;
switch (EffectID)
{
case 0:
FFAShieldedList.TryAdd(killer.PlayerId, Utils.TimeStamp);
killer.Notify(GetString("FFA-Event-GetShield"), FFAShieldDuration.GetFloat());
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
break;
case 1:
if (FFAIncreasedSpeedList.ContainsKey(killer.PlayerId))
{
FFAIncreasedSpeedList.Remove(killer.PlayerId);
FFAIncreasedSpeedList.Add(killer.PlayerId, Utils.TimeStamp);
}
else
{
FFAIncreasedSpeedList.TryAdd(killer.PlayerId, Utils.TimeStamp);
originalSpeed.TryAdd(killer.PlayerId, Main.AllPlayerSpeed[killer.PlayerId]);
Main.AllPlayerSpeed[killer.PlayerId] = FFAIncreasedSpeed.GetFloat();
}
killer.Notify(GetString("FFA-Event-GetIncreasedSpeed"), FFAModifiedSpeedDuration.GetFloat());
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
mark = true;
break;
case 2:
Main.AllPlayerKillCooldown[killer.PlayerId] = Math.Clamp(FFAKcd.GetFloat() - 3f, 1f, 60f);
killer.Notify(GetString("FFA-Event-GetLowKCD"));
sync = true;
break;
default:
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
break;
killer.Notify(GetString("FFA-Event-GetIncreasedSpeed"), FFAModifiedSpeedDuration.GetFloat());
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
mark = true;
break;
case 2:
Main.AllPlayerKillCooldown[killer.PlayerId] = Math.Clamp(FFAKcd.GetFloat() - 3f, 1f, 60f);
killer.Notify(GetString("FFA-Event-GetLowKCD"));
sync = true;
break;
default:
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
break;
}
break;
}
}
else if (EffectType == 8) // De-Buff
{
byte EffectID = (byte)HashRandom.Next(0, 3);
if (Main.NormalOptions.MapId == 4) EffectID = 1;
switch (EffectID)
// De-Buff
case 8:
{
case 0:
if (FFADecreasedSpeedList.ContainsKey(killer.PlayerId))
{
FFADecreasedSpeedList.Remove(killer.PlayerId);
FFADecreasedSpeedList.Add(killer.PlayerId, Utils.TimeStamp);
}
else
{
FFADecreasedSpeedList.TryAdd(killer.PlayerId, Utils.TimeStamp);
originalSpeed.TryAdd(killer.PlayerId, Main.AllPlayerSpeed[killer.PlayerId]);
Main.AllPlayerSpeed[killer.PlayerId] = FFADecreasedSpeed.GetFloat();
}
byte EffectID = (byte)IRandom.Instance.Next(0, 3);
if (Main.NormalOptions.MapId == 4) EffectID = 1;
switch (EffectID)
{
case 0:
if (FFADecreasedSpeedList.ContainsKey(killer.PlayerId))
{
FFADecreasedSpeedList.Remove(killer.PlayerId);
FFADecreasedSpeedList.Add(killer.PlayerId, Utils.TimeStamp);
}
else
{
FFADecreasedSpeedList.TryAdd(killer.PlayerId, Utils.TimeStamp);
originalSpeed.TryAdd(killer.PlayerId, Main.AllPlayerSpeed[killer.PlayerId]);
Main.AllPlayerSpeed[killer.PlayerId] = FFADecreasedSpeed.GetFloat();
}
killer.Notify(GetString("FFA-Event-GetDecreasedSpeed"), FFAModifiedSpeedDuration.GetFloat());
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
mark = true;
break;
case 1:
Main.AllPlayerKillCooldown[killer.PlayerId] = Math.Clamp(FFAKcd.GetFloat() + 3f, 1f, 60f);
killer.Notify(GetString("FFA-Event-GetHighKCD"));
sync = true;
break;
case 2:
FFALowerVisionList.TryAdd(killer.PlayerId, Utils.TimeStamp);
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
killer.Notify(GetString("FFA-Event-GetLowVision"));
mark = true;
break;
default:
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
break;
killer.Notify(GetString("FFA-Event-GetDecreasedSpeed"), FFAModifiedSpeedDuration.GetFloat());
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
mark = true;
break;
case 1:
Main.AllPlayerKillCooldown[killer.PlayerId] = Math.Clamp(FFAKcd.GetFloat() + 3f, 1f, 60f);
killer.Notify(GetString("FFA-Event-GetHighKCD"));
sync = true;
break;
case 2:
FFALowerVisionList.TryAdd(killer.PlayerId, Utils.TimeStamp);
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
killer.Notify(GetString("FFA-Event-GetLowVision"));
mark = true;
break;
default:
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
break;
}
break;
}
}
else // Mixed
{
_ = new LateTask(() => { killer.TPtoRndVent(); }, 0.5f, "FFA-Event-TP");
killer.Notify(GetString("FFA-Event-GetTP"));
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
// Mixed
default:
_ = new LateTask(() => { killer.TPtoRndVent(); }, 0.5f, "FFA-Event-TP");
killer.Notify(GetString("FFA-Event-GetTP"));
Main.AllPlayerKillCooldown[killer.PlayerId] = FFAKcd.GetFloat();
break;
}
if (sync || Math.Abs(nowKCD - Main.AllPlayerKillCooldown[killer.PlayerId]) > 0.1f)
@@ -353,7 +405,7 @@ internal static class FFAManager
LatestChatMessage = string.Format(GetString("FFAChatMessageNotify"), playerName, message);
foreach (var pc in Main.AllAlivePlayerControls)
{
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
pc.Notify(LatestChatMessage);
}
}
@@ -384,8 +436,7 @@ internal static class FFAManager
var rd = IRandom.Instance;
byte FFAdoTPdecider = (byte)rd.Next(0, 100);
bool FFAdoTP = false;
if (FFAdoTPdecider == 0) FFAdoTP = true;
bool FFAdoTP = FFAdoTPdecider == 0;
if (FFAEnableRandomTwists.GetBool() && FFAdoTP)
{
+2 -2
View File
@@ -13,12 +13,12 @@ namespace EHR.GameMode.HideAndSeekRoles
public static void SetupCustomOption()
{
Options.SetupRoleOptions(69_211_301, TabGroup.NeutralRoles, CustomRoles.Fox, CustomGameMode.HideAndSeek, true);
Vision = FloatOptionItem.Create(69_211_303, "FoxVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles, false)
Vision = FloatOptionItem.Create(69_211_303, "FoxVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(0, 255, 0, byte.MaxValue))
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Fox]);
Speed = FloatOptionItem.Create(69_213_304, "FoxSpeed", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles, false)
Speed = FloatOptionItem.Create(69_213_304, "FoxSpeed", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(0, 255, 0, byte.MaxValue))
+3 -3
View File
@@ -18,15 +18,15 @@ namespace EHR.GameMode.HideAndSeekRoles
.SetHeader(true)
.SetColor(new(52, 94, 235, byte.MaxValue));
Vision = FloatOptionItem.Create(69_211_101, "HiderVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.CrewmateRoles, false)
Vision = FloatOptionItem.Create(69_211_101, "HiderVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.CrewmateRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(52, 94, 235, byte.MaxValue));
Speed = FloatOptionItem.Create(69_211_102, "HiderSpeed", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.CrewmateRoles, false)
Speed = FloatOptionItem.Create(69_211_102, "HiderSpeed", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.CrewmateRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(52, 94, 235, byte.MaxValue));
TimeDecreaseOnTaskComplete = IntegerOptionItem.Create(69_211_103, "TimeDecreaseOnTaskComplete", new(0, 60, 1), 5, TabGroup.CrewmateRoles, false)
TimeDecreaseOnTaskComplete = IntegerOptionItem.Create(69_211_103, "TimeDecreaseOnTaskComplete", new(0, 60, 1), 5, TabGroup.CrewmateRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new(52, 94, 235, byte.MaxValue));
+4 -4
View File
@@ -19,19 +19,19 @@ namespace EHR.GameMode.HideAndSeekRoles
.SetHeader(true)
.SetColor(new(255, 25, 25, byte.MaxValue));
Vision = FloatOptionItem.Create(69_211_201, "SeekerVision", new(0.05f, 5f, 0.05f), 0.5f, TabGroup.ImpostorRoles, false)
Vision = FloatOptionItem.Create(69_211_201, "SeekerVision", new(0.05f, 5f, 0.05f), 0.5f, TabGroup.ImpostorRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(255, 25, 25, byte.MaxValue));
Speed = FloatOptionItem.Create(69_211_202, "SeekerSpeed", new(0.05f, 5f, 0.05f), 1.5f, TabGroup.ImpostorRoles, false)
Speed = FloatOptionItem.Create(69_211_202, "SeekerSpeed", new(0.05f, 5f, 0.05f), 1.5f, TabGroup.ImpostorRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(255, 25, 25, byte.MaxValue));
KillCooldown = FloatOptionItem.Create(69_211_203, "KillCooldown", new(0f, 90f, 1f), 10f, TabGroup.ImpostorRoles, false)
KillCooldown = FloatOptionItem.Create(69_211_203, "KillCooldown", new(0f, 90f, 1f), 10f, TabGroup.ImpostorRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new(255, 25, 25, byte.MaxValue));
CanVent = BooleanOptionItem.Create(69_211_204, "CanVent", false, TabGroup.ImpostorRoles, false)
CanVent = BooleanOptionItem.Create(69_211_204, "CanVent", false, TabGroup.ImpostorRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetColor(new(255, 25, 25, byte.MaxValue));
}
+2 -2
View File
@@ -13,12 +13,12 @@ namespace EHR.GameMode.HideAndSeekRoles
public static void SetupCustomOption()
{
Options.SetupRoleOptions(69_211_401, TabGroup.NeutralRoles, CustomRoles.Troll, CustomGameMode.HideAndSeek, true);
Vision = FloatOptionItem.Create(69_211_403, "TrollVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles, false)
Vision = FloatOptionItem.Create(69_211_403, "TrollVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(255, 0, 255, byte.MaxValue))
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Troll]);
Speed = FloatOptionItem.Create(69_211_404, "TrollSpeed", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles, false)
Speed = FloatOptionItem.Create(69_211_404, "TrollSpeed", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles)
.SetGameMode(CustomGameMode.HideAndSeek)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new(255, 0, 255, byte.MaxValue))
+6 -6
View File
@@ -1,7 +1,7 @@
using HarmonyLib;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using HarmonyLib;
using UnityEngine;
namespace EHR
@@ -23,19 +23,19 @@ namespace EHR
public static void SetupCustomOption()
{
Time = IntegerOptionItem.Create(69_213_001, "HotPotato_Time", new(1, 90, 1), 20, TabGroup.GameSettings, false)
Time = IntegerOptionItem.Create(69_213_001, "HotPotato_Time", new(1, 90, 1), 20, TabGroup.GameSettings)
.SetHeader(true)
.SetGameMode(CustomGameMode.HotPotato)
.SetValueFormat(OptionFormat.Seconds)
.SetColor(new Color32(232, 205, 70, byte.MaxValue));
HolderSpeed = FloatOptionItem.Create(69_213_002, "HotPotato_HolderSpeed", new(0.1f, 5f, 0.1f), 1.5f, TabGroup.GameSettings, false)
HolderSpeed = FloatOptionItem.Create(69_213_002, "HotPotato_HolderSpeed", new(0.1f, 5f, 0.1f), 1.5f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.HotPotato)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new Color32(232, 205, 70, byte.MaxValue));
Chat = BooleanOptionItem.Create(69_213_003, "FFA_ChatDuringGame", false, TabGroup.GameSettings, false)
Chat = BooleanOptionItem.Create(69_213_003, "FFA_ChatDuringGame", false, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.HotPotato)
.SetColor(new Color32(232, 205, 70, byte.MaxValue));
Range = FloatOptionItem.Create(69_213_004, "HotPotato_Range", new(0.25f, 5f, 0.25f), 1f, TabGroup.GameSettings, false)
Range = FloatOptionItem.Create(69_213_004, "HotPotato_Range", new(0.25f, 5f, 0.25f), 1f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.HotPotato)
.SetValueFormat(OptionFormat.Multiplier)
.SetColor(new Color32(232, 205, 70, byte.MaxValue));
+18 -10
View File
@@ -1,8 +1,8 @@
using EHR.Roles.AddOns.Common;
using HarmonyLib;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using EHR.Roles.AddOns.Common;
using HarmonyLib;
using UnityEngine;
using static EHR.Translator;
@@ -62,7 +62,15 @@ public class Counter(int totalGreenTime, int totalRedTime, long startTimeStamp,
public string ColoredTimerString
{
get => IsYellow ? Utils.ColorString(Color.clear, "00") : Utils.ColorString(IsRed ? Color.red : Color.green, Timer < 10 ? $"0{Timer}" : Timer.ToString());
get
{
string result = IsYellow || (Timer == TotalGreenTime && !IsRed && !IsYellow) || (Timer == TotalRedTime && IsRed) ? Utils.ColorString(Color.clear, "00") : Utils.ColorString(IsRed ? Color.red : Color.green, Timer < 10 ? $" {Timer}" : Timer.ToString());
if (Timer is <= 19 and >= 10 && !IsYellow) result = $" {result}";
if (Timer % 10 == 1 && !IsYellow) result = result.Insert(result.Length - 9, " ");
return $"<font=\"DIGITAL-7 SDF\"><size=130%>{result}</size></font>";
}
}
public string ColoredArrow
@@ -139,10 +147,10 @@ class MoveAndStopPlayerData(Counter leftCounter, Counter middleCounter, Counter
var middleTimer = MiddleCounter.ColoredTimerString;
var rightTimer = RightCounter.ColoredTimerString;
var arrowRow = $"{LeftCounter.ColoredArrow.PadRightV2(4)} {MiddleCounter.ColoredArrow.PadRightV2(4)} {RightCounter.ColoredArrow.PadRightV2(4)}";
var counterRow = $"{leftTimer.PadRightV2(4)} {middleTimer.PadRightV2(4)} {rightTimer.PadRightV2(4)}";
var arrowRow = $"{LeftCounter.ColoredArrow} {MiddleCounter.ColoredArrow} {RightCounter.ColoredArrow}";
var counterRow = $"{leftTimer} {middleTimer} {rightTimer}";
return $"{arrowRow}\n{counterRow}";
return $"{counterRow}\n{arrowRow}";
}
public void UpdateCounters()
@@ -209,7 +217,7 @@ internal class MoveAndStopManager
private static int DefaultMaxValue => 30;
private static OptionItem CreateSetting(int Id, string direction, bool red, bool min) =>
IntegerOptionItem.Create(Id, CounterSettingString(direction, red, min), CounterValueRule, min ? DefaultMinValue : DefaultMaxValue, TabGroup.GameSettings, false)
IntegerOptionItem.Create(Id, CounterSettingString(direction, red, min), CounterValueRule, min ? DefaultMinValue : DefaultMaxValue, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.MoveAndStop)
.SetColor(new Color32(0, 255, 255, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds)
@@ -222,7 +230,7 @@ internal class MoveAndStopManager
.AddReplacement(new("Middle", Utils.ColorString(Color.white, "Middle")));
private static OptionItem CreateExtraTimeSetting(int Id, string mapName, int defaultValue) =>
IntegerOptionItem.Create(Id, $"MoveAndStop_ExtraGreenTimeOn{mapName}", ExtraTimeValue, defaultValue, TabGroup.GameSettings, false)
IntegerOptionItem.Create(Id, $"MoveAndStop_ExtraGreenTimeOn{mapName}", ExtraTimeValue, defaultValue, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.MoveAndStop)
.SetColor(new Color32(0, 255, 255, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds)
@@ -230,7 +238,7 @@ internal class MoveAndStopManager
public static void SetupCustomOption()
{
MoveAndStop_GameTime = IntegerOptionItem.Create(68_213_001, "FFA_GameTime", new(30, 1200, 10), 900, TabGroup.GameSettings, false)
MoveAndStop_GameTime = IntegerOptionItem.Create(68_213_001, "FFA_GameTime", new(30, 1200, 10), 900, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.MoveAndStop)
.SetColor(new Color32(0, 255, 255, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds)
+13 -13
View File
@@ -1,10 +1,10 @@
using EHR.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using EHR.Modules;
using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using static EHR.RandomSpawn;
@@ -43,40 +43,40 @@ internal static class SoloKombatManager
public static void SetupCustomOption()
{
KB_GameTime = IntegerOptionItem.Create(66_233_001, "KB_GameTime", new(30, 300, 5), 180, TabGroup.GameSettings, false)
KB_GameTime = IntegerOptionItem.Create(66_233_001, "KB_GameTime", new(30, 300, 5), 180, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds)
.SetHeader(true);
KB_ATKCooldown = FloatOptionItem.Create(66_223_008, "KB_ATKCooldown", new(1f, 10f, 0.1f), 1f, TabGroup.GameSettings, false)
KB_ATKCooldown = FloatOptionItem.Create(66_223_008, "KB_ATKCooldown", new(1f, 10f, 0.1f), 1f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds);
KB_HPMax = FloatOptionItem.Create(66_233_002, "KB_HPMax", new(10f, 990f, 5f), 100f, TabGroup.GameSettings, false)
KB_HPMax = FloatOptionItem.Create(66_233_002, "KB_HPMax", new(10f, 990f, 5f), 100f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Health);
KB_ATK = FloatOptionItem.Create(66_233_003, "KB_ATK", new(1f, 100f, 1f), 8f, TabGroup.GameSettings, false)
KB_ATK = FloatOptionItem.Create(66_233_003, "KB_ATK", new(1f, 100f, 1f), 8f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Health);
KB_RecoverPerSecond = FloatOptionItem.Create(66_233_005, "KB_RecoverPerSecond", new(1f, 180f, 1f), 2f, TabGroup.GameSettings, false)
KB_RecoverPerSecond = FloatOptionItem.Create(66_233_005, "KB_RecoverPerSecond", new(1f, 180f, 1f), 2f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Health);
KB_RecoverAfterSecond = IntegerOptionItem.Create(66_233_004, "KB_RecoverAfterSecond", new(0, 60, 1), 8, TabGroup.GameSettings, false)
KB_RecoverAfterSecond = IntegerOptionItem.Create(66_233_004, "KB_RecoverAfterSecond", new(0, 60, 1), 8, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds);
KB_ResurrectionWaitingTime = IntegerOptionItem.Create(66_233_006, "KB_ResurrectionWaitingTime", new(3, 990, 1), 15, TabGroup.GameSettings, false)
KB_ResurrectionWaitingTime = IntegerOptionItem.Create(66_233_006, "KB_ResurrectionWaitingTime", new(3, 990, 1), 15, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Seconds);
KB_KillBonusMultiplier = FloatOptionItem.Create(66_233_007, "KB_KillBonusMultiplier", new(0.25f, 5f, 0.25f), 1.25f, TabGroup.GameSettings, false)
KB_KillBonusMultiplier = FloatOptionItem.Create(66_233_007, "KB_KillBonusMultiplier", new(0.25f, 5f, 0.25f), 1.25f, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue))
.SetValueFormat(OptionFormat.Multiplier);
KB_BootVentWhenDead = BooleanOptionItem.Create(66_233_009, "KB_BootVentWhenDead", false, TabGroup.GameSettings, false)
KB_BootVentWhenDead = BooleanOptionItem.Create(66_233_009, "KB_BootVentWhenDead", false, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.SoloKombat)
.SetColor(new Color32(245, 82, 82, byte.MaxValue));
}
+3 -3
View File
@@ -1,9 +1,9 @@
using AmongUs.GameOptions;
using EHR.Modules;
using Hazel;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using AmongUs.GameOptions;
using EHR.Modules;
using Hazel;
namespace EHR;
+2 -2
View File
@@ -1,5 +1,3 @@
using HarmonyLib;
using InnerNet;
using System;
using System.Collections.Generic;
using System.IO;
@@ -8,6 +6,8 @@ using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using HarmonyLib;
using InnerNet;
using static EHR.Translator;
namespace EHR;
+1 -1
View File
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using AmongUs.Data;
using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using System.Collections.Generic;
namespace EHR;
+2 -2
View File
@@ -1,5 +1,5 @@
using BepInEx.Configuration;
using System;
using System;
using BepInEx.Configuration;
using UnityEngine;
using Object = UnityEngine.Object;
+2 -2
View File
@@ -1,9 +1,9 @@
using HarmonyLib;
using System;
using System;
using System.IO;
using System.Net.Sockets;
using System.Reflection;
using System.Text;
using HarmonyLib;
namespace EHR;
+3 -3
View File
@@ -1,8 +1,8 @@
using AmongUs.GameOptions;
using System.Collections.Generic;
using System.Linq;
using AmongUs.GameOptions;
using EHR.Roles.Impostor;
using HarmonyLib;
using System.Collections.Generic;
using System.Linq;
namespace EHR.Modules;
+34 -10
View File
@@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using AmongUs.GameOptions;
using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using UnityEngine;
namespace EHR;
@@ -98,6 +99,7 @@ internal static class CustomRolesHelper
CustomRoles.Dictator => CustomRoles.Crewmate,
CustomRoles.Inhibitor => CustomRoles.Impostor,
CustomRoles.Kidnapper => CustomRoles.Shapeshifter,
CustomRoles.Generator => CustomRoles.Shapeshifter,
CustomRoles.Blackmailer => CustomRoles.Impostor,
CustomRoles.Commander => CustomRoles.Shapeshifter,
CustomRoles.Freezer => CustomRoles.Shapeshifter,
@@ -148,6 +150,7 @@ internal static class CustomRolesHelper
CustomRoles.Express => CustomRoles.Crewmate,
CustomRoles.NiceEraser => CustomRoles.Crewmate,
CustomRoles.TaskManager => CustomRoles.Crewmate,
CustomRoles.Adventurer => CustomRoles.Engineer,
CustomRoles.Randomizer => CustomRoles.Crewmate,
CustomRoles.Beacon => CustomRoles.Crewmate,
CustomRoles.Rabbit => CustomRoles.Crewmate,
@@ -168,6 +171,7 @@ internal static class CustomRolesHelper
CustomRoles.Altruist => CustomRoles.Crewmate,
CustomRoles.Transmitter => CustomRoles.Crewmate,
CustomRoles.Autocrat => CustomRoles.Crewmate,
CustomRoles.Sentry => CustomRoles.Crewmate,
CustomRoles.Perceiver => UsePets ? CustomRoles.Crewmate : CustomRoles.Engineer,
CustomRoles.Convener => UsePets ? CustomRoles.Crewmate : CustomRoles.Engineer,
CustomRoles.Mathematician => CustomRoles.Crewmate,
@@ -181,7 +185,7 @@ internal static class CustomRolesHelper
CustomRoles.Escort => UsePets && Escort.UsePet.GetBool() ? CustomRoles.Crewmate : CustomRoles.Impostor,
CustomRoles.DonutDelivery => UsePets && DonutDelivery.UsePet.GetBool() ? CustomRoles.Crewmate : CustomRoles.Impostor,
CustomRoles.Gaulois => UsePets && Gaulois.UsePet.GetBool() ? CustomRoles.Crewmate : CustomRoles.Impostor,
CustomRoles.Analyzer => UsePets && Analyzer.UsePet.GetBool() ? CustomRoles.Crewmate : CustomRoles.Impostor,
CustomRoles.Analyst => UsePets && Analyst.UsePet.GetBool() ? CustomRoles.Crewmate : CustomRoles.Impostor,
CustomRoles.Escapee => UsePets ? CustomRoles.Impostor : CustomRoles.Shapeshifter,
CustomRoles.NiceGuesser => CustomRoles.Crewmate,
CustomRoles.EvilGuesser => CustomRoles.Impostor,
@@ -228,6 +232,7 @@ internal static class CustomRolesHelper
CustomRoles.Bard => CustomRoles.Impostor,
CustomRoles.Swooper => CustomRoles.Impostor,
CustomRoles.Crewpostor => CustomRoles.Engineer,
CustomRoles.Cherokious => CustomRoles.Engineer,
CustomRoles.Observer => CustomRoles.Crewmate,
CustomRoles.DovesOfNeace => UsePets ? CustomRoles.Crewmate : CustomRoles.Engineer,
CustomRoles.Disperser => UsePets ? CustomRoles.Impostor : CustomRoles.Shapeshifter,
@@ -310,7 +315,7 @@ internal static class CustomRolesHelper
CustomRoles.Escort => UsePets && Escort.UsePet.GetBool() ? RoleTypes.GuardianAngel : RoleTypes.Impostor,
CustomRoles.DonutDelivery => UsePets && DonutDelivery.UsePet.GetBool() ? RoleTypes.GuardianAngel : RoleTypes.Impostor,
CustomRoles.Gaulois => UsePets && Gaulois.UsePet.GetBool() ? RoleTypes.GuardianAngel : RoleTypes.Impostor,
CustomRoles.Analyzer => UsePets && Analyzer.UsePet.GetBool() ? RoleTypes.GuardianAngel : RoleTypes.Impostor,
CustomRoles.Analyst => UsePets && Analyst.UsePet.GetBool() ? RoleTypes.GuardianAngel : RoleTypes.Impostor,
CustomRoles.Witness => UsePets && Options.WitnessUsePet.GetBool() ? RoleTypes.GuardianAngel : RoleTypes.Impostor,
CustomRoles.Pursuer => RoleTypes.Impostor,
CustomRoles.Revolutionist => RoleTypes.Impostor,
@@ -328,6 +333,7 @@ internal static class CustomRolesHelper
CustomRoles.BloodKnight => RoleTypes.Impostor,
CustomRoles.Poisoner => RoleTypes.Impostor,
CustomRoles.NSerialKiller => RoleTypes.Impostor,
CustomRoles.Bargainer => RoleTypes.Impostor,
CustomRoles.Tiger => RoleTypes.Impostor,
CustomRoles.SoulHunter => RoleTypes.Impostor,
CustomRoles.Enderman => RoleTypes.Impostor,
@@ -337,6 +343,7 @@ internal static class CustomRolesHelper
CustomRoles.Sprayer => RoleTypes.Impostor,
CustomRoles.PlagueDoctor => RoleTypes.Impostor,
CustomRoles.Postman => RoleTypes.Impostor,
CustomRoles.SchrodingersCat => RoleTypes.Impostor,
CustomRoles.Impartial => RoleTypes.Impostor,
CustomRoles.Predator => RoleTypes.Impostor,
CustomRoles.Reckless => RoleTypes.Impostor,
@@ -375,6 +382,7 @@ internal static class CustomRolesHelper
public static bool IsNonNK(this CustomRoles role) => role is
CustomRoles.Jester or
CustomRoles.Postman or
CustomRoles.SchrodingersCat or
CustomRoles.Impartial or
CustomRoles.Predator or
CustomRoles.SoulHunter or
@@ -411,6 +419,7 @@ internal static class CustomRolesHelper
CustomRoles.Succubus or
CustomRoles.Gamer or
CustomRoles.Crewpostor or
CustomRoles.Cherokious or
CustomRoles.Necromancer or
CustomRoles.Agitater or
CustomRoles.Wraith or
@@ -425,6 +434,7 @@ internal static class CustomRolesHelper
CustomRoles.Refugee or
CustomRoles.Parasite or
CustomRoles.NSerialKiller or
CustomRoles.Bargainer or
CustomRoles.Tiger or
CustomRoles.Enderman or
CustomRoles.Mycologist or
@@ -475,6 +485,7 @@ internal static class CustomRolesHelper
CustomRoles.Amnesiac or
CustomRoles.God or
CustomRoles.Postman or
CustomRoles.SchrodingersCat or
CustomRoles.Predator or
CustomRoles.Pursuer or
CustomRoles.FFF or
@@ -531,6 +542,7 @@ internal static class CustomRolesHelper
CustomRoles.Underdog or
CustomRoles.Inhibitor or
CustomRoles.Kidnapper or
CustomRoles.Generator or
CustomRoles.Blackmailer or
CustomRoles.Commander or
CustomRoles.Freezer or
@@ -629,7 +641,7 @@ internal static class CustomRolesHelper
CustomRoles.Escort or
CustomRoles.DonutDelivery or
CustomRoles.Gaulois or
CustomRoles.Analyzer or
CustomRoles.Analyst or
CustomRoles.Witness or
CustomRoles.Monarch or
CustomRoles.Jailor or
@@ -652,7 +664,7 @@ internal static class CustomRolesHelper
CustomRoles.Aid when Aid.UsePet.GetBool() => true,
CustomRoles.Escort when Escort.UsePet.GetBool() => true,
CustomRoles.DonutDelivery when DonutDelivery.UsePet.GetBool() => true,
CustomRoles.Analyzer when Analyzer.UsePet.GetBool() => true,
CustomRoles.Analyst when Analyst.UsePet.GetBool() => true,
CustomRoles.Jailor when Jailor.UsePet.GetBool() => true,
CustomRoles.Sheriff when Sheriff.UsePet.GetBool() => true,
CustomRoles.SwordsMan when SwordsMan.UsePet.GetBool() => true,
@@ -671,14 +683,17 @@ internal static class CustomRolesHelper
_ => false,
};
public static readonly CustomRoles[] OnlySpawnsWithPetsRoleList =
public static readonly List<CustomRoles> OnlySpawnsWithPetsRoleList =
[
CustomRoles.Tunneler,
CustomRoles.Tornado,
CustomRoles.Swiftclaw,
CustomRoles.Adventurer,
CustomRoles.Sentry,
CustomRoles.Cherokious
];
public static bool OnlySpawnsWithPets(this CustomRoles role) => OnlySpawnsWithPetsRoleList.Any(x => x.ToString() == role.ToString());
public static bool OnlySpawnsWithPets(this CustomRoles role) => OnlySpawnsWithPetsRoleList.Contains(role);
public static bool NeedUpdateOnLights(this CustomRoles role) => (!role.UsesPetInsteadOfKill()) && (role.GetDYRole() != RoleTypes.GuardianAngel || role is
CustomRoles.Convict or
@@ -734,6 +749,10 @@ internal static class CustomRolesHelper
CustomRoles.Pickpocket or
CustomRoles.TicketsStealer;
public static bool ForceCancelShapeshift(this CustomRoles role) => role is
CustomRoles.Hangman or
CustomRoles.Generator;
public static bool CheckAddonConflictV2(CustomRoles addon, CustomRoles mainRole) => addon.IsAdditionRole() && mainRole is not CustomRoles.GuardianAngelEHR and not CustomRoles.God and not CustomRoles.GM && addon switch
{
CustomRoles.Autopsy when mainRole is CustomRoles.Doctor or CustomRoles.Tracefinder or CustomRoles.Scientist or CustomRoles.ScientistEHR or CustomRoles.Sunnyboy => false,
@@ -1139,6 +1158,7 @@ internal static class CustomRolesHelper
CustomRoles.PlagueBearer => CountTypes.PlagueBearer,
CustomRoles.Parasite => CountTypes.Impostor,
CustomRoles.NSerialKiller => CountTypes.NSerialKiller,
CustomRoles.Bargainer => CountTypes.Bargainer,
CustomRoles.Tiger => CountTypes.Tiger,
CustomRoles.Enderman => CountTypes.Enderman,
CustomRoles.Mycologist => CountTypes.Mycologist,
@@ -1168,8 +1188,10 @@ internal static class CustomRolesHelper
CustomRoles.Refugee => CountTypes.Impostor,
CustomRoles.Glitch => CountTypes.Glitch,
CustomRoles.Spiritcaller => CountTypes.Spiritcaller,
CustomRoles.Cherokious => CountTypes.Cherokious,
CustomRoles.DarkHide => DarkHide.SnatchesWin.GetBool() ? CountTypes.Crew : CountTypes.DarkHide,
CustomRoles.Arsonist => !Options.ArsonistCanIgniteAnytime.GetBool() ? CountTypes.Crew : CountTypes.Arsonist,
CustomRoles.SchrodingersCat => SchrodingersCat.WinsWithCrewIfNotAttacked.GetBool() ? CountTypes.Crew : CountTypes.OutOfGame,
_ => role.Is(Team.Impostor) ? CountTypes.Impostor : CountTypes.Crew
};
@@ -1286,6 +1308,7 @@ public enum CountTypes
HexMaster,
Wraith,
NSerialKiller,
Bargainer,
Tiger,
Enderman,
Mycologist,
@@ -1318,5 +1341,6 @@ public enum CountTypes
Pestilence,
PlagueBearer,
Glitch,
Arsonist
Arsonist,
Cherokious
}
+2 -2
View File
@@ -1,9 +1,9 @@
using System;
using System.Diagnostics.CodeAnalysis;
using AmongUs.GameOptions;
using Hazel;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using InnerNet;
using System;
using System.Diagnostics.CodeAnalysis;
namespace EHR;
+2 -2
View File
@@ -1,8 +1,8 @@
using Hazel;
using System;
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using Hazel;
namespace EHR.Modules;
+26 -16
View File
@@ -1,8 +1,8 @@
using HarmonyLib;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using HarmonyLib;
namespace EHR.Modules
{
@@ -86,23 +86,33 @@ namespace EHR.Modules
{
if (CustomTeams.Count == 0 || CustomTeamPlayerIds.Count == 0) return false;
CustomTeamPlayerIds.Values.Do(x => x.RemoveWhere(p =>
try
{
var pc = Utils.GetPlayerById(p);
return pc == null || !pc.IsAlive() || pc.Data.Disconnected;
}));
var team = CustomTeamPlayerIds.Keys.First();
if (CustomTeamPlayerIds.Count == 1 && Main.AllAlivePlayerControls.All(x =>
CustomTeamPlayerIds.Do(x => x.Value.RemoveWhere(p =>
{
var customTeam = GetCustomTeam(x.PlayerId);
return customTeam != null && customTeam.Equals(team);
}))
var pc = Utils.GetPlayerById(p);
return pc == null || pc.Data.Disconnected;
}));
var aliveTeamPlayers = CustomTeamPlayerIds.ToDictionary(x => x.Key, x => x.Value);
aliveTeamPlayers.Do(x => x.Value.RemoveWhere(p => !Utils.GetPlayerById(p).IsAlive()));
var team = aliveTeamPlayers.Keys.First();
if (aliveTeamPlayers.Count == 1 && Main.AllAlivePlayerControls.All(x =>
{
var customTeam = GetCustomTeam(x.PlayerId);
return customTeam != null && customTeam.Equals(team);
}))
{
WinnerTeam = team;
CustomWinnerHolder.ResetAndSetWinner(CustomWinner.CustomTeam);
CustomWinnerHolder.WinnerIds = aliveTeamPlayers.Values.First();
return true;
}
}
catch
{
WinnerTeam = team;
CustomWinnerHolder.ResetAndSetWinner(CustomWinner.CustomTeam);
CustomWinnerHolder.WinnerIds = CustomTeamPlayerIds.Values.First();
return true;
return false;
}
return false;
+1 -1
View File
@@ -1,5 +1,5 @@
using Hazel;
using System.Collections.Generic;
using Hazel;
namespace EHR;
+2 -7
View File
@@ -4,30 +4,25 @@ namespace EHR;
public static class DebugModeManager
{
// これが有効の時、通常のゲームに支障のないデバッグ機能(詳細ログ・ゲーム外でのデバッグ表示など)が有効化される。
// また、ゲーム内オプションでデバッグモードを有効化することができる。
public static bool AmDebugger { get; private set; } =
#if DEBUG
true;
true;
#else
false;
#endif
// これが有効の時、通常のゲームを破壊する可能性のある強力なデバッグ機能(テレポートなど)が有効化される。
public static bool IsDebugMode => AmDebugger && EnableDebugMode != null && EnableDebugMode.GetBool();
public static OptionItem EnableDebugMode;
public static void Auth(HashAuth auth, string input)
{
// AmDebugger = デバッグビルドである || デバッグキー認証が通った
AmDebugger = AmDebugger || auth.CheckString(input);
}
public static void SetupCustomOption()
{
EnableDebugMode = BooleanOptionItem.Create(2, "EnableDebugMode", false, TabGroup.SystemSettings, true)
.SetHeader(true)
.SetColor(Color.green)
.SetHeader(true)
.SetHidden(!AmDebugger);
}
}
+1 -1
View File
@@ -1,4 +1,3 @@
using EHR.Modules;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -6,6 +5,7 @@ using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Net.Http;
using System.Runtime.CompilerServices;
using EHR.Modules;
using LogLevel = BepInEx.Logging.LogLevel;
namespace EHR;
+1 -1
View File
@@ -25,7 +25,7 @@ public static class DevManager
public static void Init()
{
// Dev
DevUserList.Add(new(code: "actorour#0029", color: "#ffc0cb", tag: "EHR/TONX Developer", isUp: true, isDev: true, deBug: true, colorCmd: true, upName: "KARPED1EM"));
DevUserList.Add(new(code: "actorour#0029", color: "#ffc0cb", tag: "TOHE/TONX Developer", isUp: true, isDev: true, deBug: true, colorCmd: true, upName: "KARPED1EM"));
DevUserList.Add(new(code: "pinklaze#1776", color: "#30548e", tag: "#Dev", isUp: true, isDev: true, deBug: true, colorCmd: false, upName: "NCSIMON"));
DevUserList.Add(new(code: "keepchirpy#6354", color: "#1FF3C6", tag: "Переводчик", isUp: true, isDev: false, deBug: false, colorCmd: true, upName: "TommyXL")); //Tommy-XL
DevUserList.Add(new(code: "taskunsold#2701", color: "null", tag: "<color=#426798>Tem</color><color=#f6e509>mie</color>", isUp: false, isDev: true, deBug: false, colorCmd: false, upName: null)); //Tem
+1 -1
View File
@@ -1,6 +1,6 @@
using HarmonyLib;
using System;
using System.Collections.Generic;
using HarmonyLib;
using UnityEngine;
using Object = UnityEngine.Object;
+18 -12
View File
@@ -1,11 +1,11 @@
using AmongUs.GameOptions;
using EHR.Modules;
using Hazel;
using InnerNet;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using AmongUs.GameOptions;
using EHR.Modules;
using Hazel;
using InnerNet;
using static EHR.Translator;
namespace EHR;
@@ -323,15 +323,21 @@ internal class EAC
if (amount is not 64 and not 65) goto YesCheat;
break;
case SystemTypes.Comms:
if (amount == 0)
switch (amount)
{
if (Mapid is 1 or 5) goto YesCheat;
case 0:
{
if (Mapid is 1 or 5) goto YesCheat;
break;
}
case 64 or 65 or 32 or 33 or 16 or 17:
{
if (Mapid is not (1 or 5)) goto YesCheat;
break;
}
default:
goto YesCheat;
}
else if (amount is 64 or 65 or 32 or 33 or 16 or 17)
{
if (!(Mapid is 1 or 5)) goto YesCheat;
}
else goto YesCheat;
break;
case SystemTypes.Electrical:
+17 -16
View File
@@ -1,3 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using AmongUs.GameOptions;
using EHR.Modules;
using EHR.Patches;
@@ -9,11 +14,6 @@ using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using UnityEngine;
using static EHR.Translator;
using static EHR.Utils;
@@ -256,22 +256,23 @@ static class ExtendedPlayerControl
public static float GetAbilityUseLimit(this PlayerControl pc) => Main.AbilityUseLimit.GetValueOrDefault(pc.PlayerId, float.NaN);
public static float GetAbilityUseLimit(this byte playerId) => Main.AbilityUseLimit.GetValueOrDefault(playerId, float.NaN);
public static void RpcRemoveAbilityUse(this PlayerControl pc)
public static void RpcRemoveAbilityUse(this PlayerControl pc, bool log = true)
{
float current = pc.GetAbilityUseLimit();
if (float.IsNaN(current) || current <= 0f) return;
pc.SetAbilityUseLimit(current - 1);
pc.SetAbilityUseLimit(current - 1, log: log);
}
public static void RpcIncreaseAbilityUseLimitBy(this PlayerControl pc, float get)
public static void RpcIncreaseAbilityUseLimitBy(this PlayerControl pc, float get, bool log = true)
{
float current = pc.GetAbilityUseLimit();
if (float.IsNaN(current)) return;
pc.SetAbilityUseLimit(current + get);
pc.SetAbilityUseLimit(current + get, log: log);
}
public static void SetAbilityUseLimit(this PlayerControl pc, float limit, bool rpc = true) => pc.PlayerId.SetAbilityUseLimit(limit, rpc);
public static void SetAbilityUseLimit(this PlayerControl pc, float limit, bool rpc = true, bool log = true) => pc.PlayerId.SetAbilityUseLimit(limit, rpc, log);
public static void SetAbilityUseLimit(this byte playerId, float limit, bool rpc = true)
public static void SetAbilityUseLimit(this byte playerId, float limit, bool rpc = true, bool log = true)
{
if (float.IsNaN(limit) || limit is < 0f or > 100f || (Main.AbilityUseLimit.TryGetValue(playerId, out var beforeLimit) && Math.Abs(beforeLimit - limit) < 0.01f)) return;
@@ -287,7 +288,7 @@ static class ExtendedPlayerControl
var pc = GetPlayerById(playerId);
NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
Logger.Info($" {pc.GetNameWithRole()} => {Math.Round(limit, 1)}", "SetAbilityUseLimit");
if (log) Logger.Info($" {pc.GetNameWithRole()} => {Math.Round(limit, 1)}", "SetAbilityUseLimit");
}
public static void Suicide(this PlayerControl pc, PlayerState.DeathReason deathReason = PlayerState.DeathReason.Suicide, PlayerControl realKiller = null)
@@ -631,13 +632,13 @@ static class ExtendedPlayerControl
return pc.GetCustomRole() switch
{
//SoloKombat
// SoloKombat
CustomRoles.KB_Normal => true,
//FFA
// FFA
CustomRoles.Killer => true,
//Move And Stop
// Move And Stop
CustomRoles.Tasker => false,
//Hot Potato
// Hot Potato
CustomRoles.Potato => false,
_ => Main.PlayerStates.TryGetValue(pc.PlayerId, out var state) && state.Role.CanUseImpostorVentButton(pc),
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using AmongUs.GameOptions;
using Hazel;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using InnerNet;
using System;
using System.Collections.Generic;
using Array = Il2CppSystem.Array;
using Buffer = Il2CppSystem.Buffer;
@@ -1,5 +1,5 @@
using AmongUs.GameOptions;
using System;
using AmongUs.GameOptions;
namespace EHR.Modules;
@@ -14,19 +14,19 @@ public class NormalGameOptionsSender : GameOptionsSender
{
try
{
if (_logicOptions == null || !GameManager.Instance.LogicComponents.Contains(_logicOptions))
if (GameManager.Instance != null && GameManager.Instance.LogicComponents != null && (_logicOptions == null || !GameManager.Instance.LogicComponents.Contains(_logicOptions)))
{
foreach (var glc in GameManager.Instance?.LogicComponents)
foreach (var glc in GameManager.Instance.LogicComponents)
if (glc.TryCast<LogicOptions>(out var lo))
_logicOptions = lo;
}
return _logicOptions != null && _logicOptions.IsDirty;
return _logicOptions is { IsDirty: true };
}
catch (Exception ex)
{
Logger.Fatal(ex.ToString(), "NormalGameOptionsSender.IsDirty.Get");
return _logicOptions != null && _logicOptions.IsDirty;
Logger.Error(ex.ToString(), "NormalGameOptionsSender.IsDirty.Get");
return _logicOptions is { IsDirty: true };
}
}
protected set { _logicOptions?.ClearDirtyFlag(); }
@@ -1,4 +1,6 @@
using AmongUs.GameOptions;
using System;
using System.Linq;
using AmongUs.GameOptions;
using EHR.Roles.AddOns.GhostRoles;
using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
@@ -6,8 +8,6 @@ using EHR.Roles.Neutral;
using Hazel;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using InnerNet;
using System;
using System.Linq;
using Mathf = UnityEngine.Mathf;
namespace EHR.Modules;
@@ -16,41 +16,59 @@ public class PlayerGameOptionsSender(PlayerControl player) : GameOptionsSender
{
public static void SetDirty(byte playerId)
{
foreach (var sender in AllSenders.OfType<PlayerGameOptionsSender>().Where(sender => sender.player.PlayerId == playerId))
foreach (GameOptionsSender allSender in AllSenders)
{
sender.SetDirty();
if (allSender is PlayerGameOptionsSender sender && sender.player.PlayerId == playerId)
{
sender.SetDirty();
}
}
}
public static void SetDirtyToAll()
{
foreach (var sender in AllSenders.OfType<PlayerGameOptionsSender>())
foreach (GameOptionsSender allSender in AllSenders)
{
sender.SetDirty();
if (allSender is PlayerGameOptionsSender sender)
{
sender.SetDirty();
}
}
}
// For lights call/fix
public static void SetDirtyToAllV2()
{
foreach (var sender in AllSenders.OfType<PlayerGameOptionsSender>().Where(sender => !sender.IsDirty && sender.player.IsAlive() && (sender.player.GetCustomRole().NeedUpdateOnLights() || sender.player.Is(CustomRoles.Torch) || sender.player.Is(CustomRoles.Mare))))
foreach (GameOptionsSender allSender in AllSenders)
{
sender.SetDirty();
if (allSender is PlayerGameOptionsSender { IsDirty: false } sender && sender.player.IsAlive() && (sender.player.GetCustomRole().NeedUpdateOnLights() || sender.player.Is(CustomRoles.Torch) || sender.player.Is(CustomRoles.Mare)))
{
sender.SetDirty();
}
}
}
// For Grenadier blidning/restoring
public static void SetDirtyToAllV3()
{
foreach (var sender in AllSenders.OfType<PlayerGameOptionsSender>().Where(sender => !sender.IsDirty && sender.player.IsAlive() && ((Grenadier.GrenadierBlinding.Count > 0 && (sender.player.GetCustomRole().IsImpostor() || (sender.player.GetCustomRole().IsNeutral() && Options.GrenadierCanAffectNeutral.GetBool()))) || (Grenadier.MadGrenadierBlinding.Count > 0 && !sender.player.GetCustomRole().IsImpostorTeam() && !sender.player.Is(CustomRoles.Madmate)))))
foreach (GameOptionsSender allSender in AllSenders)
{
sender.SetDirty();
if (allSender is PlayerGameOptionsSender { IsDirty: false } sender && sender.player.IsAlive() && ((Grenadier.GrenadierBlinding.Count > 0 && (sender.player.GetCustomRole().IsImpostor() || (sender.player.GetCustomRole().IsNeutral() && Options.GrenadierCanAffectNeutral.GetBool()))) || (Grenadier.MadGrenadierBlinding.Count > 0 && !sender.player.GetCustomRole().IsImpostorTeam() && !sender.player.Is(CustomRoles.Madmate))))
{
sender.SetDirty();
}
}
}
// For players with kill buttons
public static void SetDirtyToAllV4()
{
foreach (var sender in AllSenders.OfType<PlayerGameOptionsSender>().Where(sender => !sender.IsDirty && sender.player.IsAlive() && sender.player.CanUseKillButton()).ToArray())
foreach (GameOptionsSender allSender in AllSenders)
{
sender.SetDirty();
if (allSender is PlayerGameOptionsSender { IsDirty: false } sender && sender.player.IsAlive() && sender.player.CanUseKillButton())
{
sender.SetDirty();
}
}
}
@@ -324,6 +342,13 @@ public class PlayerGameOptionsSender(PlayerControl player) : GameOptionsSender
opt.SetFloat(FloatOptionNames.ImpostorLightMod, 0);
}
if (player.IsCrewmate() && Main.PlayerStates.Values.Any(s => s.Role is Adventurer { IsEnable: true } av && av.ActiveWeapons.Contains(Adventurer.Weapon.Lantern)))
{
opt.SetVision(true);
opt.SetFloat(FloatOptionNames.CrewLightMod, 1.5f);
opt.SetFloat(FloatOptionNames.ImpostorLightMod, 1.5f);
}
if (Changeling.ChangedRole.TryGetValue(player.PlayerId, out var changed) && changed && player.GetRoleTypes() != RoleTypes.Shapeshifter)
{
AURoleOptions.ShapeshifterCooldown = 300f;
+3 -3
View File
@@ -1,3 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using AmongUs.GameOptions;
using EHR.Modules;
using EHR.Roles.AddOns.Crewmate;
@@ -7,9 +10,6 @@ using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using HarmonyLib;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Linq;
namespace EHR;
+4 -4
View File
@@ -1,10 +1,10 @@
using AmongUs.GameOptions;
using EHR.Roles.AddOns.GhostRoles;
using HarmonyLib;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using AmongUs.GameOptions;
using EHR.Roles.AddOns.GhostRoles;
using HarmonyLib;
namespace EHR.Modules
{
+18 -25
View File
@@ -1,13 +1,13 @@
using EHR.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using EHR.Modules;
using EHR.Roles.AddOns.Common;
using EHR.Roles.Crewmate;
using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
@@ -106,24 +106,18 @@ public static class GuessManager
return true;
}
if (!pc.Is(CustomRoles.NiceGuesser))
if (!pc.Is(CustomRoles.NiceGuesser) && pc.IsCrewmate() && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge) && !pc.Is(CustomRoles.NiceSwapper))
{
if (pc.IsCrewmate() && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge) && !pc.Is(CustomRoles.NiceSwapper))
{
if (!isUI) Utils.SendMessage(GetString("GuessNotAllowed"), pc.PlayerId);
else pc.ShowPopUp(GetString("GuessNotAllowed"));
return true;
}
if (!isUI) Utils.SendMessage(GetString("GuessNotAllowed"), pc.PlayerId);
else pc.ShowPopUp(GetString("GuessNotAllowed"));
return true;
}
if (!pc.Is(CustomRoles.EvilGuesser))
if (!pc.Is(CustomRoles.EvilGuesser) && pc.GetCustomRole().IsImpostor() && !Options.ImpostorsCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Councillor))
{
if (pc.GetCustomRole().IsImpostor() && !Options.ImpostorsCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Councillor))
{
if (!isUI) Utils.SendMessage(GetString("GuessNotAllowed"), pc.PlayerId);
else pc.ShowPopUp(GetString("GuessNotAllowed"));
return true;
}
if (!isUI) Utils.SendMessage(GetString("GuessNotAllowed"), pc.PlayerId);
else pc.ShowPopUp(GetString("GuessNotAllowed"));
return true;
}
if (pc.IsNeutralKiller() && !Options.NeutralKillersCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser))
@@ -147,12 +141,11 @@ public static class GuessManager
return true;
case 2:
{
if (
(pc.Is(CustomRoles.NiceGuesser) && Options.GGTryHideMsg.GetBool()) ||
if ((pc.Is(CustomRoles.NiceGuesser) && Options.GGTryHideMsg.GetBool()) ||
(pc.Is(CustomRoles.EvilGuesser) && Options.EGTryHideMsg.GetBool()) ||
(pc.Is(CustomRoles.Doomsayer) && Doomsayer.DoomsayerTryHideMsg.GetBool()) ||
(pc.Is(CustomRoles.Guesser) && Options.GTryHideMsg.GetBool()) || (Options.GuesserMode.GetBool() && Options.HideGuesserCommands.GetBool())
) /*TryHideMsg();*/ ChatManager.SendPreviousMessagesToAll();
(pc.Is(CustomRoles.Guesser) && Options.GTryHideMsg.GetBool()) || (Options.GuesserMode.GetBool() && Options.HideGuesserCommands.GetBool()))
ChatManager.SendPreviousMessagesToAll();
else if (pc.AmOwner && !isUI) Utils.SendMessage(originMsg, 255, pc.GetRealName());
if (!MsgToPlayerAndRole(msg, out byte targetId, out CustomRoles role, out string error))
@@ -960,7 +953,7 @@ public static class GuessManager
CustomRoleTypes.Impostor => new(255, 25, 25, byte.MaxValue),
CustomRoleTypes.Neutral => new(255, 171, 27, byte.MaxValue),
CustomRoleTypes.Addon => new Color32(255, 154, 206, byte.MaxValue),
_ => throw new NotImplementedException(),
_ => throw new NotImplementedException()
};
Logger.Info(Teamlabel.color.ToString(), ((CustomRoleTypes)index).ToString());
Teamlabel.text = GetString("Type" + ((CustomRoleTypes)index));
@@ -1026,7 +1019,7 @@ public static class GuessManager
Pagelabel.transform.localScale *= 1.6f;
Pagelabel.autoSizeTextContainer = true;
if (!IsNext && Page <= 1) Pagebutton.GetComponent<SpriteRenderer>().color = new(1, 1, 1, 0.1f);
Pagebutton.GetComponent<PassiveButton>().OnClick.AddListener((Action)(() => ClickEvent()));
Pagebutton.GetComponent<PassiveButton>().OnClick.AddListener((Action)(ClickEvent));
PageButtons.Add(Pagebutton.GetComponent<SpriteRenderer>());
return;
+2 -2
View File
@@ -1,6 +1,6 @@
using EHR.Patches;
using System;
using EHR.Patches;
using Rewired.Utils;
using System;
using UnityEngine;
using Object = UnityEngine.Object;
+1 -6
View File
@@ -83,12 +83,7 @@ static class LocateArrow
/// <returns></returns>
public static string GetArrows(PlayerControl seer)
{
var arrows = string.Empty;
foreach (var arrowInfo in LocateArrows.Keys.Where(ai => ai.From == seer.PlayerId))
{
arrows += LocateArrows[arrowInfo];
}
return arrows;
return LocateArrows.Keys.Where(ai => ai.From == seer.PlayerId).Aggregate(string.Empty, (current, arrowInfo) => current + LocateArrows[arrowInfo]);
}
/// <summary>
/// Check target arrow every FixedUpdate
+2 -2
View File
@@ -1,7 +1,7 @@
using AmongUs.GameOptions;
using System;
using AmongUs.GameOptions;
using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using System;
namespace EHR.Modules;
+3 -3
View File
@@ -1,11 +1,11 @@
using HarmonyLib;
using Newtonsoft.Json.Linq;
using System;
using System;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
using HarmonyLib;
using Newtonsoft.Json.Linq;
using Twitch;
using UnityEngine;
using static EHR.Translator;
+5 -2
View File
@@ -1,3 +1,4 @@
using System.Linq;
using EHR.Modules;
using EHR.Roles.AddOns.Common;
using EHR.Roles.AddOns.GhostRoles;
@@ -5,7 +6,6 @@ using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using Hazel;
using System.Linq;
namespace EHR;
@@ -39,6 +39,9 @@ public static class NameColorManager
switch (Options.CurrentGameMode)
{
case CustomGameMode.FFA when FFAManager.FFATeamMode.GetBool():
color = FFAManager.TeamColors[FFAManager.PlayerTeams[target.PlayerId]];
return true;
case CustomGameMode.MoveAndStop:
color = "#ffffff";
return true;
@@ -68,7 +71,7 @@ public static class NameColorManager
}
// Custom Teams
if (CustomTeamManager.AreInSameCustomTeam(seer.PlayerId, target.PlayerId)) color = Main.RoleColors[target.GetCustomRole()];
if (CustomTeamManager.AreInSameCustomTeam(seer.PlayerId, target.PlayerId) && Options.CTAPlayersCanSeeEachOthersRoles.GetBool()) color = Main.RoleColors[target.GetCustomRole()];
// Add-ons
if (seer.Is(CustomRoles.Rogue) && target.Is(CustomRoles.Rogue) && Options.RogueKnowEachOther.GetBool()) color = Main.RoleColors[CustomRoles.Rogue];
+2 -2
View File
@@ -1,6 +1,6 @@
using EHR.Modules;
using System.Collections.Generic;
using EHR.Modules;
using Hazel;
using System.Collections.Generic;
using UnityEngine;
namespace EHR;
+1 -1
View File
@@ -1,8 +1,8 @@
using AmongUs.GameOptions;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using AmongUs.GameOptions;
namespace EHR;
+1 -1
View File
@@ -1,5 +1,5 @@
using AmongUs.GameOptions;
using System;
using AmongUs.GameOptions;
namespace EHR;
+335 -306
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -6,7 +6,7 @@ public class BooleanOptionItem(int id, string name, bool defaultValue, TabGroup
public const string TEXT_false = "ColoredOff";
public static BooleanOptionItem Create(
int id, string name, bool defaultValue, TabGroup tab, bool isSingleValue
int id, string name, bool defaultValue, TabGroup tab, bool isSingleValue = false
)
{
return new(
+1 -1
View File
@@ -6,7 +6,7 @@ public class FloatOptionItem(int id, string name, float defaultValue, TabGroup t
public FloatValueRule Rule = rule;
public static FloatOptionItem Create(
int id, string name, FloatValueRule rule, float defaultValue, TabGroup tab, bool isSingleValue
int id, string name, FloatValueRule rule, float defaultValue, TabGroup tab, bool isSingleValue = false
)
{
return new(
+1 -1
View File
@@ -6,7 +6,7 @@ public class IntegerOptionItem(int id, string name, int defaultValue, TabGroup t
public IntegerValueRule Rule = rule;
public static IntegerOptionItem Create(
int id, string name, IntegerValueRule rule, int defaultValue, TabGroup tab, bool isSingleValue
int id, string name, IntegerValueRule rule, int defaultValue, TabGroup tab, bool isSingleValue = false
)
{
return new(
+2 -2
View File
@@ -1,7 +1,7 @@
using EHR.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using EHR.Modules;
using UnityEngine;
namespace EHR;
@@ -166,7 +166,7 @@ public abstract class OptionItem
return disableColor ? Translator.GetString(Name, ReplacementDictionary, console) : Utils.ColorString(NameColor, Translator.GetString(Name, ReplacementDictionary));
}
public virtual bool GetBool() => CurrentValue != 0 && (Parent == null || Parent.GetBool());
public virtual bool GetBool() => Name == "Bargainer.LensOfTruth.DurationSwitch" ? GetValue() == 3 : CurrentValue != 0 && (Parent == null || Parent.GetBool());
public virtual int GetInt() => CurrentValue;
public virtual float GetFloat() => CurrentValue;
+1 -1
View File
@@ -5,7 +5,7 @@ public class StringOptionItem(int id, string name, int defaultValue, TabGroup ta
public IntegerValueRule Rule = (0, selections.Length - 1, 1);
public string[] Selections = selections;
public static StringOptionItem Create(int id, string name, string[] selections, int defaultIndex, TabGroup tab, bool isSingleValue, bool noTranslation = false)
public static StringOptionItem Create(int id, string name, string[] selections, int defaultIndex, TabGroup tab, bool isSingleValue = false, bool noTranslation = false)
=> new(id, name, defaultIndex, tab, isSingleValue, selections, noTranslation);
// Getter
+2 -2
View File
@@ -6,8 +6,8 @@ public class TextOptionItem : OptionItem
public IntegerValueRule Rule;
// コンストラクタ
public TextOptionItem(int id, string name, int defaultValue, TabGroup tab, bool isSingleValue)
: base(id, name, defaultValue, tab, isSingleValue)
public TextOptionItem(int id, string name, int defaultValue, TabGroup tab, bool isSingleValue = false)
: base(id, name, defaultValue, tab, isSingleValue)
{
IsText = true;
IsHeader = true;
+4 -4
View File
@@ -1,3 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AmongUs.GameOptions;
using EHR.Roles.AddOns.Crewmate;
using EHR.Roles.AddOns.Impostor;
@@ -7,10 +11,6 @@ using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using static EHR.Translator;
namespace EHR.Modules;
+3 -3
View File
@@ -1,10 +1,10 @@
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes;
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes;
namespace EHR;
+3 -3
View File
@@ -1,6 +1,3 @@
using AmongUs.Data;
using HarmonyLib;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -9,6 +6,9 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using AmongUs.Data;
using HarmonyLib;
using InnerNet;
using UnityEngine;
using static EHR.Translator;
+2 -2
View File
@@ -1,5 +1,3 @@
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -9,6 +7,8 @@ using System.Reflection;
using System.Text;
using System.Text.Json;
using System.Text.RegularExpressions;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Object = Il2CppSystem.Object;
namespace EHR;
+77 -41
View File
@@ -1,3 +1,12 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using AmongUs.Data;
using AmongUs.GameOptions;
using EHR.Modules;
@@ -12,15 +21,6 @@ using HarmonyLib;
using Hazel;
using Il2CppInterop.Runtime.InteropTypes;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using UnityEngine;
using static EHR.Translator;
using Object = UnityEngine.Object;
@@ -42,9 +42,9 @@ other: ∟ ⌠ ⌡ ╬ ╨ ▓ ▒ ░ « » █ ▄ ▌▀▐│ ┤ ╡ ╢
public static class Utils
{
private static readonly DateTime timeStampStartTime = new(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public static long GetTimeStamp(DateTime? dateTime = null) => (long)((dateTime ?? DateTime.Now).ToUniversalTime() - timeStampStartTime).TotalSeconds;
public static long TimeStamp => GetTimeStamp();
private static readonly DateTime TimeStampStartTime = new(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public static long GetTimeStamp(DateTime? dateTime = null) => (long)((dateTime ?? DateTime.Now).ToUniversalTime() - TimeStampStartTime).TotalSeconds;
public static long TimeStamp => (long)(DateTime.Now.ToUniversalTime() - TimeStampStartTime).TotalSeconds;
public static void ErrorEnd(string text)
{
@@ -518,6 +518,7 @@ public static class Utils
case CustomRoles.Eclipse:
case CustomRoles.Pyromaniac:
case CustomRoles.NSerialKiller:
case CustomRoles.Bargainer:
case CustomRoles.Tiger:
case CustomRoles.SoulHunter:
case CustomRoles.Enderman:
@@ -528,6 +529,7 @@ public static class Utils
case CustomRoles.Doppelganger:
case CustomRoles.PlagueDoctor:
case CustomRoles.Postman:
case CustomRoles.SchrodingersCat:
case CustomRoles.Impartial:
case CustomRoles.Predator:
case CustomRoles.Reckless:
@@ -586,7 +588,7 @@ public static class Utils
case CustomRoles.Escort when !Options.UsePets.GetBool() || !Escort.UsePet.GetBool():
case CustomRoles.DonutDelivery when !Options.UsePets.GetBool() || !DonutDelivery.UsePet.GetBool():
case CustomRoles.Gaulois when !Options.UsePets.GetBool() || !Gaulois.UsePet.GetBool():
case CustomRoles.Analyzer when !Options.UsePets.GetBool() || !Analyzer.UsePet.GetBool():
case CustomRoles.Analyst when !Options.UsePets.GetBool() || !Analyst.UsePet.GetBool():
case CustomRoles.Witness when !Options.UsePets.GetBool() || !Options.WitnessUsePet.GetBool():
case CustomRoles.Pursuer:
case CustomRoles.Spiritcaller:
@@ -606,6 +608,7 @@ public static class Utils
if (ForRecompute)
hasTasks = false;
break;
case CustomRoles.Cherokious:
case CustomRoles.Crewpostor:
if (ForRecompute && !p.IsDead)
hasTasks = false;
@@ -703,7 +706,9 @@ public static class Utils
__instance.Is(CustomRoleTypes.Impostor) && PlayerControl.LocalPlayer.Is(CustomRoles.Crewpostor) && Options.AlliesKnowCrewpostor.GetBool() ||
__instance.Is(CustomRoleTypes.Impostor) && PlayerControl.LocalPlayer.Is(CustomRoleTypes.Impostor) && Options.ImpKnowAlliesRole.GetBool() ||
__instance.Is(CustomRoleTypes.Impostor) && PlayerControl.LocalPlayer.Is(CustomRoles.Madmate) && Options.MadmateKnowWhosImp.GetBool() ||
CustomTeamManager.AreInSameCustomTeam(__instance.PlayerId, PlayerControl.LocalPlayer.PlayerId) ||
CustomTeamManager.AreInSameCustomTeam(__instance.PlayerId, PlayerControl.LocalPlayer.PlayerId) && Options.CTAPlayersCanSeeEachOthersRoles.GetBool() ||
Bargainer.KnowRole(PlayerControl.LocalPlayer, __instance) ||
Adventurer.KnowRole(PlayerControl.LocalPlayer, __instance) ||
Totocalcio.KnowRole(PlayerControl.LocalPlayer, __instance) ||
Romantic.KnowRole(PlayerControl.LocalPlayer, __instance) ||
Lawyer.KnowRole(PlayerControl.LocalPlayer, __instance) ||
@@ -716,7 +721,6 @@ public static class Utils
PlayerControl.LocalPlayer.IsRevealedPlayer(__instance) ||
PlayerControl.LocalPlayer.Is(CustomRoles.God) ||
PlayerControl.LocalPlayer.Is(CustomRoles.GM) ||
Totocalcio.KnowRole(PlayerControl.LocalPlayer, __instance) ||
Lawyer.KnowRole(PlayerControl.LocalPlayer, __instance) ||
EvilDiviner.IsShowTargetRole(PlayerControl.LocalPlayer, __instance) ||
Executioner.KnowRole(PlayerControl.LocalPlayer, __instance) ||
@@ -805,8 +809,15 @@ public static class Utils
NonCompleteColor = Workhorse.RoleColor;
var NormalColor = taskState.IsTaskFinished ? TaskCompleteColor : NonCompleteColor;
if (Main.PlayerStates.TryGetValue(playerId, out var ps) && ps.MainRole == CustomRoles.Crewpostor)
NormalColor = Color.red;
if (Main.PlayerStates.TryGetValue(playerId, out var ps))
{
NormalColor = ps.MainRole switch
{
CustomRoles.Crewpostor => Color.red,
CustomRoles.Cherokious => GetRoleColor(CustomRoles.Cherokious),
_ => NormalColor
};
}
Color TextColor = comms ? Color.gray : NormalColor;
string Completed = comms ? "?" : $"{taskState.CompletedTasksCount}";
@@ -1587,7 +1598,7 @@ public static class Utils
public static void ApplySuffix(PlayerControl player)
{
if (!AmongUsClient.Instance.AmHost || player == null) return;
if (!(player.AmOwner || player.FriendCode.GetDevUser().HasTag())) return;
if (!player.AmOwner && !player.FriendCode.GetDevUser().HasTag() && !ChatCommands.IsPlayerModerator(player.FriendCode)) return;
string name = Main.AllPlayerNames.TryGetValue(player.PlayerId, out var n) ? n : string.Empty;
if (Main.NickName != string.Empty && player.AmOwner) name = Main.NickName;
if (name == string.Empty) return;
@@ -1620,6 +1631,7 @@ public static class Utils
if (devUser.HasTag() || isMod)
{
string tag = devUser.GetTag();
if (tag == "null") tag = string.Empty;
if (player.AmOwner || player.IsModClient())
name = tag + (isMod ? ("<size=1.4>" + GetString("ModeratorTag") + "\r\n</size>") : string.Empty) + name;
else name = tag.Replace("\r\n", " - ") + (isMod ? ("<size=1.4>" + GetString("ModeratorTag") + " - </size>") : string.Empty) + name;
@@ -1786,6 +1798,8 @@ public static class Utils
if (Options.CurrentGameMode != CustomGameMode.Standard) goto GameMode;
SelfSuffix.Append(Adventurer.GetSuffixAndHUDText(seer, isForMeeting: isForMeeting));
if (!isForMeeting)
{
if (Options.UsePets.GetBool() && Main.AbilityCD.TryGetValue(seer.PlayerId, out var time) && !seer.IsModClient())
@@ -1799,6 +1813,8 @@ public static class Utils
SelfSuffix.Append(Deathpact.GetDeathpactPlayerArrow(seer));
SelfSuffix.Append(Commander.GetSuffixText(seer, seer));
SelfSuffix.Append(AntiAdminer.GetSuffixText(seer));
SelfSuffix.Append(Roles.Impostor.Sentry.GetSuffix(seer));
SelfSuffix.Append(Bargainer.GetSuffix(seer));
switch (seer.GetCustomRole())
{
@@ -1913,7 +1929,6 @@ public static class Utils
{
case CustomGameMode.FFA:
SelfSuffix.Append(FFAManager.GetPlayerArrow(seer));
if (FFAManager.FFAChatDuringGame.GetBool()) SelfSuffix.Append(SelfSuffix.Length > 0 && FFAManager.LatestChatMessage != string.Empty ? "\n" : string.Empty).Append(FFAManager.LatestChatMessage);
break;
case CustomGameMode.SoloKombat:
SelfSuffix.Append(SoloKombatManager.GetDisplayHealth(seer));
@@ -1931,6 +1946,9 @@ public static class Utils
string SeerRealName = seer.GetRealName(isForMeeting);
if (Options.CurrentGameMode == CustomGameMode.FFA && FFAManager.FFATeamMode.GetBool())
SeerRealName = SeerRealName.ApplyNameColorData(seer, seer, isForMeeting);
if (!isForMeeting && MeetingStates.FirstMeeting && Options.ChangeNameToRoleInfo.GetBool() && Options.CurrentGameMode is not CustomGameMode.FFA and not CustomGameMode.MoveAndStop and not CustomGameMode.HotPotato)
{
var team = CustomTeamManager.GetCustomTeam(seer.PlayerId);
@@ -2028,7 +2046,7 @@ public static class Utils
seer.RpcSetNamePrivate(SelfName, true, force: NoCache);
// Run the second loop only when necessary, such as when seer is dead
if (seer.Data.IsDead || !seer.IsAlive() || NoCache || CamouflageIsForMeeting || MushroomMixup || IsActive(SystemTypes.MushroomMixupSabotage) || ForceLoop || seerList.Length == 1 || targetList.Length == 1)
if (GameStates.IsLobby || seer.Data.IsDead || !seer.IsAlive() || NoCache || CamouflageIsForMeeting || MushroomMixup || IsActive(SystemTypes.MushroomMixupSabotage) || ForceLoop || seerList.Length == 1 || targetList.Length == 1)
{
foreach (PlayerControl target in targetList)
{
@@ -2104,10 +2122,10 @@ public static class Utils
}
break;
case CustomRoles.Analyzer:
if ((Main.PlayerStates[seer.PlayerId].Role as Analyzer).CurrentTarget.ID == target.PlayerId)
case CustomRoles.Analyst:
if ((Main.PlayerStates[seer.PlayerId].Role as Analyst).CurrentTarget.ID == target.PlayerId)
{
TargetMark.Append($"<color={GetRoleColorCode(CustomRoles.Analyzer)}>○</color>");
TargetMark.Append($"<color={GetRoleColorCode(CustomRoles.Analyst)}>○</color>");
}
break;
@@ -2137,7 +2155,9 @@ public static class Utils
(target.Is(CustomRoles.Mayor) && Mayor.MayorRevealWhenDoneTasks.GetBool() && target.GetTaskState().IsTaskFinished) ||
(seer.Is(CustomRoleTypes.Crewmate) && target.Is(CustomRoles.Marshall) && target.GetTaskState().IsTaskFinished) ||
(Main.PlayerStates[target.PlayerId].deathReason == PlayerState.DeathReason.Vote && Options.SeeEjectedRolesInMeeting.GetBool()) ||
CustomTeamManager.AreInSameCustomTeam(seer.PlayerId, target.PlayerId) ||
CustomTeamManager.AreInSameCustomTeam(seer.PlayerId, target.PlayerId) && Options.CTAPlayersCanSeeEachOthersRoles.GetBool() ||
Bargainer.KnowRole(seer, target) ||
Adventurer.KnowRole(seer, target) ||
Totocalcio.KnowRole(seer, target) ||
Romantic.KnowRole(seer, target) ||
Lawyer.KnowRole(seer, target) ||
@@ -2389,6 +2409,7 @@ public static class Utils
CustomRoles.Tornado => Tornado.TornadoCooldown.GetInt(),
CustomRoles.Sentinel => Sentinel.PatrolCooldown.GetInt(),
CustomRoles.Druid => Druid.VentCooldown.GetInt(),
CustomRoles.Sentry => Roles.Impostor.Sentry.ShowInfoCooldown.GetInt(),
CustomRoles.Sniper => Options.DefaultShapeshiftCooldown.GetInt(),
CustomRoles.Assassin => Assassin.AssassinateCooldownOpt.GetInt(),
CustomRoles.Undertaker => Undertaker.UndertakerAssassinateCooldown.GetInt(),
@@ -2403,6 +2424,7 @@ public static class Utils
CustomRoles.Warlock => Warlock.IsCursed ? -1 : (int)Options.DefaultKillCooldown,
CustomRoles.Swiftclaw => Swiftclaw.DashCD.GetInt() + (includeDuration ? Swiftclaw.DashDuration.GetInt() : 0),
CustomRoles.Tiger => Tiger.EnrageCooldown.GetInt() + (includeDuration ? Tiger.EnrageDuration.GetInt() : 0),
CustomRoles.Cherokious => Cherokious.KillCooldown.GetInt(),
_ => -1,
};
if (CD == -1) return;
@@ -2412,25 +2434,30 @@ public static class Utils
public static void AfterMeetingTasks()
{
foreach (var pc in Main.AllAlivePlayerControls)
foreach (var pc in Main.AllPlayerControls)
{
pc.AddKillTimerToDict();
if (pc.Is(CustomRoles.Truant))
if (pc.IsAlive())
{
float beforeSpeed = Main.AllPlayerSpeed[pc.PlayerId];
Main.AllPlayerSpeed[pc.PlayerId] = Main.MinSpeed;
pc.MarkDirtySettings();
_ = new LateTask(() =>
{
Main.AllPlayerSpeed[pc.PlayerId] = beforeSpeed;
pc.MarkDirtySettings();
}, Options.TruantWaitingTime.GetFloat(), $"Truant Waiting: {pc.GetNameWithRole()}");
pc.AddKillTimerToDict();
if (pc.Is(CustomRoles.Truant))
{
float beforeSpeed = Main.AllPlayerSpeed[pc.PlayerId];
Main.AllPlayerSpeed[pc.PlayerId] = Main.MinSpeed;
pc.MarkDirtySettings();
_ = new LateTask(() =>
{
Main.AllPlayerSpeed[pc.PlayerId] = beforeSpeed;
pc.MarkDirtySettings();
}, Options.TruantWaitingTime.GetFloat(), $"Truant Waiting: {pc.GetNameWithRole()}");
}
if (Options.UsePets.GetBool()) pc.AddAbilityCD(includeDuration: false);
Main.PlayerStates[pc.PlayerId].Role.AfterMeetingTasks();
}
if (Options.UsePets.GetBool()) pc.AddAbilityCD(includeDuration: false);
Main.PlayerStates[pc.PlayerId].Role.AfterMeetingTasks();
if (pc.Is(CustomRoles.Specter) || pc.Is(CustomRoles.Haunter)) pc.RpcResetAbilityCooldown();
}
CopyCat.ResetRole();
@@ -2555,6 +2582,8 @@ public static class Utils
Tracefinder.OnPlayerDead(target);
Vulture.OnPlayerDead(target);
Tracker.OnPlayerDeath(target);
Adventurer.OnAnyoneDead(target);
Roles.Impostor.Sentry.OnAnyoneMurder(target);
FixedUpdatePatch.LoversSuicide(target.PlayerId, onMeeting);
}
@@ -2682,8 +2711,15 @@ public static class Utils
NonCompleteColor = Workhorse.RoleColor;
var NormalColor = taskState.IsTaskFinished ? TaskCompleteColor : NonCompleteColor;
if (Main.PlayerStates.TryGetValue(id, out var ps) && ps.MainRole == CustomRoles.Crewpostor)
NormalColor = Color.red;
if (Main.PlayerStates.TryGetValue(id, out var ps))
{
NormalColor = ps.MainRole switch
{
CustomRoles.Crewpostor => Color.red,
CustomRoles.Cherokious => GetRoleColor(CustomRoles.Cherokious),
_ => NormalColor
};
}
Color TextColor = NormalColor;
string Completed = $"{taskState.CompletedTasksCount}";
+2 -2
View File
@@ -1,6 +1,6 @@
using HarmonyLib;
using System;
using System;
using System.Collections.Generic;
using HarmonyLib;
using UnityEngine;
namespace EHR;
+1 -1
View File
@@ -1,5 +1,5 @@
using HarmonyLib;
using System.Collections.Generic;
using HarmonyLib;
namespace EHR;
+4 -4
View File
@@ -1,11 +1,11 @@
using AmongUs.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using AmongUs.Data;
using AmongUs.Data.Player;
using Assets.InnerNet;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using System;
using System.Collections.Generic;
using System.Linq;
namespace EHR;
+11 -12
View File
@@ -1,15 +1,15 @@
using Assets.CoreScripts;
using EHR.Modules;
using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using HarmonyLib;
using Hazel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Assets.CoreScripts;
using EHR.Modules;
using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using HarmonyLib;
using Hazel;
using UnityEngine;
using static EHR.Translator;
@@ -297,7 +297,7 @@ internal class ChatCommands
case "ban":
if (GetRoleByName(args[2], out CustomRoles mainRole) && GetRoleByName(args[3], out CustomRoles addOn))
{
if (mainRole.IsAdditionRole() || !addOn.IsAdditionRole()) break;
if (mainRole.IsAdditionRole() || !addOn.IsAdditionRole() || addOn == CustomRoles.Lovers) break;
if (args[1] == "add") Main.AlwaysSpawnTogetherCombos[mainRole] = addOn;
else Main.NeverSpawnTogetherCombos[mainRole] = addOn;
Utils.SendMessage(string.Format(args[1] == "add" ? GetString("ComboAdd") : GetString("ComboBan"), GetString(mainRole.ToString()), GetString(addOn.ToString())), localPlayerId);
@@ -353,7 +353,7 @@ internal class ChatCommands
settings.Append("</size>");
var txt = sb.ToString();
_ = sb.Clear().Append(txt.RemoveHtmlTags());
if (role.PetActivatedAbility()) sb.Append("<size=50%>" + GetString("SupportsPetMessage").RemoveHtmlTags() + "</size>");
if (role.PetActivatedAbility() && sb.Length < 1000) sb.Append("<size=50%>" + GetString("SupportsPetMessage").RemoveHtmlTags() + "</size>");
sb.Append("<size=70%>");
foreach (CustomRoles subRole in Main.PlayerStates[localPlayerId].SubRoles.ToArray())
{
@@ -939,7 +939,7 @@ internal class ChatCommands
_ = sb.Clear().Append(txt);
}
if (rl.PetActivatedAbility()) sb.Append($"<size=50%>{GetString("SupportsPetMessage")}</size>");
if (rl.PetActivatedAbility() && sb.Length < 1000) sb.Append($"<size=50%>{GetString("SupportsPetMessage")}</size>");
Utils.SendMessage(text: "\n", sendTo: playerId, title: settings.ToString());
Utils.SendMessage(text: sb.ToString(), sendTo: playerId, title: title);
return;
@@ -968,8 +968,7 @@ internal class ChatCommands
if (GuessManager.GuesserMsg(player, text))
{
if (GuessManager.GuesserMsg(player, text) ||
Judge.TrialMsg(player, text) ||
if (Judge.TrialMsg(player, text) ||
NiceSwapper.SwapMsg(player, text) ||
ParityCop.ParityCheckMsg(player, text) ||
Councillor.MurderMsg(player, text))
@@ -1045,7 +1044,7 @@ internal class ChatCommands
settings.Append("</size>");
var txt = sb.ToString();
_ = sb.Clear().Append(txt.RemoveHtmlTags());
if (role.PetActivatedAbility()) sb.Append("<size=50%>" + GetString("SupportsPetMessage").RemoveHtmlTags() + "</size>");
if (role.PetActivatedAbility() && sb.Length < 1000) sb.Append("<size=50%>" + GetString("SupportsPetMessage").RemoveHtmlTags() + "</size>");
sb.Append("<size=70%>");
foreach (CustomRoles subRole in Main.PlayerStates[player.PlayerId].SubRoles.ToArray())
{
+3 -3
View File
@@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using AmongUs.Data;
using EHR.Roles.Impostor;
using HarmonyLib;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace EHR;
+31 -10
View File
@@ -1,3 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using AmongUs.GameOptions;
using BepInEx.Unity.IL2CPP.Utils.Collections;
using EHR.Modules;
@@ -7,9 +10,6 @@ using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using InnerNet;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using static EHR.CustomWinnerHolder;
using static EHR.Translator;
@@ -183,6 +183,10 @@ class GameEndChecker
WinnerIds.Add(pc.PlayerId);
AdditionalWinnerTeams.Add(AdditionalWinners.SoulHunter);
break;
case CustomRoles.SchrodingersCat when SchrodingersCat.WinsWithCrewIfNotAttacked.GetBool():
WinnerIds.Add(pc.PlayerId);
AdditionalWinnerTeams.Add(AdditionalWinners.SchrodingersCat);
break;
}
}
@@ -218,7 +222,7 @@ class GameEndChecker
.Do(p => WinnerIds.Add(p.PlayerId));
}
if (WinnerTeam != CustomWinner.CustomTeam)
if (WinnerTeam != CustomWinner.CustomTeam && !Options.CTAPlayersCanWinWithOriginalTeam.GetBool())
{
WinnerIds.RemoveWhere(x => CustomTeamManager.GetCustomTeam(x) != null);
}
@@ -282,7 +286,7 @@ class GameEndChecker
continue;
}
bool canWin = WinnerIds.Contains(pc.PlayerId) || WinnerRoles.Contains(pc.GetCustomRole());
bool canWin = WinnerIds.Contains(pc.PlayerId) || WinnerRoles.Contains(pc.GetCustomRole()) || (winner == CustomWinner.Bloodlust && pc.Is(CustomRoles.Bloodlust));
bool isCrewmateWin = reason.Equals(GameOverReason.HumansByVote) || reason.Equals(GameOverReason.HumansByTask);
SetGhostRole(ToGhostImpostor: canWin ^ isCrewmateWin); // XOR
@@ -515,21 +519,38 @@ class GameEndChecker
Logger.Warn($"Winner: {winner.GetRealName().RemoveHtmlTags()}", "FFA");
WinnerIds =
[
winnerId
];
WinnerIds = [winnerId];
Main.DoBlockNameChange = true;
return true;
}
if (FFAManager.FFATeamMode.GetBool())
{
var teams = FFAManager.PlayerTeams.GroupBy(x => x.Value, x => x.Key).Select(x => x.Where(p =>
{
var pc = GetPlayerById(p);
return pc != null && !pc.Data.Disconnected;
}).ToHashSet()).Where(x => x.Count > 0);
foreach (var team in teams)
{
if (Main.AllAlivePlayerControls.All(x => team.Contains(x.PlayerId)))
{
WinnerIds = team;
Main.DoBlockNameChange = true;
return true;
}
}
}
switch (Main.AllAlivePlayerControls.Length)
{
case 1:
{
var winner = Main.AllAlivePlayerControls.First();
var winner = Main.AllAlivePlayerControls[0];
Logger.Info($"Winner: {winner.GetRealName().RemoveHtmlTags()}", "FFA");
+3 -3
View File
@@ -1,10 +1,10 @@
using EHR.Modules;
using HarmonyLib;
using Rewired;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EHR.Modules;
using HarmonyLib;
using Rewired;
using UnityEngine;
using static EHR.Translator;
+2 -2
View File
@@ -1,8 +1,8 @@
using EHR.Modules;
using HarmonyLib;
using System;
using System.Linq;
using System.Text;
using EHR.Modules;
using HarmonyLib;
using TMPro;
using UnityEngine;
using static EHR.Translator;
+1 -1
View File
@@ -1,7 +1,7 @@
using System;
using AmongUs.Data;
using Discord;
using HarmonyLib;
using System;
namespace EHR.Patches
{
+1 -1
View File
@@ -1,3 +1,4 @@
using System.Linq;
using AmongUs.Data;
using AmongUs.GameOptions;
using EHR.Roles.AddOns.Crewmate;
@@ -6,7 +7,6 @@ using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using HarmonyLib;
using System.Linq;
namespace EHR.Patches;
+2 -2
View File
@@ -1,9 +1,9 @@
using System;
using System.Linq;
using AmongUs.GameOptions;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem.Collections.Generic;
using System;
using System.Linq;
using TMPro;
using UnityEngine;
using static EHR.Translator;
+3 -3
View File
@@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using AmongUs.Data;
using AmongUs.GameOptions;
using EHR.Roles.Neutral;
using HarmonyLib;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using static EHR.Translator;
+8 -8
View File
@@ -1,3 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EHR.Modules;
using EHR.Roles.AddOns.Common;
using EHR.Roles.Crewmate;
@@ -5,9 +8,6 @@ using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using HarmonyLib;
using Il2CppSystem.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using static EHR.Translator;
@@ -31,7 +31,7 @@ class HudManagerPatch
private static TextMeshPro OverriddenRolesText;
private static long LastNullError = 0;
private static long LastNullError;
//public static GameObject TempLowerInfoText;
public static void Postfix(HudManager __instance)
@@ -203,7 +203,7 @@ class HudManagerPatch
case CustomRoles.Pelican:
__instance.KillButton?.OverrideText(GetString("PelicanButtonText"));
break;
case CustomRoles.Analyzer:
case CustomRoles.Analyst:
usedButton?.OverrideText(GetString("AnalyzerKillButtonText"));
break;
case CustomRoles.Pursuer:
@@ -377,6 +377,7 @@ class HudManagerPatch
CustomRoles.Swooper or CustomRoles.Wraith or CustomRoles.Chameleon => Swooper.GetHudText(player),
CustomRoles.HeadHunter => HeadHunter.GetHudText(player),
CustomRoles.Alchemist => Alchemist.GetHudText(player),
CustomRoles.Adventurer => Adventurer.GetSuffixAndHUDText(player, hud: true),
CustomRoles.Werewolf => Werewolf.GetHudText(player),
CustomRoles.Glitch => Glitch.GetHudText(player),
CustomRoles.NiceHacker => NiceHacker.GetHudText(player),
@@ -385,6 +386,7 @@ class HudManagerPatch
CustomRoles.WeaponMaster => WeaponMaster.GetHudAndProgressText(player.PlayerId),
CustomRoles.Postman => Postman.GetHudText(player),
CustomRoles.SoulHunter => SoulHunter.HUDText(player.PlayerId),
CustomRoles.Bargainer => Bargainer.GetSuffix(player),
CustomRoles.Chronomancer => Chronomancer.GetHudText(player.PlayerId),
CustomRoles.Mafioso => Mafioso.GetHUDText(player),
CustomRoles.Druid => Druid.GetHUDText(player),
@@ -568,8 +570,6 @@ class SetHudActivePatch
case CustomRoles.SwordsMan:
case CustomRoles.Deputy:
case CustomRoles.Monarch:
//case CustomRoles.NWitch:
//case CustomRoles.Reverie:
case CustomRoles.Pelican:
case CustomRoles.FFF:
case CustomRoles.Medic:
@@ -773,7 +773,7 @@ class TaskPanelBehaviourPatch
List<(int, byte)> list3 = [];
foreach (var id in Main.PlayerStates.Keys) list3.Add((MoveAndStopManager.GetRankOfScore(id), id));
list3.Sort();
list3 = [.. list3.OrderBy(x => Utils.GetPlayerById(x.Item2).IsAlive())];
list3 = [.. list3.OrderBy(x => !Utils.GetPlayerById(x.Item2).IsAlive())];
foreach (var id in list3.Where(x => SummaryText3.ContainsKey(x.Item2)).ToArray())
{
bool alive = Utils.GetPlayerById(id.Item2).IsAlive();
+1 -1
View File
@@ -238,7 +238,7 @@ public static class HudSpritePatch
else
newPetButton = CustomButton.Get("Mine");
break;
case CustomRoles.Analyzer:
case CustomRoles.Analyst:
case CustomRoles.Witness:
newKillButton = CustomButton.Get("Examine");
break;
+26 -4
View File
@@ -1,11 +1,11 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using AmongUs.GameOptions;
using EHR.Modules;
using EHR.Roles.Neutral;
using HarmonyLib;
using Il2CppSystem.Collections.Generic;
using System;
using System.Linq;
using System.Threading.Tasks;
using UnityEngine;
using static EHR.Translator;
@@ -182,6 +182,7 @@ class BeginCrewmatePatch
var team = CustomTeamManager.GetCustomTeam(PlayerControl.LocalPlayer.PlayerId);
if (team != null)
{
teamToDisplay = new();
foreach (var pc in Main.AllPlayerControls)
{
if (CustomTeamManager.AreInSameCustomTeam(pc.PlayerId, PlayerControl.LocalPlayer.PlayerId))
@@ -192,6 +193,18 @@ class BeginCrewmatePatch
}
}
if (Options.CurrentGameMode == CustomGameMode.FFA && FFAManager.FFATeamMode.GetBool() && FFAManager.PlayerTeams.TryGetValue(PlayerControl.LocalPlayer.PlayerId, out var ffaTeam))
{
teamToDisplay = new();
foreach (var pc in Main.AllPlayerControls)
{
if (FFAManager.PlayerTeams.TryGetValue(pc.PlayerId, out var team) && team == ffaTeam)
{
teamToDisplay.Add(pc);
}
}
}
return true;
}
@@ -441,33 +454,42 @@ class BeginCrewmatePatch
break;
}
case CustomGameMode.FFA:
{
__instance.TeamTitle.text = GetString("Killer");
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(0, 255, 255, byte.MaxValue);
var color = FFAManager.PlayerTeams.TryGetValue(PlayerControl.LocalPlayer.PlayerId, out var team) && ColorUtility.TryParseHtmlString(FFAManager.TeamColors[team], out var teamColor) ? teamColor : new(0, 255, 255, byte.MaxValue);
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = color;
PlayerControl.LocalPlayer.Data.Role.IntroSound = GetIntroSound(RoleTypes.Shapeshifter);
__instance.ImpostorText.gameObject.SetActive(true);
__instance.ImpostorText.text = GetString("KillerInfo");
break;
}
case CustomGameMode.MoveAndStop:
{
__instance.TeamTitle.text = GetString("MoveAndStop");
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(0, 255, 160, byte.MaxValue);
PlayerControl.LocalPlayer.Data.Role.IntroSound = GetIntroSound(RoleTypes.Shapeshifter);
__instance.ImpostorText.gameObject.SetActive(true);
__instance.ImpostorText.text = GetString("TaskerInfo");
break;
}
case CustomGameMode.HotPotato:
{
__instance.TeamTitle.text = GetString("HotPotato");
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(232, 205, 70, byte.MaxValue);
PlayerControl.LocalPlayer.Data.Role.IntroSound = GetIntroSound(RoleTypes.Shapeshifter);
__instance.ImpostorText.gameObject.SetActive(true);
__instance.ImpostorText.text = GetString("PotatoInfo");
break;
}
case CustomGameMode.HideAndSeek:
{
__instance.TeamTitle.text = GetString("HideAndSeek");
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(52, 94, 235, byte.MaxValue);
PlayerControl.LocalPlayer.Data.Role.IntroSound = GetIntroSound(RoleTypes.Impostor);
__instance.ImpostorText.gameObject.SetActive(true);
__instance.ImpostorText.text = GetString("SubText.HideAndSeek");
break;
}
}
if (Input.GetKey(KeyCode.RightShift))
+1 -1
View File
@@ -1,5 +1,5 @@
using HarmonyLib;
using System.Text.RegularExpressions;
using HarmonyLib;
using UnityEngine;
namespace EHR;
+2 -2
View File
@@ -1,6 +1,6 @@
using HarmonyLib;
using System.Collections.Generic;
using HarmonyLib;
using Hazel;
using System.Collections.Generic;
using UnityEngine;
namespace EHR;
+3 -3
View File
@@ -1,7 +1,7 @@
using HarmonyLib;
using InnerNet;
using System;
using System;
using System.Collections.Generic;
using HarmonyLib;
using InnerNet;
using UnityEngine;
namespace EHR;
+2 -2
View File
@@ -1,6 +1,6 @@
using BepInEx.Unity.IL2CPP.Utils;
using System.Collections;
using BepInEx.Unity.IL2CPP.Utils;
using HarmonyLib;
using System.Collections;
using TMPro;
using UnityEngine;
using static EHR.Translator;
+2 -2
View File
@@ -1,5 +1,5 @@
using HarmonyLib;
using System;
using HarmonyLib;
using TMPro;
using UnityEngine;
using static EHR.Translator;
@@ -102,7 +102,7 @@ public class MainMenuManagerPatch
{
freeplayButton.GetComponent<PassiveButton>().OnClick = new();
freeplayButton.GetComponent<PassiveButton>().OnClick.AddListener((Action)(() => Application.OpenURL("https://tohe.cc")));
__instance.StartCoroutine(Effects.Lerp(0.01f, new Action<float>((p) => freeplayButton.transform.GetChild(0).GetComponent<TMP_Text>().SetText(GetString("Website")))));
__instance.StartCoroutine(Effects.Lerp(0.01f, new Action<float>(p => freeplayButton.transform.GetChild(0).GetComponent<TMP_Text>().SetText(GetString("Website")))));
}
#endif
+34 -15
View File
@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EHR.Modules;
using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using static EHR.Translator;
using Object = UnityEngine.Object;
@@ -121,7 +121,7 @@ class CheckForEndVotingPatch
}
}
if (__instance.playerStates.TakeWhile(_ => !shouldSkip).Any(ps => !(Main.PlayerStates[ps.TargetPlayerId].IsDead || ps.DidVote)))
if (!shouldSkip && !__instance.playerStates.All(ps => Main.PlayerStates[ps.TargetPlayerId].IsDead || ps.DidVote || Utils.GetPlayerById(ps.TargetPlayerId).Data.Disconnected))
{
return false;
}
@@ -132,7 +132,7 @@ class CheckForEndVotingPatch
foreach (var ps in __instance.playerStates)
{
if (ps == null) continue;
voteLog.Info($"{ps.TargetPlayerId,-2}{$"({Utils.GetVoteName(ps.TargetPlayerId)})".PadRightV2(40)}:{ps.VotedFor,-3}{$"({Utils.GetVoteName(ps.VotedFor)})"}");
voteLog.Info($"{ps.TargetPlayerId,-2}{$"({Utils.GetVoteName(ps.TargetPlayerId)})".PadRightV2(40)}:{ps.VotedFor,-3}({Utils.GetVoteName(ps.VotedFor)})");
var voter = Utils.GetPlayerById(ps.TargetPlayerId);
if (voter == null || voter.Data == null || voter.Data.Disconnected) continue;
if (Options.VoteMode.GetBool())
@@ -195,9 +195,6 @@ class CheckForEndVotingPatch
VotedForId = ps.VotedFor
});
Blackmailer.OnCheckForEndVoting();
NiceSwapper.OnCheckForEndVoting();
if (CheckRole(ps.TargetPlayerId, CustomRoles.Mayor) && !Mayor.MayorHideVote.GetBool()) //Mayorの投票数
{
for (var i2 = 0; i2 < Mayor.MayorAdditionalVote.GetFloat(); i2++)
@@ -221,8 +218,20 @@ class CheckForEndVotingPatch
});
}
}
if (Main.PlayerStates[ps.TargetPlayerId].Role is Adventurer { IsEnable: true } av && av.ActiveWeapons.Contains(Adventurer.Weapon.Proxy))
{
statesList.Add(new()
{
VoterId = ps.TargetPlayerId,
VotedForId = ps.VotedFor
});
}
}
Blackmailer.OnCheckForEndVoting();
NiceSwapper.OnCheckForEndVoting();
states = [.. statesList];
var VotingData = __instance.CustomCalculateVotes();
@@ -308,13 +317,13 @@ class CheckForEndVotingPatch
exiledPlayer?.Object.SetRealKiller(null);
//RPC
// RPC
if (AntiBlackout.OverrideExiledPlayer)
{
__instance.RpcVotingComplete(states.ToArray(), null, true);
ExileControllerWrapUpPatch.AntiBlackout_LastExiled = exiledPlayer;
}
else __instance.RpcVotingComplete(states.ToArray(), exiledPlayer, tie); //通常処理
else __instance.RpcVotingComplete(states.ToArray(), exiledPlayer, tie);
CheckForDeathOnExile(PlayerState.DeathReason.Vote, exileId);
@@ -387,7 +396,10 @@ class CheckForEndVotingPatch
if (Options.ShowTeamNextToRoleNameOnEject.GetBool())
{
name += " (";
if (player.GetCustomRole().IsImpostor() || player.Is(CustomRoles.Madmate))
var team = CustomTeamManager.GetCustomTeam(player.PlayerId);
if (team != null)
name += Utils.ColorString(team.RoleRevealScreenBackgroundColor == "*" || !ColorUtility.TryParseHtmlString(team.RoleRevealScreenBackgroundColor, out var color) ? Color.yellow : color, team.RoleRevealScreenTitle == "*" ? team.TeamName : team.RoleRevealScreenTitle);
else if (player.GetCustomRole().IsImpostor() || player.Is(CustomRoles.Madmate))
name += Utils.ColorString(new(255, 25, 25, byte.MaxValue), GetString("TeamImpostor"));
else if (player.GetCustomRole().IsNeutral() || player.Is(CustomRoles.Charmed))
name += Utils.ColorString(new(255, 171, 27, byte.MaxValue), GetString("TeamNeutral"));
@@ -584,6 +596,11 @@ static class ExtendedMeetingHud
) VoteNum += VoteNum;
}
if (Main.PlayerStates[ps.TargetPlayerId].Role is Adventurer { IsEnable: true } av && av.ActiveWeapons.Contains(Adventurer.Weapon.Proxy))
{
VoteNum++;
}
if (CheckForEndVotingPatch.CheckRole(ps.TargetPlayerId, CustomRoles.TicketsStealer))
{
var ps1 = ps;
@@ -654,7 +671,7 @@ class MeetingHudStartPatch
AddMsg(string.Format(GetString("WorkaholicAdviceAlive"), string.Join(separator, workaholicAliveList)), 255, Utils.ColorString(Utils.GetRoleColor(CustomRoles.Workaholic), GetString("WorkaholicAliveTitle")));
}
//Bait Notify
// Bait Notify
if (MeetingStates.FirstMeeting && CustomRoles.Bait.RoleExist() && Options.BaitNotification.GetBool())
{
foreach (var pc in Main.AllAlivePlayerControls.Where(x => x.Is(CustomRoles.Bait)).ToArray())
@@ -779,7 +796,9 @@ class MeetingHudStartPatch
(pc.Is(CustomRoles.Mayor) && Mayor.MayorRevealWhenDoneTasks.GetBool() && pc.GetTaskState().IsTaskFinished) ||
(pc.Is(CustomRoles.Marshall) && PlayerControl.LocalPlayer.Is(CustomRoleTypes.Crewmate) && pc.GetTaskState().IsTaskFinished) ||
(Main.PlayerStates[pc.PlayerId].deathReason == PlayerState.DeathReason.Vote && Options.SeeEjectedRolesInMeeting.GetBool()) ||
CustomTeamManager.AreInSameCustomTeam(pc.PlayerId, PlayerControl.LocalPlayer.PlayerId) ||
CustomTeamManager.AreInSameCustomTeam(pc.PlayerId, PlayerControl.LocalPlayer.PlayerId) && Options.CTAPlayersCanSeeEachOthersRoles.GetBool() ||
Bargainer.KnowRole(PlayerControl.LocalPlayer, pc) ||
Adventurer.KnowRole(PlayerControl.LocalPlayer, pc) ||
Totocalcio.KnowRole(PlayerControl.LocalPlayer, pc) ||
Romantic.KnowRole(PlayerControl.LocalPlayer, pc) ||
EvilDiviner.IsShowTargetRole(PlayerControl.LocalPlayer, pc) ||
@@ -834,7 +853,7 @@ class MeetingHudStartPatch
if (AmongUsClient.Instance.AmHost)
{
_ = _ = new LateTask(() =>
_ = new LateTask(() =>
{
foreach (PlayerControl pc in Main.AllPlayerControls)
{
+5 -5
View File
@@ -1,11 +1,11 @@
using EHR.Modules;
using EHR.Roles.Crewmate;
using EHR.Roles.Neutral;
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EHR.Modules;
using EHR.Roles.Crewmate;
using EHR.Roles.Neutral;
using HarmonyLib;
using TMPro;
using UnityEngine;
using static EHR.Translator;
@@ -231,7 +231,7 @@ class SetEverythingUpPatch
{
var winnerId = CustomWinnerHolder.WinnerIds.FirstOrDefault();
__instance.BackgroundBar.material.color = new Color32(0, 255, 255, 255);
WinnerText.text = Main.AllPlayerNames[winnerId] + " wins!";
WinnerText.text = FFAManager.FFATeamMode.GetBool() ? string.Empty : Main.AllPlayerNames[winnerId] + " wins!";
WinnerText.color = Main.PlayerColors[winnerId];
goto EndOfText;
}
+1 -1
View File
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using AmongUs.GameOptions;
using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using HarmonyLib;
using System.Collections.Generic;
namespace EHR.Patches;
+83 -56
View File
@@ -1,3 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AmongUs.GameOptions;
using EHR.Modules;
using EHR.Patches;
@@ -11,11 +16,6 @@ using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using InnerNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TMPro;
using UnityEngine;
using static EHR.Translator;
@@ -130,7 +130,7 @@ class CheckMurderPatch
{
if (!AmongUsClient.Instance.AmHost) return false;
var killer = __instance; // alternative variable
var killer = __instance;
Logger.Info($"{killer.GetNameWithRole().RemoveHtmlTags()} => {target.GetNameWithRole().RemoveHtmlTags()}", "CheckMurder");
@@ -185,21 +185,16 @@ class CheckMurderPatch
{
if (!Main.KilledDiseased.TryAdd(killer.PlayerId, 1))
{
// Key already exists, update the value
Main.KilledDiseased[killer.PlayerId] += 1;
}
// Key doesn't exist, add the key-value pair
}
if (target.Is(CustomRoles.Antidote))
{
if (!Main.KilledAntidote.TryAdd(killer.PlayerId, 1))
{
// Key already exists, update the value
Main.KilledAntidote[killer.PlayerId] += 1; // Main.AllPlayerKillCooldown.TryGetValue(killer.PlayerId, out float kcd) ? (kcd - Options.AntidoteCDOpt.GetFloat() > 0 ? kcd - Options.AntidoteCDOpt.GetFloat() : 0f) : 0f;
Main.KilledAntidote[killer.PlayerId] += 1;
}
// Key doesn't exist, add the key-value pair
// Main.AllPlayerKillCooldown.TryGetValue(killer.PlayerId, out float kcd) ? (kcd - Options.AntidoteCDOpt.GetFloat() > 0 ? kcd - Options.AntidoteCDOpt.GetFloat() : 0f) : 0f);
}
killer.ResetKillCooldown();
@@ -217,7 +212,7 @@ class CheckMurderPatch
return false;
case CustomGameMode.FFA:
FFAManager.OnPlayerAttack(killer, target);
return true;
return false;
case CustomGameMode.MoveAndStop:
case CustomGameMode.HotPotato:
return false;
@@ -330,6 +325,8 @@ class CheckMurderPatch
if (Penguin.IsVictim(killer)) return false;
if (!Adventurer.OnAnyoneCheckMurder(target)) return false;
if (killer.Is(CustomRoles.Refugee) && target.Is(CustomRoleTypes.Impostor)) return false;
if (SoulHunter.IsSoulHunterTarget(killer.PlayerId) && target.Is(CustomRoles.SoulHunter))
@@ -504,11 +501,11 @@ class MurderPlayerPatch
if (Main.PlayerStates[target.PlayerId].deathReason == PlayerState.DeathReason.etc)
{
//If the cause of death is not specified, it is determined as a normal kill.
// If the cause of death is not specified, it is determined as a normal kill.
Main.PlayerStates[target.PlayerId].deathReason = PlayerState.DeathReason.Kill;
}
//Let’s see if Youtuber was stabbed first
// Let’s see if Youtuber was stabbed first
if (Main.FirstDied == byte.MaxValue && target.Is(CustomRoles.Youtuber))
{
CustomSoundsManager.RPCPlayCustomSoundAll("Congrats");
@@ -516,7 +513,7 @@ class MurderPlayerPatch
CustomWinnerHolder.WinnerIds.Add(target.PlayerId);
}
//Record the first blow
// Record the first blow
if (Main.FirstDied == byte.MaxValue)
Main.FirstDied = target.PlayerId;
@@ -528,9 +525,6 @@ class MurderPlayerPatch
if (target.Is(CustomRoles.Stained))
Stained.OnDeath(target, killer);
//if ((Romantic.BetPlayer.TryGetValue(target.PlayerId, out var RomanticPartner) && target.PlayerId == RomanticPartner) && target.PlayerId != killer.PlayerId)
// VengefulRomantic.PartnerKiller.Add(killer.PlayerId, 1);
Witness.AllKillers.Remove(killer.PlayerId);
Witness.AllKillers.Add(killer.PlayerId, TimeStamp);
@@ -648,19 +642,25 @@ class CmdCheckShapeshiftPatch
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.Shapeshift))]
class ShapeshiftPatch
{
private static readonly List<byte> IgnoreSS = [];
public static bool ProcessShapeshift(PlayerControl shapeshifter, PlayerControl target)
{
if (!Main.ProcessShapeshifts) return true;
Logger.Info($"{shapeshifter?.GetNameWithRole()} => {target?.GetNameWithRole()}", "Shapeshift");
if (shapeshifter == null || target == null) return true;
if (IgnoreSS.Contains(shapeshifter.PlayerId))
{
IgnoreSS.Remove(shapeshifter.PlayerId);
return true;
}
Logger.Info($"{shapeshifter.GetNameWithRole()} => {target.GetNameWithRole()}", "Shapeshift");
var shapeshifting = shapeshifter.PlayerId != target.PlayerId;
if (Main.CheckShapeshift.TryGetValue(shapeshifter.PlayerId, out var last) && last == shapeshifting)
{
// Dunno how you would get here but ok
// Don't know how you would get here but ok
return true;
}
@@ -683,8 +683,21 @@ class ShapeshiftPatch
isSSneeded = false;
}
bool forceCancel = shapeshifter.GetCustomRole().ForceCancelShapeshift();
if (shapeshifter.Is(CustomRoles.Camouflager) && !shapeshifting) Camouflager.Reset();
if (Changeling.ChangedRole.TryGetValue(shapeshifter.PlayerId, out var changed) && changed && shapeshifter.GetRoleTypes() != RoleTypes.Shapeshifter) isSSneeded = false;
if (Changeling.ChangedRole.TryGetValue(shapeshifter.PlayerId, out var changed) && changed && shapeshifter.GetRoleTypes() != RoleTypes.Shapeshifter)
{
forceCancel = true;
isSSneeded = false;
}
bool shouldCancel = Options.DisableShapeshiftAnimations.GetBool();
bool shouldAlwaysCancel = shouldCancel && Options.DisableAllShapeshiftAnimations.GetBool();
bool doSSwithoutAnim = isSSneeded && shouldAlwaysCancel;
isSSneeded &= !shouldAlwaysCancel;
forceCancel |= shouldAlwaysCancel;
// Forced rewriting in case the name cannot be corrected due to the timing of canceling the transformation being off.
if (!shapeshifting && !shapeshifter.Is(CustomRoles.Glitch) && isSSneeded)
@@ -704,7 +717,13 @@ class ShapeshiftPatch
NotifyRoles(SpecifySeer: shapeshifter, SpecifyTarget: shapeshifter);
}
return isSSneeded || !Options.DisableShapeshiftAnimations.GetBool() || !shapeshifting;
if (doSSwithoutAnim)
{
shapeshifter.RpcShapeshift(target, false);
IgnoreSS.Add(shapeshifter.PlayerId);
}
return isSSneeded || (!shouldCancel && !forceCancel) || (!shapeshifting && !shouldAlwaysCancel);
}
// Tasks that should run when someone performs a shapeshift (with the egg animation) should be here.
@@ -720,10 +739,29 @@ class ShapeshiftPatch
{
pc.Notify(shapeshifting ? GetString("ShiftguardNotifySS") : "ShiftguardNotifyUnshift");
}
switch (Main.PlayerStates[pc.PlayerId].Role)
{
case Adventurer av:
Adventurer.OnAnyoneShapeshiftLoop(av, __instance);
break;
case Roles.Impostor.Sentry st:
st.OnAnyoneShapeshiftLoop(__instance, target);
break;
}
}
}
}
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.RpcShapeshift))]
class RpcShapeshiftPatch
{
public static void Postfix(PlayerControl __instance, [HarmonyArgument(0)] PlayerControl target)
{
Main.CheckShapeshift[__instance.PlayerId] = __instance.PlayerId != target.PlayerId;
}
}
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.ReportDeadBody))]
class ReportDeadBodyPatch
{
@@ -1261,6 +1299,8 @@ class FixedUpdatePatch
var seer = PlayerControl.LocalPlayer;
var target = __instance;
bool self = seer.PlayerId == target.PlayerId;
Mark.Clear();
Suffix.Clear();
@@ -1320,8 +1360,6 @@ class FixedUpdatePatch
break;
}
bool self = seer.PlayerId == target.PlayerId;
switch (seer.GetCustomRole())
{
case CustomRoles.Lookout:
@@ -1370,10 +1408,10 @@ class FixedUpdatePatch
}
break;
case CustomRoles.Analyzer:
if ((Main.PlayerStates[seer.PlayerId].Role as Analyzer).CurrentTarget.ID == target.PlayerId)
case CustomRoles.Analyst:
if ((Main.PlayerStates[seer.PlayerId].Role as Analyst).CurrentTarget.ID == target.PlayerId)
{
Mark.Append($"<color={GetRoleColorCode(CustomRoles.Analyzer)}>○</color>");
Mark.Append($"<color={GetRoleColorCode(CustomRoles.Analyst)}>○</color>");
}
break;
@@ -1486,9 +1524,12 @@ class FixedUpdatePatch
Suffix.Append(Deathpact.GetDeathpactPlayerArrow(seer, target));
Suffix.Append(Deathpact.GetDeathpactMark(seer, target));
if (self) Suffix.Append(AntiAdminer.GetSuffixText(seer));
if (seer.Is(CustomRoles.Asthmatic) && self) Suffix.Append(Asthmatic.GetSuffixText(seer.PlayerId));
if (self)
{
Suffix.Append(AntiAdminer.GetSuffixText(seer));
Suffix.Append(Roles.Impostor.Sentry.GetSuffix(seer));
if (seer.Is(CustomRoles.Asthmatic)) Suffix.Append(Asthmatic.GetSuffixText(seer.PlayerId));
}
if (target.Is(CustomRoles.Librarian)) Suffix.Append(Librarian.GetNameTextForSuffix(target.PlayerId));
@@ -1498,7 +1539,6 @@ class FixedUpdatePatch
{
case CustomGameMode.FFA:
Suffix.Append(FFAManager.GetPlayerArrow(seer, target));
if (self && FFAManager.FFAChatDuringGame.GetBool()) Suffix.Append((Suffix.Length > 0 && FFAManager.LatestChatMessage != string.Empty ? "\n" : string.Empty) + FFAManager.LatestChatMessage);
break;
case CustomGameMode.MoveAndStop when self:
Suffix.Append(MoveAndStopManager.GetSuffixText(seer));
@@ -1554,20 +1594,9 @@ class FixedUpdatePatch
offset += 0.15f;
}
if (!seer.IsAlive())
{
offset += 0.1f;
}
if (isProgressTextLong)
{
offset += 0.3f;
}
if (Options.CurrentGameMode == CustomGameMode.MoveAndStop)
{
offset += 0.2f;
}
if (!seer.IsAlive()) offset += 0.1f;
if (isProgressTextLong) offset += 0.3f;
if (Options.CurrentGameMode == CustomGameMode.MoveAndStop) offset += 0.2f;
RoleText.transform.SetLocalY(offset);
}
@@ -1688,14 +1717,15 @@ class EnterVentPatch
{
Logger.Info($" {pc.GetNameWithRole()}, Vent ID: {__instance.Id} ({__instance.name})", "EnterVent");
if (pc.GetRoleTypes() != RoleTypes.Engineer && !Main.PlayerStates[pc.PlayerId].Role.CanUseImpostorVentButton(pc))
if (pc.GetRoleTypes() != RoleTypes.Engineer && !Main.PlayerStates[pc.PlayerId].Role.CanUseImpostorVentButton(pc) && Options.CurrentGameMode == CustomGameMode.Standard)
{
pc.MyPhysics?.RpcBootFromVent(__instance.Id);
return;
}
Drainer.OnAnyoneEnterVent(pc, __instance);
Analyzer.OnAnyoneEnterVent(pc);
Analyst.OnAnyoneEnterVent(pc);
Roles.Impostor.Sentry.OnAnyoneEnterVent(pc);
switch (pc.GetCustomRole())
{
@@ -1803,10 +1833,7 @@ class CoEnterVentPatch
if (Ventguard.BlockedVents.Contains(id))
{
var pc = __instance.myPlayer;
if (Options.VentguardBlockDoesNotAffectCrew.GetBool() && pc.IsCrewmate())
{
}
else
if (!Options.VentguardBlockDoesNotAffectCrew.GetBool() || !pc.IsCrewmate())
{
_ = new LateTask(() =>
{
@@ -1827,7 +1854,7 @@ class CoEnterVentPatch
Circumvent.OnCoEnterVent(__instance, id);
}
if (__instance.myPlayer.GetCustomRole().GetDYRole() == RoleTypes.Impostor && !Main.PlayerStates[__instance.myPlayer.PlayerId].Role.CanUseImpostorVentButton(__instance.myPlayer))
if (__instance.myPlayer.GetCustomRole().GetDYRole() == RoleTypes.Impostor && !Main.PlayerStates[__instance.myPlayer.PlayerId].Role.CanUseImpostorVentButton(__instance.myPlayer) && Options.CurrentGameMode == CustomGameMode.Standard)
{
_ = new LateTask(() => { __instance.RpcBootFromVent(id); }, 0.5f);
}
@@ -1835,7 +1862,7 @@ class CoEnterVentPatch
if (((__instance.myPlayer.Data.Role.Role != RoleTypes.Engineer && !__instance.myPlayer.CanUseImpostorVentButton()) ||
(__instance.myPlayer.Is(CustomRoles.Mayor) && Mayor.MayorUsedButtonCount.TryGetValue(__instance.myPlayer.PlayerId, out var count) && count >= Mayor.MayorNumOfUseButton.GetInt()) ||
(__instance.myPlayer.Is(CustomRoles.Paranoia) && Paranoia.ParaUsedButtonCount.TryGetValue(__instance.myPlayer.PlayerId, out var count2) && count2 >= Options.ParanoiaNumOfUseButton.GetInt()))
&& !__instance.myPlayer.Is(CustomRoles.Nimble) && !__instance.myPlayer.Is(CustomRoles.Bloodlust))
&& !__instance.myPlayer.Is(CustomRoles.Nimble) && !__instance.myPlayer.Is(CustomRoles.Bloodlust) && Options.CurrentGameMode == CustomGameMode.Standard)
{
try
{
+3 -3
View File
@@ -1,3 +1,6 @@
using System;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using AmongUs.Data;
using AmongUs.GameOptions;
using EHR.Modules;
@@ -5,9 +8,6 @@ using EHR.Roles.Crewmate;
using EHR.Roles.Neutral;
using HarmonyLib;
using InnerNet;
using System;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static EHR.Translator;
namespace EHR;
+2 -2
View File
@@ -1,8 +1,8 @@
using EHR.Roles.Impostor;
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using EHR.Roles.Impostor;
using HarmonyLib;
using UnityEngine;
namespace EHR;
+2 -2
View File
@@ -1,8 +1,8 @@
using System.Linq;
using EHR.Roles.Crewmate;
using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using System.Linq;
namespace EHR;
@@ -261,7 +261,7 @@ public static class SabotageSystemTypeRepairDamagePatch
}
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) && !player.Is(CustomRoles.Mafioso)) return true;
if (player.Is(CustomRoleTypes.Impostor) && (player.IsAlive() || !Options.DeadImpCantSabotage.GetBool()) && player.GetCustomRole() is not CustomRoles.Minimalism and not CustomRoles.Mafioso and not CustomRoles.Generator) return true;
return player.GetCustomRole() switch
{
CustomRoles.Jackal when Jackal.CanSabotage.GetBool() => true,
+14 -7
View File
@@ -1,3 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using BepInEx;
using EHR.Patches;
using EHR.Roles.AddOns.Crewmate;
@@ -6,8 +8,6 @@ using EHR.Roles.Crewmate;
using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace EHR;
@@ -71,7 +71,7 @@ class RepairSystemPatch
if (RepairSender.enabled && AmongUsClient.Instance.NetworkMode != NetworkModes.OnlineGame)
Logger.SendInGame("SystemType: " + systemType + ", PlayerName: " + player.GetNameWithRole().RemoveHtmlTags() + ", amount: " + amount);
if (!AmongUsClient.Instance.AmHost) return true; //Execute the following only on the host
if (!AmongUsClient.Instance.AmHost) return true; // Execute the following only on the host
IsComms = PlayerControl.LocalPlayer.myTasks.ToArray().Any(x => x.TaskType == TaskTypes.FixComms);
@@ -79,7 +79,7 @@ class RepairSystemPatch
if (Options.DisableSabotage.GetBool() && systemType == SystemTypes.Sabotage) return false;
//Note: "SystemTypes.Laboratory" сauses bugs in the Host, it is better not to use
// Note: "SystemTypes.Laboratory" сauses bugs in the Host, it is better not to use
if (player.Is(CustomRoles.Fool) &&
(systemType is
SystemTypes.Comms or
@@ -168,20 +168,27 @@ class RepairSystemPatch
var SwitchSystem = ShipStatus.Instance?.Systems?[SystemTypes.Electrical]?.Cast<SwitchSystem>();
if (SwitchSystem is { IsActive: true })
{
switch (player.GetCustomRole())
switch (Main.PlayerStates[player.PlayerId].Role)
{
case CustomRoles.SabotageMaster:
case SabotageMaster:
Logger.Info($"{player.GetNameWithRole().RemoveHtmlTags()} instant-fix-lights", "SwitchSystem");
SabotageMaster.SwitchSystemRepair(player.PlayerId, SwitchSystem, amount);
Utils.NotifyRoles(SpecifySeer: player, SpecifyTarget: player);
break;
case CustomRoles.Alchemist when Main.PlayerStates[player.PlayerId].Role is Alchemist { FixNextSabo: true } am:
case Alchemist { FixNextSabo: true } am:
Logger.Info($"{player.GetNameWithRole().RemoveHtmlTags()} instant-fix-lights", "SwitchSystem");
SwitchSystem.ActualSwitches = 0;
SwitchSystem.ExpectedSwitches = 0;
am.FixNextSabo = false;
Utils.NotifyRoles(SpecifySeer: player, SpecifyTarget: player);
break;
case Adventurer av:
Logger.Info($"{player.GetNameWithRole().RemoveHtmlTags()} instant-fix-lights", "SwitchSystem");
SwitchSystem.ActualSwitches = 0;
SwitchSystem.ExpectedSwitches = 0;
av.OnLightsFix();
Utils.NotifyRoles(SpecifySeer: player, SpecifyTarget: player);
break;
}
if (player.Is(CustomRoles.Damocles) && Damocles.countRepairSabotage) Damocles.OnRepairSabotage(player.PlayerId);
+2 -2
View File
@@ -1,8 +1,8 @@
using AmongUs.GameOptions;
using HarmonyLib;
using System;
using System.Collections;
using System.Linq;
using AmongUs.GameOptions;
using HarmonyLib;
using UnityEngine;
using Object = UnityEngine.Object;
+2 -2
View File
@@ -1,5 +1,5 @@
using HarmonyLib;
using System;
using System;
using HarmonyLib;
namespace EHR.Patches;
+4 -4
View File
@@ -1,3 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using AmongUs.GameOptions;
using EHR.Modules;
using EHR.Roles.AddOns.Common;
@@ -8,9 +11,6 @@ using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using HarmonyLib;
using Hazel;
using System;
using System.Collections.Generic;
using System.Linq;
using static EHR.Modules.CustomRoleSelector;
using static EHR.Translator;
@@ -596,7 +596,7 @@ internal class SelectRolesPatch
GameOptionsSender.AllSenders.Add(new PlayerGameOptionsSender(pc));
}
// Added players with unclassified roles to the list of players who require ResetCam.
// Add players with unclassified roles to the list of players who require ResetCam.
Main.ResetCamPlayerList.AddRange(Main.AllPlayerControls.Where(p => p.GetCustomRole() is CustomRoles.Arsonist or CustomRoles.Revolutionist or CustomRoles.Sidekick or CustomRoles.KB_Normal or CustomRoles.Killer or CustomRoles.Tasker or CustomRoles.Potato or CustomRoles.Seeker or CustomRoles.Hider or CustomRoles.Fox or CustomRoles.Troll or CustomRoles.Innocent || (p.Is(CustomRoles.Witness) && (!Options.UsePets.GetBool() || Options.WitnessUsePet.GetBool()))).Select(p => p.PlayerId));
Utils.CountAlivePlayers(true);
Utils.SyncAllSettings();
+1 -1
View File
@@ -134,7 +134,7 @@
- Tunneler (Crewmate)
- Detour (Crewmate)
- Gaulois (Crewmate)
- Analyzer (Crewmate)
- Analyst (Crewmate)
- Electric (Crewmate)
- Mole (Crewmate)
- Tornado (Crewmate)
+120 -15
View File
@@ -240,7 +240,7 @@
"Infectious": "Infectious",
"Virus": "Virus",
"Pursuer": "Pursuer",
"Phantom": "Phantom",
"Phantom": "Specter",
"Pirate": "Pirate",
"Jinx": "Jinx",
"Maverick": "Maverick",
@@ -761,7 +761,7 @@
"InfectiousInfoLong": "(Neutrals):\\nAs the Infectious, your job is to infect as many players as you can.\\n\\nIf you infect all the killers, you then can simply outnumber the crew and win the game.",
"VirusInfoLong": "(Neutrals):\\nThe virus' goal is to eliminate other players. When a crewmate is killed, their corpse is infected, and the reporting crewmate joins the virus team or dies if the virus isn't voted out. The Virus team wins if they outnumber the Crewmate team.",
"PursuerInfoLong": "(Neutrals):\\nAs the Pursuer, you can use your ability on someone to make them shoot a blank when they try to kill (= reset their kill cooldown).\\n\\nTo win, just survive to the end of the game.",
"PhantomInfoLong": "(Neutrals):\\nAs the Phantom, your job is to get killed and finish your tasks.\\nYou can do your tasks while alive.\\nYou cannot win if you're alive.\\nIf you get killed, you win with the winning team if your tasks are completed.",
"PhantomInfoLong": "(Neutrals):\\nAs the Specter, your job is to get killed and finish your tasks.\\nYou can do your tasks while alive.\\nYou cannot win if you're alive.\\nIf you get killed, you win with the winning team if your tasks are completed.",
"PirateInfoLong": "(Neutrals):\\nAs the Pirate, use your kill button to select a target every round. You will duel with your target when in a meeting. If both the Pirate and the target choose the same number Pirate wins.\\nAdditionally, if Pirate wins the duel, or Target doesn't duel Target will suicide.\\n\\nDueling command:- /duel X (where X can be 0, 1 or 2)\\n\\nYou win after winning a certain number of duels set by the host.",
"JinxInfoLong": "(Neutrals):\\nAs the Jinx, whenever you are attacked, you jinx them, resulting in them dying to a jinx.\\nThis has limited uses.\\n\\nKill off everyone to win.",
"MaverickInfoLong": "(Neutrals):\\nAs the Maverick, you can kill much like a Serial Killer.\\n\\nHowever, you win with the winning team rather than alone.\\nIf you die, you lose.",
@@ -1091,6 +1091,9 @@
"DisableZiplineForImps": "Disable Zipline for <color=#ff1919>Impostors</color>",
"DisableZiplineForNeutrals": "Disable Zipline for <color=#ffab1b>Neutrals</color>",
"DisableShapeshiftAnimations": "Disable Shapeshift Animations",
"DisableAllShapeshiftAnimations": "Disable All Shapeshift Animations",
"CTA.PlayersCanWinWithOriginalTeam": "Custom Teamed Players Can Win With Their Original Team",
"CTA.PlayersCanSeeEachOthersRoles": "Custom Teamed Players Can See Each Other's Roles",
"AirshipVariableElectrical": "Variable Electrical (Airship)",
"ApplyDenyNameList": "Apply DenyName List",
"KickPlayerFriendCodeNotExist": "Kick players who are not logged in",
@@ -1128,6 +1131,7 @@
"MenuTitle.TaskSettings": "★ Task Management ★",
"MenuTitle.Guessers": "★ Guesser Mode ★",
"MenuTitle.GuesserModeRoles": "★ Roles and Add-ons for Guesser Mode ★",
"MenuTitle.CTA": "★ Custom Team Assignment ★",
"ShieldPersonDiedFirst": "Shield the person who got killed first in the last game",
"JackalWinWithSidekick": "<color=#00b4eb>Jackal</color> can win with <color=#00b4eb>Sidekick</color>'s team",
"SidekickKnowOtherSidekick": "<color=#00b4eb>Sidekicks</color> know each other",
@@ -1946,7 +1950,7 @@
"InfectiousBittenPlayer": "You successfully infected a player",
"GuessNotAllowed": "Sorry, your role does not have access to guessing.",
"GuessOnbound": "This player has the Onbound add-on, so your guess on them was canceled.",
"GuessPhantom": "You can't guess a Phantom, that allows them to win!",
"GuessPhantom": "You can't guess a Specter, that allows them to win!",
"DovesOfNeaceOnGuard": "Ability used, {0} uses remain",
"DovesOfNeaceMaxUsage": "Ability use limit reached",
"DovesOfNeaceSkillNotify": "Pacifist reset your kill cooldown",
@@ -2615,6 +2619,58 @@
"Transmitter": "Transmitter",
"TransmitterInfo": "TP to nearest player by doing a task",
"TransmitterInfoLong": "(Crewmates):\\nAs the Transmitter, when you complete a task, you teleport to the nearest player.",
"Sentry": "Sentry",
"SentryInfo": "Monitor a Room",
"SentryInfoLong": "(Crewmates):\\nAs the Sentry, you can monitor a room by petting your pet. When you pet your pet in the future, you get information from that room, including:<size=80%>\\n- The players currently in that room\\n- Who is dead in that room (if any)</size>\\nYou also get a notification when someone uses a vent or shapeshifts in that room.\\n\\nDepending on the settings, players may know if a room is monitored, and you may not be able to view this info during Comms Sabotages.",
"Sentry.ShowInfoDuration": "Info is Visible for",
"Sentry.PlayersKnowAboutCamera": "Players Know if the Room is Monitored",
"Sentry.CannotSeeInfoDuringComms": "Cannot See Info During Comms Sabotages",
"Sentry.Suffix.MonitoredRoom": "<size=80%>This room is monitored by the {0}</size>",
"Sentry.Suffix.Self": "<size=70%>Monitoring: <#00ffa5>{0}</color></size>",
"Sentry.Notify.Info": "<u>Info about your monitored room:</u>\\nPlayers: {0}\\nDead players: {1}",
"Sentry.Notify.Info.NoData": "<#ff0000>none</color>",
"Sentry.Notify.Shapeshifted": "{0} shapeshifted into {1} in your monitored room",
"Sentry.Notify.Vented": "{0} vented in your monitored room",
"Bargainer": "Bargainer",
"BargainerInfo": "Gain Money & Buy Power-Ups",
"BargainerInfoLong": "(Neutrals):\\nAs the Bargainer, you can gain money by killing, sabotaging and surviving meetings. You can use this money to buy some items from the shop. All devices on this map represent a shop you can use by going near it. You can buy the following items:<size=80%>\\n- Energy Drink (lowers your kill cooldown for that round)\\n- Lens Of Truth (reveals a random player's role for some time)\\n- Band Aid (gives you a shield for some time)</size>\\nWhen you step away from a shop, the selected item will be purchased if you have enough money for it. You can choose to not buy anything. While in the shop, sabotage to cycle between the available items.",
"Bargainer.StartingMoney": "Starting Money",
"Bargainer.Kill.Enabled": "Gain Money for Killing",
"Bargainer.Kill.Amount": "Money Gained for Killing",
"Bargainer.Sabotage.Enabled": "Gain Money for Sabotaging",
"Bargainer.Sabotage.Amount": "Money Gained for Sabotaging",
"Bargainer.SurviveMeeting.Enabled": "Gain Money for Surviving Meetings",
"Bargainer.SurviveMeeting.Amount": "Money Gained for Surviving Meetings",
"Bargainer.EnergyDrink.Enabled": "Energy Drink Enabled",
"Bargainer.EnergyDrink.Cost": "Energy Drink Cost",
"Bargainer.LensOfTruth.Enabled": "Lens Of Truth Enabled",
"Bargainer.LensOfTruth.Cost": "Lens Of Truth Cost",
"Bargainer.BandAid.Enabled": "Band Aid Enabled",
"Bargainer.BandAid.Cost": "Band Aid Cost",
"Bargainer.BandAid.Duration": "Band Aid Duration",
"Bargainer.BandAid.DurationSwitch": "Band Aid Lasts",
"Bargainer.EnergyDrink.ReducedKCD": "Energy Drink Reduced Kill Cooldown",
"Bargainer.LensOfTruth.Duration": "Lens Of Truth Duration",
"Bargainer.LensOfTruth.DurationSwitch": "Lens Of Truth Lasts",
"Bargainer.Notify.PurchasedItem": "You have purchased a(n) {0}",
"Bargainer.None": "No Item",
"Bargainer.EnergyDrink": "Energy Drink",
"Bargainer.LensOfTruth": "Lens Of Truth",
"Bargainer.BandAid": "Band Aid",
"Bargainer.Suffix.InShop": "<size=80%>[<#00ffa5>Shop</color>] Selected: {0} ({1})</size>",
"Forever": "Forever",
"UntilNextMeeting": "Until Next Meeting",
"UntilNextReveal": "Until Next Reveal",
"ForSpecifiedTime": "For Specified Time",
"SchrodingersCat": "Schrödinger's Cat",
"SchrodingersCatInfo": "Get Attacked to Get a Role",
"SchrodingersCatInfoLong": "(Neutrals):\\nAs Schrödinger's Cat, if you get attacked, you turn into the same role as your killer.\\nIf you don't get attacked, you lose, or you can win with crewmates, depending on the settings.",
"SchrodingersCat.WinsWithCrewIfNotAttacked": "Wins with crewmates if not attacked",
"SchrodingersCat.Notify.KillerRecruited": "You have recruited the {1}! {0} now has the same role as you.",
"SchrodingersCat.Notify.RecruitedByKiller": "You have been recruited by the {1}! You now have the same role as {0}.",
"Cherokious": "Cherokious",
"CherokiousInfo": "Do tasks to get Bullets to Kill",
"CherokiousInfoLong": "(Neutrals):\\nAs the Cherokious, you can get bullets by completing tasks. You can kill by petting your pet near someone. You can only kill if you have bullets.",
"Autocrat": "Autocrat",
"AutocratInfo": "TP nearest player to you by doing a task",
"AutocratInfoLong": "(Crewmates):\\nAs the Autocrat, when you complete a task, you teleport the nearest player to you.",
@@ -2829,9 +2885,9 @@
"StealthDarkened": "Darkened: {0}",
"StealthExcludeImpostors": "Ignore Impostors when Blinding",
"StealthDarkenDuration": "Blinding Duration",
"Analyzer": "Analyzer",
"AnalyzerInfo": "Analyze Players to Get Information",
"AnalyzerInfoLong": "(Crewmates):\\nAs the Analyzer, you may use your kill button on someone to analyze them. You will have to stand next to your target for a few seconds to complete the analysis. When the analysis is complete, you will see how many players they've killed so far, how many times they've vented so far, and their role basis.\\n\\nNote: If the host's settings don't allow you to see an information, the result will show 0 or nothing!\\nNote: None of these factors determine whether someone is evil or not! Think twice before judging too fast!",
"Analyst": "Analyst",
"AnalystInfo": "Analyze Players to Get Information",
"AnalystInfoLong": "(Crewmates):\\nAs the Analyst, you may use your kill button on someone to analyze them. You will have to stand next to your target for a few seconds to complete the analysis. When the analysis is complete, you will see how many players they've killed so far, how many times they've vented so far, and their role basis.\\n\\nNote: If the host's settings don't allow you to see an information, the result will show 0 or nothing!\\nNote: None of these factors determine whether someone is evil or not! Think twice before judging too fast!",
"AnalyzerCD": "Analyze Cooldown",
"AnalyzerDur": "Analyze Time",
"AnalyzerResult": "\\n\\nShowing analyzation result for <color=#00ffa5>{0}</color>:\\nKills: <color=#ff1919>{1}</color>, Vents: <color=#ffa500>{2}</color>, Role Basis: <color=#00ffff>{3}</color>",
@@ -3106,6 +3162,40 @@
"CandleLighterEndVision": "End Vision (Smallest Vision)",
"CandleLighterTimeMoveMeeting": "Time Moves During Meetings",
"CandleLighterTasksFinishedVision": "Vision after completing all tasks",
"AprilFoolsMode": "April Fools Mode",
"SilenceMode": "Silencing Method",
"Adventurer": "Adventurer",
"AdventurerInfo": "Collect Resources to Perform Actions",
"AdventurerInfoLong": "(Crewmates):\\nAs the Adventurer, you can collect resources listed below and craft them into weapons if you have the required amount of materials for it.<size=70%>\\n\\n<u><b>Resources (and how to obtain them):</b></u>\\n- ❖ (Complete a Task)\\n- Θ (Players Leave This Behind<sup>*</sup>)\\n- ♳ (Dead Bodies<sup>*</sup>)\\n- ⁂ (Shapeshift Skins<sup>*</sup>)\\n- \u2600 (Fix Lights)\\n- ○ (Found in Groups<sup>*</sup>)\\n<size=50%><sup>*</sup> When this resource is available somewhere, you get an arrow pointing towards that location. (Except dead bodies.) Go there to collect it.</size>\\n\\n<u><b>Weapons (and their ingredients):</b></u>\\n- Gun (1 ♳ + 1 ❖) (Kill nearest player)\\n- Shield (3 ❖) (Gives nearest player a 1-time shield)\\n- Lantern (1 \u2600 + 1 ❖) (Increases crewmates' vision for some time)\\n- Portal (2 Θ) (Swaps you with a random player)\\n- Wrench (1 \u2600 + 2 ❖) (Clears the current sabotage)\\n- Proxy (2 ○ + 1 ❖) (Gives you +1 vote in the next meeting)\\n- Prediction (1 ♳ + 2 ⁂ + 1 ❖) (Reveals the nearest player's role)\\n- RNG (2 Θ + 2 ❖) (Makes a random weapon)</size>\\n\\nTo use your weapons, pet your pet.",
"AdventurerWeaponDescription.Gun": "Kill the next player you go near",
"AdventurerWeaponDescription.Shield": "Gives someone a 1-time shield",
"AdventurerWeaponDescription.Lantern": "Increases crewmates' vision for some time",
"AdventurerWeaponDescription.Portal": "Swaps you with a random player",
"AdventurerWeaponDescription.Wrench": "Clears the current sabotage",
"AdventurerWeaponDescription.Proxy": "Gives you +1 vote in the next meeting",
"AdventurerWeaponDescription.Prediction": "Reveals the nearest player's role",
"AdventurerWeaponDescription.RNG": "Makes a random weapon",
"AdventurerIncreasedVisionDuration": "Increased Vision Duration",
"AdventurerWeaponEnabled.Gun": "Gun Enabled",
"AdventurerWeaponEnabled.Shield": "Healthy Dose Enabled",
"AdventurerWeaponEnabled.Lantern": "Lantern Enabled",
"AdventurerWeaponEnabled.Portal": "Portal Enabled",
"AdventurerWeaponEnabled.Wrench": "Wrench Enabled",
"AdventurerWeaponEnabled.Proxy": "Proxy Enabled",
"AdventurerWeaponEnabled.Prediction": "Prediction Enabled",
"AdventurerWeaponEnabled.RNG": "RNG Enabled",
"AdventurerVentToEnterCrafting": "Vent to Enter Crafting Menu",
"AdventurerIngredientsDisplay": "{0}: {1}\\nVent to craft this weapon / Pet to cycle to next weapon",
"AdventurerWeaponCrafted": "Crafted Weapon: {0}",
"AdventurerFound": "Found Resource: {0}",
"AdventurerGun.Gun": "Gun",
"AdventurerGun.Shield": "Shield",
"AdventurerGun.Lantern": "Lantern",
"AdventurerGun.Portal": "Portal",
"AdventurerGun.Wrench": "Wrench",
"AdventurerGun.Proxy": "Proxy",
"AdventurerGun.Prediction": "Prediction",
"AdventurerGun.RNG": "RNG",
"Imitator": "Imitator",
"ImitatorInfo": "Your kill cooldown shifts",
"ImitatorInfoLong": "(Neutral):\\nAs the Imitator, your kill cooldown is different after every even numbered kill and every odd numbered kill of yours. You have a separate cooldown after meetings. Your first kill after every meeting will set your cooldown to the Even-Numbered Kill Cooldown, your second kill will set it to the Odd-Numbered Kill Cooldown, and the process repeats until a meeting is called again.",
@@ -3203,6 +3293,8 @@
"FFA_LowerVision": "Lowered Vision",
"FFA_ModifiedVisionDuration": "Lowered Vision Duration",
"FFA_EnableRandomTwists": "Enable Random Swaps from time to time",
"FFA_TeamMode": "Enable Team Mode",
"FFA_TeamNumber": "Number of Teams",
"FFA-Event-GetShield": "You have a temporary shield!",
"FFA-Event-GetIncreasedSpeed": "You have a temporary speed boost!",
"FFA-Event-GetLowKCD": "You got a lower kill cooldown!",
@@ -3283,6 +3375,19 @@
"TrollInfoLong": "GET KILLED TO WIN",
"TrollVision": "Troll Vision",
"TrollSpeed": "Troll Speed",
"Generator": "Generator",
"GeneratorInfo": "Power up the ship",
"GeneratorInfoLong": "(Impostors):\\nAs the Generator, you generate charges every second. You can only kill/vent/shapeshift/sabotage if you have enough charges to do so. You also lose charges while shapeshifted.",
"Generator.ChargesGainedEverySecond": "Charges Gained Every Second",
"Generator.StartingCharges": "Starting Charges",
"Generator.ChargesLostWhileShiftedPerSecond": "Charges Lost While Shifted Per Second",
"Generator.MaxChargesStored": "Maximum Charges Stored",
"Generator.Kill.Cost": "Charges Needed to Kill",
"Generator.Vent.Cost": "Charges Needed to Vent",
"Generator.Sabotage.Cost": "Charges Needed to Sabotage",
"Generator.Shapeshift.Cost": "Charges Needed to Shapeshift",
"Generator.Notify.RevertShapeshift": "You ran out of charges, so shapeshifting was reverted",
"Generator.Notify.NotEnoughCharges": "You don't have enough charges ({0}) to do that",
"GNoCommandInfo": "<b>This Command can only be used when in lobby or after you die.</b>\\n\\ntype <b>/gno X</b> to play guess a number. X can be a number between 0 and 99 (both included). \\n\\nYou get maximum of <color=#ff0000>7 tries</color> to guess the number.\\n\\n Example:- <b>/gno 10</b>",
"GNoLost": "Oh, you were so close! Just one more guess, and you might have deciphered the Da Vinci code! By the way, <color=#ff0000>the secret number was... {0}!</color> But hey, you were only off by a few billion possibilities. Better luck next time, Sherlock! ",
"GNoLow": "Oh, you're really nailing this! It's so low, I almost need a shovel to dig it up!\\nYou have <color=#ff0000>{0} guesses</color> left!",
@@ -3301,8 +3406,8 @@
"CommanderInfo": "Command your team",
"CommanderInfoLong": "(Impostors):\\nAs the Commander, you can switch between 6 modes by venting/petting your pet. You can execute the selected action by shapeshifting.<size=70%>\\n\\n<b><u>Mark:</u></b> Marks your shapeshift target with a unique color visible to all impostors. Use this to command them to kill that player!\\n\\n<b><u>Whistle:</u></b> This tells all or 1 specific<sup>*</sup> impostor(s) to come to you and gives them (each) an arrow pointing towards you.\\n\\n<b><u>Kill Anyone:</u></b> Notifies all or 1 specific<sup>*</sup> impostor(s) to kill anyone.\\n\\n<b><u>Leave Player Alive:</u></b> Shapeshifting into a crewmate marks that player with a unique color and text telling other impostors to not kill that player. Shapeshifting into an impostor tells that impostor to not kill anyone.\\n\\n<b><u>Don't Sabotage:</u></b> Notifies all impostors to not call any sabotage.\\n\\n<b><u>Use Ability:</u></b> Notifies all or 1 specific<sup>*</sup> impostor(s) to use their ability.\\n\\n<size=60%><sup>*</sup> If you shapeshift into an impostor, the action executes specifically and only on them.</size></size>",
"CommanderNotify": "The Commander wants you to meet with them",
"CommanderTarget": "<size=1.7>Commander's target</color>",
"CommanderDontKill": "<size=1.7>Don't kill this player</color>",
"CommanderTarget": "<size=1.7>Commander's target</size>",
"CommanderDontKill": "<size=1.7>Don't kill this player</size>",
"CommanderWhistling": "Whistling",
"CommanderKillAnyoneNotify": "Commander wants you to kill anyone",
"CommanderDontSabotageNotify": "Commander wants you to not sabotage",
@@ -3421,11 +3526,11 @@
"WardenInfoLong": "(Crewmates):\\nAs the Warden, you can protect someone (optimally a crewmate) to notify them about being in danger and to give them a temporary speed boost.",
"WardenNotify": "The Warden warns you that you're in danger!",
"Prefix.Warden": "Warden",
"Specter": "Specter",
"Specter": "Phantom",
"SpecterInfo": "Finish Tasks to Win!",
"SpecterInfoLong": "(Crewmates):\\nAs the Specter, you must finish all of your tasks to win! Depending on a setting, you may also end the game and win alone if you do so!",
"SpecterInfoLong": "(Crewmates):\\nAs the Phantom, you must finish all of your tasks to win! Depending on a setting, you may also end the game and win alone if you do so!",
"SnatchWin": "Snatches Win (Win With Winning Team if Off)",
"Prefix.Specter": "Specter",
"Prefix.Specter": "Phantom",
"Haunter": "Haunter",
"HaunterInfo": "You're the Impostors' Worst Nightmare",
"HaunterInfoLong": "(Neutrals):\\nAs the Haunter, when you complete all of your tasks, a random living impostor's name will show in red to everyone in meetings. When you have 1 task left, all impostors will get an arrow pointing towards you, and if any of them come close to you, you lose this role.",
@@ -3802,7 +3907,7 @@
"WinnerRoleText.Infectious": "Infectious Wins!",
"WinnerRoleText.Rogue": "Mavericks Win!",
"WinnerRoleText.Virus": "Virus Wins!",
"WinnerRoleText.Phantom": "Phantom Wins!",
"WinnerRoleText.Phantom": "Specter Wins!",
"WinnerRoleText.Jinx": "Jinx Wins!",
"WinnerRoleText.CursedSoul": "Cursed Soul Wins!",
"WinnerRoleText.Ritualist": "Ritualist Wins!",
@@ -3834,7 +3939,7 @@
"WinnerRoleText.Sprayer": "Sprayer Wins!",
"WinnerRoleText.SoulHunter": "Soul Hunter Wins!",
"WinnerRoleText.Tiger": "Tiger Wins!",
"WinnerRoleText.Specter": "Specter Wins!",
"WinnerRoleText.Specter": "Phantom Wins!",
"WinnerRoleText.Default": "{0} Wins!",
"AdditionalWinnerRoleText.Sidekick": "along with Sidekicks",
"AdditionalWinnerRoleText.Opportunist": "The Opportunist survived",
@@ -3848,13 +3953,13 @@
"AdditionalWinnerRoleText.Jester": "The Jester wins along",
"AdditionalWinnerRoleText.Lovers": "Lovers win along",
"AdditionalWinnerRoleText.Executioner": "Executioner wins along",
"AdditionalWinnerRoleText.Phantom": "Phantom wins along",
"AdditionalWinnerRoleText.Phantom": "Specter wins along",
"AdditionalWinnerRoleText.Maverick": "The Maverick survived",
"AdditionalWinnerRoleText.Romantic": "The Romantic wins along",
"AdditionalWinnerRoleText.VengefulRomantic": "The Vengeful Romantic avenged their lover",
"AdditionalWinnerRoleText.Postman": "The Postman delivered mail to everyone",
"AdditionalWinnerRoleText.SoulHunter": "Soul Hunter wins along",
"AdditionalWinnerRoleText.Specter": "Specter wins along",
"AdditionalWinnerRoleText.Specter": "Phantom wins along",
"AdditionalWinnerRoleText.Default": "{0} wins along",
"ErrorEndText": "An error occurred",
"ErrorEndTextDescription": "To avoid crashing, the game was forcibly ended.",
+3 -3
View File
@@ -2820,9 +2820,9 @@
"StealthDarkened": "Cegado: {0}",
"StealthExcludeImpostors": "Ignorar Impostores ao Cegar",
"StealthDarkenDuration": "Duração da Visão Zero",
"Analyzer": "Analisador",
"AnalyzerInfo": "Analize jogadores para obter Informações",
"AnalyzerInfoLong": "(Tripulantes):\\nComo Analisador, você pode usar seu botão matar para analizar um jogador. Você deverá ficar ao lado do alvo por alguns segundos para concluir a analise. Quando a analise estiver completa, Você verá quantos jogadores ele matou, quantoas vezes ele entrou no duto e a sua função base.\\n\\nNota: Se as configurações do Anfitrião não permitirem você ver uma informação, o resultado será 0 ou nada!\\nNota: Nenhum destes fatores determinam se o jogador e maligno ou não! Pense duas vezes antes de acusar!",
"Analyst": "Analisador",
"AnalystInfo": "Analize jogadores para obter Informações",
"AnalystInfoLong": "(Tripulantes):\\nComo Analisador, você pode usar seu botão matar para analizar um jogador. Você deverá ficar ao lado do alvo por alguns segundos para concluir a analise. Quando a analise estiver completa, Você verá quantos jogadores ele matou, quantoas vezes ele entrou no duto e a sua função base.\\n\\nNota: Se as configurações do Anfitrião não permitirem você ver uma informação, o resultado será 0 ou nada!\\nNota: Nenhum destes fatores determinam se o jogador e maligno ou não! Pense duas vezes antes de acusar!",
"AnalyzerCD": "Recarga para analisar",
"AnalyzerDur": "Duração da analise",
"AnalyzerResult": "n\\nMostrando resultados da analise de <color=#00ffa5>{0}</color>:\\nAbates: <color=#ff1919>{1}</color>, Usou dutos: <color=#ffa500>{2}</color>, Função Base: <color=#00ffff>{3}</color>",
+5 -5
View File
@@ -9,16 +9,16 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(222420, CustomRoles.Antidote, canSetNum: true);
ImpCanBeAntidote = BooleanOptionItem.Create(222426, "ImpCanBeAntidote", true, TabGroup.Addons, false)
ImpCanBeAntidote = BooleanOptionItem.Create(222426, "ImpCanBeAntidote", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Antidote]);
CrewCanBeAntidote = BooleanOptionItem.Create(222427, "CrewCanBeAntidote", true, TabGroup.Addons, false)
CrewCanBeAntidote = BooleanOptionItem.Create(222427, "CrewCanBeAntidote", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Antidote]);
NeutralCanBeAntidote = BooleanOptionItem.Create(222423, "NeutralCanBeAntidote", true, TabGroup.Addons, false)
NeutralCanBeAntidote = BooleanOptionItem.Create(222423, "NeutralCanBeAntidote", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Antidote]);
AntidoteCDOpt = FloatOptionItem.Create(222424, "AntidoteCDOpt", new(0f, 180f, 1f), 5f, TabGroup.Addons, false)
AntidoteCDOpt = FloatOptionItem.Create(222424, "AntidoteCDOpt", new(0f, 180f, 1f), 5f, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Antidote])
.SetValueFormat(OptionFormat.Seconds);
AntidoteCDReset = BooleanOptionItem.Create(222425, "AntidoteCDReset", true, TabGroup.Addons, false)
AntidoteCDReset = BooleanOptionItem.Create(222425, "AntidoteCDReset", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Antidote]);
}
}
+4 -4
View File
@@ -12,16 +12,16 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(15420, CustomRoles.Asthmatic, canSetNum: true);
AsthmaticMinRedTime = IntegerOptionItem.Create(15423, "AsthmaticMinRedTime", new(1, 90, 1), 5, TabGroup.Addons, false)
AsthmaticMinRedTime = IntegerOptionItem.Create(15423, "AsthmaticMinRedTime", new(1, 90, 1), 5, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Asthmatic])
.SetValueFormat(OptionFormat.Seconds);
AsthmaticMaxRedTime = IntegerOptionItem.Create(15424, "AsthmaticMaxRedTime", new(1, 90, 1), 30, TabGroup.Addons, false)
AsthmaticMaxRedTime = IntegerOptionItem.Create(15424, "AsthmaticMaxRedTime", new(1, 90, 1), 30, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Asthmatic])
.SetValueFormat(OptionFormat.Seconds);
AsthmaticMinGreenTime = IntegerOptionItem.Create(15425, "AsthmaticMinGreenTime", new(1, 90, 1), 5, TabGroup.Addons, false)
AsthmaticMinGreenTime = IntegerOptionItem.Create(15425, "AsthmaticMinGreenTime", new(1, 90, 1), 5, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Asthmatic])
.SetValueFormat(OptionFormat.Seconds);
AsthmaticMaxGreenTime = IntegerOptionItem.Create(15426, "AsthmaticMaxGreenTime", new(1, 90, 1), 30, TabGroup.Addons, false)
AsthmaticMaxGreenTime = IntegerOptionItem.Create(15426, "AsthmaticMaxGreenTime", new(1, 90, 1), 30, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Asthmatic])
.SetValueFormat(OptionFormat.Seconds);
}
+3 -3
View File
@@ -9,11 +9,11 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(13600, CustomRoles.Autopsy, canSetNum: true);
ImpCanBeAutopsy = BooleanOptionItem.Create(13610, "ImpCanBeAutopsy", true, TabGroup.Addons, false)
ImpCanBeAutopsy = BooleanOptionItem.Create(13610, "ImpCanBeAutopsy", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Autopsy]);
CrewCanBeAutopsy = BooleanOptionItem.Create(13611, "CrewCanBeAutopsy", true, TabGroup.Addons, false)
CrewCanBeAutopsy = BooleanOptionItem.Create(13611, "CrewCanBeAutopsy", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Autopsy]);
NeutralCanBeAutopsy = BooleanOptionItem.Create(13612, "NeutralCanBeAutopsy", true, TabGroup.Addons, false)
NeutralCanBeAutopsy = BooleanOptionItem.Create(13612, "NeutralCanBeAutopsy", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Autopsy]);
}
}
+1 -1
View File
@@ -7,7 +7,7 @@
public void SetupCustomOption()
{
Options.SetupAdtRoleOptions(15100, CustomRoles.Avanger, canSetNum: true);
Options.ImpCanBeAvanger = BooleanOptionItem.Create(15110, "ImpCanBeAvanger", false, TabGroup.Addons, false)
Options.ImpCanBeAvanger = BooleanOptionItem.Create(15110, "ImpCanBeAvanger", false, TabGroup.Addons)
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Avanger]);
}
}
+8 -8
View File
@@ -9,23 +9,23 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(13700, CustomRoles.Bait, canSetNum: true);
ImpCanBeBait = BooleanOptionItem.Create(13710, "ImpCanBeBait", true, TabGroup.Addons, false)
ImpCanBeBait = BooleanOptionItem.Create(13710, "ImpCanBeBait", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait]);
CrewCanBeBait = BooleanOptionItem.Create(13711, "CrewCanBeBait", true, TabGroup.Addons, false)
CrewCanBeBait = BooleanOptionItem.Create(13711, "CrewCanBeBait", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait]);
NeutralCanBeBait = BooleanOptionItem.Create(13712, "NeutralCanBeBait", true, TabGroup.Addons, false)
NeutralCanBeBait = BooleanOptionItem.Create(13712, "NeutralCanBeBait", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait]);
BaitDelayMin = FloatOptionItem.Create(13713, "BaitDelayMin", new(0f, 90f, 1f), 0f, TabGroup.Addons, false)
BaitDelayMin = FloatOptionItem.Create(13713, "BaitDelayMin", new(0f, 90f, 1f), 0f, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait])
.SetValueFormat(OptionFormat.Seconds);
BaitDelayMax = FloatOptionItem.Create(13714, "BaitDelayMax", new(0f, 90f, 1f), 0f, TabGroup.Addons, false)
BaitDelayMax = FloatOptionItem.Create(13714, "BaitDelayMax", new(0f, 90f, 1f), 0f, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait])
.SetValueFormat(OptionFormat.Seconds);
BaitDelayNotify = BooleanOptionItem.Create(13715, "BaitDelayNotify", true, TabGroup.Addons, false)
BaitDelayNotify = BooleanOptionItem.Create(13715, "BaitDelayNotify", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait]);
BaitNotification = BooleanOptionItem.Create(13716, "BaitNotification", false, TabGroup.Addons, false)
BaitNotification = BooleanOptionItem.Create(13716, "BaitNotification", false, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait]);
ReportBaitAtAllCost = BooleanOptionItem.Create(13717, "ReportBaitAtAllCost", false, TabGroup.Addons, false)
ReportBaitAtAllCost = BooleanOptionItem.Create(13717, "ReportBaitAtAllCost", false, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bait]);
}
}
+4 -4
View File
@@ -9,14 +9,14 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(15200, CustomRoles.Bewilder, canSetNum: true);
BewilderVision = FloatOptionItem.Create(15210, "BewilderVision", new(0f, 5f, 0.05f), 0.6f, TabGroup.Addons, false)
BewilderVision = FloatOptionItem.Create(15210, "BewilderVision", new(0f, 5f, 0.05f), 0.6f, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bewilder])
.SetValueFormat(OptionFormat.Multiplier);
ImpCanBeBewilder = BooleanOptionItem.Create(15211, "ImpCanBeBewilder", true, TabGroup.Addons, false)
ImpCanBeBewilder = BooleanOptionItem.Create(15211, "ImpCanBeBewilder", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bewilder]);
CrewCanBeBewilder = BooleanOptionItem.Create(15212, "CrewCanBeBewilder", true, TabGroup.Addons, false)
CrewCanBeBewilder = BooleanOptionItem.Create(15212, "CrewCanBeBewilder", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bewilder]);
NeutralCanBeBewilder = BooleanOptionItem.Create(15213, "NeutralCanBeBewilder", true, TabGroup.Addons, false)
NeutralCanBeBewilder = BooleanOptionItem.Create(15213, "NeutralCanBeBewilder", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Bewilder]);
}
}
+3 -3
View File
@@ -9,11 +9,11 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(14900, CustomRoles.Brakar, canSetNum: true);
ImpCanBeTiebreaker = BooleanOptionItem.Create(14910, "ImpCanBeTiebreaker", true, TabGroup.Addons, false)
ImpCanBeTiebreaker = BooleanOptionItem.Create(14910, "ImpCanBeTiebreaker", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Brakar]);
CrewCanBeTiebreaker = BooleanOptionItem.Create(14911, "CrewCanBeTiebreaker", true, TabGroup.Addons, false)
CrewCanBeTiebreaker = BooleanOptionItem.Create(14911, "CrewCanBeTiebreaker", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Brakar]);
NeutralCanBeTiebreaker = BooleanOptionItem.Create(14912, "NeutralCanBeTiebreaker", true, TabGroup.Addons, false)
NeutralCanBeTiebreaker = BooleanOptionItem.Create(14912, "NeutralCanBeTiebreaker", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Brakar]);
}
}
+2 -2
View File
@@ -9,9 +9,9 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(15290, CustomRoles.Busy, canSetNum: true);
BusyLongTasks = IntegerOptionItem.Create(15293, "BusyLongTasks", new(0, 90, 1), 1, TabGroup.Addons, false)
BusyLongTasks = IntegerOptionItem.Create(15293, "BusyLongTasks", new(0, 90, 1), 1, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Busy]);
BusyShortTasks = IntegerOptionItem.Create(15294, "BusyShortTasks", new(0, 90, 1), 1, TabGroup.Addons, false)
BusyShortTasks = IntegerOptionItem.Create(15294, "BusyShortTasks", new(0, 90, 1), 1, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Busy]);
}
}
+3 -3
View File
@@ -1,5 +1,5 @@
using EHR.Roles.Impostor;
using System.Collections.Generic;
using System.Collections.Generic;
using EHR.Roles.Impostor;
using static EHR.Options;
namespace EHR.Roles.AddOns.Common
@@ -11,7 +11,7 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(15430, CustomRoles.Disco, canSetNum: true);
DiscoChangeInterval = IntegerOptionItem.Create(15433, "DiscoChangeInterval", new(1, 90, 1), 5, TabGroup.Addons, false)
DiscoChangeInterval = IntegerOptionItem.Create(15433, "DiscoChangeInterval", new(1, 90, 1), 5, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Disco])
.SetValueFormat(OptionFormat.Seconds);
}
+5 -5
View File
@@ -9,16 +9,16 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(111420, CustomRoles.Diseased, canSetNum: true);
ImpCanBeDiseased = BooleanOptionItem.Create(111426, "ImpCanBeDiseased", true, TabGroup.Addons, false)
ImpCanBeDiseased = BooleanOptionItem.Create(111426, "ImpCanBeDiseased", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Diseased]);
CrewCanBeDiseased = BooleanOptionItem.Create(111427, "CrewCanBeDiseased", true, TabGroup.Addons, false)
CrewCanBeDiseased = BooleanOptionItem.Create(111427, "CrewCanBeDiseased", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Diseased]);
NeutralCanBeDiseased = BooleanOptionItem.Create(111423, "NeutralCanBeDiseased", true, TabGroup.Addons, false)
NeutralCanBeDiseased = BooleanOptionItem.Create(111423, "NeutralCanBeDiseased", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Diseased]);
DiseasedCDOpt = FloatOptionItem.Create(111424, "DiseasedCDOpt", new(0f, 180f, 1f), 25f, TabGroup.Addons, false)
DiseasedCDOpt = FloatOptionItem.Create(111424, "DiseasedCDOpt", new(0f, 180f, 1f), 25f, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Diseased])
.SetValueFormat(OptionFormat.Seconds);
DiseasedCDReset = BooleanOptionItem.Create(111425, "DiseasedCDReset", true, TabGroup.Addons, false)
DiseasedCDReset = BooleanOptionItem.Create(111425, "DiseasedCDReset", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.Diseased]);
}
}
+3 -3
View File
@@ -17,11 +17,11 @@ namespace EHR.Roles.AddOns.Common
public void SetupCustomOption()
{
SetupAdtRoleOptions(13900, CustomRoles.DoubleShot, canSetNum: true, tab: TabGroup.Addons);
ImpCanBeDoubleShot = BooleanOptionItem.Create(13910, "ImpCanBeDoubleShot", true, TabGroup.Addons, false)
ImpCanBeDoubleShot = BooleanOptionItem.Create(13910, "ImpCanBeDoubleShot", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.DoubleShot]);
CrewCanBeDoubleShot = BooleanOptionItem.Create(13911, "CrewCanBeDoubleShot", true, TabGroup.Addons, false)
CrewCanBeDoubleShot = BooleanOptionItem.Create(13911, "CrewCanBeDoubleShot", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.DoubleShot]);
NeutralCanBeDoubleShot = BooleanOptionItem.Create(13912, "NeutralCanBeDoubleShot", true, TabGroup.Addons, false)
NeutralCanBeDoubleShot = BooleanOptionItem.Create(13912, "NeutralCanBeDoubleShot", true, TabGroup.Addons)
.SetParent(CustomRoleSpawnChances[CustomRoles.DoubleShot]);
}
}
Loaded 100 of 372 files, more files were not shown because too many files have changed in this diff. Show more