Crossfire Server, Trunk  R20513
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 */
Flame-touch.
Definition: skills.h:37
Stealing.
Definition: skills.h:26
Air magic, unused.
Definition: skills.h:59
Harvesting.
Definition: skills.h:58
Thaumaturgy.
Definition: skills.h:48
Missile weapon.
Definition: skills.h:43
unsigned char uint8_t
Definition: win32.h:161
Wraith feed.
Definition: skills.h:57
SK
Skill subtypes.
Definition: skills.h:19
Climbing.
Definition: skills.h:39
Earth magic, unused.
Definition: skills.h:60
Detect curse.
Definition: skills.h:33
Jumping.
Definition: skills.h:29
const char * skill_names[NUM_SKILLS]
Will contain a number-name mapping for skills, initialized by init_skills().
Definition: skill_util.c:57
Bowyer.
Definition: skills.h:23
Bargaining.
Definition: skills.h:28
Smithery.
Definition: skills.h:22
Lockpicking.
Definition: skills.h:20
Woodsman.
Definition: skills.h:40
Clawing.
Definition: skills.h:50
Throwing.
Definition: skills.h:44
Inscription.
Definition: skills.h:41
Disarm traps.
Definition: skills.h:46
Fire magic, unused.
Definition: skills.h:62
One handed weapon.
Definition: skills.h:42
Use magic item.
Definition: skills.h:45
Set traps, unused.
Definition: skills.h:47
Summoning.
Definition: skills.h:52
Alchemy.
Definition: skills.h:25
Sorcery.
Definition: skills.h:55
Detect magic.
Definition: skills.h:30
Find traps.
Definition: skills.h:34
Levitation.
Definition: skills.h:51
Meditation.
Definition: skills.h:35
Praying.
Definition: skills.h:49
Punching.
Definition: skills.h:36
Literacy.
Definition: skills.h:27
Karate.
Definition: skills.h:38
Water magic, unused.
Definition: skills.h:61
#define NUM_SKILLS
This is the highest number skill in the table +1 This is used to store pointers to the actual skills ...
Definition: skills.h:71
Oratory.
Definition: skills.h:31
Jeweler.
Definition: skills.h:24
int skill_faces[NUM_SKILLS]
Will contain the face numbers for the skills, initialized by init_skill().
Definition: skill_util.c:61
Hiding.
Definition: skills.h:21
Singing.
Definition: skills.h:32
Two handed weapons.
Definition: skills.h:56
Evocation.
Definition: skills.h:54
Pyromancy.
Definition: skills.h:53