Exemplo n.º 1
0
    public void FinishAction()
    {
        Investigator i = App.Model.actionPhaseModel.investigators[App.Model.actionPhaseModel.turnIndex];

        i.GainHealth(App.Model.restModel.healthHeal);
        i.GainSanity(App.Model.restModel.sanityHeal);

        i.ActionPerformed("" + BasicActions.Rest);
        App.Controller.actionPhaseController.ActionPerformed();
    }
    public void PrepareTicket(bool ship)
    {
        App.View.prepareView.TicketPrepared();
        Investigator i = App.Model.actionPhaseModel.investigators[App.Model.actionPhaseModel.turnIndex];

        if (ship) // get ship
        {
            i.GetShipTicket();
        }
        else // get train
        {
            i.GetTrainTicket();
        }

        // Can Add Prepare Event Here
        i.ActionPerformed("" + BasicActions.Prepare);
        App.Controller.actionPhaseController.ActionPerformed();
    }
Exemplo n.º 3
0
    public void TravelEventFinished()
    {
        Investigator i = App.Model.actionPhaseModel.investigators[App.Model.actionPhaseModel.turnIndex];

        if (i.deathEncounter != null || i.delayed) // The Investigator died/became delayed during the travel event
        {
            i.ActionPerformed("" + BasicActions.Travel);
            App.Controller.actionPhaseController.ActionPerformed();
            return;
        }

        Connection c = App.Model.travelModel.currentPath;
        // Either open the ticket menu or end the action
        bool canUseShipTicket  = false;
        bool canUseTrainTicket = false;

        if (c.type != ConnectionType.Uncharted)
        {
            foreach (Connection con in c.destination.connections)
            {
                if (con.type == ConnectionType.Ship && i.shipTickets > 0)
                {
                    canUseShipTicket = true;
                }
                if (con.type == ConnectionType.Train && i.trainTickets > 0)
                {
                    canUseTrainTicket = true;
                }
            }
        }
        if (canUseShipTicket || canUseTrainTicket)
        {
            OpenUseTicketMenu();
        }
        else
        {
            FinishAction();
        }
    }