public void StartExplorer(int stage)
        {
            var stageData  = _explorer.GetStage(stage);
            var staticData = _explorer.Stages[stage];

            //UpdateExplorerSlots();
            foreach (var temp in _units.State.LastTeam)
            {
                var data = _units.GetUnit(temp.Key).data;
                data.ExplorerPosition = temp.Value;
                data.Reserve          = false;
            }

            if (_units.ExplorerUnits.Length == 0)
            {
                throw new Exception("The number of selected units in exploration should be: 0 < count < 3");
            }
            if (!stageData.IsUnlock)
            {
                throw new Exception($"Stage is locked. stage_id = {stage}");
            }
            if (stageData.DailyNumber <= 0)
            {
                throw new Exception($"Ended up trying for today. stage_id = {stage}.");
            }
            if (!staticData.NoExit)
            {
                stageData.DailyNumber--;
            }
            _scorers.Spend(staticData.Price, _formula);
            _explorerLogic.StartExplorer(stage);
            LogicLog.SetExplorer(stage, LogExplorerType.Start);
        }
Ejemplo n.º 2
0
 public void  CheatStartExplorer(int stage)
 {
     for (var i = 1; i < 4; i++)
     {
         if (i <= _units.State.Units.Count)
         {
             var data = _units.State.Units[i - 1];
             data.ExplorerPosition = i;
             data.Reserve          = false;
         }
     }
     _explorerLogic.StartExplorer(stage);
 }