… | |
… | |
30 | * skills could be done via strncmp |
30 | * skills could be done via strncmp |
31 | * This list doesn't really try to identify what the skills do. |
31 | * This list doesn't really try to identify what the skills do. |
32 | * The order of this list has no special meaning. 0 is not used |
32 | * The order of this list has no special meaning. 0 is not used |
33 | * to denote improperly set objects. |
33 | * to denote improperly set objects. |
34 | */ |
34 | */ |
35 | enum { |
35 | enum |
|
|
36 | { |
36 | SK_NONE = 0, |
37 | SK_NONE = 0, |
37 | # define def(uc, flags) SK_ ## uc, |
38 | # define def(uc, flags) SK_ ## uc, |
38 | # include "skillinc.h" |
39 | # include "skillinc.h" |
39 | # undef def |
40 | # undef def |
40 | NUM_SKILLS, |
41 | NUM_SKILLS, |
41 | }; |
42 | }; |
42 | |
43 | |
43 | enum { |
44 | enum |
|
|
45 | { |
44 | SF_COMBAT = 0x01, // skill can be used in direct attack combat (hth or weapon-based, not ranged) |
46 | SF_COMBAT = 0x01, // skill can be used in direct attack combat (hth or weapon-based, not ranged) |
45 | SF_RANGED = 0x02, // skill can be used for ranged attacks (not combat) |
47 | SF_RANGED = 0x02, // skill can be used for ranged attacks (not combat) |
46 | |
48 | |
47 | SF_USE = 0x04, // skill can be used directly, directionless |
49 | SF_USE = 0x04, // skill can be used directly, directionless |
48 | SF_NEED_ITEM = 0x08, // skill *requires* some object in the weapon slot |
50 | SF_NEED_ITEM = 0x08, // skill *requires* some object in the weapon slot |
… | |
… | |
75 | /* Currently only one of these, but put the define here to make |
77 | /* Currently only one of these, but put the define here to make |
76 | * it easier to expand it in the future */ |
78 | * it easier to expand it in the future */ |
77 | #define IS_GRACE_SKILL(num) (skill_flags [num] & SF_GRACE) |
79 | #define IS_GRACE_SKILL(num) (skill_flags [num] & SF_GRACE) |
78 | |
80 | |
79 | extern const uint8_t skill_flags[NUM_SKILLS]; |
81 | extern const uint8_t skill_flags[NUM_SKILLS]; |
80 | // defined in shstr.C for initialisation order |
82 | |
81 | extern shstr skill_names[NUM_SKILLS]; |
83 | // would like to use object_vector here... |
|
|
84 | extern vector<object_ptr> skillvec; |
|
|
85 | void add_skill_archetype (object *o); |
|
|
86 | #define SKILL_INDEX(o) (o)->arch->cached_sp |
82 | |
87 | |
83 | #endif |
88 | #endif |
84 | |
89 | |