TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | Public Attributes | List of all members
cherrypi::BuildType Struct Reference

Represents and holds information about buildable types (units, upgrades, techs). More...

#include <buildtype.h>

Public Member Functions

bool isUnit () const
 
bool isUpgrade () const
 
bool isTech () const
 
bool isTerran () const
 
bool isProtoss () const
 
bool isZerg () const
 
 BuildType ()
 

Public Attributes

int unit = -1
 
int upgrade = -1
 
int tech = -1
 
const BuildTypebuilder = nullptr
 
double mineralCost = 0.0
 
double gasCost = 0.0
 
std::vector< const BuildType * > prerequisites
 
std::string name
 
int buildTime = 0
 
std::vector< const BuildType * > whatUses
 
int level = 0
 
const BuildTypeprev = nullptr
 
int race = 0
 See https://bwapi.github.io/namespace_b_w_a_p_i_1_1_races.html Zerg = 0 Terran = 1 Protoss = 2. More...
 
bool isAddon = false
 
bool isWorker = false
 
double supplyProvided = 0.0
 Amount by which this unit increases its race's supply cap. More...
 
double supplyRequired = 0.0
 Amount by which this unit consumes its race's supply cap. More...
 
bool isTwoUnitsInOneEgg = false
 
bool isRefinery = false
 
bool isMinerals = false
 
bool isGas = false
 
bool requiresPsi = false
 
bool requiresCreep = false
 
bool isBuilding = false
 
bool isResourceDepot = false
 
bool isResourceContainer = false
 
bool isSpecialBuilding = false
 
int dimensionLeft = 0
 
int dimensionUp = 0
 
int dimensionRight = 0
 
int dimensionDown = 0
 
int tileWidth = 0
 
int tileHeight = 0
 
bool hasAirWeapon = false
 
bool hasGroundWeapon = false
 
int numAirAttacks = 0
 
int numGroundAttacks = 0
 
bool canProduce = false
 
bool canBuildAddon = false
 
bool isFlyer = false
 
bool isDetector = false
 
int sightRange = 0
 Sight range in walktiles. More...
 
bool isNonUsable = false
 
double gScore = 0
 
double subjectiveValue = 0
 
int maxHp = 0
 
int maxShields = 0
 
int maxEnergy = 0
 
int airWeaponCooldown = 0
 
int groundWeaponCooldown = 0
 
int size = 0
 
bool isBiological = false
 
bool producesCreep = false
 
bool producesLarva = false
 
bool restrictedByDarkSwarm = false
 

Detailed Description

Represents and holds information about buildable types (units, upgrades, techs).

Only one instance exists of a given type, so pointer comparisons can be made. For upgrades, each level is treated as their own unique type. The buildtypes namespace has all of the useful types.

Many of these properties directly reference BWAPI properties. See: https://bwapi.github.io/class_b_w_a_p_i_1_1_unit_type.html https://bwapi.github.io/class_b_w_a_p_i_1_1_upgrade_type.html https://bwapi.github.io/class_b_w_a_p_i_1_1_tech_type.html

Constructor & Destructor Documentation

cherrypi::BuildType::BuildType ( )
inline

Member Function Documentation

bool cherrypi::BuildType::isProtoss ( ) const
inline
bool cherrypi::BuildType::isTech ( ) const
inline
bool cherrypi::BuildType::isTerran ( ) const
inline
bool cherrypi::BuildType::isUnit ( ) const
inline
bool cherrypi::BuildType::isUpgrade ( ) const
inline
bool cherrypi::BuildType::isZerg ( ) const
inline

Member Data Documentation

int cherrypi::BuildType::airWeaponCooldown = 0
const BuildType* cherrypi::BuildType::builder = nullptr
int cherrypi::BuildType::buildTime = 0
bool cherrypi::BuildType::canBuildAddon = false
bool cherrypi::BuildType::canProduce = false
int cherrypi::BuildType::dimensionDown = 0
int cherrypi::BuildType::dimensionLeft = 0
int cherrypi::BuildType::dimensionRight = 0
int cherrypi::BuildType::dimensionUp = 0
double cherrypi::BuildType::gasCost = 0.0
int cherrypi::BuildType::groundWeaponCooldown = 0
double cherrypi::BuildType::gScore = 0
bool cherrypi::BuildType::hasAirWeapon = false
bool cherrypi::BuildType::hasGroundWeapon = false
bool cherrypi::BuildType::isAddon = false
bool cherrypi::BuildType::isBiological = false
bool cherrypi::BuildType::isBuilding = false
bool cherrypi::BuildType::isDetector = false
bool cherrypi::BuildType::isFlyer = false
bool cherrypi::BuildType::isGas = false
bool cherrypi::BuildType::isMinerals = false
bool cherrypi::BuildType::isNonUsable = false
bool cherrypi::BuildType::isRefinery = false
bool cherrypi::BuildType::isResourceContainer = false
bool cherrypi::BuildType::isResourceDepot = false
bool cherrypi::BuildType::isSpecialBuilding = false
bool cherrypi::BuildType::isTwoUnitsInOneEgg = false
bool cherrypi::BuildType::isWorker = false
int cherrypi::BuildType::level = 0
int cherrypi::BuildType::maxEnergy = 0
int cherrypi::BuildType::maxHp = 0
int cherrypi::BuildType::maxShields = 0
double cherrypi::BuildType::mineralCost = 0.0
std::string cherrypi::BuildType::name
int cherrypi::BuildType::numAirAttacks = 0
int cherrypi::BuildType::numGroundAttacks = 0
std::vector<const BuildType*> cherrypi::BuildType::prerequisites
const BuildType* cherrypi::BuildType::prev = nullptr
bool cherrypi::BuildType::producesCreep = false
bool cherrypi::BuildType::producesLarva = false
int cherrypi::BuildType::race = 0

See https://bwapi.github.io/namespace_b_w_a_p_i_1_1_races.html Zerg = 0 Terran = 1 Protoss = 2.

bool cherrypi::BuildType::requiresCreep = false
bool cherrypi::BuildType::requiresPsi = false
bool cherrypi::BuildType::restrictedByDarkSwarm = false
int cherrypi::BuildType::sightRange = 0

Sight range in walktiles.

int cherrypi::BuildType::size = 0
double cherrypi::BuildType::subjectiveValue = 0
double cherrypi::BuildType::supplyProvided = 0.0

Amount by which this unit increases its race's supply cap.

In human-visible Brood War units, as opposed to BWAPI units (ie. a Marine is 1 instead of 2)

double cherrypi::BuildType::supplyRequired = 0.0

Amount by which this unit consumes its race's supply cap.

In human-visible Brood War units, as opposed to BWAPI units (ie. a Marine is 1 instead of 2)

int cherrypi::BuildType::tech = -1
int cherrypi::BuildType::tileHeight = 0
int cherrypi::BuildType::tileWidth = 0
int cherrypi::BuildType::unit = -1
int cherrypi::BuildType::upgrade = -1
std::vector<const BuildType*> cherrypi::BuildType::whatUses

The documentation for this struct was generated from the following file: