![]() |
BTHAI 2.0
|
#include <TerranCommander.h>
Public Member Functions | |
TerranCommander () | |
~TerranCommander () | |
void | computeActions () |
bool | checkUnfinishedBuildings () |
bool | checkRepairUnits () |
bool | isImportantUnit (Unit *unit) |
void | repair (BaseAgent *agent) |
void | finishBuild (BaseAgent *agent) |
void | handleCloakedEnemy (TilePosition pos, Squad *squad) |
void | addRushSquad () |
void | addMainAttackSquad () |
void | addHarassSquad () |
void | addBunkerSquad () |
void | addAirExplorerSquad () |
void | addAirSneakSquad () |
void | addDetectorSquad () |
void | addGhostSquad () |
void | addBattleCruiserSquad () |
void | addSiegeTankSquad () |
This is the Terran implementation of the Commander class. See Commander for more info.
This is where you need to modify the overall strategy for Terran, which squads to construct, and when and where to engage the enemy.
Author: Johan Hagelback (johan.hagelback@gmail.com)
TerranCommander::TerranCommander | ( | ) |
Constructor.
TerranCommander::~TerranCommander | ( | ) |
Destructor.
bool TerranCommander::checkRepairUnits | ( | ) |
Check if there are any important buildings or units to repair.
bool TerranCommander::checkUnfinishedBuildings | ( | ) |
Checks if there are any unfinished buildings that does not have an SCV working on them. Terran only.
void TerranCommander::computeActions | ( | ) | [virtual] |
Called each update to issue orders.
Reimplemented from Commander.
void TerranCommander::finishBuild | ( | BaseAgent * | agent | ) |
Assigns a worker to finish constructing an interrupted building.
void TerranCommander::handleCloakedEnemy | ( | TilePosition | pos, |
Squad * | squad | ||
) | [virtual] |
Called when own units are attacked by a cloaked enemy unit.
Reimplemented from Commander.
bool TerranCommander::isImportantUnit | ( | Unit * | unit | ) |
Returns true if the unit is important to assist, false if not. All buildings and large expensive units such as siege tanks and battlecruisers are considered important, while small units such as marines and vultures are not considered important.
void TerranCommander::repair | ( | BaseAgent * | agent | ) |
Assigns a worker to repair the specified agent.