BWAPI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Public Attributes
BWAPI::UnitImpl Class Reference

#include <UnitImpl.h>

Inheritance diagram for BWAPI::UnitImpl:
Inheritance graph
[legend]
Collaboration diagram for BWAPI::UnitImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual int getID () const
virtual int getReplayID () const
virtual PlayergetPlayer () const
virtual UnitType getType () const
virtual Position getPosition () const
virtual TilePosition getTilePosition () const
virtual double getAngle () const
virtual double getVelocityX () const
virtual double getVelocityY () const
virtual BWAPI::RegiongetRegion () const
virtual int getLeft () const
virtual int getTop () const
virtual int getRight () const
virtual int getBottom () const
virtual int getHitPoints () const
virtual int getShields () const
virtual int getEnergy () const
virtual int getResources () const
virtual int getResourceGroup () const
virtual int getDistance (Unit *target) const
virtual int getDistance (Position target) const
virtual bool hasPath (Unit *target) const
virtual bool hasPath (Position target) const
virtual int getLastCommandFrame () const
virtual UnitCommand getLastCommand () const
virtual BWAPI::PlayergetLastAttackingPlayer () const
virtual int getUpgradeLevel (UpgradeType upgrade) const
virtual UnitType getInitialType () const
virtual Position getInitialPosition () const
virtual TilePosition getInitialTilePosition () const
virtual int getInitialHitPoints () const
virtual int getInitialResources () const
virtual int getKillCount () const
virtual int getAcidSporeCount () const
virtual int getInterceptorCount () const
virtual int getScarabCount () const
virtual int getSpiderMineCount () const
virtual int getGroundWeaponCooldown () const
virtual int getAirWeaponCooldown () const
virtual int getSpellCooldown () const
virtual int getDefenseMatrixPoints () const
virtual int getDefenseMatrixTimer () const
virtual int getEnsnareTimer () const
virtual int getIrradiateTimer () const
virtual int getLockdownTimer () const
virtual int getMaelstromTimer () const
virtual int getOrderTimer () const
virtual int getPlagueTimer () const
virtual int getRemoveTimer () const
virtual int getStasisTimer () const
virtual int getStimTimer () const
virtual UnitType getBuildType () const
virtual std::list< UnitTypegetTrainingQueue () const
virtual TechType getTech () const
virtual UpgradeType getUpgrade () const
virtual int getRemainingBuildTime () const
virtual int getRemainingTrainTime () const
virtual int getRemainingResearchTime () const
virtual int getRemainingUpgradeTime () const
virtual UnitgetBuildUnit () const
virtual UnitgetTarget () const
virtual Position getTargetPosition () const
virtual Order getOrder () const
virtual UnitgetOrderTarget () const
virtual Position getOrderTargetPosition () const
virtual Order getSecondaryOrder () const
virtual Position getRallyPosition () const
virtual UnitgetRallyUnit () const
virtual UnitgetAddon () const
virtual UnitgetNydusExit () const
virtual UnitgetPowerUp () const
virtual UnitgetTransport () const
virtual std::set< Unit * > getLoadedUnits () const
virtual UnitgetCarrier () const
virtual std::set< Unit * > getInterceptors () const
virtual UnitgetHatchery () const
virtual std::set< Unit * > getLarva () const
virtual std::set< Unit * > & getUnitsInRadius (int radius) const
virtual std::set< Unit * > & getUnitsInWeaponRange (WeaponType weapon) const
virtual void * getClientInfo () const
virtual void setClientInfo (void *clientinfo)
virtual bool exists () const
virtual bool hasNuke () const
virtual bool isAccelerating () const
virtual bool isAttackFrame () const
virtual bool isAttacking () const
virtual bool isBeingConstructed () const
virtual bool isBeingGathered () const
virtual bool isBeingHealed () const
virtual bool isBlind () const
virtual bool isBraking () const
virtual bool isBurrowed () const
virtual bool isCarryingGas () const
virtual bool isCarryingMinerals () const
virtual bool isCloaked () const
virtual bool isCompleted () const
virtual bool isConstructing () const
virtual bool isDefenseMatrixed () const
virtual bool isDetected () const
virtual bool isEnsnared () const
virtual bool isFollowing () const
virtual bool isGatheringGas () const
virtual bool isGatheringMinerals () const
virtual bool isHallucination () const
virtual bool isHoldingPosition () const
virtual bool isIdle () const
virtual bool isInWeaponRange (Unit *target) const
virtual bool isInterruptible () const
virtual bool isInvincible () const
virtual bool isIrradiated () const
virtual bool isLifted () const
virtual bool isLoaded () const
virtual bool isLockedDown () const
virtual bool isMaelstrommed () const
virtual bool isMorphing () const
virtual bool isMoving () const
virtual bool isParasited () const
virtual bool isPatrolling () const
virtual bool isPlagued () const
virtual bool isRepairing () const
virtual bool isResearching () const
virtual bool isSelected () const
virtual bool isSieged () const
virtual bool isStartingAttack () const
virtual bool isStasised () const
virtual bool isStimmed () const
virtual bool isStuck () const
virtual bool isTraining () const
virtual bool isUnderAttack () const
virtual bool isUnderDarkSwarm () const
virtual bool isUnderDisruptionWeb () const
virtual bool isUnderStorm () const
virtual bool isUnpowered () const
virtual bool isUpgrading () const
virtual bool isVisible () const
virtual bool isVisible (Player *player) const
virtual bool canIssueCommand (UnitCommand c) const
virtual bool issueCommand (UnitCommand command)
virtual bool attack (Position target, bool shiftQueueCommand=false)
virtual bool attack (Unit *target, bool shiftQueueCommand=false)
virtual bool build (TilePosition target, UnitType type)
virtual bool buildAddon (UnitType type)
virtual bool train (UnitType type)
virtual bool morph (UnitType type)
virtual bool research (TechType tech)
virtual bool upgrade (UpgradeType upgrade)
virtual bool setRallyPoint (Position target)
virtual bool setRallyPoint (Unit *target)
virtual bool move (Position target, bool shiftQueueCommand=false)
virtual bool patrol (Position target, bool shiftQueueCommand=false)
virtual bool holdPosition (bool shiftQueueCommand=false)
virtual bool stop (bool shiftQueueCommand=false)
virtual bool follow (Unit *target, bool shiftQueueCommand=false)
virtual bool gather (Unit *target, bool shiftQueueCommand=false)
virtual bool returnCargo (bool shiftQueueCommand=false)
virtual bool repair (Unit *target, bool shiftQueueCommand=false)
virtual bool burrow ()
virtual bool unburrow ()
virtual bool cloak ()
virtual bool decloak ()
virtual bool siege ()
virtual bool unsiege ()
virtual bool lift ()
virtual bool land (TilePosition target)
virtual bool load (Unit *target, bool shiftQueueCommand=false)
virtual bool unload (Unit *target)
virtual bool unloadAll (bool shiftQueueCommand=false)
virtual bool unloadAll (Position target, bool shiftQueueCommand=false)
virtual bool rightClick (Position target, bool shiftQueueCommand=false)
virtual bool rightClick (Unit *target, bool shiftQueueCommand=false)
virtual bool haltConstruction ()
virtual bool cancelConstruction ()
virtual bool cancelAddon ()
virtual bool cancelTrain (int slot=-2)
virtual bool cancelMorph ()
virtual bool cancelResearch ()
virtual bool cancelUpgrade ()
virtual bool useTech (TechType tech)
virtual bool useTech (TechType tech, Position target)
virtual bool useTech (TechType tech, Unit *target)
virtual bool placeCOP (TilePosition target)
 UnitImpl (BW::Unit *originalUnit, u16 index)
 ~UnitImpl ()
void die ()
void setID (int newID)
bool canAccess () const
bool canAccessDetected () const
bool canAccessInside () const
u16 getIndex () const
void setSelected (bool selectedState)
void setLoaded (bool loadedState)
UnitImplgetNext () const
void saveInitialState ()
void updateInternalData ()
void updateData ()
void clear ()
void saveInitialState ()
 UnitImpl (int id)
virtual int getID () const
virtual int getReplayID () const
virtual PlayergetPlayer () const
virtual UnitType getType () const
virtual Position getPosition () const
virtual TilePosition getTilePosition () const
virtual double getAngle () const
virtual double getVelocityX () const
virtual double getVelocityY () const
virtual BWAPI::RegiongetRegion () const
virtual int getLeft () const
virtual int getTop () const
virtual int getRight () const
virtual int getBottom () const
virtual int getHitPoints () const
virtual int getShields () const
virtual int getEnergy () const
virtual int getResources () const
virtual int getResourceGroup () const
virtual int getDistance (Unit *target) const
virtual int getDistance (Position target) const
virtual bool hasPath (Unit *target) const
virtual bool hasPath (Position target) const
virtual int getLastCommandFrame () const
virtual UnitCommand getLastCommand () const
virtual BWAPI::PlayergetLastAttackingPlayer () const
virtual int getUpgradeLevel (UpgradeType upgrade) const
virtual UnitType getInitialType () const
virtual Position getInitialPosition () const
virtual TilePosition getInitialTilePosition () const
virtual int getInitialHitPoints () const
virtual int getInitialResources () const
virtual int getKillCount () const
virtual int getAcidSporeCount () const
virtual int getInterceptorCount () const
virtual int getScarabCount () const
virtual int getSpiderMineCount () const
virtual int getGroundWeaponCooldown () const
virtual int getAirWeaponCooldown () const
virtual int getSpellCooldown () const
virtual int getDefenseMatrixPoints () const
virtual int getDefenseMatrixTimer () const
virtual int getEnsnareTimer () const
virtual int getIrradiateTimer () const
virtual int getLockdownTimer () const
virtual int getMaelstromTimer () const
virtual int getOrderTimer () const
virtual int getPlagueTimer () const
virtual int getRemoveTimer () const
virtual int getStasisTimer () const
virtual int getStimTimer () const
virtual UnitType getBuildType () const
virtual std::list< UnitTypegetTrainingQueue () const
virtual TechType getTech () const
virtual UpgradeType getUpgrade () const
virtual int getRemainingBuildTime () const
virtual int getRemainingTrainTime () const
virtual int getRemainingResearchTime () const
virtual int getRemainingUpgradeTime () const
virtual UnitgetBuildUnit () const
virtual UnitgetTarget () const
virtual Position getTargetPosition () const
virtual Order getOrder () const
virtual UnitgetOrderTarget () const
virtual Position getOrderTargetPosition () const
virtual Order getSecondaryOrder () const
virtual Position getRallyPosition () const
virtual UnitgetRallyUnit () const
virtual UnitgetAddon () const
virtual UnitgetNydusExit () const
virtual UnitgetPowerUp () const
virtual UnitgetTransport () const
virtual std::set< Unit * > getLoadedUnits () const
virtual UnitgetCarrier () const
virtual std::set< Unit * > getInterceptors () const
virtual UnitgetHatchery () const
virtual std::set< Unit * > getLarva () const
virtual std::set< Unit * > & getUnitsInRadius (int radius) const
virtual std::set< Unit * > & getUnitsInWeaponRange (WeaponType weapon) const
virtual void * getClientInfo () const
virtual void setClientInfo (void *clientinfo)
virtual bool exists () const
virtual bool hasNuke () const
virtual bool isAccelerating () const
virtual bool isAttackFrame () const
virtual bool isAttacking () const
virtual bool isBeingConstructed () const
virtual bool isBeingGathered () const
virtual bool isBeingHealed () const
virtual bool isBlind () const
virtual bool isBraking () const
virtual bool isBurrowed () const
virtual bool isCarryingGas () const
virtual bool isCarryingMinerals () const
virtual bool isCloaked () const
virtual bool isCompleted () const
virtual bool isConstructing () const
virtual bool isDefenseMatrixed () const
virtual bool isDetected () const
virtual bool isEnsnared () const
virtual bool isFollowing () const
virtual bool isGatheringGas () const
virtual bool isGatheringMinerals () const
virtual bool isHallucination () const
virtual bool isHoldingPosition () const
virtual bool isIdle () const
virtual bool isInWeaponRange (Unit *target) const
virtual bool isInterruptible () const
virtual bool isInvincible () const
virtual bool isIrradiated () const
virtual bool isLifted () const
virtual bool isLoaded () const
virtual bool isLockedDown () const
virtual bool isMaelstrommed () const
virtual bool isMorphing () const
virtual bool isMoving () const
virtual bool isParasited () const
virtual bool isPatrolling () const
virtual bool isPlagued () const
virtual bool isRepairing () const
virtual bool isResearching () const
virtual bool isSelected () const
virtual bool isSieged () const
virtual bool isStartingAttack () const
virtual bool isStasised () const
virtual bool isStimmed () const
virtual bool isStuck () const
virtual bool isTraining () const
virtual bool isUnderAttack () const
virtual bool isUnderDarkSwarm () const
virtual bool isUnderDisruptionWeb () const
virtual bool isUnderStorm () const
virtual bool isUnpowered () const
virtual bool isUpgrading () const
virtual bool isVisible () const
virtual bool isVisible (Player *player) const
virtual bool canIssueCommand (UnitCommand command) const
virtual bool issueCommand (UnitCommand command)
virtual bool attack (Position target, bool shiftQueueCommand=false)
virtual bool attack (Unit *target, bool shiftQueueCommand=false)
virtual bool build (TilePosition target, UnitType type)
virtual bool buildAddon (UnitType type)
virtual bool train (UnitType type)
virtual bool morph (UnitType type)
virtual bool research (TechType tech)
virtual bool upgrade (UpgradeType upgrade)
virtual bool setRallyPoint (Position target)
virtual bool setRallyPoint (Unit *target)
virtual bool move (Position target, bool shiftQueueCommand=false)
virtual bool patrol (Position target, bool shiftQueueCommand=false)
virtual bool holdPosition (bool shiftQueueCommand=false)
virtual bool stop (bool shiftQueueCommand=false)
virtual bool follow (Unit *target, bool shiftQueueCommand=false)
virtual bool gather (Unit *target, bool shiftQueueCommand=false)
virtual bool returnCargo (bool shiftQueueCommand=false)
virtual bool repair (Unit *target, bool shiftQueueCommand=false)
virtual bool burrow ()
virtual bool unburrow ()
virtual bool cloak ()
virtual bool decloak ()
virtual bool siege ()
virtual bool unsiege ()
virtual bool lift ()
virtual bool land (TilePosition target)
virtual bool load (Unit *target, bool shiftQueueCommand=false)
virtual bool unload (Unit *target)
virtual bool unloadAll (bool shiftQueueCommand=false)
virtual bool unloadAll (Position target, bool shiftQueueCommand=false)
virtual bool rightClick (Position target, bool shiftQueueCommand=false)
virtual bool rightClick (Unit *target, bool shiftQueueCommand=false)
virtual bool haltConstruction ()
virtual bool cancelConstruction ()
virtual bool cancelAddon ()
virtual bool cancelTrain (int slot=-2)
virtual bool cancelMorph ()
virtual bool cancelResearch ()
virtual bool cancelUpgrade ()
virtual bool useTech (TechType tech)
virtual bool useTech (TechType tech, Position target)
virtual bool useTech (TechType tech, Unit *target)
virtual bool placeCOP (TilePosition target)

Static Public Member Functions

static UnitImplBWUnitToBWAPIUnit (BW::Unit *unit)

Public Attributes

Player_getPlayer
UnitType _getType
Position _getPosition
int _getResources
int _getHitPoints
bool _isCompleted
bool wasCompleted
Unit_getTransport
BW::UnitgetOriginalRawData
u8 getBuildQueueSlot
BWAPI::UnitType getBuildQueue [5]
bool hasEmptyBuildQueue
UnitData data
UnitDataself
bool userSelected
bool staticInformation
bool nukeDetected
Position nukePosition
int lastGroundWeaponCooldown
int lastAirWeaponCooldown
int lastFrameSet
bool startingAttack
UnitType lastType
PlayerlastPlayer
int id
bool isAlive
bool wasAlive
bool wasAccessible
bool wasVisible
std::set< Unit * > connectedUnits
std::set< Unit * > loadedUnits
int lastCommandFrame
UnitCommand lastCommand
void * clientInfo

Detailed Description

Interface for broodwar unit, can be used to obtain any information and issue commands.


Constructor & Destructor Documentation

BWAPI::UnitImpl::UnitImpl ( BW::Unit originalUnit,
u16  index 
)

Member Function Documentation

virtual bool BWAPI::UnitImpl::attack ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to attack move to the specified location.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::attack ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to attack the specified unit.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::attack ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to attack move to the specified location.

Implements BWAPI::Unit.

Here is the call graph for this function:

bool BWAPI::UnitImpl::attack ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to attack the specified unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::build ( TilePosition  target,
UnitType  type 
) [virtual]

Orders the unit to build the given unit type at the given position. Note that if the player does not have enough resources when the unit attempts to place the building down, the order will fail. The tile position specifies where the top left corner of the building will be placed.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::build ( TilePosition  target,
UnitType  type 
) [virtual]

Orders the unit to build the given unit type at the given position. Note that if the player does not have enough resources when the unit attempts to place the building down, the order will fail. The tile position specifies where the top left corner of the building will be placed.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::buildAddon ( UnitType  type) [virtual]

Orders the unit to build the given addon. The unit must be a Terran building that can have an addon and the specified unit type must be an addon unit type.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::buildAddon ( UnitType  type) [virtual]

Orders the unit to build the given addon. The unit must be a Terran building that can have an addon and the specified unit type must be an addon unit type.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::burrow ( ) [virtual]

Orders the unit to burrow. Either the unit must be a Zerg Lurker, or the unit must be a Zerg ground unit and burrow tech must be researched.

See also:
: Unit::unburrow, Unit::isBurrowed.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::burrow ( ) [virtual]

Orders the unit to burrow. Either the unit must be a Zerg Lurker, or the unit must be a Zerg ground unit and burrow tech must be researched.

See also:
: Unit::unburrow, Unit::isBurrowed.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::cancelAddon ( ) [virtual]

Orders the unit to stop making the addon.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::cancelAddon ( ) [virtual]

