"Phantom": 9,
"Tracker": 10,
"Detective": 12,
- "Viper": 18
-}
\ No newline at end of file
+ "Viper": 18,
+ "Judge": 19
+}
public class NormalGameOptions : IGameOptions
{
- public const int LatestVersion = 10;
+ public const int LatestVersion = 11;
public NormalGameOptions(byte version = LatestVersion)
{
public void Deserialize(IMessageReader reader)
{
+ if (Version > LatestVersion)
+ {
+ IGameOptions.ThrowUnknownVersion<NormalGameOptions>(Version);
+ }
+
if (Version >= 8)
{
SpecialMode = (SpecialGameModes)reader.ReadByte();
}
RoleOptions.Deserialize(reader);
-
- if (Version > LatestVersion)
- {
- IGameOptions.ThrowUnknownVersion<NormalGameOptions>(Version);
- }
}
public void Serialize(IMessageWriter writer)
--- /dev/null
+namespace Impostor.Api.Innersloth.GameOptions.RoleOptions;
+
+public class JudgeRoleOptions : IRoleOptions
+{
+ public JudgeRoleOptions(byte version)
+ {
+ Version = version;
+ }
+
+ public byte Version { get; }
+
+ public RoleTypes Type => RoleTypes.Judge;
+
+ public float JudgeTaskRequirementPercentage { get; set; } = 50f;
+
+ public static JudgeRoleOptions Deserialize(IMessageReader reader, byte version)
+ {
+ var options = new JudgeRoleOptions(version);
+
+ options.JudgeTaskRequirementPercentage = (int)reader.ReadByte();
+
+ return options;
+ }
+
+ public void Serialize(IMessageWriter writer)
+ {
+ writer.Write((byte)JudgeTaskRequirementPercentage);
+ }
+}
RoleTypes.Tracker => TrackerRoleOptions.Deserialize(roleOptionsReader, Version),
RoleTypes.Detective => DetectiveRoleOptions.Deserialize(roleOptionsReader, Version),
RoleTypes.Viper => ViperRoleOptions.Deserialize(roleOptionsReader, Version),
+ RoleTypes.Judge => JudgeRoleOptions.Deserialize(roleOptionsReader, Version),
_ => throw new ArgumentOutOfRangeException(nameof(roleType), roleType, null),
};
new GameVersion(2026, 3, 18), // 17.4 (2026-06-05, build 7044, pc only)
new GameVersion(2026, 4, 23), // 17.4 (2026-06-05, build 7045, mobile only)
},
+ new[]
+ {
+ new GameVersion(2026, 7, 15), // 18.0 (2026-08-18, build 7238)
+ },
};
private readonly List<CompatibilityGroup> _compatibilityGroups = new();