Esempio n. 1
0
    public void EndTurn()
    {
        if (gameAction.action == ActionType.Nothing)
        {
            ShowMessage("<color=red>You did not select an action for the turn!</color>", true);
            return;
        }
        else if (gameAction.action == ActionType.ResearchTechnology && gameAction.val1 == 255)
        {
            ShowMessage("<color=red>You did not select the technology to research!</color>", true);
            return;
        }
        else if (gameAction.action == ActionType.BuildImprovement)
        {
            if (gameAction.val2 == 255)
            {
                ShowMessage("<color=red>You did not select the improvement to build!</color>", true);
                return;
            }
            if (gameAction.val1 == 255)
            {
                ShowMessage("<color=red>You did not select the city where to build the improvement!</color>", true);
                return;
            }
        }

        engine.EndTurn(game.multiplayer, GD.thePlayer.ID, gameAction);
        // Disable endturn, and hide all views
        EndTurnButton.enabled = false;
        HideAllViews();
        playerAction = PlayerAction.Nothing;
        wtf          = WhatTheFuckStatus.GetLost;
        // Show the short version of the selected action
        ShowMessage("Action:\n" + gameAction.Display());
    }