Orders the unit to stop making the addon.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::cancelConstruction ( ) [virtual]

Orders the building to stop being constructed.

See also:
Unit::beingConstructed.

Implements BWAPI::Unit.

Orders the building to stop being constructed.

See also:
Unit::beingConstructed.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::cancelMorph ( ) [virtual]

Orders the unit to stop morphing.

See also:
Unit::morph, Unit::isMorphing.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::cancelMorph ( ) [virtual]

Orders the unit to stop morphing.

See also:
Unit::morph, Unit::isMorphing.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::cancelResearch ( ) [virtual]

Orders the unit to cancel a research in progress.

See also:
Unit::research, Unit::isResearching, Unit::getTech.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::cancelResearch ( ) [virtual]

Orders the unit to cancel a research in progress.

See also:
Unit::research, Unit::isResearching, Unit::getTech.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::cancelTrain ( int  slot = -2) [virtual]

Orders the unit to remove the specified unit from its training queue.

See also:
Unit::train, Unit::cancelTrain, Unit::isTraining, Unit::getTrainingQueue.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::cancelTrain ( int  slot = -2) [virtual]

Orders the unit to remove the specified unit from its training queue.

See also:
Unit::train, Unit::cancelTrain, Unit::isTraining, Unit::getTrainingQueue.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::cancelUpgrade ( ) [virtual]

Orders the unit to cancel an upgrade in progress.

See also:
Unit::upgrade, Unit::isUpgrading, Unit::getUpgrade.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::cancelUpgrade ( ) [virtual]

Orders the unit to cancel an upgrade in progress.

See also:
Unit::upgrade, Unit::isUpgrading, Unit::getUpgrade.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::canIssueCommand ( UnitCommand  command) const [virtual]

Returns true if the unit is able to execute the given command, or false if there is an error

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::canIssueCommand ( UnitCommand  command) const [virtual]

Returns true if the unit is able to execute the given command, or false if there is an error

Implements BWAPI::Unit.

Here is the caller graph for this function:

void BWAPI::UnitImpl::clear ( )
virtual bool BWAPI::UnitImpl::cloak ( ) [virtual]

Orders the unit to cloak.

See also:
: Unit::decloak, Unit::isCloaked.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::cloak ( ) [virtual]

Orders the unit to cloak.

See also:
: Unit::decloak, Unit::isCloaked.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::decloak ( ) [virtual]

Orders the unit to decloak.

See also:
: Unit::cloak, Unit::isCloaked.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::decloak ( ) [virtual]

Orders the unit to decloak.

See also:
: Unit::cloak, Unit::isCloaked.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::exists ( ) const [virtual]

3 cases to consider:

  • If exists() returns true, the unit exists.
  • If exists() returns false and the unit is owned by self(), then the unit does not exist.
  • If exists() returns false and the unit is not owned by self(), then the unit may or may not exist.
See also:
Unit::isVisible.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::exists ( ) const [virtual]

3 cases to consider:

  • If exists() returns true, the unit exists.
  • If exists() returns false and the unit is owned by self(), then the unit does not exist.
  • If exists() returns false and the unit is not owned by self(), then the unit may or may not exist.
See also:
Unit::isVisible.

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::follow ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to follow the specified unit.

See also:
Unit::isFollowing.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::follow ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to follow the specified unit.

See also:
Unit::isFollowing.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::gather ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to gather the specified unit (must be mineral or refinery type).

See also:
Unit::isGatheringGas, Unit::isGatheringMinerals.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::gather ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to gather the specified unit (must be mineral or refinery type).

See also:
Unit::isGatheringGas, Unit::isGatheringMinerals.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual int BWAPI::UnitImpl::getAcidSporeCount ( ) const [virtual]

Returns the unit's acid spore count.

Implements BWAPI::Unit.

Returns the unit's acid spore count.

Implements BWAPI::Unit.

virtual Unit* BWAPI::UnitImpl::getAddon ( ) const [virtual]

Returns the add-on of this unit, or NULL if the unit doesn't have an add-on.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getAddon ( ) const [virtual]

Returns the add-on of this unit, or NULL if the unit doesn't have an add-on.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual int BWAPI::UnitImpl::getAirWeaponCooldown ( ) const [virtual]

Returns unit's air weapon cooldown. It is 0 if the unit is ready to attack.

Implements BWAPI::Unit.

Returns unit's air weapon cooldown. It is 0 if the unit is ready to attack.

Implements BWAPI::Unit.

virtual double BWAPI::UnitImpl::getAngle ( ) const [virtual]

Returns the direction the unit is facing, measured in radians. An angle of 0 means the unit is facing east.

Implements BWAPI::Unit.

double BWAPI::UnitImpl::getAngle ( ) const [virtual]

Returns the direction the unit is facing, measured in radians. An angle of 0 means the unit is facing east.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getBottom ( ) const [virtual]

Returns the Y coordinate of the bottom side of the unit.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getBottom ( ) const [virtual]

Returns the Y coordinate of the bottom side of the unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual UnitType BWAPI::UnitImpl::getBuildType ( ) const [virtual]

Returns the building type a worker is about to construct. If the unit is a morphing Zerg unit or an incomplete building, this returns the UnitType the unit is about to become upon completion.

Implements BWAPI::Unit.

Returns the building type a worker is about to construct. If the unit is a morphing Zerg unit or an incomplete building, this returns the UnitType the unit is about to become upon completion.

Implements BWAPI::Unit.

virtual Unit* BWAPI::UnitImpl::getBuildUnit ( ) const [virtual]

If the unit is an SCV that is constructing a building, this will return the building it is constructing. If the unit is a Terran building that is being constructed, this will return the SCV that is constructing it.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getBuildUnit ( ) const [virtual]

If the unit is an SCV that is constructing a building, this will return the building it is constructing. If the unit is a Terran building that is being constructed, this will return the SCV that is constructing it.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Unit* BWAPI::UnitImpl::getCarrier ( ) const [virtual]

For Protoss Interceptors, this returns the Carrier unit this Interceptor is controlled by. For all other unit types this function returns NULL.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getCarrier ( ) const [virtual]

For Protoss Interceptors, this returns the Carrier unit this Interceptor is controlled by. For all other unit types this function returns NULL.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void* BWAPI::UnitImpl::getClientInfo ( ) const [virtual]

Returns the unit's custom client info. The client is responsible for deallocation.

Implements BWAPI::Unit.

void * BWAPI::UnitImpl::getClientInfo ( ) const [virtual]

Returns the unit's custom client info. The client is responsible for deallocation.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getDefenseMatrixPoints ( ) const [virtual]

Returns the remaining hit points of the defense matrix. Initially a defense Matrix has 250 points.

See also:
Unit::getDefenseMatrixTimer, Unit::isDefenseMatrixed.

Implements BWAPI::Unit.

Returns the remaining hit points of the defense matrix. Initially a defense Matrix has 250 points.

See also:
Unit::getDefenseMatrixTimer, Unit::isDefenseMatrixed.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getDefenseMatrixTimer ( ) const [virtual]

Returns the time until the defense matrix wears off. 0 -> No defense Matrix present.

Implements BWAPI::Unit.

Returns the time until the defense matrix wears off. 0 -> No defense Matrix present.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getDistance ( Unit target) const [virtual]

Returns the edge-to-edge distance between the current unit and the target unit.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getDistance ( Position  target) const [virtual]

Returns the distance from the edge of the current unit to the target position.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getDistance ( Unit target) const [virtual]

Returns the edge-to-edge distance between the current unit and the target unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

int BWAPI::UnitImpl::getDistance ( Position  target) const [virtual]

Returns the distance from the edge of the current unit to the target position.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual int BWAPI::UnitImpl::getEnergy ( ) const [virtual]

Returns the unit's current amount of energy.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getEnergy ( ) const [virtual]

Returns the unit's current amount of energy.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getEnsnareTimer ( ) const [virtual]

Returns the time until the ensnare effect wears off. 0 -> No ensnare effect present.

Implements BWAPI::Unit.

Returns the time until the ensnare effect wears off. 0 -> No ensnare effect present.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getGroundWeaponCooldown ( ) const [virtual]

Returns unit's ground weapon cooldown. It is 0 if the unit is ready to attack.

Implements BWAPI::Unit.

Returns unit's ground weapon cooldown. It is 0 if the unit is ready to attack.

Implements BWAPI::Unit.

virtual Unit* BWAPI::UnitImpl::getHatchery ( ) const [virtual]

For Zerg Larva, this returns the Hatchery, Lair, or Hive unit this Larva was spawned from. For all other unit types this function returns NULL.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getHatchery ( ) const [virtual]

For Zerg Larva, this returns the Hatchery, Lair, or Hive unit this Larva was spawned from. For all other unit types this function returns NULL.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int BWAPI::UnitImpl::getHitPoints ( ) const [virtual]

Returns the unit's current amount of hit points.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getHitPoints ( ) const [virtual]

Returns the unit's current amount of hit points.

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual int BWAPI::UnitImpl::getID ( ) const [virtual]

Returns a unique ID for this unit. It simply casts the unit's address as an integer, since each unit has a unique address.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getID ( ) const [virtual]

