Exemplo n.º 1
0
        public Point2D FindPlacement(Point2D target, Point2D size, uint type)
        {
            if (Tyr.Bot.MyRace == Race.Terran)
            {
                if (type != UnitTypes.REFINERY &&
                    type != UnitTypes.COMMAND_CENTER &&
                    type != UnitTypes.MISSILE_TURRET)
                {
                    return(TerranBuildingPlacement.FindPlacement(target, size, type));
                }
            }
            else if (Tyr.Bot.MyRace == Race.Protoss)
            {
                if (type != UnitTypes.ASSIMILATOR &&
                    type != UnitTypes.NEXUS &&
                    type != UnitTypes.PHOTON_CANNON &&
                    type != UnitTypes.SHIELD_BATTERY &&
                    Tyr.Bot.MapAnalyzer.StartArea[target] &&
                    !BuildCompact)
                {
                    return(ProtossBuildingPlacement.FindPlacement(target, size, type));
                }
            }
            Point2D result = findPlacementLocal(target, size, type, 20);

            if (type == UnitTypes.PYLON)
            {
                PylonsFilled = result == null;
            }
            return(result);
        }
Exemplo n.º 2
0
        public Point2D FindPlacement(Point2D target, Point2D size, uint type)
        {
            if (Tyr.Bot.MyRace == Race.Terran)
            {
                if (type != UnitTypes.REFINERY &&
                    type != UnitTypes.COMMAND_CENTER &&
                    type != UnitTypes.MISSILE_TURRET)
                {
                    return(TerranBuildingPlacement.FindPlacement(target, size, type));
                }
            }
            Point2D result = findPlacementLocal(target, size, type, 20);

            if (type == UnitTypes.PYLON)
            {
                PylonsFilled = result == null;
            }
            return(result);
        }