Ejemplo n.º 1
0
    public void crackdown()
    {
        App    app         = UnityEngine.Object.FindObjectOfType <App>();
        int    playerIndex = app.GetHumanIndex();
        Nation player      = State.getNations()[playerIndex];

        eventLogic.playerCrackDownOnRiot(currentEvent.Province);
        Province disputedProvince = State.getProvince(currentEvent.Province);

        if (currentEvent.OtherMajor != -1 && !player.culture.Equals(disputedProvince.getCulture()))
        {
            Nation         otherMajor = State.getNation(currentEvent.OtherMajor);
            EventResponder responder  = otherMajor.getAI().getEventResponder();
            if (responder.demandReferendum(otherMajor, player, disputedProvince))
            {
                //Now you need to update and re-open decision panel
                DecisionEvent newEvent = new DecisionEvent();
                eventLogic.initalizeAIDemandsreferendumEvent(newEvent, player, otherMajor, disputedProvince);
                currentEvent = newEvent;
                showDecisionPanel(player);
            }
            nextEventTurn(player);
        }
    }