$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <stdio.h>
#include <stdlib.h>
#include "stratagus.h"
#include "missile.h"
#include "unittype.h"
#include "animation.h"
#include "actions.h"
#include "unit.h"
#include "tileset.h"
#include "map.h"
#include "pathfinder.h"
#include "spells.h"
#include "player.h"
action_still.cpp - The stand still action. | |
#define | SUB_STILL_INIT 0 |
#define | SUB_STILL_STANDBY 1 |
#define | SUB_STILL_ATTACK 2 |
static void | MapMarkTileGuard (const CPlayer &player, const unsigned int index) |
static void | MapUnmarkTileGuard (const CPlayer &player, const unsigned int index) |
void | MapMarkUnitGuard (CUnit &unit) |
void | MapUnmarkUnitGuard (CUnit &unit) |
void | UnHideUnit (CUnit &unit) |
static bool | MoveRandomly (CUnit &unit) |
bool | AutoCast (CUnit &unit) |
static CUnit * | UnitToRepairInRange (CUnit &unit, int range) |
bool | AutoRepair (CUnit &unit) |
static bool | AutoAttack (CUnit &unit, bool stand_ground) |
void | AutoAttack (CUnit &unit, CUnitCache &targets, bool stand_ground) |
void | ActionStillGeneric (CUnit &unit, bool stand_ground) |
Generic still action. | |
void | HandleActionStill (CUnit &unit) |
Handle command still. |
#define SUB_STILL_ATTACK 2 |
#define SUB_STILL_INIT 0 |
#define SUB_STILL_STANDBY 1 |
void ActionStillGeneric | ( | CUnit & | unit, | |
bool | stand_ground | |||
) |
Generic still action.
Unit stands still or stand ground.
unit | Unit pointer for action. | |
stand_ground | true if unit is standing ground. |
void AutoAttack | ( | CUnit & | unit, | |
CUnitCache & | targets, | |||
bool | stand_ground | |||
) |
static bool AutoAttack | ( | CUnit & | unit, | |
bool | stand_ground | |||
) | [static] |
Auto attack nearby units if possible
bool AutoCast | ( | CUnit & | unit | ) |
Auto cast a spell if possible
bool AutoRepair | ( | CUnit & | unit | ) |
Auto repair a unit if possible
void HandleActionStill | ( | CUnit & | unit | ) |
Handle command still.
Unit stands still!
unit | Unit pointer for still action. |
static void MapMarkTileGuard | ( | const CPlayer & | player, | |
const unsigned int | index | |||
) | [static] |
void MapMarkUnitGuard | ( | CUnit & | unit | ) |
static void MapUnmarkTileGuard | ( | const CPlayer & | player, | |
const unsigned int | index | |||
) | [static] |
void MapUnmarkUnitGuard | ( | CUnit & | unit | ) |
static bool MoveRandomly | ( | CUnit & | unit | ) | [static] |
Move in a random direction
void UnHideUnit | ( | CUnit & | unit | ) |
Try to find a repairable unit around and return it.
unit | unit which can repair. | |
range | range to find a repairable unit. |