Exemplo n.º 1
0
        public VirtualIntelligence(ref Map MapRef, Building HomeBase, Building Archery, Building Barraks, TeamAIStats MyStats, Color VITeamColor)
        {
            _teamColor = VITeamColor;

            _numOfWorkers    = 0;
            _numberSwordsman = 0;
            _numberArchers   = 0;
            _buildingsLeft   = 3;

            _mapRef  = MapRef;
            _myStats = MyStats;

            _homeBase        = HomeBase;
            _homeBase.Master = this;

            _archery        = Archery;
            _archery.Master = this;

            _barraks        = Barraks;
            _barraks.Master = this;

            switch (_myStats.AggressiveBias)
            {
            case BiasNames.Archers:
                _bias = new bias(CreateArcher);
                break;

            default:
                _bias = new bias(CreateSwords);
                break;
            }
        }
Exemplo n.º 2
0
        private void newTeamAIStats(int WorkerStartBoost, int WorkerToFighterRatio, int FighterToWorkerRatio, int SToA, int AToS, BiasNames bias)
        {
            TeamAIStats newStats = new TeamAIStats();

            newStats.workerStartBoost        = WorkerStartBoost;
            newStats.workerToFighterRatio    = WorkerToFighterRatio;
            newStats.fighterToWorkerRatio    = FighterToWorkerRatio;
            newStats.ArchersToSwordsmanRatio = AToS;
            newStats.SwordsmanToArchersRatio = SToA;
            newStats.AggressiveBias          = bias;
            _teams.Push(newStats);
        }