PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/TGame/TCommon/Combat/CombatDefinition.h

http://awoe.googlecode.com/
C++ Header | 96 lines | 71 code | 16 blank | 9 comment | 1 complexity | 25f66b638fdd5bd71202c98fb2321e95 MD5 | raw file
 1#ifndef  __COMBAT_DEFINITION___
 2#define  __COMBAT_DEFINITION___
 3
 4
 5namespace Combat
 6{
 7	enum CombatTarget
 8	{
 9		Tgt_Enemy,
10		Tgt_EnemyInRange,
11		Tgt_Alies,
12		Tgt_AliesAndSelf,
13		Tgt_Self,
14	};
15
16	//
17	//	Combat State:
18	//	state Peace:		no combat
19	//	state Ready:		in combat, ready for casting a spell to its target
20	//	state Casting:		in combat, casting a spell on its target
21	//	state CoolDown:		in combat, cool down time interval just after a previous spell is casted
22	//	state Forbidden:	in combat, forbidden to cast a spell
23	//	state Charging:		in combat, approaching to its target for casting a spell
24	//
25	enum CombatState
26	{
27		CBS_Begin	= -1,			//	Invalid
28
29		CBS_Peace,			//	not in combat with some others
30		CBS_Ready,			//	in combat, ready to cast a spell
31		CBS_Casting,		//	in combat, casting spell
32		CBS_CoolDown,		//	in combat, cool down time between two spell cast
33		CBS_Forbidden,		//	in combat, forbidden to cast a spell
34		CBS_Charging,       //	in combat, charging for an melee or ranged attack
35		CBS_Standby,			//	out of combat temperately, all casting operation will cancel this state
36
37		CBS_End,			//	Invalid
38	};
39
40	enum CombatFaction
41	{
42		FC_Unknown,
43		FC_Player,
44		FC_Monster,
45
46		FC_Max,
47	};
48
49	enum CombatFlagIndex
50	{
51		FIdx_Daze,
52		FIdx_Forbbiden_CastMelee,
53		FIdx_CanBeTargeted,
54		FIdx_75ToHit,
55		FIdx_ZeroToDodge,
56	};
57
58	enum CombatProperty
59	{
60		CBP_Start			= 0,
61		CBP_Class_Start		= 0,
62		
63		CBP_Soldier			= 0,
64		CBP_Wizard,
65		CBP_Explorer,
66		CBP_Beauty,
67		CBP_Dancer,
68
69		CBP_Class_End		= 5,
70		CBP_Element_Start	= 5,
71
72		CBP_Fire			= 5,
73		CBP_Water,
74		CBP_Light,
75		CBP_Earth,
76		CBP_Spirit,
77
78		CBP_Element_End		= 10,
79		CBP_Attribute_Start	= 10,
80
81		CBP_Power			= 10,
82		CBP_Toughness,
83		CBP_Evade,
84		CBP_Luck,
85		CBP_Focus,
86
87		CBP_Attribute_End	= 15,
88		CBP_End				= 15,
89	};
90
91	inline	bool CBP_Validate(const short& nIdx)
92	{
93		return nIdx>=CBP_Start && nIdx<CBP_End;
94	}
95}
96#endif