|
UpgradeType
Class header file: BWAPI/UpgradeType.h The UpgradeType class is used to get information about a particular upgrade. List of all UpgradeTypes.
MethodsgetIDint getID() const; Returns the unique ID for this upgrade type. getNamestd::string getName() const; Returns the name for the upgrade type. getRaceRace getRace() const; Returns the race the upgrade is for. For example, UpgradeTypes::Terran_Infantry_Armor.getRace() will return Races::Terran. mineralPriceint mineralPrice(int level = 1) const; Returns the mineral price for the specified upgrade level. For the base price, call mineralPrice(1). mineralPriceFactorint mineralPriceFactor() const; Returns the amount that the mineral price increases for each additional upgrade. gasPriceint gasPrice(int level = 1) const; Returns the vespene gas price for the specified upgrade level. For the base price, call gasPrice(1). gasPriceFactorint gasPriceFactor() const; Returns the amount that the vespene gas price increases for each additional upgrade. upgradeTimeint upgradeTime(int level = 1) const; Returns the number of frames needed to research the specified upgrade level. For the base time, call upgradeTime(1). upgradeTimeFactorint upgradeTimeFactor() const; Returns the number of frames that the upgrade time increases for each additional upgrade. maxRepeatsint maxRepeats() const; Returns the maximum number of times the upgrade can be researched. whatUpgradesUnitType whatUpgrades() const; Returns the type of unit that researches the upgrade. whatsRequiredUnitType whatsRequired(int level = 1) const; Returns the type of unit that is required for the specified upgrade level. whatUsesconst std::set<UnitType>& whatUses() const; Returns the set of units that are affected by this upgrade. Non-Member MethodsgetUpgradeTypeUpgradeType getUpgradeType(std::string name); Given a string, this will return the upgrade type. allUpgradeTypesstd::set<UpgradeType>& allUpgradeTypes(); Returns the set of all the UpgradeTypes. | |