_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <ai_local.h>
Public Member Functions | |
AiForce () | |
void | Remove (CUnit &unit) |
void | Reset (bool types=false) |
size_t | Size () const |
bool | IsAttacking () const |
ai_plan.cpp - AI planning functions. | |
int | PlanAttack () |
Public Attributes | |
bool | Completed |
bool | Defending |
Flag saying force is complete build. More... | |
bool | Attacking |
Flag saying force is defending. More... | |
AiForceRole | Role |
Flag saying force is attacking. More... | |
std::vector< AiUnitType > | UnitTypes |
Role of the force. More... | |
CUnitCache | Units |
Count and types of unit-type. More... | |
int | FormerForce |
Units in the force. More... | |
AiForceAttackingState | State |
Original force number. More... | |
Vec2i | GoalPos |
Attack state. More... | |
Vec2i | HomePos |
Attack point tile map position. More... | |
int | WaitOnRallyPoint |
Return after attack tile map position. More... | |
Friends | |
class | AiForceManager |
Periodic called force manager handler. More... | |
ai_force.cpp - AI force functions. | |
void | Attack (const Vec2i &pos) |
void | RemoveDeadUnit () |
void | ReturnToHome () |
bool | NewRallyPoint (const Vec2i &startPos, Vec2i *resultPos) |
void | Insert (CUnit &unit) |
Define an AI force.
A force is a group of units belonging together.
|
inline |
|
inline |
int AiForce::PlanAttack | ( | ) |
Plan an attack with a force. We know, that we must use a transporter.
Perfect planning. Only works for water transporter!
transporter are more selective now (flag with unittypeland). We must manage it.
void AiForce::RemoveDeadUnit | ( | ) |
Ai clean units in a force.
|
inline |
Reset the force. But don't change its role and its demand.
void AiForce::ReturnToHome | ( | ) |
|
inline |
|
friend |
Periodic called force manager handler.
Entry point of force manager, periodic called.
bool AiForce::Attacking |
Flag saying force is defending.
bool AiForce::Completed |
bool AiForce::Defending |
Flag saying force is complete build.
int AiForce::FormerForce |
Units in the force.
Vec2i AiForce::GoalPos |
Attack state.
Vec2i AiForce::HomePos |
Attack point tile map position.
AiForceRole AiForce::Role |
Flag saying force is attacking.
AiForceAttackingState AiForce::State |
Original force number.
CUnitCache AiForce::Units |
Count and types of unit-type.
std::vector<AiUnitType> AiForce::UnitTypes |
Role of the force.
int AiForce::WaitOnRallyPoint |
Return after attack tile map position.