public override void Execute()
 {
     OwnFighters.Where(u => u.IsIdle).ForEach(u =>
     {
         u.Move(_rellyFightersTo, false);
         MyUnits.SetActivity(u, nameof(FightersRallyPoint));
     });
 }
Exemple #2
0
 public override void Execute()
 {
     if (!EnemiesInBase.Any())
     {
         return;
     }
     OwnFighters.Where(u => u.IsIdle)
     .ForEach(u =>
     {
         MyUnits.SetActivity(u, nameof(AttackEnemiesInBase));
         u.Attack(EnemiesInBase.First().Position, false);
     });
 }
Exemple #3
0
        public override void Execute()
        {
            if (Game.FrameCount % 20 != 0)
            {
                return;
            }
            var idleUnitsOfWantedTypeInMyBase =
                OwnFighters.Where(x => x.UnitType.Type == _unitType).Where(x => x.IsIdle).ToList();

            if (idleUnitsOfWantedTypeInMyBase.Count < _minCount)
            {
                return;
            }
            if (GameMemory.EnemyBuildings.Any())
            {
                AttackClosestEnemyBuilding(idleUnitsOfWantedTypeInMyBase);
                return;
            }

            ShiftAttackAllStartLocations(idleUnitsOfWantedTypeInMyBase);
        }