My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
UpgradeType  
Updated Apr 14, 2011 by AHein...@gmail.com

Class header file: BWAPI/UpgradeType.h

The UpgradeType class is used to get information about a particular upgrade.

List of all UpgradeTypes.

Methods

getID

int getID() const;

Returns the unique ID for this upgrade type.

getName

std::string getName() const;

Returns the name for the upgrade type.

getRace

Race getRace() const;

Returns the race the upgrade is for. For example, UpgradeTypes::Terran_Infantry_Armor.getRace() will return Races::Terran.

mineralPrice

int mineralPrice(int level = 1) const;

Returns the mineral price for the specified upgrade level. For the base price, call mineralPrice(1).

mineralPriceFactor

int mineralPriceFactor() const;

Returns the amount that the mineral price increases for each additional upgrade.

gasPrice

int gasPrice(int level = 1) const;

Returns the vespene gas price for the specified upgrade level. For the base price, call gasPrice(1).

gasPriceFactor

int gasPriceFactor() const;

Returns the amount that the vespene gas price increases for each additional upgrade.

upgradeTime

int upgradeTime(int level = 1) const;

Returns the number of frames needed to research the specified upgrade level. For the base time, call upgradeTime(1).

upgradeTimeFactor

int upgradeTimeFactor() const;

Returns the number of frames that the upgrade time increases for each additional upgrade.

maxRepeats

int maxRepeats() const;

Returns the maximum number of times the upgrade can be researched.

whatUpgrades

UnitType whatUpgrades() const;

Returns the type of unit that researches the upgrade.

whatsRequired

UnitType whatsRequired(int level = 1) const;

Returns the type of unit that is required for the specified upgrade level.

whatUses

const std::set<UnitType>& whatUses() const;

Returns the set of units that are affected by this upgrade.

Non-Member Methods

getUpgradeType

UpgradeType getUpgradeType(std::string name);

Given a string, this will return the upgrade type.

allUpgradeTypes

std::set<UpgradeType>& allUpgradeTypes();

Returns the set of all the UpgradeTypes.


Sign in to add a comment
Powered by Google Project Hosting