Exemple #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);
        }
Exemple #2
0
        private void game_Start()
        {
            this.m_Status = Misc.BaseGameStatus.InProgress;
            psyGame.Send(msg.team_pm(this.m_AlphaFreq, "?|warpto " + this.m_CurrentBase.AlphaStartX + " " + this.m_CurrentBase.AlphaStartY + "|shipreset"));
            psyGame.Send(msg.team_pm(this.m_BravoFreq, "?|warpto " + this.m_CurrentBase.BravoStartX + " " + this.m_CurrentBase.BravoStartY + "|shipreset"));

            sendBotSpam("- Current Base        : " + this.m_CurrentBase.Number.ToString().PadLeft(2, '0'));
            sendBotSpam("- Current Base Size   : " + this.m_CurrentBase.Size.ToString());
            if (this.m_AllPoints.Count == 0)
            {
                sendBotSpam("- Team vs Team Rules  : " + (this.m_Settings.SafeWin ? "BaseClear and Safes" : "BaseClear"));
                sendBotSpam("- Auto Scoring        :  - On -");
            }

            if (this.m_InactiveTimerActivated)
            {
                this.m_InactiveTimer          = new Timer();
                this.m_InactiveTimer.Elapsed += new ElapsedEventHandler(timer_InactiveTimer);
                this.m_InactiveTimer.Interval = 500;
                this.m_InactiveTimer.Start();

                this.m_ActivityTimeStamp = DateTime.Now;
            }

            this.m_CurrentPoint.startPoint();
        }
Exemple #3
0
        private void game_Reset()
        {
            this.m_ATeamName    = m_DefaultATeamName;
            this.m_BTeamName    = m_DefaultBTeamName;
            this.m_CurrentPoint = new BasePoint(this.m_ATeamName, this.m_BTeamName);
            this.m_AllPoints    = new List <BasePoint>();
            this.m_Status       = Misc.BaseGameStatus.NotStarted;

            this.m_Timer          = new Timer();
            this.m_InactiveTimer  = new Timer();
            this.m_StartGameDelay = 10;
            this.m_StartGameShow  = 5;
            this.m_TeamClearDelay = 5;
            this.m_AlphaPoints    = 0;
            this.m_BravoPoints    = 0;

            this.m_Settings.LoadSettings(this.m_DefaultSettingType);
            this.players_WarptoCenter();
        }
Exemple #4
0
        public void command_GameHold(SSPlayer p)
        {
            if (this.m_Status == Misc.BaseGameStatus.OnHold)
            {
                this.point_Reset();
                return;
            }

            if (this.m_Status != Misc.BaseGameStatus.InProgress || m_Timer.Enabled)
            {
                psyGame.Send(msg.pm(p.PlayerName, "This command can only be used when the game is in progress and no [Team Out] events have been triggered."));
                return;
            }

            this.m_Status = Misc.BaseGameStatus.OnHold;

            this.sendAllTeamMessage("Your game has currently been put on hold. We will resume the game shortly - " + p.PlayerName);
            this.players_WarptoCenter();
        }