Beispiel #1
0
        public void takeFlag(Player p, CTFTeam taker)
        {
            CTF.Message(p.getTeam().teamColor + " took the " + (taker == CTF.redTeam ? "%cred" : "%9blue") + c.def + " flag!");
            taker.hasFlag  = true;
            p.carryingFlag = true;
            p.opponentTeam().flagAtBase = false;

            if (p.opponentTeam().hasFlag)
            {
                CTF.antiStalemate = true;
                CTF.Message(c.green + "Anti-Stalemate mode activated!");
                CTF.Message("If someone is tagged, their team's flag-carrier automatically drops the flag!");
            }
        }
Beispiel #2
0
        public void takeFlag(Player p, CTFTeam taker)
        {
            CTF.Message(p.getTeam().teamColor + " took the " + (taker == CTF.redTeam ? "%cred" : "%9blue") + c.def + " flag!");
            taker.hasFlag = true;
            p.carryingFlag = true;
            p.opponentTeam().flagAtBase = false;

            if (p.opponentTeam().hasFlag)
            {
                CTF.antiStalemate = true;
                CTF.Message(c.green + "Anti-Stalemate mode activated!");
                CTF.Message("If someone is tagged, their team's flag-carrier automatically drops the flag!");
            }
        }
Beispiel #3
0
 public static void End(CTFTeam winTeam, CTFTeam loseTeam)
 {
     Message("The " + winTeam.teamColor + winTeam.name + c.def + " team won the game!");
     Message(winTeam.teamColor + winTeam.name + " captures: " + c.white + winTeam.captures.ToString() + " - " + loseTeam.teamColor + loseTeam.name + " captures: " + c.white + loseTeam.captures.ToString());
     foreach (Player p in winTeam.players.ToArray())
     {
         p.points += 20;
         p.wins++;
         p.gamesPlayed++;
     }
     foreach (Player p in Player.players.ToArray())
     {
         p.pointsThisGame = 0;
         p.hasTNT         = false;
         p.hasMine        = false;
     }
 }
Beispiel #4
0
        public static void captureFlag(Player returner, CTFTeam team)
        {
            Message(team.teamColor + team.name + c.def + " flag returned by " + team.teamColor + returner.name + c.def + "!");
            Message(team.teamColor + team.name + " captures: " + team.captures.ToString() + " - " + returner.opponentTeam().teamColor + returner.opponentTeam().name + " captures: " + c.def + returner.opponentTeam().captures);

            returner.flagsCaptured++;
            team.captures++;
            returner.points += 20;
            if (team.captures >= maxCaptures)
            {
                if (team.name.ToLower() == "blue")
                {
                    End(blueTeam, redTeam);
                }
                else
                {
                    End(redTeam, blueTeam);
                }
            }
        }
Beispiel #5
0
        public static void End(CTFTeam winTeam, CTFTeam loseTeam)
        {
            Message("The " + winTeam.teamColor + winTeam.name + c.def + " team won the game!");
            Message(winTeam.teamColor + winTeam.name + " captures: " + c.white + winTeam.captures.ToString() + " - " + loseTeam.teamColor + loseTeam.name + " captures: " + c.white + loseTeam.captures.ToString());
            foreach (Player p in winTeam.players.ToArray())
            {
                p.points += 20;
                p.wins++;
                p.gamesPlayed++;

            }
            foreach (Player p in Player.players.ToArray())
            {
                p.pointsThisGame = 0;
                p.hasTNT = false;
                p.hasMine = false;
            }

        }
Beispiel #6
0
        public static void captureFlag(Player returner, CTFTeam team)
        {
            Message(team.teamColor + team.name + c.def + " flag returned by " + team.teamColor + returner.name + c.def + "!");
            Message(team.teamColor + team.name + " captures: " + team.captures.ToString() + " - " + returner.opponentTeam().teamColor + returner.opponentTeam().name + " captures: " + c.def + returner.opponentTeam().captures);

            returner.flagsCaptured++;
            team.captures++;
            returner.points += 20;
            if (team.captures >= maxCaptures)
            {
                if (team.name.ToLower() == "blue")
                    End(blueTeam, redTeam);
                else
                    End(redTeam, blueTeam);

            }

        }