Exemplo 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);
            }
        }
    }
Exemplo n.º 2
0
    private void PopulateBossPredictionList()
    {
        //          2                           20            /         10
        int desiredBossPredictionsInList = _bossPredictionList.Count / _bossFrequency;

        if (_bossPredictionList.Where(x => { return(x != null); }).Count() < desiredBossPredictionsInList)
        {
            AIType           ai      = AIManager.GetRandomBossType();
            WavePredictionAI newBoss = new WavePredictionAI(ai, ai._aiTypeReference.AICombatType);

            _bossPredictionList.Add(newBoss);
            return;
        }

        _bossPredictionList.Add(null);
    }
Exemplo n.º 3
0
    private void InitialiseBossPredictionList()
    {
        for (int i = 0; i < _totalWavePredictionSize; i++)
        {
            if ((i + 1) % _bossFrequency == 0)
            {
                AIType           ai      = AIManager.GetRandomBossType();
                WavePredictionAI newBoss = new WavePredictionAI(ai, ai._aiTypeReference.AICombatType);

                _bossPredictionList.Add(newBoss);
            }
            else
            {
                _bossPredictionList.Add(null);
            }
        }
    }
Exemplo n.º 4
0
 public WavePredictionAI(AIType ai, CombatTypeBase combatType)
 {
     _aitype     = ai;
     _combatType = combatType;
 }