Returns a unique ID for this unit. It simply casts the unit's address as an integer, since each unit has a unique address.

Implements BWAPI::Unit.

Here is the caller graph for this function:

Gets index of the unit in the unit array. Note that the index is same for the original unit array, BWAPI::Unit array and BWAI::Unit array, so it is good way to compare units of different types and for conversion.

Returns:
0-based index of the unit in the unit array.

Here is the caller graph for this function:

virtual int BWAPI::UnitImpl::getInitialHitPoints ( ) const [virtual]

Returns the unit's initial amount of hit points, or 0 if it wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

Returns the unit's initial amount of hit points, or 0 if it wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

virtual Position BWAPI::UnitImpl::getInitialPosition ( ) const [virtual]

Returns the initial position of the unit on the map, or Positions::Unknown if the unit wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

Returns the initial position of the unit on the map, or Positions::Unknown if the unit wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getInitialResources ( ) const [virtual]

Returns the unit's initial amount of containing resources, or 0 if the unit wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

Returns the unit's initial amount of containing resources, or 0 if the unit wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

Returns the initial build tile position of the unit on the map, or TilePositions::Unknown if the unit wasn't a neutral unit at the beginning of the game. The tile position is of the top left corner of the building.

Implements BWAPI::Unit.

Returns the initial build tile position of the unit on the map, or TilePositions::Unknown if the unit wasn't a neutral unit at the beginning of the game. The tile position is of the top left corner of the building.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual UnitType BWAPI::UnitImpl::getInitialType ( ) const [virtual]

Returns the initial type of the unit or Unknown if it wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

Returns the initial type of the unit or Unknown if it wasn't a neutral unit at the beginning of the game.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getInterceptorCount ( ) const [virtual]

Returns the number of interceptors the Protoss Carrier has.

Implements BWAPI::Unit.

Returns the number of interceptors the Protoss Carrier has.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual std::set<Unit*> BWAPI::UnitImpl::getInterceptors ( ) const [virtual]

Returns the set of interceptors controlled by this unit. If the unit has no interceptors, or is not a Carrier, this function returns an empty set.

Implements BWAPI::Unit.

std::set< Unit * > BWAPI::UnitImpl::getInterceptors ( ) const [virtual]

Returns the set of interceptors controlled by this unit. If the unit has no interceptors, or is not a Carrier, this function returns an empty set.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual int BWAPI::UnitImpl::getIrradiateTimer ( ) const [virtual]

Returns the time until the radiation wears off. 0 -> No radiation present.

Implements BWAPI::Unit.

Returns the time until the radiation wears off. 0 -> No radiation present.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getKillCount ( ) const [virtual]

Returns the unit's current kill count.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getKillCount ( ) const [virtual]

Returns the unit's current kill count.

Implements BWAPI::Unit.

virtual std::set<Unit*> BWAPI::UnitImpl::getLarva ( ) const [virtual]

Returns the set of larva spawned by this unit. If the unit has no larva, or is not a Hatchery, Lair, or Hive, this function returns an empty set. Equivalent to clicking "Select Larva" from the Starcraft GUI.

Implements BWAPI::Unit.

std::set< Unit * > BWAPI::UnitImpl::getLarva ( ) const [virtual]

Returns the set of larva spawned by this unit. If the unit has no larva, or is not a Hatchery, Lair, or Hive, this function returns an empty set. Equivalent to clicking "Select Larva" from the Starcraft GUI.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the player that last attacked this unit.

Implements BWAPI::Unit.

Returns the player that last attacked this unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual UnitCommand BWAPI::UnitImpl::getLastCommand ( ) const [virtual]

Returns the last successful command.

Implements BWAPI::Unit.

Returns the last successful command.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getLastCommandFrame ( ) const [virtual]

Returns the frame of the last successful command. Frame is comparable to Game::getFrameCount().

Implements BWAPI::Unit.

Returns the frame of the last successful command. Frame is comparable to Game::getFrameCount().

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getLeft ( ) const [virtual]

Returns the X coordinate of the left side of the unit.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getLeft ( ) const [virtual]

Returns the X coordinate of the left side of the unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::set<Unit*> BWAPI::UnitImpl::getLoadedUnits ( ) const [virtual]

Returns a list of the units loaded into a Terran Bunker, Terran Dropship, Protoss Shuttle, or Zerg Overlord.

Implements BWAPI::Unit.

std::set< Unit * > BWAPI::UnitImpl::getLoadedUnits ( ) const [virtual]

Returns a list of the units loaded into a Terran Bunker, Terran Dropship, Protoss Shuttle, or Zerg Overlord.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getLockdownTimer ( ) const [virtual]

Returns the time until the lockdown wears off. 0 -> No lockdown present.

Implements BWAPI::Unit.

Returns the time until the lockdown wears off. 0 -> No lockdown present.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getMaelstromTimer ( ) const [virtual]

Returns the time until the maelstrom wears off. 0 -> No maelstrom present.

Implements BWAPI::Unit.

Returns the time until the maelstrom wears off. 0 -> No maelstrom present.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual Unit* BWAPI::UnitImpl::getNydusExit ( ) const [virtual]

Returns the corresponding connected nydus canal of this unit, or NULL if the unit does not have a connected nydus canal.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getNydusExit ( ) const [virtual]

Returns the corresponding connected nydus canal of this unit, or NULL if the unit does not have a connected nydus canal.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual Order BWAPI::UnitImpl::getOrder ( ) const [virtual]

Implements BWAPI::Unit.

Order BWAPI::UnitImpl::getOrder ( ) const [virtual]

Implements BWAPI::Unit.

virtual Unit* BWAPI::UnitImpl::getOrderTarget ( ) const [virtual]

This is usually set when the low level unit AI acquires a new target automatically. For example if an enemy probe comes in range of your marine, the marine will start attacking it, and getOrderTarget will be set in this case, but not getTarget.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getOrderTarget ( ) const [virtual]

This is usually set when the low level unit AI acquires a new target automatically. For example if an enemy probe comes in range of your marine, the marine will start attacking it, and getOrderTarget will be set in this case, but not getTarget.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the target position for the units order. For example for the move order getTargetPosition returns the end of the units path but this returns the location the unit is trying to move to.

Implements BWAPI::Unit.

Returns the target position for the units order. For example for the move order getTargetPosition returns the end of the units path but this returns the location the unit is trying to move to.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getOrderTimer ( ) const [virtual]

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getOrderTimer ( ) const [virtual]

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getPlagueTimer ( ) const [virtual]

Returns the time until the plague wears off. 0 -> No plague present.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getPlagueTimer ( ) const [virtual]

Returns the time until the plague wears off. 0 -> No plague present.

Implements BWAPI::Unit.

virtual Player* BWAPI::UnitImpl::getPlayer ( ) const [virtual]

Returns a pointer to the player that owns this unit.

Implements BWAPI::Unit.

Player * BWAPI::UnitImpl::getPlayer ( ) const [virtual]

Returns a pointer to the player that owns this unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Position BWAPI::UnitImpl::getPosition ( ) const [virtual]

Returns the position of the unit on the map.

Implements BWAPI::Unit.

Returns the position of the unit on the map.

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual Unit* BWAPI::UnitImpl::getPowerUp ( ) const [virtual]

Returns the power up the unit is holding, or NULL if the unit is not holding a power up

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getPowerUp ( ) const [virtual]

Returns the power up the unit is holding, or NULL if the unit is not holding a power up

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual Position BWAPI::UnitImpl::getRallyPosition ( ) const [virtual]

Returns the position the building is rallied to. If the building does not produce units, Positions::None is returned.

See also:
Unit::setRallyPoint, Unit::getRallyUnit.

Implements BWAPI::Unit.

Returns the position the building is rallied to. If the building does not produce units, Positions::None is returned.

See also:
Unit::setRallyPoint, Unit::getRallyUnit.

Implements BWAPI::Unit.

virtual Unit* BWAPI::UnitImpl::getRallyUnit ( ) const [virtual]

Returns the unit the building is rallied to. If the building is not rallied to any unit, NULL is returned.

See also:
Unit::setRallyPoint, Unit::getRallyPosition.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getRallyUnit ( ) const [virtual]

Returns the unit the building is rallied to. If the building is not rallied to any unit, NULL is returned.

See also:
Unit::setRallyPoint, Unit::getRallyPosition.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual BWAPI::Region* BWAPI::UnitImpl::getRegion ( ) const [virtual]

Returns the region that this unit is currently in.

Implements BWAPI::Unit.

Returns the region that this unit is currently in.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual int BWAPI::UnitImpl::getRemainingBuildTime ( ) const [virtual]

Returns the remaining build time of a unit/building that is being constructed.

Implements BWAPI::Unit.

Returns the remaining build time of a unit/building that is being constructed.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getRemainingResearchTime ( ) const [virtual]

Returns the amount of time until the unit is done researching its current tech. If the unit is not researching anything, 0 is returned.

See also:
Unit::research, Unit::cancelResearch, Unit::isResearching, Unit::getTech.

Implements BWAPI::Unit.

