… | |
… | |
45 | #include <sproto.h> |
45 | #include <sproto.h> |
46 | #include <living.h> /* for defs of STR,CON,DEX,etc. -b.t. */ |
46 | #include <living.h> /* for defs of STR,CON,DEX,etc. -b.t. */ |
47 | #include <spells.h> |
47 | #include <spells.h> |
48 | |
48 | |
49 | const uint8_t skill_flags[NUM_SKILLS] = { |
49 | const uint8_t skill_flags[NUM_SKILLS] = { |
|
|
50 | 0, // SK_NONE |
50 | # define def(uc, flags) flags, |
51 | # define def(uc, flags) flags, |
51 | # include "skillinc.h" |
52 | # include "skillinc.h" |
52 | # undef def |
53 | # undef def |
53 | }; |
54 | }; |
54 | |
55 | |
… | |
… | |
250 | int old_range; |
251 | int old_range; |
251 | |
252 | |
252 | if (who->type != PLAYER) |
253 | if (who->type != PLAYER) |
253 | return 0; |
254 | return 0; |
254 | |
255 | |
255 | if (who->chosen_skill && who->chosen_skill == new_skill) |
256 | player *pl = who->contr; |
256 | { |
257 | |
257 | //who->contr->combat_skill = who->chosen_skill; |
258 | if (pl->ranged_skill && pl->ranged_skill == new_skill) |
258 | return 1; |
259 | return 1; |
259 | } |
|
|
260 | |
260 | |
261 | if (!new_skill) |
261 | if (!new_skill) |
262 | { |
262 | { |
263 | if (who->chosen_skill) |
263 | if (pl->ranged_skill) |
264 | apply_special (who, who->chosen_skill, AP_UNAPPLY); |
264 | apply_special (who, pl->ranged_skill, AP_UNAPPLY); |
265 | |
265 | |
266 | /* Only goal in this case was to unapply a skill */ |
266 | /* Only goal in this case was to unapply a skill */ |
267 | return 0; |
267 | return 0; |
268 | } |
268 | } |
269 | |
269 | |