BWAPI 4.2.0 An API for interacting with Starcraft: Broodwar (1.16.1) |
Public Member Functions | |
constexpr | UpgradeType (int id=UpgradeTypes::Enum::None) |
int | gasPrice (int level=1) const |
int | gasPriceFactor () const |
Race | getRace () const |
int | maxRepeats () const |
int | mineralPrice (int level=1) const |
int | mineralPriceFactor () const |
int | upgradeTime (int level=1) const |
int | upgradeTimeFactor () const |
UnitType | whatsRequired (int level=1) const |
UnitType | whatUpgrades () const |
const UnitType::set & | whatUses () const |
The upgrade type represents a passive upgrade that can be obtained with UnitInterface::upgrade.
UpgradeTypes::Enum::None
)Expected type constructor.
If the type is an invalid type, then it becomes Types::Unknown. A type is invalid if its value is less than 0 or greater than Types::Unknown.
id | The id that corresponds to this type. It is typically an integer value that corresponds to an internal Broodwar type. If the given id is invalid, then it becomes Types::Unknown. |
References BWAPI::UpgradeTypes::allUpgradeTypes().
Retrieves the race the upgrade is for.
For example, UpgradeTypes::Terran_Infantry_Armor.getRace() will return Races::Terran.
1
) constReturns the mineral price for the upgrade.
level | (optional) The next upgrade level. |
level
. The amount that the mineral price increases for each additional upgrade.
1
) constReturns the vespene gas price for the first upgrade.
level | (optional) The next upgrade level. |
level
. Returns the amount that the vespene gas price increases for each additional upgrade.
1
) constReturns the number of frames needed to research the first upgrade.
level | (optional) The next upgrade level. |
level
. Returns the number of frames that the upgrade time increases for each additional upgrade.
Returns the maximum number of times the upgrade can be researched.
Returns the type of unit that researches the upgrade.
1
) constReturns the type of unit that is required for the upgrade.
The player must have at least one of these units completed in order to start upgrading this upgrade.
level | (optional) The next upgrade level. |
Returns the set of units that are affected by this upgrade.