Crossfire Server, Trunk  R20608
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 
71 #define NUM_SKILLS 44
72 
79 #define SK_EXP_ADD_SKILL 0
80 #define SK_EXP_TOTAL 1
81 #define SK_EXP_NONE 2
82 #define SK_SUBTRACT_SKILL_EXP 3
84 
85 
86 #define USING_SKILL(op, skill) ((op)->chosen_skill && (op)->chosen_skill->subtype == skill)
87 
92 #define IS_COMBAT_SKILL(num) \
93  ((num == SK_PUNCHING) \
94  || (num == SK_FLAME_TOUCH) \
95  || (num == SK_KARATE) \
96  || (num == SK_ONE_HANDED_WEAPON) \
97  || (num == SK_MISSILE_WEAPON) \
98  || (num == SK_THROWING) \
99  || (num == SK_CLAWING) \
100  || (num == SK_TWO_HANDED_WEAPON) \
101  || (num == SK_WRAITH_FEED))
102 
107 #define IS_MANA_SKILL(num) \
108  ((num == SK_SORCERY) \
109  || (num == SK_EVOCATION) \
110  || (num == SK_PYROMANCY) \
111  || (num == SK_SUMMONING) \
112  || (num==SK_AIR_MAGIC) \
113  || (num==SK_EARTH_MAGIC) \
114  || (num==SK_FIRE_MAGIC) \
115  || (num==SK_WATER_MAGIC))
116 
117 
121 #define IS_GRACE_SKILL(num) \
122  (num == SK_PRAYING)
123 
124 extern const char *skill_names[NUM_SKILLS];
125 extern int skill_faces[NUM_SKILLS];
126 
127 #ifdef WANT_UNARMED_SKILLS
128 
140 static uint8_t unarmed_skills[] = {
141  SK_KARATE,
142  SK_CLAWING,
144  SK_PUNCHING,
146  0
147 };
148 
149 /* Just in case one file includes this more than once */
150 #undef WANT_UNARMED_SKILLS
151 
152 #endif
153 
154 #endif /* SKILLS_H */
unsigned char uint8_t
Definition: win32.h:161
SK
Definition: skills.h:19
const char * skill_names[NUM_SKILLS]
Definition: skill_util.c:57
#define NUM_SKILLS
Definition: skills.h:71
int skill_faces[NUM_SKILLS]
Definition: skill_util.c:61