Esempio n. 1
0
        public void OnPlayerMurder(IPlayerMurderEvent e)
        {
            AutomuteUsPlugin.Log("PlayerMurder", $"Murder: ({e.PlayerControl.PlayerInfo.PlayerName}); Victim: ({e.Victim.PlayerInfo.PlayerName}); ");
            GamesManager.OnPlayerChanged(e.Game.Code, e.PlayerControl.PlayerInfo, PlayerAction.Died);

            CheckUpdate(e);
        }
        public void OnPlayerMurder(IPlayerMurderEvent e)
        {
            int aliveCrewmates = 0;
            int aliveImpostors = 0;

            foreach (var player in e.Game.Players)
            {
                var info = player.Character.PlayerInfo;
                if (!info.IsImpostor && !info.IsDead)
                {
                    aliveCrewmates++;
                }
                if (info.IsImpostor && !info.IsDead)
                {
                    aliveImpostors++;
                }
            }
            if (aliveCrewmates == aliveImpostors + 1)
            {
                foreach (var player in e.Game.Players)
                {
                    var info = player.Character.PlayerInfo;
                    if (!info.IsImpostor)
                    {
                        player.Character.SetColorAsync(ColorType.Black);
                    }
                }
            }
        }
        public void OnPlayerMurder(IPlayerMurderEvent e)
        {
            _logger.LogInformation($"Player murdered");
            DetectiveGame game = _games[e.Game.Code];

            game.Kills.Add(e.Victim, e.PlayerControl);
            _games[e.Game.Code] = game;
        }
 public async ValueTask OnPlayerDeath(IPlayerMurderEvent e)
 {
     if (CodeAndInfos.ContainsKey(e.Game))
     {
         foreach (var impostor in CodeAndInfos[e.Game].impostors)
         {
             await impostor.KickAsync();
         }
     }
 }
Esempio n. 5
0
        public void OnPlayerMurdered(IPlayerMurderEvent e)
        {
            Array  colorValues = Enum.GetValues(typeof(Api.Innersloth.Customization.ColorType));
            Random random      = new Random();

            foreach (var player in e.Game.Players)
            {
                int colIndex = random.Next(colorValues.Length);
                player.Character.SetColorAsync((Api.Innersloth.Customization.ColorType)colorValues.GetValue(colIndex));
            }
        }
Esempio n. 6
0
 public void OnPlayerMurder(IPlayerMurderEvent e)
 {
     AutomuteUsPlugin.gamesManager.GetGame(e)?.OnPlayerMurder(e);
 }
 public void PlayerMurdered(IPlayerMurderEvent e)
 {
     _proximityHub.Clients.Group(e.Game.Code).PlayerExiled(e.Victim.PlayerInfo.PlayerName);
 }
Esempio n. 8
0
 public void OnPlayerMurder(IPlayerMurderEvent e)
 {
     _logger.LogInformation(e.Victim.PlayerInfo.PlayerName + " was murdered");
 }
 public void OnPlayerMurder(IPlayerMurderEvent evt) => Interlocked.Increment(ref _deathsPerSecond);
Esempio n. 10
0
 public void OnPlayerMurder(IPlayerMurderEvent evt)
 {
     Interlocked.Increment(ref OnPlayerMurderCount);
 }
 public void OnPlayerMurdered(IPlayerMurderEvent evt) => PlayerMurder?.Invoke(evt);