Esempio n. 1
0
    private void PopulateWavePredictionList()
    {
        // Maintain the same Combat TYpe for X rounds (see difficulty later on?)
        CombatTypeBase _chosenType = _wavePredictionList.Count > 0 ? _wavePredictionList[_wavePredictionList.Count - 1]._combatType : null;

        while (_wavePredictionList.Count < _totalWavePredictionSize)
        {
            _currentWavePrediction++;

            if (_chosenType == null || (_currentWavePrediction - 1) % _currentCombatTypePersistance == 0)
            {
                if (_chosenType != null)
                {
                    _currentCombatTypePersistance = _currentCombatTypePersistance <= 1 ? 1 : _currentCombatTypePersistance - 1;
                }

                _chosenType = AIManager.Instance.AvailableCombatTypes[Random.Range(0, AIManager.Instance.AvailableCombatTypes.Count)];
            }

            AIType           ai    = AIManager.GetRandomAIType();
            WavePredictionAI newAI = new WavePredictionAI(ai, _chosenType);
            _wavePredictionList.Add(newAI);

            if (_currentWavePrediction % _bossFrequency == 0)
            {
                _currentBossesDefeatedPrediction++;
                AIManager.BossDefeatPredicted(_currentBossesDefeatedPrediction);
            }
        }
    }