_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <actions.h>
Public Member Functions | |
COrder (int action) | |
virtual COrder * | Clone () const =0 |
virtual void | Execute (CUnit &unit)=0 |
virtual void | Cancel (CUnit &unit) |
virtual bool | IsValid () const =0 |
virtual PixelPos | Show (const CViewport &vp, const PixelPos &lastScreenPos) const =0 |
virtual void | Save (CFile &file, const CUnit &unit) const =0 |
virtual bool | ParseSpecificData (lua_State *l, int &j, const char *value, const CUnit &unit)=0 |
virtual void | UpdateUnitVariables (CUnit &unit) const |
virtual void | UpdatePathFinderData (PathFinderInput &input)=0 |
bool | HasGoal () const |
CUnit * | GetGoal () const |
script_unit.cpp - The unit ccl functions. | |
bool | ParseGenericData (lua_State *l, int &j, const char *value) |
Static Public Member Functions | |
action_attack.cpp - The attack action. | |
static COrder * | NewActionAttack (const CUnit &attacker, CUnit &target) |
static COrder * | NewActionAttack (const CUnit &attacker, const Vec2i &dest) |
static COrder * | NewActionAttackGround (const CUnit &attacker, const Vec2i &dest) |
action_board.cpp - The board action. | |
static COrder * | NewActionBoard (CUnit &unit) |
action_build.cpp - The build building action. | |
static COrder * | NewActionBuild (const CUnit &builder, const Vec2i &pos, CUnitType &building) |
action_build.cpp - The build building action. | |
static COrder * | NewActionBuilt (CUnit &builder, CUnit &unit) |
action_defend.cpp - The defend action. | |
static COrder * | NewActionDefend (CUnit &dest) |
action_die.cpp - The die action. | |
static COrder * | NewActionDie () |
action_explore.cpp - The explore action. | |
static COrder * | NewActionExplore (const CUnit &unit) |
action_follow.cpp - The follow action. | |
static COrder * | NewActionFollow (CUnit &dest) |
action_move.cpp - The move action. | |
static COrder * | NewActionMove (const Vec2i &pos) |
action_patrol.cpp - The patrol action. | |
static COrder * | NewActionPatrol (const Vec2i ¤tPos, const Vec2i &dest) |
action_repair.cpp - The repair action. | |
static COrder * | NewActionRepair (CUnit &unit, CUnit &target) |
static COrder * | NewActionRepair (const Vec2i &pos) |
action_research.cpp - The research action. | |
static COrder * | NewActionResearch (CUnit &unit, CUpgrade &upgrade) |
action_resource.cpp - The generic resource action. | |
static COrder * | NewActionResource (CUnit &harvester, const Vec2i &pos) |
static COrder * | NewActionResource (CUnit &harvester, CUnit &mine) |
static COrder * | NewActionReturnGoods (CUnit &harvester, CUnit *depot) |
action_spellcast.cpp - The spell cast action. | |
static COrder * | NewActionSpellCast (const SpellType &spell, const Vec2i &pos, CUnit *target, bool isAutocast=false) |
action_still.cpp - The stand still action. | |
static COrder * | NewActionStandGround () |
static COrder * | NewActionStill () |
action_train.cpp - The building train action. | |
static COrder * | NewActionTrain (CUnit &trainer, CUnitType &type) |
action_upgradeto.cpp - The unit upgrading to new action. | |
static COrder * | NewActionTransformInto (CUnitType &type) |
static COrder * | NewActionUpgradeTo (CUnit &unit, CUnitType &type, bool instant=false) |
action_unload.cpp - The unload action. | |
static COrder * | NewActionUnload (const Vec2i &pos, CUnit *what) |
Public Attributes | |
const unsigned char | Action |
bool | Finished |
global action More... | |
bool | Instant |
true when order is finish More... | |
actions.cpp - The actions. | |
virtual | ~COrder () |
Hash calculated to find sync failures. More... | |
virtual void | OnAnimationAttack (CUnit &unit) |
virtual void | FillSeenValues (CUnit &unit) const |
virtual void | AiUnitKilled (CUnit &unit) |
void | SetGoal (CUnit *const new_goal) |
void | ClearGoal () |
virtual const Vec2i | GetGoalPos () const |
virtual bool | OnAiHitUnit (CUnit &unit, CUnit *attacker, int) |
void | UpdatePathFinderData_NotCalled (PathFinderInput &input) |
Unit order structure.
|
inlineexplicit |
|
virtual |
Hash calculated to find sync failures.
Called when unit is killed. warn the AI module.
Reimplemented in COrder_Build, and COrder_Built.
Reimplemented in COrder_UpgradeTo, COrder_Build, COrder_Built, COrder_Train, and COrder_Research.
void COrder::ClearGoal | ( | ) |
|
pure virtual |
Implemented in COrder_UpgradeTo, COrder_Resource, COrder_Repair, COrder_Build, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Patrol, COrder_SpellCast, COrder_Unload, COrder_Attack, COrder_Board, COrder_Built, COrder_Train, COrder_TransformInto, COrder_Die, COrder_Research, and COrder_Still.
Implemented in COrder_UpgradeTo, COrder_Resource, COrder_Repair, COrder_Build, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Patrol, COrder_SpellCast, COrder_Unload, COrder_Attack, COrder_Board, COrder_Built, COrder_Train, COrder_TransformInto, COrder_Die, COrder_Research, and COrder_Still.
Reimplemented in COrder_Built.
|
inline |
|
virtual |
Get goal position
Reimplemented in COrder_Resource, COrder_Build, COrder_Repair, COrder_SpellCast, COrder_Patrol, COrder_Attack, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Unload, and COrder_Board.
|
inline |
|
pure virtual |
Implemented in COrder_UpgradeTo, COrder_Resource, COrder_Repair, COrder_Build, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Patrol, COrder_SpellCast, COrder_Unload, COrder_Attack, COrder_Die, COrder_Board, COrder_Built, COrder_Train, COrder_TransformInto, COrder_Research, and COrder_Still.
|
static |
|
static |
|
static |
|
static |
|
static |
Reimplemented in COrder_Resource, and COrder_Attack.
Call when animation step is "attack"
Reimplemented in COrder_SpellCast, COrder_Attack, and COrder_Still.
bool COrder::ParseGenericData | ( | lua_State * | l, |
int & | j, | ||
const char * | value | ||
) |
|
pure virtual |
Implemented in COrder_UpgradeTo, COrder_Resource, COrder_Repair, COrder_Build, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Patrol, COrder_SpellCast, COrder_Unload, COrder_Attack, COrder_Board, COrder_Built, COrder_Train, COrder_TransformInto, COrder_Research, COrder_Still, and COrder_Die.
Implemented in COrder_UpgradeTo, COrder_Resource, COrder_Repair, COrder_Build, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Patrol, COrder_SpellCast, COrder_Unload, COrder_Attack, COrder_Board, COrder_Built, COrder_Train, COrder_TransformInto, COrder_Research, COrder_Still, and COrder_Die.
|
pure virtual |
Implemented in COrder_UpgradeTo, COrder_Resource, COrder_Build, COrder_Repair, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Patrol, COrder_SpellCast, COrder_Unload, COrder_Attack, COrder_Built, COrder_Train, COrder_Board, COrder_Research, COrder_Still, COrder_TransformInto, and COrder_Die.
|
pure virtual |
Implemented in COrder_UpgradeTo, COrder_Resource, COrder_Build, COrder_Repair, COrder_Defend, COrder_Explore, COrder_Follow, COrder_Move, COrder_Patrol, COrder_SpellCast, COrder_Unload, COrder_Attack, COrder_Built, COrder_Train, COrder_Board, COrder_Research, COrder_Still, COrder_TransformInto, and COrder_Die.
|
protected |
Reimplemented in COrder_UpgradeTo, COrder_Build, COrder_Built, COrder_Research, and COrder_Train.
const unsigned char COrder::Action |
bool COrder::Finished |
global action
bool COrder::Instant |
true when order is finish