Returns the amount of time until the unit is done researching its current tech. If the unit is not researching anything, 0 is returned.

See also:
Unit::research, Unit::cancelResearch, Unit::isResearching, Unit::getTech.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getRemainingTrainTime ( ) const [virtual]

Returns the remaining time of the unit that is currently being trained. If the unit is a Hatchery, Lair, or Hive, this returns the amount of time until the next larva spawns, or 0 if the unit already has 3 larva.

Implements BWAPI::Unit.

Returns the remaining time of the unit that is currently being trained. If the unit is a Hatchery, Lair, or Hive, this returns the amount of time until the next larva spawns, or 0 if the unit already has 3 larva.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getRemainingUpgradeTime ( ) const [virtual]

Returns the amount of time until the unit is done upgrading its current upgrade. If the unit is not upgrading anything, 0 is returned.

See also:
Unit::upgrade, Unit::cancelUpgrade, Unit::isUpgrading, Unit::getUpgrade.

Implements BWAPI::Unit.

Returns the amount of time until the unit is done upgrading its current upgrade. If the unit is not upgrading anything, 0 is returned.

See also:
Unit::upgrade, Unit::cancelUpgrade, Unit::isUpgrading, Unit::getUpgrade.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getRemoveTimer ( ) const [virtual]

Returns the amount of time until the unit is removed, or 0 if the unit does not have a remove timer. Used to determine how much time remains before hallucinated units, dark swarm, etc have until they are removed.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getRemoveTimer ( ) const [virtual]

Returns the amount of time until the unit is removed, or 0 if the unit does not have a remove timer. Used to determine how much time remains before hallucinated units, dark swarm, etc have until they are removed.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getReplayID ( ) const [virtual]

Returns the unit ID that is used in a replay (*.rep) file's action recordings.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getReplayID ( ) const [virtual]

Returns the unit ID that is used in a replay (*.rep) file's action recordings.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getResourceGroup ( ) const [virtual]

Retrieves the group ID of a resource. Can be used to identify which resources belong to an expansion.

Implements BWAPI::Unit.

Retrieves the group ID of a resource. Can be used to identify which resources belong to an expansion.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getResources ( ) const [virtual]

Returns the unit's current amount of containing resources. Useful for determining how much minerals are left in a mineral patch, or how much gas is left in a geyser (can also be called on a refinery/assimilator/extractor).

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getResources ( ) const [virtual]

Returns the unit's current amount of containing resources. Useful for determining how much minerals are left in a mineral patch, or how much gas is left in a geyser (can also be called on a refinery/assimilator/extractor).

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual int BWAPI::UnitImpl::getRight ( ) const [virtual]

Returns the X coordinate of the right side of the unit.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getRight ( ) const [virtual]

Returns the X coordinate of the right side of the unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int BWAPI::UnitImpl::getScarabCount ( ) const [virtual]

Returns the number of scarabs in the Protoss Reaver.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getScarabCount ( ) const [virtual]

Returns the number of scarabs in the Protoss Reaver.

Implements BWAPI::Unit.

virtual Order BWAPI::UnitImpl::getSecondaryOrder ( ) const [virtual]

Implements BWAPI::Unit.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getShields ( ) const [virtual]

Returns the unit's current amount of shields.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getShields ( ) const [virtual]

Returns the unit's current amount of shields.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getSpellCooldown ( ) const [virtual]

Returns unit's ground weapon cooldown. It is 0 if the unit is ready cast a spell.

Implements BWAPI::Unit.

Returns unit's ground weapon cooldown. It is 0 if the unit is ready cast a spell.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getSpiderMineCount ( ) const [virtual]

Returns the number of spider mines in the Terran Vulture.

Implements BWAPI::Unit.

Returns the number of spider mines in the Terran Vulture.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getStasisTimer ( ) const [virtual]

Returns the time until the stasis field wears off. 0 -> No stasis field present.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getStasisTimer ( ) const [virtual]

Returns the time until the stasis field wears off. 0 -> No stasis field present.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getStimTimer ( ) const [virtual]

Returns the time until the stimpack wears off. 0 -> No stimpack boost present.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getStimTimer ( ) const [virtual]

Returns the time until the stimpack wears off. 0 -> No stimpack boost present.

Implements BWAPI::Unit.

virtual Unit* BWAPI::UnitImpl::getTarget ( ) const [virtual]

Generally returns the appropriate target unit after issuing an order that accepts a target unit (i.e. attack, repair, gather, follow, etc.). To check for a target that has been acquired automatically (without issuing an order) see getOrderTarget.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getTarget ( ) const [virtual]

Generally returns the appropriate target unit after issuing an order that accepts a target unit (i.e. attack, repair, gather, follow, etc.). To check for a target that has been acquired automatically (without issuing an order) see getOrderTarget.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Position BWAPI::UnitImpl::getTargetPosition ( ) const [virtual]

Returns the target position the unit is moving to (provided a valid path to the target position exists).

Implements BWAPI::Unit.

Returns the target position the unit is moving to (provided a valid path to the target position exists).

Implements BWAPI::Unit.

virtual TechType BWAPI::UnitImpl::getTech ( ) const [virtual]

Returns the tech that the unit is currently researching. If the unit is not researching anything, TechTypes::None is returned.

See also:
Unit::research, Unit::cancelResearch, Unit::isResearching, Unit::getRemainingResearchTime.

Implements BWAPI::Unit.

TechType BWAPI::UnitImpl::getTech ( ) const [virtual]

Returns the tech that the unit is currently researching. If the unit is not researching anything, TechTypes::None is returned.

See also:
Unit::research, Unit::cancelResearch, Unit::isResearching, Unit::getRemainingResearchTime.

Implements BWAPI::Unit.

virtual TilePosition BWAPI::UnitImpl::getTilePosition ( ) const [virtual]

Returns the build tile position of the unit on the map. Useful if the unit is a building. The tile position is of the top left corner of the building.

Implements BWAPI::Unit.

Returns the build tile position of the unit on the map. Useful if the unit is a building. The tile position is of the top left corner of the building.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual int BWAPI::UnitImpl::getTop ( ) const [virtual]

Returns the Y coordinate of the top side of the unit.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getTop ( ) const [virtual]

Returns the Y coordinate of the top side of the unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::list<UnitType> BWAPI::UnitImpl::getTrainingQueue ( ) const [virtual]

Returns the list of units queued up to be trained.

See also:
Unit::train, Unit::cancelTrain, Unit::isTraining.

Implements BWAPI::Unit.

std::list< UnitType > BWAPI::UnitImpl::getTrainingQueue ( ) const [virtual]

Returns the list of units queued up to be trained.

See also:
Unit::train, Unit::cancelTrain, Unit::isTraining.

Implements BWAPI::Unit.

virtual Unit* BWAPI::UnitImpl::getTransport ( ) const [virtual]

Returns the dropship, shuttle, overlord, or bunker that is this unit is loaded in to.

Implements BWAPI::Unit.

Unit * BWAPI::UnitImpl::getTransport ( ) const [virtual]

Returns the dropship, shuttle, overlord, or bunker that is this unit is loaded in to.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual UnitType BWAPI::UnitImpl::getType ( ) const [virtual]

Returns the current type of the unit.

Implements BWAPI::Unit.

UnitType BWAPI::UnitImpl::getType ( ) const [virtual]

Returns the current type of the unit.

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual std::set<Unit*>& BWAPI::UnitImpl::getUnitsInRadius ( int  radius) const [virtual]

Returns the set of units within the given radius of this unit

Implements BWAPI::Unit.

std::set< Unit * > & BWAPI::UnitImpl::getUnitsInRadius ( int  radius) const [virtual]

Returns the set of units within the given radius of this unit

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual std::set<Unit*>& BWAPI::UnitImpl::getUnitsInWeaponRange ( WeaponType  weapon) const [virtual]

Returns the set of units within weapon range of this unit.

Implements BWAPI::Unit.

std::set< Unit * > & BWAPI::UnitImpl::getUnitsInWeaponRange ( WeaponType  weapon) const [virtual]

Returns the set of units within weapon range of this unit.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual UpgradeType BWAPI::UnitImpl::getUpgrade ( ) const [virtual]

Returns the upgrade that the unit is currently upgrading. If the unit is not upgrading anything, UpgradeTypes::None is returned.

See also:
Unit::upgrade, Unit::cancelUpgrade, Unit::isUpgrading, Unit::getRemainingUpgradeTime.

Implements BWAPI::Unit.

Returns the upgrade that the unit is currently upgrading. If the unit is not upgrading anything, UpgradeTypes::None is returned.

See also:
Unit::upgrade, Unit::cancelUpgrade, Unit::isUpgrading, Unit::getRemainingUpgradeTime.

Implements BWAPI::Unit.

virtual int BWAPI::UnitImpl::getUpgradeLevel ( UpgradeType  upgrade) const [virtual]

Returns the player's current upgrade level for the given upgrade, if the unit is affected by this upgrade.

Implements BWAPI::Unit.

int BWAPI::UnitImpl::getUpgradeLevel ( UpgradeType  upgrade) const [virtual]

