Beispiel #1
0
        private async Task TurnTheTables(IPlayerExileEvent e)
        {
            await e.Game.GetClientPlayer(JesterGames[e.Game.Code].JesterClientId).Character.SetHatAsync(HatType.ElfHat).ConfigureAwait(false);

            foreach (var player in e.Game.Players)
            {
                if (player.Client.Id != JesterGames[e.Game.Code].JesterClientId)
                {
                    await player.Character.SetHatAsync(HatType.DumSticker).ConfigureAwait(false);

                    await player.Character.SetColorAsync(ColorType.Black).ConfigureAwait(false);

                    await player.Character.SetSkinAsync(SkinType.None).ConfigureAwait(false);

                    await player.Character.SetPetAsync(PetType.NoPet).ConfigureAwait(false);
                }
            }
            foreach (var player in e.Game.Players)
            {
                if (!player.Character.PlayerInfo.IsDead && player.Character.PlayerInfo.IsImpostor)
                {
                    _logger.LogInformation($"- {player.Character.PlayerInfo.PlayerName} is murdered by plugin.");
                    await player.Character.SetMurderedByAsync(player);
                }
            }
        }
Beispiel #2
0
 public void OnPlayerExiled(IPlayerExileEvent e)
 {
     if (JesterInGame && e.PlayerControl == Jester.Character)
     {
         Jesterwin = true;
         _logger.LogInformation($"Jester has won!");
         Task.Run(async() => await TurnTheTables(e).ConfigureAwait(false));
     }
 }
Beispiel #3
0
        public void OnPlayerExiled(IPlayerExileEvent e)
        {
            if (JesterGames[e.Game.Code].JesterInGame && e.PlayerControl == e.Game.GetClientPlayer(JesterGames[e.Game.Code].JesterClientId).Character)
            {
                JesterGame jgame = JesterGames[e.Game.Code];
                jgame.JesterWin          = true;
                JesterGames[e.Game.Code] = jgame;

                _logger.LogInformation($"Jester has won!");
                Task.Run(async() => await TurnTheTables(e).ConfigureAwait(false));
            }
        }
Beispiel #4
0
        private async Task TurnTheTables(IPlayerExileEvent e)
        {
            await JesterGames[e.Game.Code].Jester.Character.SetHatAsync(HatType.ElfHat).ConfigureAwait(false);

            foreach (var player in e.Game.Players)
            {
                if (player != JesterGames[e.Game.Code].Jester)
                {
                    await player.Character.SetHatAsync(HatType.DumSticker).ConfigureAwait(false);
                }
            }
            foreach (var player in e.Game.Players)
            {
                if (!player.Character.PlayerInfo.IsDead && player.Character.PlayerInfo.IsImpostor)
                {
                    _logger.LogInformation($"- {player.Character.PlayerInfo.PlayerName} is murdered by plugin.");
                    await player.Character.SetMurderedAsync().ConfigureAwait(false);
                }
            }
        }
Beispiel #5
0
 public void OnPlayerExile(IPlayerExileEvent e)
 {
     AutomuteUsPlugin.gamesManager.GetGame(e)?.OnPlayerExile(e);
 }
 public void PlayerExiled(IPlayerExileEvent e)
 {
     // Called when MeetingHud RPC VotingComplete has a player to be voted out.
     _proximityHub.Clients.Group(e.Game.Code).PlayerExiled(e.PlayerControl.PlayerInfo.PlayerName);
 }
Beispiel #7
0
 public void OnPlayerExhiled(IPlayerExileEvent e)
 {
     Bot.games[e.Game.Code.Code].players[(int)e.PlayerControl.PlayerInfo.Color].isDead = true;
 }
Beispiel #8
0
        public void OnPlayerExile(IPlayerExileEvent e)
        {
            GamesManager.OnPlayerChanged(e.Game.Code, e.PlayerControl.PlayerInfo, PlayerAction.Died);

            CheckUpdate(e);
        }
Beispiel #9
0
        public void OnPlayerExile(IPlayerExileEvent e)
        {
            var exiled = e.PlayerControl.PlayerInfo;

            e.PlayerControl.SetMurderedAsync();
        }
Beispiel #10
0
 public void OnPlayerExile(IPlayerExileEvent evt)
 {
     Interlocked.Increment(ref OnPlayerExileCount);
 }
 public void OnPlayerExiled(IPlayerExileEvent evt) => PlayerExile?.Invoke(evt);