Crossfire Server, Trunk  R21219
skills.h
Go to the documentation of this file.
1 
6 #ifndef SKILLS_H
7 #define SKILLS_H
8 
19 enum SK {
21  SK_HIDING = 2,
23  SK_BOWYER = 4,
24  SK_JEWELER = 5,
25  SK_ALCHEMY = 6,
29  SK_JUMPING = 10,
30  SK_DET_MAGIC = 11,
31  SK_ORATORY = 12,
32  SK_SINGING = 13,
33  SK_DET_CURSE = 14,
36  SK_PUNCHING = 17,
38  SK_KARATE = 19,
39  SK_CLIMBING = 20,
40  SK_WOODSMAN = 21,
44  SK_THROWING = 25,
47  SK_SET_TRAP = 28,
49  SK_PRAYING = 30,
50  SK_CLAWING = 31,
52  SK_SUMMONING = 33,
53  SK_PYROMANCY = 34,
54  SK_EVOCATION = 35,
55  SK_SORCERY = 36,
59  SK_AIR_MAGIC = 40,
63 };
64 
70 #define MAX_SKILLS 50
71 
78 #define SK_EXP_ADD_SKILL 0
79 #define SK_EXP_TOTAL 1
80 #define SK_EXP_NONE 2
81 #define SK_SUBTRACT_SKILL_EXP 3
83 
84 
85 #define USING_SKILL(op, skill) ((op)->chosen_skill && (op)->chosen_skill->subtype == skill)
86 
91 #define IS_COMBAT_SKILL(num) \
92  ((num == SK_PUNCHING) \
93  || (num == SK_FLAME_TOUCH) \
94  || (num == SK_KARATE) \
95  || (num == SK_ONE_HANDED_WEAPON) \
96  || (num == SK_MISSILE_WEAPON) \
97  || (num == SK_THROWING) \
98  || (num == SK_CLAWING) \
99  || (num == SK_TWO_HANDED_WEAPON) \
100  || (num == SK_WRAITH_FEED))
101 
106 #define IS_MANA_SKILL(num) \
107  ((num == SK_SORCERY) \
108  || (num == SK_EVOCATION) \
109  || (num == SK_PYROMANCY) \
110  || (num == SK_SUMMONING) \
111  || (num==SK_AIR_MAGIC) \
112  || (num==SK_EARTH_MAGIC) \
113  || (num==SK_FIRE_MAGIC) \
114  || (num==SK_WATER_MAGIC))
115 
116 
120 #define IS_GRACE_SKILL(num) \
121  (num == SK_PRAYING)
122 
123 extern const char *skill_names[MAX_SKILLS];
124 extern int skill_faces[MAX_SKILLS];
125 
126 extern int get_skill_client_code(const char *skill_name);
127 
128 #ifdef WANT_UNARMED_SKILLS
129 
141 static uint8_t unarmed_skills[] = {
142  SK_KARATE,
143  SK_CLAWING,
145  SK_PUNCHING,
147  0
148 };
149 
150 /* Just in case one file includes this more than once */
151 #undef WANT_UNARMED_SKILLS
152 
153 #endif
154 
155 #endif /* SKILLS_H */
const char * skill_names[MAX_SKILLS]
Definition: skill_util.c:57
unsigned char uint8_t
Definition: win32.h:161
SK
Definition: skills.h:19
int skill_faces[MAX_SKILLS]
Definition: skill_util.c:61
int get_skill_client_code(const char *skill_name)
Definition: skill_util.c:96
#define MAX_SKILLS
Definition: skills.h:70