Returns the player's current upgrade level for the given upgrade, if the unit is affected by this upgrade.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual double BWAPI::UnitImpl::getVelocityX ( ) const [virtual]

Returns the x component of the unit's velocity, measured in pixels per frame.

Implements BWAPI::Unit.

double BWAPI::UnitImpl::getVelocityX ( ) const [virtual]

Returns the x component of the unit's velocity, measured in pixels per frame.

Implements BWAPI::Unit.

virtual double BWAPI::UnitImpl::getVelocityY ( ) const [virtual]

Returns the y component of the unit's velocity, measured in pixels per frame.

Implements BWAPI::Unit.

double BWAPI::UnitImpl::getVelocityY ( ) const [virtual]

Returns the y component of the unit's velocity, measured in pixels per frame.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::haltConstruction ( ) [virtual]

Orders the SCV to stop constructing the building, and the building is left in a partially complete state until it is canceled, destroyed, or completed.

See also:
Unit::isConstructing.

Implements BWAPI::Unit.

Orders the SCV to stop constructing the building, and the building is left in a partially complete state until it is canceled, destroyed, or completed.

See also:
Unit::isConstructing.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::hasNuke ( ) const [virtual]

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::hasNuke ( ) const [virtual]

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::hasPath ( Unit target) const [virtual]

Returns true if the unit is able to move to the target unit

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::hasPath ( Position  target) const [virtual]

Returns true if the unit is able to move to the target position

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::hasPath ( Unit target) const [virtual]

Returns true if the unit is able to move to the target unit

Implements BWAPI::Unit.

Here is the call graph for this function:

bool BWAPI::UnitImpl::hasPath ( Position  target) const [virtual]

Returns true if the unit is able to move to the target position

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::holdPosition ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to hold its position.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::holdPosition ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to hold its position.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::isAccelerating ( ) const [virtual]

Returns true if the unit is currently accelerating.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isAccelerating ( ) const [virtual]

Returns true if the unit is currently accelerating.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isAttackFrame ( ) const [virtual]

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isAttackFrame ( ) const [virtual]

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isAttacking ( ) const [virtual]

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isAttacking ( ) const [virtual]

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isBeingConstructed ( ) const [virtual]

Returns true if the unit is being constructed. Always true for incomplete Protoss and Zerg buildings, and true for incomplete Terran buildings that have an SCV constructing them. If the SCV halts construction, isBeingConstructed will return false.

See also:
Unit::build, Unit::cancelConstruction, Unit::haltConstruction, Unit::isConstructing.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isBeingConstructed ( ) const [virtual]

Returns true if the unit is being constructed. Always true for incomplete Protoss and Zerg buildings, and true for incomplete Terran buildings that have an SCV constructing them. If the SCV halts construction, isBeingConstructed will return false.

See also:
Unit::build, Unit::cancelConstruction, Unit::haltConstruction, Unit::isConstructing.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::isBeingGathered ( ) const [virtual]

Returns true if the unit is a mineral patch or refinery that is being gathered.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isBeingGathered ( ) const [virtual]

Returns true if the unit is a mineral patch or refinery that is being gathered.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isBeingHealed ( ) const [virtual]

Returns true if the unit is currently being healed by a Terran Medic, or repaired by a Terran SCV.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isBeingHealed ( ) const [virtual]

Returns true if the unit is currently being healed by a Terran Medic, or repaired by a Terran SCV.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::isBlind ( ) const [virtual]

Returns true if the unit is currently blind from a Medic's Optical Flare.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isBlind ( ) const [virtual]

Returns true if the unit is currently blind from a Medic's Optical Flare.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isBraking ( ) const [virtual]

Returns true if the unit is currently braking/slowing down.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isBraking ( ) const [virtual]

Returns true if the unit is currently braking/slowing down.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isBurrowed ( ) const [virtual]

Returns true if the unit is a Zerg unit that is current burrowed.

See also:
Unit::burrow, Unit::unburrow.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isBurrowed ( ) const [virtual]

Returns true if the unit is a Zerg unit that is current burrowed.

See also:
Unit::burrow, Unit::unburrow.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isCarryingGas ( ) const [virtual]

Returns true if the unit is a worker that is carrying gas.

See also:
Unit::returnCargo, Unit::isGatheringGas.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isCarryingGas ( ) const [virtual]

Returns true if the unit is a worker that is carrying gas.

See also:
Unit::returnCargo, Unit::isGatheringGas.

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::isCarryingMinerals ( ) const [virtual]

Returns true if the unit is a worker that is carrying minerals.

See also:
Unit::returnCargo, Unit::isGatheringMinerals.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isCarryingMinerals ( ) const [virtual]

Returns true if the unit is a worker that is carrying minerals.

See also:
Unit::returnCargo, Unit::isGatheringMinerals.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isCloaked ( ) const [virtual]

Returns true if the unit is cloaked.

See also:
Unit::cloak, Unit::decloak.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isCloaked ( ) const [virtual]

Returns true if the unit is cloaked.

See also:
Unit::cloak, Unit::decloak.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isCompleted ( ) const [virtual]

Returns true if the unit has been completed.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isCompleted ( ) const [virtual]

Returns true if the unit has been completed.

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::isConstructing ( ) const [virtual]

Returns true when a unit has been issued an order to build a structure and is moving to the build location. Also returns true for Terran SCVs while they construct a building.

See also:
Unit::build, Unit::cancelConstruction, Unit::haltConstruction, Unit::isBeingConstructed.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isConstructing ( ) const [virtual]

Returns true when a unit has been issued an order to build a structure and is moving to the build location. Also returns true for Terran SCVs while they construct a building.

See also:
Unit::build, Unit::cancelConstruction, Unit::haltConstruction, Unit::isBeingConstructed.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isDefenseMatrixed ( ) const [virtual]

Returns true if the unit has a defense matrix from a Terran Science Vessel.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isDefenseMatrixed ( ) const [virtual]

Returns true if the unit has a defense matrix from a Terran Science Vessel.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isDetected ( ) const [virtual]

Returns true if the unit is detected.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isDetected ( ) const [virtual]

Returns true if the unit is detected.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isEnsnared ( ) const [virtual]

Returns true if the unit has been ensnared by a Zerg Queen.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isEnsnared ( ) const [virtual]

Returns true if the unit has been ensnared by a Zerg Queen.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isFollowing ( ) const [virtual]

Returns true if the unit is following another unit.

See also:
Unit::follow, Unit::getTarget.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isFollowing ( ) const [virtual]

Returns true if the unit is following another unit.

See also:
Unit::follow, Unit::getTarget.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isGatheringGas ( ) const [virtual]

Returns true if the unit is in one of the four states for gathering gas (MoveToGas, WaitForGas, HarvestGas, ReturnGas).

See also:
Unit::isCarryingGas.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isGatheringGas ( ) const [virtual]

Returns true if the unit is in one of the four states for gathering gas (MoveToGas, WaitForGas, HarvestGas, ReturnGas).

See also:
Unit::isCarryingGas.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::isGatheringMinerals ( ) const [virtual]

Returns true if the unit is in one of the four states for gathering minerals (MoveToMinerals, WaitForMinerals, MiningMinerals, ReturnMinerals).

See also:
Unit::isCarryingMinerals.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isGatheringMinerals ( ) const [virtual]

Returns true if the unit is in one of the four states for gathering minerals (MoveToMinerals, WaitForMinerals, MiningMinerals, ReturnMinerals).

See also:
Unit::isCarryingMinerals.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::isHallucination ( ) const [virtual]

Returns true for hallucinated units, false for normal units. Returns true for hallucinated enemy units only if Complete Map Information is enabled.

See also:
Unit::getRemoveTimer.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isHallucination ( ) const [virtual]

Returns true for hallucinated units, false for normal units. Returns true for hallucinated enemy units only if Complete Map Information is enabled.

See also:
Unit::getRemoveTimer.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isHoldingPosition ( ) const [virtual]

Returns true if the unit is holding position

See also:
Unit::holdPosition.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isHoldingPosition ( ) const [virtual]

Returns true if the unit is holding position

See also:
Unit::holdPosition.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isIdle ( ) const [virtual]

Returns true if the unit is not doing anything.

See also:
Unit::stop.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isIdle ( ) const [virtual]

Returns true if the unit is not doing anything.

See also:
Unit::stop.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isInterruptible ( ) const [virtual]

Returns true if the unit can be interrupted.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isInterruptible ( ) const [virtual]

Returns true if the unit can be interrupted.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isInvincible ( ) const [virtual]

Returns true if the unit is invincible.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isInvincible ( ) const [virtual]

Returns true if the unit is invincible.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isInWeaponRange ( Unit target) const [virtual]

Returns true if the unit can attack a specified target from its current position.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isInWeaponRange ( Unit target) const [virtual]

Returns true if the unit can attack a specified target from its current position.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::isIrradiated ( ) const [virtual]

Returns true if the unit is being irradiated by a Terran Science Vessel.

See also:
Unit::getIrradiateTimer.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isIrradiated ( ) const [virtual]

Returns true if the unit is being irradiated by a Terran Science Vessel.

See also:
Unit::getIrradiateTimer.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isLifted ( ) const [virtual]

Returns true if the unit is a Terran building that is currently lifted off the ground.

