public class Unit extends Object implements Comparable<Unit>
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.
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, 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 BWEventListener.onUnitDestroy(bwapi.Unit)
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
exists()
is accurate for all units. Similarly BWEventListener.onUnitDestroy(bwapi.Unit)
messages are generated for all
units that get destroyed, not just visible ones.
If a Unit is not accessible, then 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.
Modifier and Type | Method and Description |
---|---|
boolean |
attack(Position target) |
boolean |
attack(Position target,
boolean shiftQueueCommand)
Orders the unit(s) to attack move to the specified position.
|
boolean |
attack(Unit target) |
boolean |
attack(Unit target,
boolean shiftQueueCommand) |
boolean |
build(UnitType type) |
boolean |
build(UnitType type,
TilePosition target)
Orders the worker unit(s) to construct a structure at a target position.
|
boolean |
buildAddon(UnitType type)
Orders the @Terran structure(s) to construct an add-on.
|
boolean |
burrow()
Orders the unit to burrow.
|
boolean |
canAttack() |
boolean |
canAttack(boolean checkCommandibility) |
boolean |
canAttack(Position target) |
boolean |
canAttack(Position target,
boolean checkCanTargetUnit) |
boolean |
canAttack(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canAttack(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an attack command to attack-move or attack a unit.
|
boolean |
canAttack(Unit target) |
boolean |
canAttack(Unit target,
boolean checkCanTargetUnit) |
boolean |
canAttack(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canAttack(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility) |
boolean |
canAttackGrouped() |
boolean |
canAttackGrouped(boolean checkCommandibilityGrouped) |
boolean |
canAttackGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility) |
boolean |
canAttackGrouped(Position target) |
boolean |
canAttackGrouped(Position target,
boolean checkCanTargetUnit) |
boolean |
canAttackGrouped(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canAttackGrouped(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped) |
boolean |
canAttackGrouped(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an attack command to attack-move or attack a unit,
as part of a List
|
boolean |
canAttackGrouped(Unit target) |
boolean |
canAttackGrouped(Unit target,
boolean checkCanTargetUnit) |
boolean |
canAttackGrouped(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canAttackGrouped(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped) |
boolean |
canAttackGrouped(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped,
boolean checkCommandibility) |
boolean |
canAttackMove() |
boolean |
canAttackMove(boolean checkCommandibility)
Checks whether the unit is able to execute an attack command to attack-move.
|
boolean |
canAttackMoveGrouped() |
boolean |
canAttackMoveGrouped(boolean checkCommandibilityGrouped) |
boolean |
canAttackMoveGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Checks whether the unit is able to execute an attack command to attack-move, as part of a
List
|
boolean |
canAttackUnit() |
boolean |
canAttackUnit(boolean checkCommandibility) |
boolean |
canAttackUnit(Unit targetUnit) |
boolean |
canAttackUnit(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canAttackUnit(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canAttackUnit(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an attack command to attack a unit.
|
boolean |
canAttackUnitGrouped() |
boolean |
canAttackUnitGrouped(boolean checkCommandibilityGrouped) |
boolean |
canAttackUnitGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility) |
boolean |
canAttackUnitGrouped(Unit targetUnit) |
boolean |
canAttackUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canAttackUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canAttackUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped) |
boolean |
canAttackUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandTypeGrouped,
boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an attack command to attack a unit,
as part of a List
|
boolean |
canBuild() |
boolean |
canBuild(boolean checkCommandibility) |
boolean |
canBuild(UnitType uType) |
boolean |
canBuild(UnitType uType,
boolean checkCanIssueCommandType) |
boolean |
canBuild(UnitType uType,
boolean checkCanIssueCommandType,
boolean checkCommandibility) |
boolean |
canBuild(UnitType uType,
TilePosition tilePos) |
boolean |
canBuild(UnitType uType,
TilePosition tilePos,
boolean checkTargetUnitType) |
boolean |
canBuild(UnitType uType,
TilePosition tilePos,
boolean checkTargetUnitType,
boolean checkCanIssueCommandType) |
boolean |
canBuild(UnitType uType,
TilePosition tilePos,
boolean checkTargetUnitType,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a build command.
|
boolean |
canBuildAddon() |
boolean |
canBuildAddon(boolean checkCommandibility) |
boolean |
canBuildAddon(UnitType uType) |
boolean |
canBuildAddon(UnitType uType,
boolean checkCanIssueCommandType) |
boolean |
canBuildAddon(UnitType uType,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a buildAddon command.
|
boolean |
canBurrow() |
boolean |
canBurrow(boolean checkCommandibility)
Checks whether the unit is able to execute a burrow command.
|
boolean |
canCancelAddon() |
boolean |
canCancelAddon(boolean checkCommandibility)
Checks whether the unit is able to execute a cancelAddon command.
|
boolean |
canCancelConstruction() |
boolean |
canCancelConstruction(boolean checkCommandibility)
Checks whether the unit is able to execute a cancelConstruction command.
|
boolean |
canCancelMorph() |
boolean |
canCancelMorph(boolean checkCommandibility)
Checks whether the unit is able to execute a cancelMorph command.
|
boolean |
canCancelResearch() |
boolean |
canCancelResearch(boolean checkCommandibility)
Checks whether the unit is able to execute a cancelResearch command.
|
boolean |
canCancelTrain() |
boolean |
canCancelTrain(boolean checkCommandibility)
Checks whether the unit is able to execute a cancelTrain command for any slot.
|
boolean |
canCancelTrainSlot() |
boolean |
canCancelTrainSlot(boolean checkCommandibility) |
boolean |
canCancelTrainSlot(int slot) |
boolean |
canCancelTrainSlot(int slot,
boolean checkCanIssueCommandType) |
boolean |
canCancelTrainSlot(int slot,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a cancelTrain command for an
unspecified slot.
|
boolean |
canCancelUpgrade() |
boolean |
canCancelUpgrade(boolean checkCommandibility)
Checks whether the unit is able to execute a cancelUpgrade command.
|
boolean |
cancelAddon()
Orders this unit to cancel and refund an add-on that is being constructed.
|
boolean |
cancelConstruction()
Orders this unit to cancel and refund itself from begin constructed.
|
boolean |
cancelMorph()
Orders this unit to cancel and refund a unit that is morphing.
|
boolean |
cancelResearch()
Orders this unit to cancel and refund a research that is in progress.
|
boolean |
cancelTrain() |
boolean |
cancelTrain(int slot)
Orders the unit to remove the specified unit from its training queue.
|
boolean |
cancelUpgrade()
Orders this unit to cancel and refund an upgrade that is in progress.
|
boolean |
canCloak() |
boolean |
canCloak(boolean checkCommandibility)
Checks whether the unit is able to execute a cloak command.
|
boolean |
canCommand()
Performs some cheap checks to attempt to quickly detect whether the unit is unable to
execute any commands (eg the unit is stasised).
|
boolean |
canCommandGrouped() |
boolean |
canCommandGrouped(boolean checkCommandibility)
Performs some cheap checks to attempt to quickly detect whether the unit is unable to
execute any commands as part of a List
|
boolean |
canDecloak() |
boolean |
canDecloak(boolean checkCommandibility)
Checks whether the unit is able to execute a decloak command.
|
boolean |
canFollow() |
boolean |
canFollow(boolean checkCommandibility) |
boolean |
canFollow(Unit targetUnit) |
boolean |
canFollow(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canFollow(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canFollow(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a follow command.
|
boolean |
canGather() |
boolean |
canGather(boolean checkCommandibility) |
boolean |
canGather(Unit targetUnit) |
boolean |
canGather(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canGather(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canGather(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a gather command.
|
boolean |
canHaltConstruction() |
boolean |
canHaltConstruction(boolean checkCommandibility)
Checks whether the unit is able to execute a haltConstruction command.
|
boolean |
canHoldPosition() |
boolean |
canHoldPosition(boolean checkCommandibility)
Checks whether the unit is able to execute a holdPosition command.
|
boolean |
canIssueCommand(UnitCommand command) |
boolean |
canIssueCommand(UnitCommand command,
boolean checkCanUseTechPositionOnPositions) |
boolean |
canIssueCommand(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits) |
boolean |
canIssueCommand(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanBuildUnitType) |
boolean |
canIssueCommand(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanBuildUnitType,
boolean checkCanTargetUnit) |
boolean |
canIssueCommand(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanBuildUnitType,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canIssueCommand(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanBuildUnitType,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Checks whether the unit is able to execute the given command.
|
boolean |
canIssueCommandGrouped(UnitCommand command) |
boolean |
canIssueCommandGrouped(UnitCommand command,
boolean checkCanUseTechPositionOnPositions) |
boolean |
canIssueCommandGrouped(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits) |
boolean |
canIssueCommandGrouped(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanTargetUnit) |
boolean |
canIssueCommandGrouped(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canIssueCommandGrouped(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped) |
boolean |
canIssueCommandGrouped(UnitCommand command,
boolean checkCanUseTechPositionOnPositions,
boolean checkCanUseTechUnitOnUnits,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Checks whether the unit is able to execute the given command as part of a List
|
boolean |
canIssueCommandType(UnitCommandType ct) |
boolean |
canIssueCommandType(UnitCommandType ct,
boolean checkCommandibility)
Performs some cheap checks to attempt to quickly detect whether the unit is unable to
execute the given command type (i.e.
|
boolean |
canIssueCommandTypeGrouped(UnitCommandType ct) |
boolean |
canIssueCommandTypeGrouped(UnitCommandType ct,
boolean checkCommandibilityGrouped) |
boolean |
canIssueCommandTypeGrouped(UnitCommandType ct,
boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Performs some cheap checks to attempt to quickly detect whether the unit is unable to
execute the given command type (i.e.
|
boolean |
canLand() |
boolean |
canLand(boolean checkCommandibility) |
boolean |
canLand(TilePosition target) |
boolean |
canLand(TilePosition target,
boolean checkCanIssueCommandType) |
boolean |
canLand(TilePosition target,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a land command.
|
boolean |
canLift() |
boolean |
canLift(boolean checkCommandibility)
Checks whether the unit is able to execute a lift command.
|
boolean |
canLoad() |
boolean |
canLoad(boolean checkCommandibility) |
boolean |
canLoad(Unit targetUnit) |
boolean |
canLoad(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canLoad(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canLoad(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a load command.
|
boolean |
canMorph() |
boolean |
canMorph(boolean checkCommandibility) |
boolean |
canMorph(UnitType uType) |
boolean |
canMorph(UnitType uType,
boolean checkCanIssueCommandType) |
boolean |
canMorph(UnitType uType,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a morph command.
|
boolean |
canMove() |
boolean |
canMove(boolean checkCommandibility)
Checks whether the unit is able to execute a move command.
|
boolean |
canMoveGrouped() |
boolean |
canMoveGrouped(boolean checkCommandibilityGrouped) |
boolean |
canMoveGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Checks whether the unit is able to execute a move command, as part of a List
|
boolean |
canPatrol() |
boolean |
canPatrol(boolean checkCommandibility)
Checks whether the unit is able to execute a patrol command.
|
boolean |
canPatrolGrouped() |
boolean |
canPatrolGrouped(boolean checkCommandibilityGrouped) |
boolean |
canPatrolGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Checks whether the unit is able to execute a patrol command, as part of a List
|
boolean |
canPlaceCOP() |
boolean |
canPlaceCOP(boolean checkCommandibility) |
boolean |
canPlaceCOP(TilePosition target) |
boolean |
canPlaceCOP(TilePosition target,
boolean checkCanIssueCommandType) |
boolean |
canPlaceCOP(TilePosition target,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a placeCOP command.
|
boolean |
canRepair() |
boolean |
canRepair(boolean checkCommandibility) |
boolean |
canRepair(Unit targetUnit) |
boolean |
canRepair(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canRepair(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canRepair(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a repair command.
|
boolean |
canResearch() |
boolean |
canResearch(boolean checkCommandibility) |
boolean |
canResearch(TechType type) |
boolean |
canResearch(TechType type,
boolean checkCanIssueCommandType)
Cheap checks for whether the unit is able to execute a research command.
|
boolean |
canReturnCargo() |
boolean |
canReturnCargo(boolean checkCommandibility)
Checks whether the unit is able to execute a returnCargo command.
|
boolean |
canRightClick() |
boolean |
canRightClick(boolean checkCommandibility) |
boolean |
canRightClick(Position target) |
boolean |
canRightClick(Position target,
boolean checkCanTargetUnit) |
boolean |
canRightClick(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canRightClick(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a rightClick command to a position
or unit.
|
boolean |
canRightClick(Unit target) |
boolean |
canRightClick(Unit target,
boolean checkCanTargetUnit) |
boolean |
canRightClick(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canRightClick(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility) |
boolean |
canRightClickGrouped() |
boolean |
canRightClickGrouped(boolean checkCommandibilityGrouped) |
boolean |
canRightClickGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility) |
boolean |
canRightClickGrouped(Position target) |
boolean |
canRightClickGrouped(Position target,
boolean checkCanTargetUnit) |
boolean |
canRightClickGrouped(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canRightClickGrouped(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped) |
boolean |
canRightClickGrouped(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a rightClick command to a position
or unit, as part of a List
|
boolean |
canRightClickGrouped(Unit target) |
boolean |
canRightClickGrouped(Unit target,
boolean checkCanTargetUnit) |
boolean |
canRightClickGrouped(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canRightClickGrouped(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped) |
boolean |
canRightClickGrouped(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandTypeGrouped,
boolean checkCommandibilityGrouped,
boolean checkCommandibility) |
boolean |
canRightClickPosition() |
boolean |
canRightClickPosition(boolean checkCommandibility)
Checks whether the unit is able to execute a rightClick command for a position.
|
boolean |
canRightClickPositionGrouped() |
boolean |
canRightClickPositionGrouped(boolean checkCommandibilityGrouped) |
boolean |
canRightClickPositionGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Checks whether the unit is able to execute a rightClick command for a position, as part of
a List
|
boolean |
canRightClickUnit() |
boolean |
canRightClickUnit(boolean checkCommandibility) |
boolean |
canRightClickUnit(Unit targetUnit) |
boolean |
canRightClickUnit(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canRightClickUnit(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canRightClickUnit(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a rightClick command to a unit.
|
boolean |
canRightClickUnitGrouped() |
boolean |
canRightClickUnitGrouped(boolean checkCommandibilityGrouped) |
boolean |
canRightClickUnitGrouped(boolean checkCommandibilityGrouped,
boolean checkCommandibility) |
boolean |
canRightClickUnitGrouped(Unit targetUnit) |
boolean |
canRightClickUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canRightClickUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canRightClickUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped) |
boolean |
canRightClickUnitGrouped(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibilityGrouped,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a rightClick command to a unit, as
part of a List
|
boolean |
canSetRallyPoint() |
boolean |
canSetRallyPoint(boolean checkCommandibility) |
boolean |
canSetRallyPoint(Position target) |
boolean |
canSetRallyPoint(Position target,
boolean checkCanTargetUnit) |
boolean |
canSetRallyPoint(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canSetRallyPoint(Position target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a setRallyPoint command to a
position or unit.
|
boolean |
canSetRallyPoint(Unit target) |
boolean |
canSetRallyPoint(Unit target,
boolean checkCanTargetUnit) |
boolean |
canSetRallyPoint(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canSetRallyPoint(Unit target,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility) |
boolean |
canSetRallyPosition() |
boolean |
canSetRallyPosition(boolean checkCommandibility)
Checks whether the unit is able to execute a setRallyPoint command to a position.
|
boolean |
canSetRallyUnit() |
boolean |
canSetRallyUnit(boolean checkCommandibility) |
boolean |
canSetRallyUnit(Unit targetUnit) |
boolean |
canSetRallyUnit(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canSetRallyUnit(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType) |
boolean |
canSetRallyUnit(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a setRallyPoint command to a unit.
|
boolean |
canSiege() |
boolean |
canSiege(boolean checkCommandibility)
Checks whether the unit is able to execute a siege command.
|
boolean |
canStop() |
boolean |
canStop(boolean checkCommandibility)
Checks whether the unit is able to execute a stop command.
|
boolean |
canTargetUnit(Unit targetUnit) |
boolean |
canTargetUnit(Unit targetUnit,
boolean checkCommandibility)
Performs some cheap checks to attempt to quickly detect whether the unit is unable to
use the given unit as the target unit of an unspecified command.
|
boolean |
canTrain() |
boolean |
canTrain(boolean checkCommandibility) |
boolean |
canTrain(UnitType uType) |
boolean |
canTrain(UnitType uType,
boolean checkCanIssueCommandType) |
boolean |
canTrain(UnitType uType,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a train command.
|
boolean |
canUnburrow() |
boolean |
canUnburrow(boolean checkCommandibility)
Checks whether the unit is able to execute an unburrow command.
|
boolean |
canUnload() |
boolean |
canUnload(boolean checkCommandibility) |
boolean |
canUnload(Unit targetUnit) |
boolean |
canUnload(Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canUnload(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkPosition) |
boolean |
canUnload(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkPosition,
boolean checkCanIssueCommandType) |
boolean |
canUnload(Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkPosition,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an unload command.
|
boolean |
canUnloadAll() |
boolean |
canUnloadAll(boolean checkCommandibility)
Checks whether the unit is able to execute an unloadAll command for the current position.
|
boolean |
canUnloadAllPosition() |
boolean |
canUnloadAllPosition(boolean checkCommandibility) |
boolean |
canUnloadAllPosition(Position targDropPos) |
boolean |
canUnloadAllPosition(Position targDropPos,
boolean checkCanIssueCommandType) |
boolean |
canUnloadAllPosition(Position targDropPos,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an unloadAll command for a different
position.
|
boolean |
canUnloadAtPosition(Position targDropPos) |
boolean |
canUnloadAtPosition(Position targDropPos,
boolean checkCanIssueCommandType) |
boolean |
canUnloadAtPosition(Position targDropPos,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an unload command or unloadAll at
current position command or unloadAll at a different position command, for a given
position.
|
boolean |
canUnloadWithOrWithoutTarget() |
boolean |
canUnloadWithOrWithoutTarget(boolean checkCommandibility)
Cheap checks for whether the unit is able to execute an unload command or unloadAll at
current position command or unloadAll at a different position command.
|
boolean |
canUnsiege() |
boolean |
canUnsiege(boolean checkCommandibility)
Checks whether the unit is able to execute an unsiege command.
|
boolean |
canUpgrade() |
boolean |
canUpgrade(boolean checkCommandibility) |
boolean |
canUpgrade(UpgradeType type) |
boolean |
canUpgrade(UpgradeType type,
boolean checkCanIssueCommandType)
Cheap checks for whether the unit is able to execute an upgrade command.
|
boolean |
canUseTech(TechType tech) |
boolean |
canUseTech(TechType tech,
Position target) |
boolean |
canUseTech(TechType tech,
Position target,
boolean checkCanTargetUnit) |
boolean |
canUseTech(TechType tech,
Position target,
boolean checkCanTargetUnit,
boolean checkTargetsType) |
boolean |
canUseTech(TechType tech,
Position target,
boolean checkCanTargetUnit,
boolean checkTargetsType,
boolean checkCanIssueCommandType) |
boolean |
canUseTech(TechType tech,
Position target,
boolean checkCanTargetUnit,
boolean checkTargetsType,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Checks whether the unit is able to execute a useTech command for a specified position or
unit (only specify null if the TechType does not target another position/unit).
|
boolean |
canUseTech(TechType tech,
Unit target) |
boolean |
canUseTech(TechType tech,
Unit target,
boolean checkCanTargetUnit) |
boolean |
canUseTech(TechType tech,
Unit target,
boolean checkCanTargetUnit,
boolean checkTargetsType) |
boolean |
canUseTech(TechType tech,
Unit target,
boolean checkCanTargetUnit,
boolean checkTargetsType,
boolean checkCanIssueCommandType) |
boolean |
canUseTech(TechType tech,
Unit target,
boolean checkCanTargetUnit,
boolean checkTargetsType,
boolean checkCanIssueCommandType,
boolean checkCommandibility) |
boolean |
canUseTechPosition(TechType tech) |
boolean |
canUseTechPosition(TechType tech,
boolean checkCanIssueCommandType) |
boolean |
canUseTechPosition(TechType tech,
boolean checkCanIssueCommandType,
boolean checkCommandibility) |
boolean |
canUseTechPosition(TechType tech,
Position target) |
boolean |
canUseTechPosition(TechType tech,
Position target,
boolean checkTargetsPositions) |
boolean |
canUseTechPosition(TechType tech,
Position target,
boolean checkTargetsPositions,
boolean checkCanIssueCommandType) |
boolean |
canUseTechPosition(TechType tech,
Position target,
boolean checkTargetsPositions,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Checks whether the unit is able to execute a useTech command with an unspecified target
position.
|
boolean |
canUseTechUnit(TechType tech) |
boolean |
canUseTechUnit(TechType tech,
boolean checkCanIssueCommandType) |
boolean |
canUseTechUnit(TechType tech,
boolean checkCanIssueCommandType,
boolean checkCommandibility) |
boolean |
canUseTechUnit(TechType tech,
Unit targetUnit) |
boolean |
canUseTechUnit(TechType tech,
Unit targetUnit,
boolean checkCanTargetUnit) |
boolean |
canUseTechUnit(TechType tech,
Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkTargetsUnits) |
boolean |
canUseTechUnit(TechType tech,
Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkTargetsUnits,
boolean checkCanIssueCommandType) |
boolean |
canUseTechUnit(TechType tech,
Unit targetUnit,
boolean checkCanTargetUnit,
boolean checkTargetsUnits,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a useTech command with an unspecified
target unit.
|
boolean |
canUseTechWithOrWithoutTarget() |
boolean |
canUseTechWithOrWithoutTarget(boolean checkCommandibility) |
boolean |
canUseTechWithOrWithoutTarget(TechType tech) |
boolean |
canUseTechWithOrWithoutTarget(TechType tech,
boolean checkCanIssueCommandType) |
boolean |
canUseTechWithOrWithoutTarget(TechType tech,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Cheap checks for whether the unit is able to execute a useTech command without a target or
or a useTech command with a target position or a useTech command with a target unit.
|
boolean |
canUseTechWithoutTarget(TechType tech) |
boolean |
canUseTechWithoutTarget(TechType tech,
boolean checkCanIssueCommandType) |
boolean |
canUseTechWithoutTarget(TechType tech,
boolean checkCanIssueCommandType,
boolean checkCommandibility)
Checks whether the unit is able to execute a useTech command without a target.
|
boolean |
cloak()
Orders the unit to cloak.
|
int |
compareTo(Unit other) |
boolean |
decloak()
Orders a cloaked unit to decloak.
|
boolean |
equals(Object o) |
boolean |
exists()
Checks if the Unit exists in the view of the BWAPI player.
|
boolean |
follow(Unit target) |
boolean |
follow(Unit target,
boolean shiftQueueCommand)
Orders the unit to follow the specified unit.
|
boolean |
gather(Unit target) |
boolean |
gather(Unit target,
boolean shiftQueueCommand)
Orders the unit to gather the specified unit (must be mineral or refinery type).
|
int |
getAcidSporeCount()
Retrieves the number of acid spores that this unit is inflicted with.
|
Unit |
getAddon()
Retrieves the add-on that is attached to this unit.
|
int |
getAirWeaponCooldown()
Retrieves the unit's air weapon cooldown.
|
double |
getAngle()
Retrieves the unit's facing direction in radians.
|
int |
getBottom()
Retrieves the Y coordinate of the unit's bottom boundary, measured in pixels from
the top of the map.
|
UnitType |
getBuildType()
Retrieves the building type that a @worker is about to construct.
|
Unit |
getBuildUnit()
Retrieves the unit currently being trained, or the corresponding paired unit for @SCVs
and @Terran structures, depending on the context.
|
Unit |
getCarrier()
Retrieves the parent @Carrier that owns this @Interceptor.
|
int |
getDefenseMatrixPoints()
Retrieves the amount of hit points remaining on the @matrix created by a @Science_Vessel.
|
int |
getDefenseMatrixTimer()
Retrieves the time, in frames, that the @matrix will remain active on the current
unit.
|
int |
getDistance(Position target)
Retrieves the distance between this unit and a target position.
|
int |
getDistance(Unit target) |
int |
getEnergy()
Retrieves the unit's current Energy Points (Energy) as seen in the game.
|
int |
getEnsnareTimer()
Retrieves the time, in frames, that @ensnare will remain active on the current
unit.
|
int |
getGroundWeaponCooldown()
Retrieves the unit's ground weapon cooldown.
|
Unit |
getHatchery()
Retrieves the parent @Hatchery, @Lair, or @Hive that owns this particular unit.
|
int |
getHitPoints()
Retrieves the unit's current Hit Points (HP) as seen in the game.
|
int |
getID()
Retrieves a unique identifier for this unit.
|
int |
getInitialHitPoints()
Retrieves the amount of hit points that this unit started off with at the
beginning of the game.
|
Position |
getInitialPosition()
Retrieves the initial position of this unit.
|
int |
getInitialResources()
Retrieves the amount of resources contained in the unit at the beginning of the
game.
|
TilePosition |
getInitialTilePosition()
Retrieves the initial build tile position of this unit.
|
UnitType |
getInitialType()
Retrieves the initial type of the unit.
|
int |
getInterceptorCount()
Retrieves the number of interceptors that this unit manages.
|
List<Unit> |
getInterceptors()
Retrieves the set of @Interceptors controlled by this unit.
|
int |
getIrradiateTimer()
Retrieves the time, in frames, that @irradiate will remain active on the current
unit.
|
int |
getKillCount()
Retrieves the number of units that this unit has killed in total.
|
List<Unit> |
getLarva()
Retrieves the set of @Larvae that were spawned by this unit.
|
Player |
getLastAttackingPlayer()
Retrieves the
Player that last attacked this unit. |
UnitCommand |
getLastCommand()
Retrieves the last successful command that was sent to BWAPI.
|
int |
getLastCommandFrame()
Retrieves the frame number that sent the last successful command.
|
int |
getLeft()
Retrieves the X coordinate of the unit's left boundary, measured in pixels from
the left side of the map.
|
List<Unit> |
getLoadedUnits()
Retrieves the set of units that are contained within this @Bunker or @Transport.
|
int |
getLockdownTimer()
Retrieves the time, in frames, that @lockdown will remain active on the current
unit.
|
int |
getMaelstromTimer()
Retrieves the time, in frames, that @maelstrom will remain active on the current
unit.
|
Unit |
getNydusExit()
Retrieves the @Nydus_Canal that is attached to this one.
|
Order |
getOrder()
Retrieves the primary Order that the unit is assigned.
|
Unit |
getOrderTarget()
Retrieves the unit's primary order target.
|
Position |
getOrderTargetPosition()
Retrieves the target position for the unit's order.
|
int |
getOrderTimer()
Retrieves an internal timer used for the primary order.
|
int |
getPlagueTimer()
Retrieves the time, in frames, that @plague will remain active on the current
unit.
|
Player |
getPlayer()
Retrieves the player that owns this unit.
|
Position |
getPosition()
Retrieves the unit's position from the upper left corner of the map in pixels.
|
Unit |
getPowerUp()
Retrieves the power-up that the worker unit is holding.
|
Position |
getRallyPosition()
Retrieves the position the structure is rallying units to once they are
completed.
|
Unit |
getRallyUnit()
Retrieves the unit the structure is rallying units to once they are completed.
|
Region |
getRegion()
Retrieves the
Region that the center of the unit is in. |
int |
getRemainingBuildTime()
Retrieves the remaining build time for a unit or structure that is being trained
or constructed.
|
int |
getRemainingResearchTime()
Retrieves the amount of time until the unit is done researching its currently
assigned
TechType . |
int |
getRemainingTrainTime()
Retrieves the remaining time, in frames, of the unit that is currently being
trained.
|
int |
getRemainingUpgradeTime()
Retrieves the amount of time until the unit is done upgrading its current upgrade.
|
int |
getRemoveTimer()
Retrieves the time, in frames, until this temporary unit is destroyed or
removed.
|
int |
getReplayID()
Retrieves the unit identifier for this unit as seen in replay data.
|
int |
getResourceGroup()
Retrieves a grouping index from a resource container.
|
int |
getResources()
Retrieves the resource amount from a resource container, such as a Mineral Field
and Vespene Geyser.
|
int |
getRight()
Retrieves the X coordinate of the unit's right boundary, measured in pixels from
the left side of the map.
|
int |
getScarabCount()
Retrieves the number of scarabs that this unit has for use.
|
Order |
getSecondaryOrder()
Retrieves the secondary Order that the unit is assigned.
|
int |
getShields()
Retrieves the unit's current Shield Points (Shields) as seen in the game.
|
int |
getSpaceRemaining()
Retrieves the remaining unit-space available for @Bunkers and @Transports.
|
int |
getSpellCooldown()
Retrieves the unit's ability cooldown.
|
int |
getSpiderMineCount()
Retrieves the amount of @mines this unit has available.
|
int |
getStasisTimer()
Retrieves the time, in frames, that @stasis will remain active on the current
unit.
|
int |
getStimTimer()
Retrieves the time, in frames, that @stim will remain active on the current
unit.
|
Unit |
getTarget()
Generally returns the appropriate target unit after issuing an order that accepts
a target unit (i.e.
|
Position |
getTargetPosition()
Retrieves the target position the unit is moving to, provided a valid path to the
target position exists.
|
TechType |
getTech()
Retrieves the technology that this unit is currently researching.
|
TilePosition |
getTilePosition()
Retrieves the unit's build position from the upper left corner of the map in
tiles.
|
int |
getTop()
Retrieves the Y coordinate of the unit's top boundary, measured in pixels from
the top of the map.
|
List<UnitType> |
getTrainingQueue()
Retrieves the list of unit types queued up to be trained.
|
UnitType |
getTrainingQueueAt(int i)
Retrieves a unit type from a specific index in the queue of units this unit is training.
|
int |
getTrainingQueueCount()
Retrieves the number of units in this unit's training queue.
|
Unit |
getTransport()
Retrieves the @Transport or @Bunker unit that has this unit loaded inside of it.
|
UnitType |
getType()
Retrieves the unit's type.
|
List<Unit> |
getUnitsInRadius(int radius) |
List<Unit> |
getUnitsInRadius(int radius,
UnitFilter pred)
Retrieves the set of all units in a given radius of the current unit.
|
List<Unit> |
getUnitsInWeaponRange(WeaponType weapon) |
List<Unit> |
getUnitsInWeaponRange(WeaponType weapon,
UnitFilter pred)
Obtains the set of units within weapon range of this unit.
|
UpgradeType |
getUpgrade()
Retrieves the upgrade that this unit is currently upgrading.
|
double |
getVelocityX()
Retrieves the x component of the unit's velocity, measured in pixels per frame.
|
double |
getVelocityY()
Retrieves the y component of the unit's velocity, measured in pixels per frame.
|
int |
getX() |
int |
getY() |
boolean |
haltConstruction()
Orders a @SCV to stop constructing a structure.
|
int |
hashCode() |
boolean |
hasNuke()
Checks if the current unit is housing a @Nuke.
|
boolean |
hasPath(Position target)
Using data provided by Starcraft, checks if there is a path available from this
unit to the given target.
|
boolean |
hasPath(Unit target) |
boolean |
holdPosition() |
boolean |
holdPosition(boolean shiftQueueCommand)
Orders the unit to hold its position.
|
boolean |
isAccelerating()
Checks if the current unit is accelerating.
|
boolean |
isAttackFrame()
Checks if this unit is currently playing an attack animation.
|
boolean |
isAttacking()
Checks if this unit is currently attacking something.
|
boolean |
isBeingConstructed()
Checks if the current unit is being constructed.
|
boolean |
isBeingGathered()
Checks this @Mineral_Field or @Refinery is currently being gathered from.
|
boolean |
isBeingHealed()
Checks if this unit is currently being healed by a @Medic or repaired by a @SCV.
|
boolean |
isBlind()
Checks if this unit is currently blinded by a @Medic 's @Optical_Flare ability.
|
boolean |
isBraking()
Checks if the current unit is slowing down to come to a stop.
|
boolean |
isBurrowed()
Checks if the current unit is burrowed, either using the @Burrow ability, or is
an armed @Spider_Mine.
|
boolean |
isCarrying() |
boolean |
isCarryingGas()
Checks if this worker unit is carrying some vespene gas.
|
boolean |
isCarryingMinerals()
Checks if this worker unit is carrying some minerals.
|
boolean |
isCloaked()
Checks if this unit is currently @cloaked.
|
boolean |
isCompleted()
Checks if this unit has finished being constructed, trained, morphed, or warped
in, and can now receive orders.
|
boolean |
isConstructing()
Checks if a unit is either constructing something or moving to construct something.
|
boolean |
isDefenseMatrixed()
Checks if this unit has the @matrix effect.
|
boolean |
isDetected()
Checks if this unit is visible or revealed by a detector unit.
|
boolean |
isEnsnared()
Checks if the @Queen ability @Ensnare has been used on this unit.
|
boolean |
isFlying()
This macro function checks if this unit is in the air.
|
boolean |
isFollowing()
Checks if this unit is following another unit.
|
boolean |
isGatheringGas()
Checks if this unit is currently gathering gas.
|
boolean |
isGatheringMinerals()
Checks if this unit is currently harvesting minerals.
|
boolean |
isHallucination()
Checks if this unit is a hallucination.
|
boolean |
isHoldingPosition()
Checks if the unit is currently holding position.
|
boolean |
isIdle()
Checks if this unit is running an idle order.
|
boolean |
isInterruptible()
Checks if the unit can be interrupted.
|
boolean |
isInvincible()
Checks the invincibility state for this unit.
|
boolean |
isInWeaponRange(Unit target)
Checks if the target unit can immediately be attacked by this unit in the current
frame.
|
boolean |
isIrradiated()
Checks if this unit is irradiated by a @Science_Vessel 's @Irradiate ability.
|
boolean |
isLifted()
Checks if this unit is a @Terran building and lifted off the ground.
|
boolean |
isLoaded()
Checks if this unit is currently loaded into another unit such as a @Transport.
|
boolean |
isLockedDown()
Checks if this unit is currently @locked by a @Ghost.
|
boolean |
isMaelstrommed()
Checks if this unit has been @Maelstrommed by a @Dark_Archon.
|
boolean |
isMorphing()
Finds out if the current unit is morphing or not.
|
boolean |
isMoving()
Checks if this unit is currently moving.
|
boolean |
isParasited()
Checks if this unit has been parasited by some other player.
|
boolean |
isPatrolling()
Checks if this unit is patrolling between two positions.
|
boolean |
isPlagued()
Checks if this unit has been been @plagued by a @defiler.
|
boolean |
isPowered()
Checks if this unit has power.
|
boolean |
isRepairing()
Checks if this unit is repairing or moving to @repair another unit.
|
boolean |
isResearching()
Checks if this unit is a structure that is currently researching a technology.
|
boolean |
isSelected()
Checks if this unit has been selected in the user interface.
|
boolean |
isSieged()
Checks if this unit is currently @sieged.
|
boolean |
isStartingAttack()
Checks if the unit is starting to attack.
|
boolean |
isStasised()
Checks if this unit is inflicted with @Stasis by an @Arbiter.
|
boolean |
isStimmed()
Checks if this unit is currently under the influence of a @Stim_Pack.
|
boolean |
isStuck()
Checks if this unit is currently trying to resolve a collision by randomly moving
around.
|
boolean |
issueCommand(UnitCommand command)
This function issues a command to the unit(s), however it is used for interfacing
only, and is recommended to use one of the more specific command functions when writing an
AI.
|
boolean |
isTargetable()
Performs some cheap checks to attempt to quickly detect whether the unit is
unable to be targetted as the target unit of an unspecified command.
|
boolean |
isTraining()
Checks if this unit is training a new unit.
|
boolean |
isUnderAttack()
Checks if the current unit is being attacked.
|
boolean |
isUnderDarkSwarm()
Checks if this unit is under the cover of a @Dark_Swarm.
|
boolean |
isUnderDisruptionWeb()
Checks if this unit is currently being affected by a @Disruption_Web.
|
boolean |
isUnderStorm()
Checks if this unit is currently taking damage from a @Psi_Storm.
|
boolean |
isUpgrading()
Checks if this unit is a structure that is currently upgrading an upgrade.
|
boolean |
isVisible() |
boolean |
isVisible(Player player)
Checks if this unit is visible.
|
boolean |
land(TilePosition target)
Orders the unit to land.
|
boolean |
lift()
Orders the unit to lift.
|
boolean |
load(Unit target) |
boolean |
load(Unit target,
boolean shiftQueueCommand)
Orders the unit to load the target unit.
|
boolean |
morph(UnitType type)
Orders the unit(s) to morph into a different
UnitType . |
boolean |
move(Position target) |
boolean |
move(Position target,
boolean shiftQueueCommand)
Orders the unit to move from its current position to the specified position.
|
boolean |
patrol(Position target) |
boolean |
patrol(Position target,
boolean shiftQueueCommand)
Orders the unit to patrol between its current position and the specified position.
|
boolean |
placeCOP(TilePosition target)
Moves a @Flag_Beacon to a different location.
|
boolean |
repair(Unit target) |
boolean |
repair(Unit target,
boolean shiftQueueCommand)
Orders the unit to repair the specified unit.
|
boolean |
research(TechType tech)
Orders the unit to research the given tech type.
|
boolean |
returnCargo() |
boolean |
returnCargo(boolean shiftQueueCommand)
Orders the unit to return its cargo to a nearby resource depot such as a Command
Center.
|
boolean |
rightClick(Position target) |
boolean |
rightClick(Position target,
boolean shiftQueueCommand)
Performs a right click action as it would work in StarCraft.
|
boolean |
rightClick(Unit target) |
boolean |
rightClick(Unit target,
boolean shiftQueueCommand) |
boolean |
setRallyPoint(Position target)
Orders the unit to set its rally position.
|
boolean |
setRallyPoint(Unit target) |
boolean |
siege()
Orders the unit to siege.
|
boolean |
stop() |
boolean |
stop(boolean shiftQueueCommand)
Orders the unit to stop.
|
boolean |
train(UnitType type)
Orders the unit(s) to add a UnitType to its training queue, or morphs into the
UnitType if it is @Zerg. |
boolean |
unburrow()
Orders a burrowed unit to unburrow.
|
boolean |
unload(Unit target)
Orders the unit to unload the target unit.
|
boolean |
unloadAll() |
boolean |
unloadAll(boolean shiftQueueCommand) |
boolean |
unloadAll(Position target) |
boolean |
unloadAll(Position target,
boolean shiftQueueCommand)
Orders the unit to unload all loaded units at the unit's current position.
|
boolean |
unsiege()
Orders the unit to unsiege.
|
boolean |
upgrade(UpgradeType upgrade)
Orders the unit to upgrade the given upgrade type.
|
boolean |
useTech(TechType tech) |
boolean |
useTech(TechType tech,
Position target)
Orders the unit to use a technology.
|
boolean |
useTech(TechType tech,
Unit target) |
public int getID()
getReplayID()
public boolean exists()
This is used primarily to check if BWAPI has access to a specific unit, or if the unit is alive. This function is more general and would be synonymous to an isAlive function if such a function were necessary.
In the event that this function returns false, there are two cases to consider: 1. You own the unit. This means the unit is dead. 2. Another player owns the unit. This could either mean that you don't have access to the unit or that the unit has died. You can specifically identify dead units by polling onUnitDestroy.
isVisible()
,
isCompleted()
public int getReplayID()
This is only available if Flag.CompleteMapInformation
is enabled.
getID()
public Player getPlayer()
Game.neutral()
If the unit is a neutral unit or inaccessible.public UnitType getType()
UnitType
objects representing the unit's type. Returns UnitType.Unknown
if this unit is inaccessible or cannot be determined.getInitialType()
public Position getPosition()
The unit bounds are defined as this value plus/minus the values of
UnitType.dimensionLeft()
, UnitType.dimensionUp()
, UnitType.dimensionRight()
,
and UnitType.dimensionDown()
, which is conveniently expressed in getLeft()
,
getTop()
, getRight()
, and getBottom()
respectively.
Position
object representing the unit's current position. Returns Position.Unknown
if this unit is inaccessible.getTilePosition()
,
getInitialPosition()
,
getLeft()
,
getTop()
public int getX()
public int getY()
public TilePosition getTilePosition()
This tile position is the tile that is at the top left corner of the structure.
TilePosition
object representing the unit's current tile position. Returns TilePosition.Unknown
if this unit is inaccessible.getPosition()
,
getInitialTilePosition()
public double getAngle()
A value of 0.0 means the unit is facing east.
public double getVelocityX()
getVelocityY()
public double getVelocityY()
getVelocityX()
public Region getRegion()
Region
that the center of the unit is in.Region
object that contains this unit. Returns null if the unit is inaccessible.public int getLeft()
getTop()
,
getRight()
,
getBottom()
public int getTop()
getLeft()
,
getRight()
,
getBottom()
public int getRight()
getLeft()
,
getTop()
,
getBottom()
public int getBottom()
getLeft()
,
getTop()
,
getRight()
public int getHitPoints()
In Starcraft, a unit usually dies when its HP reaches 0. It is possible however, to have abnormal HP values in the Use Map Settings game type and as the result of a hack over Battle.net. Such values include units that have 0 HP (can't be killed conventionally) or even negative HP (death in one hit).
UnitType.maxHitPoints()
,
getShields()
,
getInitialHitPoints()
public int getShields()
UnitType.maxShields()
,
getHitPoints()
public int getEnergy()
Energy is required in order for units to use abilities.
UnitType.maxEnergy()
public int getResources()
getInitialResources()
public int getResourceGroup()
This grouping method is explicitly determined by Starcraft itself and is used only by the internal AI.
public int getDistance(Position target)
Distance is calculated from the edge of this unit, using Starcraft's own distance algorithm. Ignores collisions.
target
- A Position
to calculate the distance to.public int getDistance(Unit target)
public boolean hasPath(Position target)
This function only takes into account the terrain data, and does not include buildings when determining if a path is available. However, the complexity of this function is constant ( O(1) ), and no extensive calculations are necessary.
If the current unit is an air unit, then this function will always return true.
If the unit somehow gets stuck in unwalkable terrain, then this function may still return true if one of the unit's corners is on walkable terrain (i.e. if the unit is expected to return to the walkable terrain).
target
- A Position
or a Unit
that is used to determine if this unit has a path to the target.Game.hasPath(bwapi.Position, bwapi.Position)
public boolean hasPath(Unit target)
public int getLastCommandFrame()
This value is comparable to Game.getFrameCount()
.
Game.getFrameCount()
,
getLastCommand()
public UnitCommand getLastCommand()
UnitCommand
object containing information about the command that was processed.getLastCommandFrame()
public Player getLastAttackingPlayer()
Player
that last attacked this unit.public UnitType getInitialType()
UnitType
of this unit as it was when it was created.
Returns UnitType.Unknown
if this unit was not a static neutral unit in the beginning of the game.public Position getInitialPosition()
Position
indicating the unit's initial position when it was created.
Returns Position.Unknown
if this unit was not a static neutral unit in the beginning of
the game.public TilePosition getInitialTilePosition()
TilePosition
indicating the unit's initial tile position when it was created.
Returns TilePosition.Unknown
if this unit was not a static neutral unit in the beginning of
the game.public int getInitialHitPoints()
It is possible for the unit's initial hit points to differ from the maximum hit points.
Game.getStaticNeutralUnits()
public int getInitialResources()
Game.getStaticNeutralUnits()
public int getKillCount()
The maximum amount of recorded kills per unit is 255.
public int getAcidSporeCount()
public int getInterceptorCount()
This number may differ from the number of units returned from #getInterceptors. This occurs for cases in which you can see the number of enemy interceptors in the Carrier HUD, but don't actually have access to the individual interceptors.
getInterceptors()
public int getScarabCount()
public int getSpiderMineCount()
public int getGroundWeaponCooldown()
This value will vary, because Starcraft adds an additional random value between (-1) and (+2) to the unit's weapon cooldown.
public int getAirWeaponCooldown()
This value will vary, because Starcraft adds an additional random value between (-1) and (+2) to the unit's weapon cooldown.
public int getSpellCooldown()
This value will vary, because Starcraft adds an additional random value between (-1) and (+2) to the unit's ability cooldown.
public int getDefenseMatrixPoints()
getDefenseMatrixTimer()
,
isDefenseMatrixed()
public int getDefenseMatrixTimer()
getDefenseMatrixPoints()
,
isDefenseMatrixed()
public int getEnsnareTimer()
isEnsnared()
public int getIrradiateTimer()
isIrradiated()
public int getLockdownTimer()
isLockedDown()
public int getMaelstromTimer()
isMaelstrommed()
public int getOrderTimer()
getOrder()
public int getPlagueTimer()
isPlagued()
public int getRemoveTimer()
public int getStasisTimer()
isPlagued()
public int getStimTimer()
isPlagued()
public UnitType getBuildType()
UnitType
that it
will become when it has completed morphing/constructing.UnitType
indicating the type that a @worker is about to construct, or an
incomplete unit will be when completed.public List<UnitType> getTrainingQueue()
train(bwapi.UnitType)
,
cancelTrain()
,
isTraining()
public UnitType getTrainingQueueAt(int i)
public int getTrainingQueueCount()
public TechType getTech()
TechType
indicating the technology being researched by this unit.
Returns TechType.None
if this unit is not researching anything.research(bwapi.TechType)
,
cancelResearch()
,
isResearching()
,
getRemainingResearchTime()
public UpgradeType getUpgrade()
UpgradeType
indicating the upgrade in progress by this unit.
Returns UpgradeType.None
if this unit is not upgrading anything.upgrade(bwapi.UpgradeType)
,
cancelUpgrade()
,
isUpgrading()
,
getRemainingUpgradeTime()
public int getRemainingBuildTime()
public int getRemainingTrainTime()
If the unit is a @Hatchery, @Lair, or @Hive, this retrieves the amount of time until the next larva spawns.
+ @see #train
getTrainingQueue()
public int getRemainingResearchTime()
TechType
.research(bwapi.TechType)
,
cancelResearch()
,
isResearching()
,
getTech()
public int getRemainingUpgradeTime()
upgrade(bwapi.UpgradeType)
,
cancelUpgrade()
,
isUpgrading()
,
getUpgrade()
public Unit getBuildUnit()
BUG: This will return an incorrect unit when called on @Reavers.
public Unit getTarget()
getOrderTarget()
.getOrderTarget()
public Position getTargetPosition()
public Order getOrder()
Order.AttackUnit
and Order.PlayerGuard
.Order
that the unit is executing.public Order getSecondaryOrder()
Order.TrainFighter
,
because a @Carrier can move and train fighters at the same time.Order
that the unit is executing.public Unit getOrderTarget()
Unit
that this unit is currently targetting.getTarget()
,
getOrder()
public Position getOrderTargetPosition()
Order.Move
is assigned, getTargetPosition()
returns the end of the unit's path, but this
returns the location that the unit is trying to move to.Position
that this unit is currently targetting.getTargetPosition()
,
getOrder()
public Position getRallyPosition()
Position
that a completed unit coming from this structure will travel to.
Returns Position.None
If this building does not produce units.
If getRallyUnit()
is valid, then this value is ignored.
setRallyPoint(bwapi.Position)
,
getRallyUnit()
public Unit getRallyUnit()
Unit
that a completed unit coming from this structure will travel to.
Returns null if the structure is not rallied to a unit or it does not produce units.
A rallied unit takes precedence over a rallied position. That is if the return value is valid(non-null), then getRallyPosition is ignored.
setRallyPoint(bwapi.Position)
,
getRallyPosition()
public Unit getAddon()
public Unit getNydusExit()
Unit
object representing the @Nydus_Canal connected to this one.
Returns null if the unit is not a @Nydus_Canal, is not owned, or has not placed a Nydus
Exit.public Unit getPowerUp()
If your bot is strictly melee/1v1, then this method is not necessary.
Unit
object that represents the power-up.
Returns null if the unit is not carrying anything.public Unit getTransport()
public List<Unit> getLoadedUnits()
public int getSpaceRemaining()
getLoadedUnits()
public Unit getCarrier()
public List<Unit> getInterceptors()
getInterceptorCount()
public Unit getHatchery()
getLarva()
public List<Unit> getLarva()
getHatchery()
public List<Unit> getUnitsInRadius(int radius, UnitFilter pred)
Takes into account this unit's dimensions. Can optionally specify a filter that is composed using BWAPI Filter semantics to include only specific units (such as only ground units, etc.)
radius
- The radius, in pixels, to search for units.pred
- The composed function predicate to include only specific (desired) units in the set. Defaults to null, which means no filter.Game.getClosestUnit(bwapi.Position)
,
getUnitsInWeaponRange(bwapi.WeaponType)
,
Game.getUnitsInRadius(int, int, int)
,
Game.getUnitsInRectangle(int, int, int, int)
public List<Unit> getUnitsInWeaponRange(WeaponType weapon)
public List<Unit> getUnitsInWeaponRange(WeaponType weapon, UnitFilter pred)
weapon
- The weapon type to use as a filter for distance and units that can be hit by it.pred
- A predicate used as an additional filter. If omitted, no additional filter is used.getUnitsInRadius(int)
,
Game.getClosestUnit(bwapi.Position)
,
Game.getUnitsInRadius(int, int, int)
,
Game.getUnitsInRectangle(int, int, int, int)
public boolean hasNuke()
public boolean isAccelerating()
public boolean isAttacking()
public boolean isAttackFrame()
This function is only available to some unit types, specifically those that play special animations when they attack.
public boolean isBeingConstructed()
build(bwapi.UnitType)
,
cancelConstruction()
,
haltConstruction()
,
isConstructing()
public boolean isBeingGathered()
public boolean isBeingHealed()
public boolean isBlind()
public boolean isBraking()
public boolean isBurrowed()
burrow()
,
unburrow()
public boolean isCarrying()
public boolean isCarryingGas()
returnCargo()
,
isGatheringGas()
,
isCarryingMinerals()
public boolean isCarryingMinerals()
returnCargo()
,
isGatheringMinerals()
,
isCarryingMinerals()
public boolean isCloaked()
public boolean isCompleted()
public boolean isConstructing()
isBeingConstructed()
,
build(bwapi.UnitType)
,
cancelConstruction()
,
haltConstruction()
public boolean isDefenseMatrixed()
public boolean isDetected()
public boolean isEnsnared()
public boolean isFlying()
UnitType.isFlyer()
,
isLifted()
public boolean isFollowing()
follow(bwapi.Unit)
,
getTarget()
public boolean isGatheringGas()
isCarryingGas()
public boolean isGatheringMinerals()
isCarryingMinerals()
public boolean isHallucination()
Flag.CompleteMapInformation
is disabled. Hallucinations have a time limit until they are
destroyed (see getRemoveTimer()
).getRemoveTimer()
public boolean isHoldingPosition()
holdPosition()
public boolean isIdle()
A unit is considered idle if it is not doing any of the following: - Training - Constructing - Morphing - Researching - Upgrading
In addition to running one of the following orders: - Order.PlayerGuard: Player unit idle. - Order.Guard: Generic unit idle. - Order.Stop - Order.PickupIdle - Order.Nothing: Structure/generic idle. - Order.Medic: Medic idle. - Order.Carrier: Carrier idle. - Order.Reaver: Reaver idle. - Order.Critter: Critter idle. - Order.Neutral: Neutral unit idle. - Order.TowerGuard: Turret structure idle. - Order.Burrowed: Burrowed unit idle. - Order.NukeTrain - Order.Larva: Larva idle.
stop()
public boolean isInterruptible()
public boolean isInvincible()
public boolean isInWeaponRange(Unit target)
target
- The target unit to use in this check.public boolean isIrradiated()
getIrradiateTimer()
public boolean isLifted()
isFlying()
public boolean isLoaded()
load(bwapi.Unit)
,
unload(bwapi.Unit)
,
unloadAll()
public boolean isLockedDown()
getLockdownTimer()
public boolean isMaelstrommed()
getMaelstromTimer()
public boolean isMorphing()
morph(bwapi.UnitType)
,
cancelMorph()
,
getBuildType()
,
getRemainingBuildTime()
public boolean isMoving()
stop()
public boolean isParasited()
public boolean isPatrolling()
patrol(bwapi.Position)
public boolean isPlagued()
getPlagueTimer()
public boolean isRepairing()
public boolean isResearching()
research(bwapi.TechType)
,
cancelResearch()
,
getTech()
,
getRemainingResearchTime()
public boolean isSelected()
Game.getSelectedUnits()
public boolean isSieged()
public boolean isStartingAttack()
attack(bwapi.Position)
,
getGroundWeaponCooldown()
,
getAirWeaponCooldown()
public boolean isStasised()
This function does not necessarily imply that the unit is invincible, since there is a feature in the @UMS game type that allows stasised units to be vulnerable.
getStasisTimer()
public boolean isStimmed()
getStimTimer()
public boolean isStuck()
public boolean isTraining()
It is possible for a unit to remain in the training queue with no progress. In that case, this function will return false because of supply or unit count limitations.
train(bwapi.UnitType)
,
getTrainingQueue()
,
cancelTrain()
,
getRemainingTrainTime()
public boolean isUnderAttack()
public boolean isUnderDarkSwarm()
public boolean isUnderDisruptionWeb()
public boolean isUnderStorm()
public boolean isPowered()
public boolean isUpgrading()
upgrade(bwapi.UpgradeType)
,
cancelUpgrade()
,
getUpgrade()
,
getRemainingUpgradeTime()
public boolean isVisible()
public boolean isVisible(Player player)
player
- The player to check visibility for. If this parameter is omitted, then the BWAPI player obtained from Game.self()
will be used.
If the Flag.CompleteMapInformation
flag is enabled, existing units hidden by the
fog of war will be accessible, but isVisible will still return false.
exists()
public boolean isTargetable()
canTargetUnit(bwapi.Unit)
public boolean issueCommand(UnitCommand command)
command
- A UnitCommand
containing command parameters such as the type, position, target, etc.There is a small chance for a command to fail after it has been passed to Broodwar.
UnitCommandType
,
canIssueCommand(bwapi.UnitCommand, boolean, boolean, boolean, boolean, boolean)
public boolean attack(Position target)
public boolean attack(Unit target)
public boolean attack(Position target, boolean shiftQueueCommand)
target
- A Position
to designate as the target. The unit will perform an Attack Move command.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
A @Medic will use Heal Move instead of attack.
canAttack()
public boolean attack(Unit target, boolean shiftQueueCommand)
public boolean build(UnitType type)
public boolean build(UnitType type, TilePosition target)
type
- The UnitType
to build.target
- A TilePosition
to specify the build location, specifically the upper-left corner of the location. If the target is not specified, then the function call will be redirected to the train command.There is a small chance for a command to fail after it has been passed to Broodwar.
You must have sufficient resources and meet the necessary requirements in order to build a structure.
train(bwapi.UnitType)
,
cancelConstruction()
,
canBuild()
public boolean buildAddon(UnitType type)
type
- The add-on UnitType
to construct.There is a small chance for a command to fail after it has been passed to Broodwar.
You must have sufficient resources and meet the necessary requirements in order to build a structure.
build(bwapi.UnitType)
,
cancelAddon()
,
canBuildAddon()
public boolean train(UnitType type)
UnitType
if it is @Zerg.type
- The UnitType
to train.There is a small chance for a command to fail after it has been passed to Broodwar.
You must have sufficient resources, supply, and meet the necessary requirements in order to train a unit.
This command is also used for training @Interceptors and @Scarabs. If you call this using a @Hatchery, @Lair, or @Hive, then it will automatically pass the command to one of its @Larvae.
build(bwapi.UnitType)
,
morph(bwapi.UnitType)
,
cancelTrain()
,
isTraining()
,
canTrain()
public boolean morph(UnitType type)
UnitType
.type
- The UnitType
to morph into.There is a small chance for a command to fail after it has been passed to Broodwar.
build(bwapi.UnitType)
,
morph(bwapi.UnitType)
,
canMorph()
public boolean research(TechType tech)
tech
- The TechType
to research.There is a small chance for a command to fail after it has been passed to Broodwar.
cancelResearch()
,
isResearching()
,
getRemainingResearchTime()
,
getTech()
,
canResearch()
public boolean upgrade(UpgradeType upgrade)
upgrade
- The UpgradeType
to upgrade.There is a small chance for a command to fail after it has been passed to Broodwar.
cancelUpgrade()
,
isUpgrading()
,
getRemainingUpgradeTime()
,
getUpgrade()
,
canUpgrade()
public boolean setRallyPoint(Position target)
target
- The target position that this structure will rally completed units to.There is a small chance for a command to fail after it has been passed to Broodwar.
getRallyPosition()
,
getRallyUnit()
,
canSetRallyPoint()
,
canSetRallyPosition()
,
canSetRallyUnit()
public boolean setRallyPoint(Unit target)
public boolean move(Position target)
public boolean move(Position target, boolean shiftQueueCommand)
target
- The target position to move to.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.isMoving()
,
canMove()
public boolean patrol(Position target)
public boolean patrol(Position target, boolean shiftQueueCommand)
target
- The position to patrol to.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
isPatrolling()
,
canPatrol()
public boolean holdPosition()
public boolean holdPosition(boolean shiftQueueCommand)
shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
canHoldPosition()
,
isHoldingPosition()
public boolean stop()
public boolean stop(boolean shiftQueueCommand)
shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
canStop()
,
isIdle()
public boolean follow(Unit target)
public boolean follow(Unit target, boolean shiftQueueCommand)
target
- The target unit to start following.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
isFollowing()
,
canFollow()
,
getOrderTarget()
public boolean gather(Unit target)
public boolean gather(Unit target, boolean shiftQueueCommand)
target
- The target unit to gather from.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
isGatheringGas()
,
isGatheringMinerals()
,
canGather()
public boolean returnCargo()
public boolean returnCargo(boolean shiftQueueCommand)
shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
isCarryingGas()
,
isCarryingMinerals()
,
canReturnCargo()
public boolean repair(Unit target)
public boolean repair(Unit target, boolean shiftQueueCommand)
target
- The unit to repair.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
isRepairing()
,
canRepair()
public boolean burrow()
unburrow()
,
isBurrowed()
,
canBurrow()
public boolean unburrow()
There is a small chance for a command to fail after it has been passed to Broodwar.
burrow()
,
isBurrowed()
,
canUnburrow()
public boolean cloak()
There is a small chance for a command to fail after it has been passed to Broodwar.
decloak()
,
isCloaked()
,
canCloak()
public boolean decloak()
There is a small chance for a command to fail after it has been passed to Broodwar.
cloak()
,
isCloaked()
,
canDecloak()
public boolean siege()
There is a small chance for a command to fail after it has been passed to Broodwar.
unsiege()
,
isSieged()
,
canSiege()
public boolean unsiege()
There is a small chance for a command to fail after it has been passed to Broodwar.
siege()
,
isSieged()
,
canUnsiege()
public boolean lift()
There is a small chance for a command to fail after it has been passed to Broodwar.
land(bwapi.TilePosition)
,
isLifted()
,
canLift()
public boolean land(TilePosition target)
target
- The tile position to land this structure at.There is a small chance for a command to fail after it has been passed to Broodwar.
lift()
,
isLifted()
,
canLand()
public boolean load(Unit target)
public boolean load(Unit target, boolean shiftQueueCommand)
target
- The target unit to load into this @Transport or @Bunker.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
unload(bwapi.Unit)
,
unloadAll()
,
getLoadedUnits()
,
isLoaded()
public boolean unload(Unit target)
target
- Unloads the target unit from this @Transport or @Bunker.There is a small chance for a command to fail after it has been passed to Broodwar.
load(bwapi.Unit)
,
unloadAll()
,
getLoadedUnits()
,
isLoaded()
,
canUnload()
,
canUnloadAtPosition(bwapi.Position, boolean)
public boolean unloadAll()
public boolean unloadAll(boolean shiftQueueCommand)
public boolean unloadAll(Position target)
public boolean unloadAll(Position target, boolean shiftQueueCommand)
shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
load(bwapi.Unit)
,
unload(bwapi.Unit)
,
getLoadedUnits()
,
isLoaded()
,
canUnloadAll()
,
canUnloadAtPosition(bwapi.Position, boolean)
public boolean rightClick(Position target)
public boolean rightClick(Unit target)
public boolean rightClick(Position target, boolean shiftQueueCommand)
target
- The target position to right click.shiftQueueCommand
- If this value is true, then the order will be queued instead of immediately executed. If this value is omitted, then the order will be executed immediately by default.There is a small chance for a command to fail after it has been passed to Broodwar.
canRightClick()
,
canRightClickPosition()
,
canRightClickUnit()
public boolean rightClick(Unit target, boolean shiftQueueCommand)
public boolean haltConstruction()
There is a small chance for a command to fail after it has been passed to Broodwar.
isConstructing()
,
canHaltConstruction()
public boolean cancelConstruction()
There is a small chance for a command to fail after it has been passed to Broodwar.
isBeingConstructed()
,
build(bwapi.UnitType)
,
canCancelConstruction()
public boolean cancelAddon()
There is a small chance for a command to fail after it has been passed to Broodwar.
canCancelAddon()
,
buildAddon(bwapi.UnitType)
public boolean cancelTrain()
public boolean cancelTrain(int slot)
slot
- Identifies the slot that will be cancelled. If the specified value is at least 0, then the unit in the corresponding slot from the list provided by getTrainingQueue()
will be cancelled. If the value is either omitted or -2, then the last slot is cancelled.
The value of slot is passed directly to Broodwar. Other negative values have no effect.
train(bwapi.UnitType)
,
cancelTrain()
,
isTraining()
,
getTrainingQueue()
,
canCancelTrain()
,
canCancelTrainSlot()
public boolean cancelMorph()
There is a small chance for a command to fail after it has been passed to Broodwar.
morph(bwapi.UnitType)
,
isMorphing()
,
canCancelMorph()
public boolean cancelResearch()
There is a small chance for a command to fail after it has been passed to Broodwar.
research(bwapi.TechType)
,
isResearching()
,
getTech()
,
canCancelResearch()
public boolean cancelUpgrade()
There is a small chance for a command to fail after it has been passed to Broodwar.
upgrade(bwapi.UpgradeType)
,
isUpgrading()
,
getUpgrade()
,
canCancelUpgrade()
public boolean useTech(TechType tech)
public boolean useTech(TechType tech, Position target)
tech
- The technology type to use.target
- If specified, indicates the target location to use the tech on.canUseTechWithOrWithoutTarget()
,
canUseTech(bwapi.TechType, bwapi.Position, boolean, boolean, boolean)
,
canUseTechWithoutTarget(bwapi.TechType, boolean)
,
canUseTechUnit(bwapi.TechType, boolean)
,
canUseTechPosition(bwapi.TechType, boolean)
,
TechType
public boolean placeCOP(TilePosition target)
target
- The target tile position to place the @Flag_Beacon.There is a small chance for a command to fail after it has been passed to Broodwar.
This command is only available for the first 10 minutes of the game, as in Broodwar.
canPlaceCOP()
public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit)
public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType)
public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits)
public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions)
public boolean canIssueCommand(UnitCommand command)
public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
command
- A UnitCommand
to check.checkCanUseTechPositionOnPositions
- Only used if the command type is UnitCommandType.Use_Tech_Position
. A boolean for whether to perform cheap checks for whether the unit is unable to target any positions using the command's TechType
(i.e. regardless of what the other command parameters are). You can set this to false if you know this check has already just been performed.checkCanUseTechUnitOnUnits
- Only used if the command type is UnitCommandType.Use_Tech_Unit
. A boolean for whether to perform cheap checks for whether the unit is unable to target any units using the command's TechType
(i.e. regardless of what the other command parameters are). You can set this to false if you know this check has already just been performed.checkCanBuildUnitType
- Only used if the command type is UnitCommandType.Build
. A boolean for whether to perform cheap checks for whether the unit is unable to build the specified UnitType
(i.e. regardless of what the other command parameters are). You can set this to false if you know this check has already just been performed.checkCanTargetUnit
- Only used for command types that can target a unit. A boolean for whether to perform canTargetUnit(bwapi.Unit)
as a check. You can set this to false if you know this check has already just been performed.checkCanIssueCommandType
- A boolean for whether to perform canIssueCommandType(bwapi.UnitCommandType)
as a check. You can set this to false if you know this check has already just been performed.checkCommandibility
- A boolean for whether to perform canCommand()
as a check. You can set this to false if you know this check has already just been performed.UnitCommandType
,
canCommand()
,
canIssueCommandType(bwapi.UnitCommandType)
,
canTargetUnit(bwapi.Unit)
public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped)
public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit)
public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits)
public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions)
public boolean canIssueCommandGrouped(UnitCommand command)
public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility)
BWAPI allows the following special cases to command a unit individually (rather than
only allowing it to be commanded as part of a List
public boolean canCommand()
canIssueCommand(bwapi.UnitCommand, boolean, boolean, boolean, boolean, boolean)
public boolean canCommandGrouped()
public boolean canCommandGrouped(boolean checkCommandibility)
canIssueCommandGrouped(bwapi.UnitCommand, boolean, boolean, boolean, boolean, boolean)
,
canIssueCommand(bwapi.UnitCommand, boolean, boolean, boolean, boolean, boolean)
public boolean canIssueCommandType(UnitCommandType ct)
public boolean canIssueCommandType(UnitCommandType ct, boolean checkCommandibility)
ct
- A UnitCommandType
.checkCommandibility
- A boolean for whether to perform canCommand()
as a check. You can set this to false if you know this check has already just been performed.UnitCommandType
,
canIssueCommand(bwapi.UnitCommand, boolean, boolean, boolean, boolean, boolean)
public boolean canIssueCommandTypeGrouped(UnitCommandType ct, boolean checkCommandibilityGrouped)
public boolean canIssueCommandTypeGrouped(UnitCommandType ct)
public boolean canIssueCommandTypeGrouped(UnitCommandType ct, boolean checkCommandibilityGrouped, boolean checkCommandibility)
ct
- A UnitCommandType
.checkCommandibilityGrouped
- A boolean for whether to perform canCommandGrouped()
as a check. You can set this to false if you know this check has already just been performed.checkCommandibility
- A boolean for whether to perform canCommand()
as a check. You can set this to false if you know this check has already just been performed.UnitCommandType
,
canIssueCommandGrouped(bwapi.UnitCommand, boolean, boolean, boolean, boolean, boolean)
public boolean canTargetUnit(Unit targetUnit)
public boolean canTargetUnit(Unit targetUnit, boolean checkCommandibility)
targetUnit
- A target unit for an unspecified command.checkCommandibility
- A boolean for whether to perform canCommand()
as a check. You can set this to false if you know this check has already just been performed.canIssueCommand(bwapi.UnitCommand, boolean, boolean, boolean, boolean, boolean)
,
isTargetable()
public boolean canAttack()
public boolean canAttack(boolean checkCommandibility)
public boolean canAttack(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canAttack(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canAttack(Position target, boolean checkCanTargetUnit)
public boolean canAttack(Unit target, boolean checkCanTargetUnit)
public boolean canAttack(Position target)
public boolean canAttack(Unit target)
public boolean canAttack(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canAttack(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canAttackGrouped(boolean checkCommandibilityGrouped)
public boolean canAttackGrouped()
public boolean canAttackGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canAttackGrouped(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped)
public boolean canAttackGrouped(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped)
public boolean canAttackGrouped(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canAttackGrouped(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canAttackGrouped(Position target, boolean checkCanTargetUnit)
public boolean canAttackGrouped(Unit target, boolean checkCanTargetUnit)
public boolean canAttackGrouped(Position target)
public boolean canAttackGrouped(Unit target)
public boolean canAttackGrouped(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canAttackGrouped(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canAttackMove()
public boolean canAttackMove(boolean checkCommandibility)
public boolean canAttackMoveGrouped(boolean checkCommandibilityGrouped)
public boolean canAttackMoveGrouped()
public boolean canAttackMoveGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canAttackUnit()
public boolean canAttackUnit(boolean checkCommandibility)
public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canAttackUnit(Unit targetUnit)
public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canAttackUnitGrouped(boolean checkCommandibilityGrouped)
public boolean canAttackUnitGrouped()
public boolean canAttackUnitGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped)
public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canAttackUnitGrouped(Unit targetUnit)
public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandTypeGrouped, boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canBuild()
public boolean canBuild(boolean checkCommandibility)
public boolean canBuild(UnitType uType, boolean checkCanIssueCommandType)
public boolean canBuild(UnitType uType)
public boolean canBuild(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType)
public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType)
public boolean canBuild(UnitType uType, TilePosition tilePos)
public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canBuildAddon()
public boolean canBuildAddon(boolean checkCommandibility)
public boolean canBuildAddon(UnitType uType, boolean checkCanIssueCommandType)
public boolean canBuildAddon(UnitType uType)
public boolean canBuildAddon(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canTrain()
public boolean canTrain(boolean checkCommandibility)
public boolean canTrain(UnitType uType, boolean checkCanIssueCommandType)
public boolean canTrain(UnitType uType)
public boolean canTrain(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canMorph()
public boolean canMorph(boolean checkCommandibility)
public boolean canMorph(UnitType uType, boolean checkCanIssueCommandType)
public boolean canMorph(UnitType uType)
public boolean canMorph(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canResearch()
public boolean canResearch(boolean checkCommandibility)
public boolean canResearch(TechType type)
public boolean canResearch(TechType type, boolean checkCanIssueCommandType)
public boolean canUpgrade()
public boolean canUpgrade(boolean checkCommandibility)
public boolean canUpgrade(UpgradeType type)
public boolean canUpgrade(UpgradeType type, boolean checkCanIssueCommandType)
public boolean canSetRallyPoint()
public boolean canSetRallyPoint(boolean checkCommandibility)
public boolean canSetRallyPoint(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canSetRallyPoint(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canSetRallyPoint(Position target, boolean checkCanTargetUnit)
public boolean canSetRallyPoint(Unit target, boolean checkCanTargetUnit)
public boolean canSetRallyPoint(Position target)
public boolean canSetRallyPoint(Unit target)
public boolean canSetRallyPoint(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canSetRallyPoint(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canSetRallyPosition()
public boolean canSetRallyPosition(boolean checkCommandibility)
public boolean canSetRallyUnit()
public boolean canSetRallyUnit(boolean checkCommandibility)
public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canSetRallyUnit(Unit targetUnit)
public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canMove()
public boolean canMove(boolean checkCommandibility)
public boolean canMoveGrouped(boolean checkCommandibilityGrouped)
public boolean canMoveGrouped()
public boolean canMoveGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canPatrol()
public boolean canPatrol(boolean checkCommandibility)
public boolean canPatrolGrouped(boolean checkCommandibilityGrouped)
public boolean canPatrolGrouped()
public boolean canPatrolGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canFollow()
public boolean canFollow(boolean checkCommandibility)
public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canFollow(Unit targetUnit)
public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canGather()
public boolean canGather(boolean checkCommandibility)
public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canGather(Unit targetUnit)
public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canReturnCargo()
public boolean canReturnCargo(boolean checkCommandibility)
public boolean canHoldPosition()
public boolean canHoldPosition(boolean checkCommandibility)
public boolean canStop()
public boolean canStop(boolean checkCommandibility)
public boolean canRepair()
public boolean canRepair(boolean checkCommandibility)
public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canRepair(Unit targetUnit)
public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canBurrow()
public boolean canBurrow(boolean checkCommandibility)
public boolean canUnburrow()
public boolean canUnburrow(boolean checkCommandibility)
public boolean canCloak()
public boolean canCloak(boolean checkCommandibility)
public boolean canDecloak()
public boolean canDecloak(boolean checkCommandibility)
public boolean canSiege()
public boolean canSiege(boolean checkCommandibility)
public boolean canUnsiege()
public boolean canUnsiege(boolean checkCommandibility)
public boolean canLift()
public boolean canLift(boolean checkCommandibility)
public boolean canLand()
public boolean canLand(boolean checkCommandibility)
public boolean canLand(TilePosition target, boolean checkCanIssueCommandType)
public boolean canLand(TilePosition target)
public boolean canLand(TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canLoad()
public boolean canLoad(boolean checkCommandibility)
public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canLoad(Unit targetUnit)
public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUnloadWithOrWithoutTarget()
public boolean canUnloadWithOrWithoutTarget(boolean checkCommandibility)
public boolean canUnloadAtPosition(Position targDropPos, boolean checkCanIssueCommandType)
public boolean canUnloadAtPosition(Position targDropPos)
public boolean canUnloadAtPosition(Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUnload()
public boolean canUnload(boolean checkCommandibility)
public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType)
public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition)
public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canUnload(Unit targetUnit)
public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUnloadAll()
public boolean canUnloadAll(boolean checkCommandibility)
public boolean canUnloadAllPosition()
public boolean canUnloadAllPosition(boolean checkCommandibility)
public boolean canUnloadAllPosition(Position targDropPos, boolean checkCanIssueCommandType)
public boolean canUnloadAllPosition(Position targDropPos)
public boolean canUnloadAllPosition(Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canRightClick()
public boolean canRightClick(boolean checkCommandibility)
public boolean canRightClick(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canRightClick(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canRightClick(Position target, boolean checkCanTargetUnit)
public boolean canRightClick(Unit target, boolean checkCanTargetUnit)
public boolean canRightClick(Position target)
public boolean canRightClick(Unit target)
public boolean canRightClick(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canRightClick(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canRightClickGrouped(boolean checkCommandibilityGrouped)
public boolean canRightClickGrouped()
public boolean canRightClickGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canRightClickGrouped(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped)
public boolean canRightClickGrouped(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped)
public boolean canRightClickGrouped(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canRightClickGrouped(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canRightClickGrouped(Position target, boolean checkCanTargetUnit)
public boolean canRightClickGrouped(Unit target, boolean checkCanTargetUnit)
public boolean canRightClickGrouped(Position target)
public boolean canRightClickGrouped(Unit target)
public boolean canRightClickGrouped(Position target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canRightClickGrouped(Unit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandTypeGrouped, boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canRightClickPosition()
public boolean canRightClickPosition(boolean checkCommandibility)
public boolean canRightClickPositionGrouped(boolean checkCommandibilityGrouped)
public boolean canRightClickPositionGrouped()
public boolean canRightClickPositionGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canRightClickUnit()
public boolean canRightClickUnit(boolean checkCommandibility)
public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canRightClickUnit(Unit targetUnit)
public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canRightClickUnitGrouped(boolean checkCommandibilityGrouped)
public boolean canRightClickUnitGrouped()
public boolean canRightClickUnitGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped)
public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType)
public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit)
public boolean canRightClickUnitGrouped(Unit targetUnit)
public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility)
public boolean canHaltConstruction()
public boolean canHaltConstruction(boolean checkCommandibility)
public boolean canCancelConstruction()
public boolean canCancelConstruction(boolean checkCommandibility)
public boolean canCancelAddon()
public boolean canCancelAddon(boolean checkCommandibility)
public boolean canCancelTrain()
public boolean canCancelTrain(boolean checkCommandibility)
public boolean canCancelTrainSlot()
public boolean canCancelTrainSlot(boolean checkCommandibility)
public boolean canCancelTrainSlot(int slot, boolean checkCanIssueCommandType)
public boolean canCancelTrainSlot(int slot)
public boolean canCancelTrainSlot(int slot, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canCancelMorph()
public boolean canCancelMorph(boolean checkCommandibility)
public boolean canCancelResearch()
public boolean canCancelResearch(boolean checkCommandibility)
public boolean canCancelUpgrade()
public boolean canCancelUpgrade(boolean checkCommandibility)
public boolean canUseTechWithOrWithoutTarget()
public boolean canUseTechWithOrWithoutTarget(boolean checkCommandibility)
public boolean canUseTechWithOrWithoutTarget(TechType tech, boolean checkCanIssueCommandType)
public boolean canUseTechWithOrWithoutTarget(TechType tech)
public boolean canUseTechWithOrWithoutTarget(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUseTech(TechType tech, Position target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType)
public boolean canUseTech(TechType tech, Unit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType)
public boolean canUseTech(TechType tech, Position target, boolean checkCanTargetUnit, boolean checkTargetsType)
public boolean canUseTech(TechType tech, Unit target, boolean checkCanTargetUnit, boolean checkTargetsType)
public boolean canUseTech(TechType tech)
public boolean canUseTech(TechType tech, Position target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUseTech(TechType tech, Unit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUseTechWithoutTarget(TechType tech, boolean checkCanIssueCommandType)
public boolean canUseTechWithoutTarget(TechType tech)
public boolean canUseTechWithoutTarget(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUseTechUnit(TechType tech, boolean checkCanIssueCommandType)
public boolean canUseTechUnit(TechType tech)
public boolean canUseTechUnit(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType)
public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits)
public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit)
public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUseTechPosition(TechType tech, boolean checkCanIssueCommandType)
public boolean canUseTechPosition(TechType tech)
public boolean canUseTechPosition(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType)
public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions)
public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType, boolean checkCommandibility)
public boolean canPlaceCOP()
public boolean canPlaceCOP(boolean checkCommandibility)
public boolean canPlaceCOP(TilePosition target, boolean checkCanIssueCommandType)
public boolean canPlaceCOP(TilePosition target)
public boolean canPlaceCOP(TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility)
public int compareTo(Unit other)
compareTo
in interface Comparable<Unit>
Copyright © 2022. All rights reserved.