public void StartComplexEncounter(ComplexEncounter encounter)
 {
     currentComplexEncounter = encounter;
     currentInvestigator     = App.Model.investigatorModel.activeInvestigator;
     testIndex = 0;
     App.View.complexEncounterMenuView.StartComplexEncounter(encounter);
 }
示例#2
0
    public void SpawnNewExpedition()
    {
        ComplexEncounter newExpedition = App.Model.encounterModel.DrawExpeditionEncounter();
        Location         l             = App.Model.locationModel.FindLocationByName(newExpedition.title);

        l.ExpeditionEnteredLocation(new Expedition(newExpedition));
        App.View.locationView.LocationUpdated(l);
    }
示例#3
0
    public void StartPhase2(int newTestIndex)
    {
        App.Model.complexEncounterMenuModel.UpdateTestIndex(newTestIndex);
        App.View.complexEncounterMenuView.StartPhase2();
        ComplexEncounter encounter = App.Model.complexEncounterMenuModel.currentComplexEncounter;

        encounter.StartPhase2();
    }
    public ComplexEncounter DrawExpeditionEncounter()
    {
        if (expeditionEncounters.Count == 0)
        {
            expeditionEncounters = new List <ComplexEncounter>(expeditionEncountersDiscard);
            expeditionEncountersDiscard.Clear();
        }

        int index          = Random.Range(0, expeditionEncounters.Count);
        ComplexEncounter e = expeditionEncounters[index];

        expeditionEncountersDiscard.Add(e);
        expeditionEncounters.RemoveAt(index);
        return(e);
    }
    public ComplexEncounter DrawOtherWorldlyEncounter()
    {
        if (otherWorldlyEncounters.Count == 0)
        {
            otherWorldlyEncounters = new List <ComplexEncounter>(otherWorldlyEncountersDiscard);
            otherWorldlyEncountersDiscard.Clear();
        }

        int index          = Random.Range(0, otherWorldlyEncounters.Count);
        ComplexEncounter e = otherWorldlyEncounters[index];

        otherWorldlyEncountersDiscard.Add(e);
        otherWorldlyEncounters.RemoveAt(index);
        return(e);
    }
 public void StartComplexEncounter(ComplexEncounter encounter)
 {
     complexEncounterMenu.SetActive(true);
     App.Controller.openMenuController.OpenMenu(complexEncounterMenu);
     continueComplexEncounterButton.SetActive(false);
     encounterBlocks.SetActive(true);
     resultsText.text = "";
     complexEncounterMenuTitle.text = encounter.title;
     complexBlock1Text.text         = encounter.encounterTexts[0];
     complexBlock2Text.text         = encounter.encounterTexts[1];
     complexBlock3Text.text         = encounter.encounterTexts[2];
     complexBlock1Highlight.SetActive(true);
     complexBlock2Highlight.SetActive(false);
     complexBlock3Highlight.SetActive(false);
 }
示例#7
0
    public void StartTest1()
    {
        // Check if the Investigator died during the pre test
        Investigator active = App.Model.complexEncounterMenuModel.currentInvestigator;

        if (active.deathEncounter != null)
        {
            ContinueEncounter();
            return;
        }

        App.Model.complexEncounterMenuModel.TestStarted();
        ComplexEncounter encounter = App.Model.complexEncounterMenuModel.currentComplexEncounter;

        App.Controller.testController.StartTest(encounter.testStats[0], encounter.testModifiers[0], TestType.Test, active, Test1Complete);
    }
    public void ComplexEncounterComplete()
    {
        encounterBlocks.SetActive(false);

        ComplexEncounter e = App.Model.complexEncounterMenuModel.currentComplexEncounter;

        if (App.Model.complexEncounterMenuModel.passed)
        {
            resultsText.text = e.passTexts[App.Model.complexEncounterMenuModel.testIndex];
        }
        else
        {
            resultsText.text = e.failTexts[App.Model.complexEncounterMenuModel.testIndex];
        }
        continueComplexEncounterButton.SetActive(true);
    }
示例#9
0
    public void Test2Complete(List <int> results)
    {
        int numSuccesses = 0;

        foreach (int num in results)
        {
            if (num >= App.Model.complexEncounterMenuModel.currentInvestigator.SUCCESS)
            {
                numSuccesses++;
            }
        }

        App.Model.complexEncounterMenuModel.Test2Finished(numSuccesses > 0);

        ComplexEncounter encounter = App.Model.complexEncounterMenuModel.currentComplexEncounter;

        encounter.FinishPhase2(numSuccesses > 0); // encounter will call CompleteEncounter when its done
    }
示例#10
0
 public Expedition(ComplexEncounter e)
 {
     encounter = e;
 }
示例#11
0
 public void StartComplexEncounter(ComplexEncounter encounter)
 {
     App.Model.complexEncounterMenuModel.StartComplexEncounter(encounter);
     encounter.StartComplexEncounter(); // Should handle any pregain and then call StartComplexTest1 or StartPhase2 when its done
 }