See also:
Unit::lift,Unit::land.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isLifted ( ) const [virtual]

Returns true if the unit is a Terran building that is currently lifted off the ground.

See also:
Unit::lift,Unit::land.

Implements BWAPI::Unit.

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::isLoaded ( ) const [virtual]

Return true if the unit is loaded into a Terran Bunker, Terran Dropship, Protoss Shuttle, or Zerg Overlord.

See also:
Unit::load, Unit::unload, Unit::unloadAll.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isLoaded ( ) const [virtual]

Return true if the unit is loaded into a Terran Bunker, Terran Dropship, Protoss Shuttle, or Zerg Overlord.

See also:
Unit::load, Unit::unload, Unit::unloadAll.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isLockedDown ( ) const [virtual]

Returns true if the unit is locked down by a Terran Ghost.

See also:
Unit::getLockdownTimer.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isLockedDown ( ) const [virtual]

Returns true if the unit is locked down by a Terran Ghost.

See also:
Unit::getLockdownTimer.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isMaelstrommed ( ) const [virtual]

Returns true if the unit is being maelstrommed.

See also:
Unit::getMaelstromTimer.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isMaelstrommed ( ) const [virtual]

Returns true if the unit is being maelstrommed.

See also:
Unit::getMaelstromTimer.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isMorphing ( ) const [virtual]

Returns true if the unit is a zerg unit that is morphing.

See also:
Unit::morph, Unit::cancelMorph, Unit::getBuildType, Unit::getRemainingBuildTime.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isMorphing ( ) const [virtual]

Returns true if the unit is a zerg unit that is morphing.

See also:
Unit::morph, Unit::cancelMorph, Unit::getBuildType, Unit::getRemainingBuildTime.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isMoving ( ) const [virtual]

Returns true if the unit is moving.

See also:
Unit::attack, Unit::stop.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isMoving ( ) const [virtual]

Returns true if the unit is moving.

See also:
Unit::attack, Unit::stop.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isParasited ( ) const [virtual]

Returns true if the unit has been parasited by some other player.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isParasited ( ) const [virtual]

Returns true if the unit has been parasited by some other player.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isPatrolling ( ) const [virtual]

Returns true if the unit is patrolling between two positions.

See also:
Unit::patrol.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isPatrolling ( ) const [virtual]

Returns true if the unit is patrolling between two positions.

See also:
Unit::patrol.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isPlagued ( ) const [virtual]

Returns true if the unit has been plagued by a Zerg Defiler.

See also:
Unit::getPlagueTimer.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isPlagued ( ) const [virtual]

Returns true if the unit has been plagued by a Zerg Defiler.

See also:
Unit::getPlagueTimer.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isRepairing ( ) const [virtual]

Returns true if the unit is a Terran SCV that is repairing or moving to repair another unit.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isRepairing ( ) const [virtual]

Returns true if the unit is a Terran SCV that is repairing or moving to repair another unit.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isResearching ( ) const [virtual]

Returns true if the unit is a building that is researching tech. See TechTypes for the complete list of available techs in Broodwar.

See also:
Unit::research, Unit::cancelResearch, Unit::getTech, Unit::getRemainingResearchTime.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isResearching ( ) const [virtual]

Returns true if the unit is a building that is researching tech. See TechTypes for the complete list of available techs in Broodwar.

See also:
Unit::research, Unit::cancelResearch, Unit::getTech, Unit::getRemainingResearchTime.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isSelected ( ) const [virtual]

Returns true if the unit has been selected by the user via the starcraft GUI. Only available if you enable Flag::UserInput during AIModule::onStart.

See also:
Game::getSelectedUnits.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isSelected ( ) const [virtual]

Returns true if the unit has been selected by the user via the starcraft GUI. Only available if you enable Flag::UserInput during AIModule::onStart.

See also:
Game::getSelectedUnits.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isSieged ( ) const [virtual]

Returns true if the unit is a Terran Siege Tank that is currently in Siege mode.

See also:
Unit::siege, Unit::unsiege.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isSieged ( ) const [virtual]

Returns true if the unit is a Terran Siege Tank that is currently in Siege mode.

See also:
Unit::siege, Unit::unsiege.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isStartingAttack ( ) const [virtual]

Returns true if the unit is starting to attack.

See also:
Unit::attackUnit, Unit::getGroundWeaponCooldown, Unit::getAirWeaponCooldown.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isStartingAttack ( ) const [virtual]

Returns true if the unit is starting to attack.

See also:
Unit::attackUnit, Unit::getGroundWeaponCooldown, Unit::getAirWeaponCooldown.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isStasised ( ) const [virtual]

Returns true if the unit has been stasised by a Protoss Arbiter.

See also:
Unit::getStasisTimer.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isStasised ( ) const [virtual]

Returns true if the unit has been stasised by a Protoss Arbiter.

See also:
Unit::getStasisTimer.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isStimmed ( ) const [virtual]

Returns true if the unit is currently stimmed.

See also:
Unit::getStimTimer.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isStimmed ( ) const [virtual]

Returns true if the unit is currently stimmed.

See also:
Unit::getStimTimer.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isStuck ( ) const [virtual]

Returns true if the unit is being pushed off of another unit

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isStuck ( ) const [virtual]

Returns true if the unit is being pushed off of another unit

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::issueCommand ( UnitCommand  command) [virtual]

Issues the give unit command, or returns false if there is an error

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::issueCommand ( UnitCommand  command) [virtual]

Issues the give unit command, or returns false if there is an error

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::isTraining ( ) const [virtual]

Returns true if the unit is training units (i.e. a Barracks training Marines).

See also:
Unit::train, Unit::getTrainingQueue, Unit::cancelTrain, Unit::getRemainingTrainTime.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isTraining ( ) const [virtual]

Returns true if the unit is training units (i.e. a Barracks training Marines).

See also:
Unit::train, Unit::getTrainingQueue, Unit::cancelTrain, Unit::getRemainingTrainTime.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isUnderAttack ( ) const [virtual]

Returns true if the unit was recently attacked.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isUnderAttack ( ) const [virtual]

Returns true if the unit was recently attacked.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isUnderDarkSwarm ( ) const [virtual]

Returns true if the unit is under a Dark Swarm.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isUnderDarkSwarm ( ) const [virtual]

Returns true if the unit is under a Dark Swarm.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isUnderDisruptionWeb ( ) const [virtual]

Returns true if the unit is under a Disruption Web.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isUnderDisruptionWeb ( ) const [virtual]

Returns true if the unit is under a Disruption Web.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isUnderStorm ( ) const [virtual]

Returns true if the unit is under a Protoss Psionic Storm.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isUnderStorm ( ) const [virtual]

Returns true if the unit is under a Protoss Psionic Storm.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isUnpowered ( ) const [virtual]

Returns true if the unit is a Protoss building that is unpowered because no pylons are in range.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isUnpowered ( ) const [virtual]

Returns true if the unit is a Protoss building that is unpowered because no pylons are in range.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isUpgrading ( ) const [virtual]

Returns true if the unit is a building that is upgrading. See UpgradeTypes for the complete list of available upgrades in Broodwar.

See also:
Unit::upgrade, Unit::cancelUpgrade, Unit::getUpgrade, Unit::getRemainingUpgradeTime.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isUpgrading ( ) const [virtual]

Returns true if the unit is a building that is upgrading. See UpgradeTypes for the complete list of available upgrades in Broodwar.

See also:
Unit::upgrade, Unit::cancelUpgrade, Unit::getUpgrade, Unit::getRemainingUpgradeTime.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isVisible ( ) const [virtual]

Returns true if the unit is visible. If the CompleteMapInformation? cheat flag is enabled, existing units hidden by the fog of war will be accessible, but isVisible will still return false.

See also:
Unit::exists.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::isVisible ( Player player) const [virtual]

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::isVisible ( ) const [virtual]

Returns true if the unit is visible. If the CompleteMapInformation? cheat flag is enabled, existing units hidden by the fog of war will be accessible, but isVisible will still return false.

See also:
Unit::exists.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BWAPI::UnitImpl::isVisible ( Player player) const [virtual]

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::land ( TilePosition  target) [virtual]

Orders the unit to land. Note: unit must be a Terran building that is currently lifted.

See also:
Unit::lift, Unit::isLifted.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::land ( TilePosition  target) [virtual]

Orders the unit to land. Note: unit must be a Terran building that is currently lifted.

See also:
Unit::lift, Unit::isLifted.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::lift ( ) [virtual]

Orders the unit to lift. Note: unit must be a Terran building that can be lifted.

See also:
Unit::land, Unit::isLifted.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::lift ( ) [virtual]

Orders the unit to lift. Note: unit must be a Terran building that can be lifted.

See also:
Unit::land, Unit::isLifted.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::load ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to load the target unit.

See also:
Unit::unload, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::load ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to load the target unit.

See also:
Unit::unload, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::morph ( UnitType  type) [virtual]

Orders the unit to morph into the specified unit type. Returns false if given a wrong type.

See also:
Unit::cancelMorph, Unit::isMorphing.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::morph ( UnitType  type) [virtual]

