예제 #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;
        }
예제 #4
0
 public async ValueTask OnPlayerDeath(IPlayerMurderEvent e)
 {
     if (CodeAndInfos.ContainsKey(e.Game))
     {
         foreach (var impostor in CodeAndInfos[e.Game].impostors)
         {
             await impostor.KickAsync();
         }
     }
 }
예제 #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));
            }
        }
예제 #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);
 }
예제 #8
0
 public void OnPlayerMurder(IPlayerMurderEvent e)
 {
     _logger.LogInformation(e.Victim.PlayerInfo.PlayerName + " was murdered");
 }
 public void OnPlayerMurder(IPlayerMurderEvent evt) => Interlocked.Increment(ref _deathsPerSecond);
예제 #10
0
 public void OnPlayerMurder(IPlayerMurderEvent evt)
 {
     Interlocked.Increment(ref OnPlayerMurderCount);
 }
 public void OnPlayerMurdered(IPlayerMurderEvent evt) => PlayerMurder?.Invoke(evt);