BWAPI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
BWAPI::Unit Class Reference

#include <Unit.h>

Inheritance diagram for BWAPI::Unit:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Protected Member Functions

virtual ~Unit ()

Detailed Description

The Unit class is used to get information about individual units as well as issue orders to units. Each unit in the game has a unique Unit object, and Unit objects are not deleted until the end of the match (so you don't need to worry about unit pointers becoming invalid).

Every Unit in the game is either accessible or inaccessible. To determine if an AI can access a particular unit, BWAPI checks to see if Flag::CompleteMapInformation? is enabled. So there are two cases to consider - either the flag is enabled, or it is disabled:

If Flag::CompleteMapInformation? is disabled, then a unit is accessible if and only if it is visible. Note also that some properties of visible enemy units will not be made available to the AI (such as the contents of visible enemy dropships). If a unit is not visible, Unit::exists will return false, regardless of whether or not the unit exists. This is because absolutely no state information on invisible enemy units is made available to the AI. To determine if an enemy unit has been destroyed, the AI must watch for AIModule::onUnitDestroy messages from BWAPI, which is only called for visible units which get destroyed.

If Flag::CompleteMapInformation? is enabled, then all units that exist in the game are accessible, and Unit::exists is accurate for all units. Similarly AIModule::onUnitDestroy messages are generated for all units that get destroyed, not just visible ones.

If a Unit is not accessible, in general the only the getInitial__ functions will be available to the AI. However for units that were owned by the player, getPlayer and getType will continue to work for units that have been destroyed.


Constructor & Destructor Documentation

virtual BWAPI::Unit::~Unit ( ) [inline, protected, virtual]

Member Function Documentation

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

Orders the unit to attack move to the specified location.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Orders the unit to attack the specified unit.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::build ( TilePosition  target,
UnitType  type 
) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::buildAddon ( UnitType  type) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::burrow ( ) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::cancelAddon ( ) [pure virtual]

Orders the unit to stop making the addon.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::cancelConstruction ( ) [pure virtual]

Orders the building to stop being constructed.

See also:
Unit::beingConstructed.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::cancelMorph ( ) [pure virtual]

Orders the unit to stop morphing.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::cancelResearch ( ) [pure virtual]

Orders the unit to cancel a research in progress.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::cancelUpgrade ( ) [pure virtual]

Orders the unit to cancel an upgrade in progress.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::cloak ( ) [pure virtual]

Orders the unit to cloak.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::decloak ( ) [pure virtual]

Orders the unit to decloak.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::exists ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Orders the unit to follow the specified unit.

See also:
Unit::isFollowing.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getAcidSporeCount ( ) const [pure virtual]

Returns the unit's acid spore count.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getAirWeaponCooldown ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual double BWAPI::Unit::getAngle ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getBottom ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual UnitType BWAPI::Unit::getBuildType ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Unit* BWAPI::Unit::getBuildUnit ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual void* BWAPI::Unit::getClientInfo ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getDefenseMatrixPoints ( ) const [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getDefenseMatrixTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getEnergy ( ) const [pure virtual]

Returns the unit's current amount of energy.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getEnsnareTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getGroundWeaponCooldown ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Unit* BWAPI::Unit::getHatchery ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getHitPoints ( ) const [pure virtual]

Returns the unit's current amount of hit points.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getID ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getInitialHitPoints ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual Position BWAPI::Unit::getInitialPosition ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getInitialResources ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual TilePosition BWAPI::Unit::getInitialTilePosition ( ) const [pure virtual]

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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual UnitType BWAPI::Unit::getInitialType ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getInterceptorCount ( ) const [pure virtual]

Returns the number of interceptors the Protoss Carrier has.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual std::set<Unit*> BWAPI::Unit::getInterceptors ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getIrradiateTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getKillCount ( ) const [pure virtual]

Returns the unit's current kill count.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual std::set<Unit*> BWAPI::Unit::getLarva ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual BWAPI::Player* BWAPI::Unit::getLastAttackingPlayer ( ) const [pure virtual]

Returns the player that last attacked this unit.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual UnitCommand BWAPI::Unit::getLastCommand ( ) const [pure virtual]

Returns the last successful command.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getLastCommandFrame ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getLeft ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getLockdownTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getMaelstromTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual Order BWAPI::Unit::getOrder ( ) const [pure virtual]

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Unit* BWAPI::Unit::getOrderTarget ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Position BWAPI::Unit::getOrderTargetPosition ( ) const [pure virtual]

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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getOrderTimer ( ) const [pure virtual]

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getPlagueTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Player* BWAPI::Unit::getPlayer ( ) const [pure virtual]

Returns a pointer to the player that owns this unit.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Position BWAPI::Unit::getPosition ( ) const [pure virtual]

Returns the position of the unit on the map.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Position BWAPI::Unit::getRallyPosition ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Unit* BWAPI::Unit::getRallyUnit ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual BWAPI::Region* BWAPI::Unit::getRegion ( ) const [pure virtual]

Returns the region that this unit is currently in.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getRemainingBuildTime ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getRemainingResearchTime ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getRemainingTrainTime ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getRemainingUpgradeTime ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getRemoveTimer ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getReplayID ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getResourceGroup ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getResources ( ) const [pure 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).

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getRight ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getScarabCount ( ) const [pure virtual]

Returns the number of scarabs in the Protoss Reaver.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Order BWAPI::Unit::getSecondaryOrder ( ) const [pure virtual]

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getShields ( ) const [pure virtual]

Returns the unit's current amount of shields.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getSpellCooldown ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual int BWAPI::Unit::getSpiderMineCount ( ) const [pure virtual]

Returns the number of spider mines in the Terran Vulture.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getStasisTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getStimTimer ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Unit* BWAPI::Unit::getTarget ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual Position BWAPI::Unit::getTargetPosition ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual TechType BWAPI::Unit::getTech ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual TilePosition BWAPI::Unit::getTilePosition ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual int BWAPI::Unit::getTop ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Returns the list of units queued up to be trained.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual UnitType BWAPI::Unit::getType ( ) const [pure virtual]

Returns the current type of the unit.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual UpgradeType BWAPI::Unit::getUpgrade ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual double BWAPI::Unit::getVelocityX ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual double BWAPI::Unit::getVelocityY ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::haltConstruction ( ) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::hasNuke ( ) const [pure virtual]

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

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

Orders the unit to hold its position.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isAccelerating ( ) const [pure virtual]

Returns true if the unit is currently accelerating.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isAttackFrame ( ) const [pure virtual]

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isAttacking ( ) const [pure virtual]

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isBeingConstructed ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isBeingGathered ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isBeingHealed ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isBlind ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isBraking ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isBurrowed ( ) const [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isCarryingGas ( ) const [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isCarryingMinerals ( ) const [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isCloaked ( ) const [pure virtual]

Returns true if the unit is cloaked.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isCompleted ( ) const [pure virtual]

Returns true if the unit has been completed.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isConstructing ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isDefenseMatrixed ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isDetected ( ) const [pure virtual]

Returns true if the unit is detected.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::isEnsnared ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isFollowing ( ) const [pure virtual]

Returns true if the unit is following another unit.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isGatheringGas ( ) const [pure virtual]

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

See also:
Unit::isCarryingGas.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isGatheringMinerals ( ) const [pure virtual]

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

See also:
Unit::isCarryingMinerals.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isHallucination ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isHoldingPosition ( ) const [pure virtual]

Returns true if the unit is holding position

See also:
Unit::holdPosition.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isIdle ( ) const [pure virtual]

Returns true if the unit is not doing anything.

See also:
Unit::stop.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isInterruptible ( ) const [pure virtual]

Returns true if the unit can be interrupted.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::isInvincible ( ) const [pure virtual]

Returns true if the unit is invincible.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isIrradiated ( ) const [pure virtual]

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

See also:
Unit::getIrradiateTimer.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isLifted ( ) const [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isLoaded ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isLockedDown ( ) const [pure virtual]

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

See also:
Unit::getLockdownTimer.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isMaelstrommed ( ) const [pure virtual]

Returns true if the unit is being maelstrommed.

See also:
Unit::getMaelstromTimer.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isMorphing ( ) const [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isMoving ( ) const [pure virtual]

Returns true if the unit is moving.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isParasited ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isPatrolling ( ) const [pure virtual]

Returns true if the unit is patrolling between two positions.

See also:
Unit::patrol.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isPlagued ( ) const [pure virtual]

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

See also:
Unit::getPlagueTimer.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isRepairing ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isResearching ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isSelected ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isSieged ( ) const [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isStartingAttack ( ) const [pure virtual]

Returns true if the unit is starting to attack.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isStasised ( ) const [pure virtual]

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

See also:
Unit::getStasisTimer.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isStimmed ( ) const [pure virtual]

Returns true if the unit is currently stimmed.

See also:
Unit::getStimTimer.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isStuck ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::issueCommand ( UnitCommand  command) [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::isTraining ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isUnderAttack ( ) const [pure virtual]

Returns true if the unit was recently attacked.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isUnderDarkSwarm ( ) const [pure virtual]

Returns true if the unit is under a Dark Swarm.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::isUnderDisruptionWeb ( ) const [pure virtual]

Returns true if the unit is under a Disruption Web.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::isUnderStorm ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isUnpowered ( ) const [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isUpgrading ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::isVisible ( ) const [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::land ( TilePosition  target) [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::lift ( ) [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Orders the unit to load the target unit.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::morph ( UnitType  type) [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

See also:
Unit::isMoving.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

See also:
Unit::isPatrolling.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::placeCOP ( TilePosition  target) [pure virtual]

Moves a Flag Beacon to the target location.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::repair ( Unit target,
bool  shiftQueueCommand = false 
) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::research ( TechType  tech) [pure virtual]

Orders the unit to research the given tech type.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::returnCargo ( bool  shiftQueueCommand = false) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Works like the right click in the GUI.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::rightClick ( Unit target,
bool  shiftQueueCommand = false 
) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual void BWAPI::Unit::setClientInfo ( void *  clientinfo) [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::setRallyPoint ( Position  target) [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::siege ( ) [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Orders the unit to stop.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::train ( UnitType  type) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::unburrow ( ) [pure virtual]

Orders the burrowed unit to unburrow.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

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

Orders the unit to unload the target unit.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::unloadAll ( bool  shiftQueueCommand = false) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::unloadAll ( Position  target,
bool  shiftQueueCommand = false 
) [pure 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.

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

virtual bool BWAPI::Unit::unsiege ( ) [pure virtual]

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::upgrade ( UpgradeType  upgrade) [pure virtual]

Orders the unit to upgrade the given upgrade type.

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Unit::useTech ( TechType  tech) [pure virtual]

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.

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

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

Implemented in BWAPI::UnitImpl, and BWAPI::UnitImpl.


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