Orders the unit to morph into the specified unit type. Returns false if given a wrong type.

See also:
Unit::cancelMorph, Unit::isMorphing.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::move ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to move from its current position to the specified position.

See also:
Unit::isMoving.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::move ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to move from its current position to the specified position.

See also:
Unit::isMoving.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::patrol ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to patrol between its current position and the specified position.

See also:
Unit::isPatrolling.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::patrol ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to patrol between its current position and the specified position.

See also:
Unit::isPatrolling.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::placeCOP ( TilePosition  target) [virtual]

Moves a Flag Beacon to the target location.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::placeCOP ( TilePosition  target) [virtual]

Moves a Flag Beacon to the target location.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::repair ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to repair the specified unit. Only Terran SCVs can be ordered to repair, and the target must be a mechanical Terran unit or building.

See also:
Unit::isRepairing.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::repair ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to repair the specified unit. Only Terran SCVs can be ordered to repair, and the target must be a mechanical Terran unit or building.

See also:
Unit::isRepairing.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::research ( TechType  tech) [virtual]

Orders the unit to research the given tech type.

See also:
Unit::cancelResearch, Unit::Unit::isResearching, Unit::getRemainingResearchTime, Unit::getTech.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::research ( TechType  tech) [virtual]

Orders the unit to research the given tech type.

See also:
Unit::cancelResearch, Unit::Unit::isResearching, Unit::getRemainingResearchTime, Unit::getTech.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::returnCargo ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to return its cargo to a nearby resource depot such as a Command Center. Only workers that are carrying minerals or gas can be ordered to return cargo.

See also:
Unit::isCarryingGas, Unit::isCarryingMinerals.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::returnCargo ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to return its cargo to a nearby resource depot such as a Command Center. Only workers that are carrying minerals or gas can be ordered to return cargo.

See also:
Unit::isCarryingGas, Unit::isCarryingMinerals.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::rightClick ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Works like the right click in the GUI.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::rightClick ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Works like the right click in the GUI. Right click on a mineral patch to order a worker to mine, right click on an enemy to attack it.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::rightClick ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Works like the right click in the GUI.

Implements BWAPI::Unit.

Here is the call graph for this function:

bool BWAPI::UnitImpl::rightClick ( Unit target,
bool  shiftQueueCommand = false 
) [virtual]

Works like the right click in the GUI. Right click on a mineral patch to order a worker to mine, right click on an enemy to attack it.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the call graph for this function:

virtual void BWAPI::UnitImpl::setClientInfo ( void *  clientinfo) [virtual]

Sets the unit's custom client info. The client is responsible for deallocation.

Implements BWAPI::Unit.

void BWAPI::UnitImpl::setClientInfo ( void *  clientinfo) [virtual]

Sets the unit's custom client info. The client is responsible for deallocation.

Implements BWAPI::Unit.

void BWAPI::UnitImpl::setID ( int  newID)

Here is the caller graph for this function:

void BWAPI::UnitImpl::setLoaded ( bool  loadedState)
virtual bool BWAPI::UnitImpl::setRallyPoint ( Position  target) [virtual]

Orders the unit to set its rally position to the specified position.

See also:
Unit::getRallyPosition, Unit::getRallyUnit.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::setRallyPoint ( Unit target) [virtual]

Orders the unit to set its rally unit to the specified unit.

See also:
Unit::setRallyPosition, Unit::getRallyPosition, Unit::getRallyUnit.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::setRallyPoint ( Position  target) [virtual]

Orders the unit to set its rally position to the specified position.

See also:
Unit::getRallyPosition, Unit::getRallyUnit.

Implements BWAPI::Unit.

Here is the call graph for this function:

bool BWAPI::UnitImpl::setRallyPoint ( Unit target) [virtual]

Orders the unit to set its rally unit to the specified unit.

See also:
Unit::setRallyPosition, Unit::getRallyPosition, Unit::getRallyUnit.

Implements BWAPI::Unit.

Here is the call graph for this function:

void BWAPI::UnitImpl::setSelected ( bool  selectedState)

Here is the caller graph for this function:

virtual bool BWAPI::UnitImpl::siege ( ) [virtual]

Orders the unit to siege. Note: unit must be a Terran siege tank.

See also:
Unit::unsiege, Unit::isSieged.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::siege ( ) [virtual]

Orders the unit to siege. Note: unit must be a Terran siege tank.

See also:
Unit::unsiege, Unit::isSieged.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::stop ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to stop.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::stop ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to stop.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::train ( UnitType  type) [virtual]

Orders this unit to add the specified unit type to the training queue. Note that the player must have sufficient resources to train. If you wish to make units from a hatchery, use getLarva to get the larva associated with the hatchery and then call morph on the larva you want to morph. This command can also be used to make interceptors and scarabs.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::train ( UnitType  type) [virtual]

Orders this unit to add the specified unit type to the training queue. Note that the player must have sufficient resources to train. If you wish to make units from a hatchery, use getLarva to get the larva associated with the hatchery and then call morph on the larva you want to morph. This command can also be used to make interceptors and scarabs.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::unburrow ( ) [virtual]

Orders the burrowed unit to unburrow.

See also:
: Unit::burrow, Unit::isBurrowed.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::unburrow ( ) [virtual]

Orders the burrowed unit to unburrow.

See also:
: Unit::burrow, Unit::isBurrowed.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::unload ( Unit target) [virtual]

Orders the unit to unload the target unit.

See also:
Unit::load, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::unload ( Unit target) [virtual]

Orders the unit to unload the target unit.

See also:
Unit::load, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::unloadAll ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to unload all loaded units at the unit's current position.

See also:
Unit::load, Unit::unload, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::unloadAll ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to unload all loaded units at the specified location. Unit should be a Terran Dropship, Protoss Shuttle, or Zerg Overlord. If the unit is a Terran Bunker, the units will be unloaded right outside the bunker, like in the first version of unloadAll.

See also:
Unit::load, Unit::unload, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::unloadAll ( bool  shiftQueueCommand = false) [virtual]

Orders the unit to unload all loaded units at the unit's current position.

See also:
Unit::load, Unit::unload, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

Here is the call graph for this function:

bool BWAPI::UnitImpl::unloadAll ( Position  target,
bool  shiftQueueCommand = false 
) [virtual]

Orders the unit to unload all loaded units at the specified location. Unit should be a Terran Dropship, Protoss Shuttle, or Zerg Overlord. If the unit is a Terran Bunker, the units will be unloaded right outside the bunker, like in the first version of unloadAll.

See also:
Unit::load, Unit::unload, Unit::unloadAll, Unit::getLoadedUnits, Unit:isLoaded.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::unsiege ( ) [virtual]

Orders the unit to unsiege. Note: unit must be a Terran siege tank.

See also:
: Unit::unsiege, Unit::isSieged.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::unsiege ( ) [virtual]

Orders the unit to unsiege. Note: unit must be a Terran siege tank.

See also:
: Unit::unsiege, Unit::isSieged.

Implements BWAPI::Unit.

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::upgrade ( UpgradeType  upgrade) [virtual]

Orders the unit to upgrade the given upgrade type.

See also:
Unit::cancelUpgrade, Unit::Unit::isUpgrading, Unit::getRemainingUpgradeTime, Unit::getUpgrade.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::upgrade ( UpgradeType  upgrade) [virtual]

Orders the unit to upgrade the given upgrade type.

See also:
Unit::cancelUpgrade, Unit::Unit::isUpgrading, Unit::getRemainingUpgradeTime, Unit::getUpgrade.

Implements BWAPI::Unit.

Here is the call graph for this function:

virtual bool BWAPI::UnitImpl::useTech ( TechType  tech) [virtual]

Orders the unit to use a tech not requiring a target (ie Stim Pack). Returns true if it is a valid tech.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::useTech ( TechType  tech,
Position  target 
) [virtual]

Orders the unit to use a tech requiring a position target (ie Dark Swarm). Returns true if it is a valid tech.

Implements BWAPI::Unit.

virtual bool BWAPI::UnitImpl::useTech ( TechType  tech,
Unit target 
) [virtual]

Orders the unit to use a tech requiring a unit target (ie Irradiate). Returns true if it is a valid tech.

Implements BWAPI::Unit.

bool BWAPI::UnitImpl::useTech ( TechType  tech) [virtual]

Orders the unit to use a tech not requiring a target (ie Stim Pack). Returns true if it is a valid tech.

Implements BWAPI::Unit.

Here is the call graph for this function:

bool BWAPI::UnitImpl::useTech ( TechType  tech,
Position  target 
) [virtual]

Orders the unit to use a tech requiring a position target (ie Dark Swarm). Returns true if it is a valid tech.

Implements BWAPI::Unit.

Here is the call graph for this function:

bool BWAPI::UnitImpl::useTech ( TechType  tech,
Unit target 
) [virtual]

Orders the unit to use a tech requiring a unit target (ie Irradiate). Returns true if it is a valid tech.

Implements BWAPI::Unit.

Here is the call graph for this function:


Member Data Documentation

Gets #bwUnit->BW::Unit::buildQueue

Gets #bwUnitLocal

Gets #bwOriginalUnit

Returns if the unit has empty building queue


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines