Exemplo n.º 1
0
    void _OnPlayerWonRound(PlayerWonRound e)
    {
        if (!active)
        {
            return;
        }

        if (e.winner_t == player)
        {
            if (player == Player.L)
            {
                PostAttackPhase(true, e.playerRWeapon);
            }
            else
            {
                PostAttackPhase(true, e.playerLWeapon);
            }
        }
        else
        {
            if (player == Player.L)
            {
                PostAttackPhase(false, e.playerRWeapon);
            }
            else
            {
                PostAttackPhase(false, e.playerLWeapon);
            }
        }
    }
Exemplo n.º 2
0
    void _OnPlayerWonRound(PlayerWonRound e)
    {
        currGameData.numWins[e.winner_t] += 1;
        if (e.winner_t == Player.NaN)
        {
            LogLine(e.winner_t, "STALEMATE!");
        }
        else
        {
            LogLine(e.winner_t, "WON THE ROUND. EARNING " + e.coinsEarned + " COINS");
            LogLine(Player.NaN, "CURRENT SCORE L-R: " + GameController.instance.GetPlayer(Player.L).score + "-" + GameController.instance.GetPlayer(Player.R).score + " COINS L-R: " + GameController.instance.GetPlayer(Player.L).coins + "-" + GameController.instance.GetPlayer(Player.R).coins);

            currGameData.currentWinStreak[e.winner_t] += 1;
            if (currGameData.currentWinStreak[e.winner_t] > currGameData.longestWinStreak[e.winner_t])
            {
                currGameData.longestWinStreak[e.winner_t] = currGameData.currentWinStreak[e.winner_t];
            }

            if (e.winner_t == Player.L)
            {
                currGameData.playerWeaponWins[Player.L][e.playerLWeapon] += 1;
            }
            else
            {
                currGameData.playerWeaponWins[Player.R][e.playerRWeapon] += 1;
            }


            Player opponent = GameController.instance.GetOpponentPlayerType(e.winner_t);
            currGameData.currentWinStreak[opponent] = 0;
        }
    }