Esempio n. 1
0
        private void point_AwardWinner(Misc.WinType winType, bool AlphaWon, string PlayerName)
        {
            this.m_Status = Misc.BaseGameStatus.BetweenPoints;

            if (winType != Misc.WinType.NoCount)
            {
                if (AlphaWon)
                {
                    this.m_AlphaPoints++;
                }
                else
                {
                    this.m_BravoPoints++;
                }

                if (winType == Misc.WinType.BaseClear)
                {
                    sendBotSpam(("- " + (!AlphaWon ? this.m_ATeamName : this.m_BTeamName) + " is all dead! --  Team " + (AlphaWon ? this.m_ATeamName : this.m_BTeamName) + " scores! -"));
                }
                else if (winType == Misc.WinType.SafeWin)
                {
                    this.m_CurrentPoint.setSafeWinner(PlayerName);
                    sendBotSpam("- [ " + PlayerName + " ] has breached the enemy's defense! (SafeWin) " + (AlphaWon ? "[ " + this.m_ATeamName + " Team Win ]" : "[ " + this.m_BTeamName + " Team Win ]"));
                }
                // display score
                sendBotSpam("- " + this.m_ATeamName + " [ " + this.m_AlphaPoints.ToString() + " ]     Score     [ " + this.m_BravoPoints.ToString() + " ] " + this.m_BTeamName + " -");
                sendBotSpam("- ----------------------------------------------- -");

                sendPlayerSpam("   " + this.m_ATeamName + " " + this.m_AlphaPoints.ToString() + " - " + this.m_BravoPoints.ToString() + " " + this.m_BTeamName + "      WinType:" + winType + "   Match#:" + (this.m_AllPoints.Count + 1) + " -");
            }
            else
            {
                sendBotSpam("- Both teams out -- No count -");
                sendPlayerSpam("   " + this.m_ATeamName + " " + this.m_AlphaPoints.ToString() + " - " + this.m_BravoPoints.ToString() + " " + this.m_BTeamName + "      -- No count --    Match#:" + (this.m_AllPoints.Count + 1) + " -");
            }

            this.m_AllPoints.Add(this.m_CurrentPoint.GetCopy(AlphaWon, winType));
            this.m_CurrentPoint.resetPoint();

            if ((this.m_AlphaPoints >= this.m_Settings.MinimumPoints || this.m_BravoPoints >= this.m_Settings.MinimumPoints) &&
                Math.Abs(this.m_AlphaPoints - this.m_BravoPoints) >= this.m_Settings.WinBy)
            {
                this.doEndGamePrintOut();
                this.game_Save();
                this.game_Reset();
                return;
            }

            if (winType != Misc.WinType.NoCount)
            {
                this.loadNextBase();
                sendBotSpam("- Starting next base in " + m_StartGameDelay + " seconds! -");
            }
            else
            {
                sendBotSpam("- Restarting point in " + m_StartGameDelay + " seconds! -");
            }

            timer_Setup(Misc.TimerType.GameStart);
        }
Esempio n. 2
0
        public BasePoint GetCopy(bool AlphaWon, Misc.WinType winType)
        {
            BasePoint save = new BasePoint(this.m_ATeamName, this.m_BTeamName);

            save.m_AlphaWon   = AlphaWon;
            save.m_WinType    = winType;
            save.m_TotalTime  = DateTime.Now - this.m_StartTime;
            save.m_StartTime  = this.m_StartTime;
            save.m_BaseNumber = this.m_BaseNumber;
            save.m_AlphaTeam  = this.m_AlphaTeam.getCopy();
            save.m_BravoTeam  = this.m_BravoTeam.getCopy();
            save.m_SafeWinner = this.m_SafeWinner;
            return(save);
        }