_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
105 virtual bool IsValid()
const = 0;
202 #endif // !__ACTIONS_H__
virtual void UpdateUnitVariables(CUnit &unit) const
Definition: actions.h:115
@ UnitActionTrain
unit casts spell
Definition: actions.h:63
@ UnitActionBuild
unit paroling area
Definition: actions.h:72
virtual void Execute(CUnit &unit)=0
static COrder * NewActionDefend(CUnit &dest)
Definition: action_defend.cpp:60
static COrder * NewActionMove(const Vec2i &pos)
Definition: action_move.cpp:60
void SetGoal(CUnit *const new_goal)
Definition: actions.cpp:104
static COrder * NewActionUnload(const Vec2i &pos, CUnit *what)
Definition: action_unload.cpp:65
static COrder * NewActionSpellCast(const SpellType &spell, const Vec2i &pos, CUnit *target, bool isAutocast=false)
Definition: action_spellcast.cpp:64
COrder(int action)
Definition: actions.h:97
virtual const Vec2i GetGoalPos() const
Definition: actions.cpp:181
@ UnitActionFollow
unit stands ground
Definition: actions.h:54
static COrder * NewActionTransformInto(CUnitType &type)
Definition: action_upgradeto.cpp:59
@ UnitActionStandGround
unit stand still, does nothing
Definition: actions.h:53
@ UnitActionNone
Definition: actions.h:50
Definition: viewport.h:63
Definition: unittype.h:508
static COrder * NewActionDie()
Definition: action_die.cpp:49
unsigned SyncHash
Definition: actions.cpp:92
@ UnitActionDefend
unit follows units
Definition: actions.h:55
void AnimateActionAttack(CUnit &unit, COrder &order)
Show attack animation.
Definition: action_attack.cpp:85
virtual void FillSeenValues(CUnit &unit) const
Definition: actions.cpp:126
static COrder * NewActionBoard(CUnit &unit)
Definition: action_board.cpp:63
static COrder * NewActionResearch(CUnit &unit, CUpgrade &upgrade)
Definition: action_research.cpp:61
static COrder * NewActionPatrol(const Vec2i ¤tPos, const Vec2i &dest)
Definition: action_patrol.cpp:54
Definition: upgrade_structs.h:154
virtual void AiUnitKilled(CUnit &unit)
Definition: actions.cpp:144
virtual bool ParseSpecificData(lua_State *l, int &j, const char *value, const CUnit &unit)=0
@ UnitActionPatrol
unit leaving transporter
Definition: actions.h:71
CUnit * GetGoal() const
Definition: actions.h:122
@ UnitActionSpellCast
unit dies
Definition: actions.h:61
@ UnitActionRepair
unit explores map
Definition: actions.h:75
@ UnitActionMove
unit defends unit
Definition: actions.h:56
@ UnitActionUnload
unit entering transporter
Definition: actions.h:70
void ClearGoal()
Definition: actions.cpp:109
bool Finished
global action
Definition: actions.h:162
void UnitActions()
Handle the actions of all units each game cycle.
Definition: actions.cpp:588
static COrder * NewActionUpgradeTo(CUnit &unit, CUnitType &type, bool instant=false)
Definition: action_upgradeto.cpp:67
static COrder * NewActionBuild(const CUnit &builder, const Vec2i &pos, CUnitType &building)
Definition: action_build.cpp:72
static COrder * NewActionStill()
Definition: action_still.cpp:65
bool AutoRepair(CUnit &unit)
Definition: action_still.cpp:249
static COrder * NewActionReturnGoods(CUnit &harvester, CUnit *depot)
Definition: action_resource.cpp:173
static COrder * NewActionStandGround()
Definition: action_still.cpp:60
@ UnitActionResource
unit repairing
Definition: actions.h:76
bool Instant
true when order is finish
Definition: actions.h:163
static COrder * NewActionExplore(const CUnit &unit)
Definition: action_explore.cpp:73
@ UnitActionDie
unit attacks ground
Definition: actions.h:59
int DoActionMove(CUnit &unit)
Generic move action.
Definition: action_move.cpp:135
Definition: animation.h:94
virtual bool OnAiHitUnit(CUnit &unit, CUnit *attacker, int)
Definition: actions.cpp:135
virtual void Save(CFile &file, const CUnit &unit) const =0
virtual void UpdatePathFinderData(PathFinderInput &input)=0
UnitAction
Definition: actions.h:49
int GetNumWaitingWorkers(const CUnit &mine)
Hash calculated to find sync failures.
Definition: action_resource.cpp:822
static COrder * NewActionBuilt(CUnit &builder, CUnit &unit)
Definition: action_built.cpp:55
COrder * COrderPtr
Definition: actions.h:166
static COrder * NewActionAttackGround(const CUnit &attacker, const Vec2i &dest)
Definition: action_attack.cpp:140
bool AutoAttack(CUnit &unit)
Definition: action_still.cpp:327
Construction frame.
Definition: construct.h:112
static COrder * NewActionRepair(CUnit &unit, CUnit &target)
Definition: action_repair.cpp:58
virtual PixelPos Show(const CViewport &vp, const PixelPos &lastScreenPos) const =0
bool HasGoal() const
Definition: actions.h:121
bool ParseGenericData(lua_State *l, int &j, const char *value)
Definition: script_unit.cpp:187
virtual COrder * Clone() const =0
@ UnitActionExplore
unit builds building
Definition: actions.h:73
const unsigned char Action
Definition: actions.h:161
void CclParseOrder(lua_State *l, CUnit &unit, COrderPtr *order)
Parse order.
Definition: actions.cpp:196
static COrder * NewActionResource(CUnit &harvester, const Vec2i &pos)
Definition: action_resource.cpp:132
@ UnitActionStill
No valid action.
Definition: actions.h:52
@ UnitActionBoard
building is under construction
Definition: actions.h:69
static COrder * NewActionFollow(CUnit &dest)
Definition: action_follow.cpp:65
void UpdatePathFinderData_NotCalled(PathFinderInput &input)
Definition: actions.cpp:114
@ UnitActionBuilt
building is researching spell
Definition: actions.h:66
virtual void Cancel(CUnit &unit)
Definition: actions.h:104
static COrder * NewActionAttack(const CUnit &attacker, CUnit &target)
Definition: action_attack.cpp:101
void UnHideUnit(CUnit &unit)
Definition: action_still.cpp:154
@ UnitActionTransformInto
unit harvesting resources
Definition: actions.h:77
@ UnitActionAttack
unit moves to position/unit
Definition: actions.h:57
static COrder * NewActionTrain(CUnit &trainer, CUnitType &type)
Definition: action_train.cpp:59
virtual bool IsValid() const =0
The big unit structure.
Definition: unit.h:135
bool AutoCast(CUnit &unit)
Definition: action_still.cpp:197
virtual ~COrder()
Hash calculated to find sync failures.
Definition: actions.cpp:99
@ UnitActionAttackGround
unit attacks position/unit
Definition: actions.h:58
@ UnitActionUpgradeTo
building is training
Definition: actions.h:64
@ UnitActionResearch
building is upgrading itself
Definition: actions.h:65
virtual void OnAnimationAttack(CUnit &unit)
Definition: actions.cpp:162
(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.