None,
Normal,
HideNSeek,
+ NormalFools,
+ SeekFools
}
}
return gameMode switch
{
- GameModes.Normal => NormalGameOptions.Deserialize(optionsReader, version),
- GameModes.HideNSeek => HideNSeekGameOptions.Deserialize(optionsReader, version),
+ GameModes.Normal or GameModes.NormalFools => NormalGameOptions.Deserialize(optionsReader, version),
+ GameModes.HideNSeek or GameModes.SeekFools => HideNSeekGameOptions.Deserialize(optionsReader, version),
_ => throw new ArgumentOutOfRangeException(),
};
}
switch (gameMode)
{
case GameModes.Normal:
+ case GameModes.NormalFools:
((NormalGameOptions)gameOptions).Deserialize(optionsReader);
break;
case GameModes.HideNSeek:
+ case GameModes.SeekFools:
((HideNSeekGameOptions)gameOptions).Deserialize(optionsReader);
break;
default:
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
try
{
const float AnimationTime = 0.25f + 0.5f + 0.4f + 3f + 0.75f + 5f;
- if (Game.Options.GameMode == GameModes.Normal)
+ if (Game.Options.GameMode is GameModes.Normal or GameModes.NormalFools)
{
var options = (NormalGameOptions)Game.Options;
await Task.Delay(TimeSpan.FromSeconds(AnimationTime + options.DiscussionTime + options.VotingTime), _timerToken.Token);
-using System;
+using System;
using System.Collections.Generic;
using Impostor.Api.Games;
using Impostor.Api.Innersloth;
// the impostor has a cooldown of half the usual duration. As a workaround we always assume the kill was
// prevented and the impostor only has half of its cooldown.
// FIXME when the base game improved their implementation.
- if (game.Options.GameMode == GameModes.Normal)
+ if (game.Options.GameMode is GameModes.Normal or GameModes.NormalFools)
{
var options = (NormalGameOptions)game.Options;
return dateTimeProvider.UtcNow.Subtract(LastMurder).TotalSeconds >= options.KillCooldown / 2;