Ejemplo n.º 1
0
        private static List <Unit> unitInitializer(unitInputData newInputData)
        {
            //include tech reqs for units that require extra buildings to be made
            Unit Probe    = new Unit(12, 50, 0, 1, "nexus", 0, "Probe");
            Unit warpGate = new Unit(7, 0, 0, 0, "gateway", 0, "warpGate"); //requires warpgate research to be donef

            //include warpGateResearch times for gateway units
            Unit Zealot  = new Unit(27, 100, 0, 2, "gateway", newInputData.numZealots, "Zealot", 20);
            Unit Stalker = new Unit(30, 125, 50, 2, "gateway", "cyberCore", newInputData.numStalkers, "Stalker", 23);
            Unit Sentry  = new Unit(26, 50, 100, 2, "gateway", "cyberCore", newInputData.numSentries, "Sentry", 23);
            Unit Adept   = new Unit(27, 100, 25, 2, "gateway", "cyberCore", newInputData.numAdepts, "Adept", 20);
            Unit HT      = new Unit(39, 50, 150, 2, "gateway", "templarArchives", newInputData.numHT, "HT", 32);
            Unit DT      = new Unit(39, 125, 125, 2, "gateway", "darkShrine", newInputData.numDT, "DT", 32);

            //robo units
            Unit Immortal  = new Unit(39, 250, 100, 4, "roboticsFacility", newInputData.numImmortals, "Immortal");
            Unit Observer  = new Unit(21, 25, 75, 1, "roboticsFacility", newInputData.numObservers, "Observer");
            Unit Collosus  = new Unit(54, 300, 200, 6, "roboticsFacility", "supportBay", newInputData.numCollosi, "Collosus");
            Unit Disruptor = new Unit(36, 150, 150, 3, "roboticsFacility", "supportBay", newInputData.numDisruptors, "Disruptor");
            Unit Prism     = new Unit(36, 200, 0, 2, "roboticsFacility", newInputData.numPrisms, "Prism");

            //stargate units
            Unit Oracle  = new Unit(36, 150, 150, 3, "stargate", newInputData.numOracles, "Oracle");
            Unit Voidray = new Unit(43, 250, 150, 4, "stargate", newInputData.numVoidrays, "Voidray");
            Unit Carrier = new Unit(86, 350, 250, 6, "stargate", "fleetBeacon", newInputData.numCarriers, "Carrier");
            Unit Tempest = new Unit(43, 300, 200, 6, "stargate", "fleetBeacon", newInputData.numTempests, "Tempest");
            Unit Phoenix = new Unit(25, 150, 100, 2, "stargate", newInputData.numPhoenix, "Phoenix");

            //add units to list
            List <Unit> unitList = new List <Unit> {
                Probe, warpGate, Zealot, Stalker, Sentry, Adept, HT, DT, Prism, Immortal, Observer, Collosus, Disruptor, Oracle, Voidray, Phoenix, Carrier, Tempest,
            };

            return(unitList);
        }
Ejemplo n.º 2
0
        public buildCreatorPreEcon(unitInputData newUnitInputData, upgradeInputData newUpgradeInputData)
        {
            //initialize units with game values and #needed (only add units needed)
            unitList = unitInitializer(newUnitInputData);

            //initialize builings with game values (add all buildings)
            buildingList = buildingInitializer();

            //initialize upgrades with game values (only add if upgrade is needed)
            upgradePackage = upgradeInitializer(newUpgradeInputData);

            //create building and unit objects with format to be used in pairs (also include upgrades)
            pairObjectsLibrary = initializeUnitBuildingPairObjects();

            //create parent/child list of buildings that need to be built
            buildingPairs = findTechTree();
        }