return true if this skill can be advanced */
| 1153 | |
| 1154 | /* return true if this skill can be advanced */ |
| 1155 | boolean |
| 1156 | can_advance(int skill, boolean speedy) |
| 1157 | { |
| 1158 | if (P_RESTRICTED(skill) |
| 1159 | || P_SKILL(skill) >= P_MAX_SKILL(skill) |
| 1160 | || u.skills_advanced >= P_SKILL_LIMIT) |
| 1161 | return FALSE; |
| 1162 | |
| 1163 | if (wizard && speedy) |
| 1164 | return TRUE; |
| 1165 | |
| 1166 | return (boolean) ((int) P_ADVANCE(skill) |
| 1167 | >= practice_needed_to_advance(P_SKILL(skill)) |
| 1168 | && u.weapon_slots >= slots_required(skill)); |
| 1169 | } |
| 1170 | |
| 1171 | /* return true if this skill could be advanced if more slots were available */ |
| 1172 | staticfn boolean |
no test coverage detected