… | |
… | |
42 | |
42 | |
43 | enum { |
43 | enum { |
44 | SF_COMBAT = 0x01, // skill is used only in direct attack combat |
44 | SF_COMBAT = 0x01, // skill is used only in direct attack combat |
45 | SF_RANGED = 0x02, // skill is only used for ranged attacks |
45 | SF_RANGED = 0x02, // skill is only used for ranged attacks |
46 | SF_READY = 0x04, // skill can be used but is directionless |
46 | SF_READY = 0x04, // skill can be used but is directionless |
47 | SF_NEED_WEAPON = 0x10, // skill requires a weapon object |
47 | SF_NEED_WEAPON = 0x08, // skill requires a weapon object |
48 | SF_NEED_BOW = 0x20, // skill requires a bow object |
48 | SF_NEED_BOW = 0x10, // skill requires a bow object |
|
|
49 | SF_NEED_ITEM = 0x20, // skill requires a ranged item |
49 | SF_MANA = 0x40, // skill requires a mana-consuming spell |
50 | SF_MANA = 0x40, // skill requires a mana-consuming spell |
50 | SF_GRACE = 0x80, // skill can use a grace-consuming spell |
51 | SF_GRACE = 0x80, // skill can use a grace-consuming spell |
51 | }; |
52 | }; |
52 | |
53 | |
53 | /* This is used in the exp functions - basically what to do if |
54 | /* This is used in the exp functions - basically what to do if |
… | |
… | |
64 | |
65 | |
65 | /* This macro is used in fix_player() to define if this is a skill |
66 | /* This macro is used in fix_player() to define if this is a skill |
66 | * that should be used to calculate wc's and the like. |
67 | * that should be used to calculate wc's and the like. |
67 | */ |
68 | */ |
68 | #define IS_COMBAT_SKILL(num) (skill_flags [num] & SF_COMBAT) |
69 | #define IS_COMBAT_SKILL(num) (skill_flags [num] & SF_COMBAT) |
|
|
70 | #define IS_RANGED_SKILL(num) (skill_flags [num] & SF_RANGED) |
69 | |
71 | |
70 | /* Like IS_COMBAT_SKILL above, but instead this is used to determine |
72 | /* Like IS_COMBAT_SKILL above, but instead this is used to determine |
71 | * how many mana points the player has. |
73 | * how many mana points the player has. |
72 | */ |
74 | */ |
73 | #define IS_MANA_SKILL(num) (skill_flags [num] & SF_MANA) |
75 | #define IS_MANA_SKILL(num) (skill_flags [num] & SF_MANA) |