Example #1
0
        protected void SingleVictory()
        {
            if (Player == null)
            {
                return;
            }

            EndGameCentral.RoleVictory = this;

            ExtraNetwork.Send(CustomRPC.SingleWin, Writer => {
                Writer.Write(RoleNo);
                Writer.Write(Player.PlayerId);
            });

            foreach (var SomePlayer in PlayerControl.AllPlayerControls)
            {
                if (SomePlayer != Player)
                {
                    SomePlayer.RemoveInfected();
                    SomePlayer.MurderPlayer(SomePlayer);
                    SomePlayer.Data.IsDead     = true;
                    SomePlayer.Data.IsImpostor = false;
                }
                else
                {
                    SomePlayer.Revive();
                    SomePlayer.Data.IsDead     = false;
                    SomePlayer.Data.IsImpostor = true;
                }
            }
        }
Example #2
0
        public static void DebugWin(PlayerControl Winner)
        {
            if (!DEBUG)
            {
                return;
            }
            if (Winner == null)
            {
                return;
            }

            foreach (var SomePlayer in PlayerControl.AllPlayerControls)
            {
                if (SomePlayer != Winner)
                {
                    SomePlayer.RemoveInfected();
                    SomePlayer.MurderPlayer(SomePlayer);
                    SomePlayer.Data.IsDead     = true;
                    SomePlayer.Data.IsImpostor = false;
                }
                else
                {
                    SomePlayer.Revive();
                    SomePlayer.Data.IsDead     = false;
                    SomePlayer.Data.IsImpostor = true;
                }
            }
        }