_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes
ai_plan.cpp File Reference
#include "stratagus.h"
#include "ai_local.h"
#include "actions.h"
#include "commands.h"
#include "map.h"
#include "missile.h"
#include "pathfinder.h"
#include "tileset.h"
#include "unit.h"
#include "unit_find.h"
#include "unittype.h"

Classes

class  _EnemyOnMapTile
 
class  WallFinder
 
class  ReachableTerrainMarker
 
class  EnemyFinderWithTransporter
 
class  IsAFreeTransporter
 

Functions

ai_plan.cpp - AI planning functions.
static CUnitEnemyOnMapTile (const CUnit &source, const Vec2i &pos)
 
static bool FindWall (const CUnit &unit, int range, Vec2i *wallPos)
 
int AiFindWall (AiForce *force)
 Find a wall to attack. More...
 
static void MarkReacheableTerrainType (const CUnit &unit, TerrainTraversal *terrainTraversal)
 
static bool AiFindTarget (const CUnit &unit, const TerrainTraversal &terrainTransporter, Vec2i *resultPos)
 
template<typename ITERATOR >
int GetTotalBoardCapacity (ITERATOR begin, ITERATOR end)
 
static bool ChooseRandomUnexploredPositionNear (const Vec2i &center, Vec2i *pos)
 
static CUnitGetBestExplorer (const AiExplorationRequest &request, Vec2i *pos)
 
void AiSendExplorers ()
 

Function Documentation

◆ AiFindTarget()

static bool AiFindTarget ( const CUnit unit,
const TerrainTraversal terrainTransporter,
Vec2i resultPos 
)
static

◆ AiFindWall()

int AiFindWall ( AiForce force)

Find a wall to attack.

Find possible walls to target.

Parameters
forceAttack force.
Returns
True if wall found.

◆ AiSendExplorers()

void AiSendExplorers ( )

Respond to ExplorationRequests

◆ ChooseRandomUnexploredPositionNear()

static bool ChooseRandomUnexploredPositionNear ( const Vec2i center,
Vec2i pos 
)
static

◆ EnemyOnMapTile()

static CUnit* EnemyOnMapTile ( const CUnit source,
const Vec2i pos 
)
static

Choose enemy on map tile.

Parameters
sourceUnit which want to attack.
posposition on map, tile-based.
Returns
Returns ideal target on map tile.

◆ FindWall()

static bool FindWall ( const CUnit unit,
int  range,
Vec2i wallPos 
)
static

◆ GetBestExplorer()

static CUnit* GetBestExplorer ( const AiExplorationRequest request,
Vec2i pos 
)
static

◆ GetTotalBoardCapacity()

template<typename ITERATOR >
int GetTotalBoardCapacity ( ITERATOR  begin,
ITERATOR  end 
)

◆ MarkReacheableTerrainType()

static void MarkReacheableTerrainType ( const CUnit unit,
TerrainTraversal terrainTraversal 
)
static
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.