void ArbiterAgent::computeActions() { if (chargeShields()) { return; } NavigationAgent::getInstance()->computeMove(this, goal, true); }
void DragoonAgent::computeActions() { if (chargeShields()) { return; } defensive = false; if (unit->getAirWeaponCooldown() > 2 || unit->getGroundWeaponCooldown() > 2) defensive = true; NavigationAgent::getInstance()->computeMove(this, goal, defensive); if (!defensive) TargetingAgent::checkTarget(this); }
void ScoutAgent::computeActions() { //Necessary to avoid cancelling attacks if (unit->isAttacking() || unit->isStartingAttack()) return; if (chargeShields()) return; defensive = false; if (unit->getAirWeaponCooldown() > 2 || unit->getGroundWeaponCooldown() > 2) defensive = true; if (TargetingAgent::checkTarget(this)) return; NavigationAgent::getInstance()->computeMove(this, goal, defensive); }
void DarkTemplarAgent::computeActions() { //Necessary to avoid cancelling attacks if (unit->isAttacking() || unit->isStartingAttack()) return; if (chargeShields()) return; defensive = false; if (!unit->isCloaked() || unit->isVisible()) defensive = true; if (TargetingAgent::checkTarget(this)) return; NavigationAgent::getInstance()->computeMove(this, goal, defensive); }