public class Unitset
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
attack(Position target)
Orders the unit(s) to attack move to the specified position or attack the specified unit.
|
boolean |
attack(Position target,
boolean shiftQueueCommand) |
boolean |
attack(PositionOrUnit target) |
boolean |
attack(PositionOrUnit target,
boolean shiftQueueCommand) |
boolean |
attack(Unit target) |
boolean |
attack(Unit target,
boolean shiftQueueCommand) |
boolean |
build(UnitType type)
Orders the worker unit(s) to construct a structure at a target position.
|
boolean |
build(UnitType type,
TilePosition target) |
boolean |
buildAddon(UnitType type)
Orders the Terran structure(s) to construct an add-on.
|
boolean |
burrow()
Orders the unit to burrow.
|
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()
Orders the unit to remove the specified unit from its training queue.
|
boolean |
cancelTrain(int slot) |
boolean |
cancelUpgrade()
Orders this unit to cancel and refund an upgrade that is in progress.
|
boolean |
cloak()
Orders the unit to cloak.
|
boolean |
decloak()
Orders a cloaked unit to decloak.
|
boolean |
follow(Unit target)
Orders the unit to follow the specified unit.
|
boolean |
follow(Unit target,
boolean shiftQueueCommand) |
boolean |
gather(Unit target)
Orders the unit to gather the specified unit (must be mineral or refinery type).
|
boolean |
gather(Unit target,
boolean shiftQueueCommand) |
java.util.List<Unit> |
getInterceptors()
Creates a single set containing all the Interceptors of all Carriers in this set.
|
java.util.List<Unit> |
getLarva()
Creates a single set containing all the Larvae of all Hatcheries, Lairs, and Hives in this set.
|
java.util.List<Unit> |
getLoadedUnits()
Creates a single set containing all units that are loaded into units of this set.
|
Position |
getPosition()
Calculates the average of all valid Unit positions in this set.
|
java.util.List<Unit> |
getUnitsInRadius(int radius)
Retrieves the set of all units in a given radius of the current unit.
|
boolean |
haltConstruction()
Orders a SCV to stop constructing a structure.
|
boolean |
holdPosition()
Orders the unit to hold its position.
|
boolean |
holdPosition(boolean shiftQueueCommand) |
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 |
lift()
Orders the unit to lift.
|
boolean |
load(Unit target)
Orders the unit to load the target unit.
|
boolean |
load(Unit target,
boolean shiftQueueCommand) |
boolean |
morph(UnitType type)
Orders the unit(s) to morph into a different UnitType.
|
boolean |
move(Position target)
Orders the unit to move from its current position to the specified position.
|
boolean |
move(Position target,
boolean shiftQueueCommand) |
boolean |
patrol(Position target)
Orders the unit to patrol between its current position and the specified position.
|
boolean |
patrol(Position target,
boolean shiftQueueCommand) |
boolean |
repair(Unit target)
Orders the unit to repair the specified unit.
|
boolean |
repair(Unit target,
boolean shiftQueueCommand) |
boolean |
returnCargo()
Orders the unit to return its cargo to a nearby resource depot such as a Command Center.
|
boolean |
returnCargo(boolean shiftQueueCommand) |
boolean |
rightClick(Position target)
Works like the right click in the GUI.
|
boolean |
rightClick(Position target,
boolean shiftQueueCommand) |
boolean |
rightClick(PositionOrUnit target) |
boolean |
rightClick(PositionOrUnit target,
boolean shiftQueueCommand) |
boolean |
rightClick(Unit target) |
boolean |
rightClick(Unit target,
boolean shiftQueueCommand) |
boolean |
setRallyPoint(Position target)
Orders the unit to set its rally position to the specified position or unit.
|
boolean |
setRallyPoint(PositionOrUnit target) |
boolean |
setRallyPoint(Unit target) |
boolean |
siege()
Orders the unit to siege.
|
boolean |
stop()
Orders the unit to stop.
|
boolean |
stop(boolean shiftQueueCommand) |
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 |
unloadAll()
Orders the unit to unload all loaded units at the unit's current position.
|
boolean |
unloadAll(boolean shiftQueueCommand) |
boolean |
unloadAll(Position target)
Orders the unit to unload all loaded units at the unit's current position.
|
boolean |
unloadAll(Position target,
boolean shiftQueueCommand) |
boolean |
unsiege()
Orders the unit to unsiege.
|
boolean |
useTech(TechType tech)
Orders the unit to use a technology.
|
boolean |
useTech(TechType tech,
Position target) |
boolean |
useTech(TechType tech,
PositionOrUnit target) |
boolean |
useTech(TechType tech,
Unit target) |
public Position getPosition()
public java.util.List<Unit> getLoadedUnits()
public java.util.List<Unit> getInterceptors()
public java.util.List<Unit> getLarva()
public java.util.List<Unit> getUnitsInRadius(int radius)
public boolean issueCommand(UnitCommand command)
public boolean attack(Position target)
public boolean attack(Unit target)
public boolean attack(PositionOrUnit target)
public boolean attack(Position target, boolean shiftQueueCommand)
public boolean attack(Unit target, boolean shiftQueueCommand)
public boolean attack(PositionOrUnit target, boolean shiftQueueCommand)
public boolean build(UnitType type)
public boolean build(UnitType type, TilePosition target)
public boolean buildAddon(UnitType type)
public boolean train(UnitType type)
public boolean morph(UnitType type)
public boolean setRallyPoint(Position target)
public boolean setRallyPoint(Unit target)
public boolean setRallyPoint(PositionOrUnit target)
public boolean move(Position target)
public boolean move(Position target, boolean shiftQueueCommand)
public boolean patrol(Position target)
public boolean patrol(Position target, boolean shiftQueueCommand)
public boolean holdPosition()
public boolean holdPosition(boolean shiftQueueCommand)
public boolean stop()
public boolean stop(boolean shiftQueueCommand)
public boolean follow(Unit target)
public boolean follow(Unit target, boolean shiftQueueCommand)
public boolean gather(Unit target)
public boolean gather(Unit target, boolean shiftQueueCommand)
public boolean returnCargo()
public boolean returnCargo(boolean shiftQueueCommand)
public boolean repair(Unit target)
public boolean repair(Unit target, boolean shiftQueueCommand)
public boolean burrow()
public boolean unburrow()
public boolean cloak()
public boolean decloak()
public boolean siege()
public boolean unsiege()
public boolean lift()
public boolean load(Unit target)
public boolean load(Unit target, boolean shiftQueueCommand)
public boolean unloadAll()
public boolean unloadAll(boolean shiftQueueCommand)
public boolean unloadAll(Position target)
public boolean unloadAll(Position target, boolean shiftQueueCommand)
public boolean rightClick(Position target)
public boolean rightClick(Unit target)
public boolean rightClick(PositionOrUnit target)
public boolean rightClick(Position target, boolean shiftQueueCommand)
public boolean rightClick(Unit target, boolean shiftQueueCommand)
public boolean rightClick(PositionOrUnit target, boolean shiftQueueCommand)
public boolean haltConstruction()
public boolean cancelConstruction()
public boolean cancelAddon()
public boolean cancelTrain()
public boolean cancelTrain(int slot)
public boolean cancelMorph()
public boolean cancelResearch()
public boolean cancelUpgrade()
public boolean useTech(TechType tech)
public boolean useTech(TechType tech, PositionOrUnit target)