| 1195 | } |
| 1196 | |
| 1197 | staticfn void |
| 1198 | skill_advance(int skill) |
| 1199 | { |
| 1200 | u.weapon_slots -= slots_required(skill); |
| 1201 | P_SKILL(skill)++; |
| 1202 | u.skill_record[u.skills_advanced++] = skill; |
| 1203 | /* subtly change the advance message to indicate no more advancement */ |
| 1204 | You("are now %s skilled in %s.", |
| 1205 | P_SKILL(skill) >= P_MAX_SKILL(skill) ? "most" : "more", |
| 1206 | P_NAME(skill)); |
| 1207 | |
| 1208 | /* wizards discover spellbook IDs depending on spell 'school' skill limits; |
| 1209 | this allows them to successfully write books for unknown spells without |
| 1210 | the Luck bias they used to have over other roles */ |
| 1211 | if (skill >= P_FIRST_SPELL && skill <= P_LAST_SPELL) |
| 1212 | skill_based_spellbook_id(); |
| 1213 | } |
| 1214 | |
| 1215 | static const struct skill_range { |
| 1216 | short first, last; |
no test coverage detected