… | |
… | |
482 | static void |
482 | static void |
483 | stop_jump (object *pl, int dist, int spaces) |
483 | stop_jump (object *pl, int dist, int spaces) |
484 | { |
484 | { |
485 | pl->update_stats (); |
485 | pl->update_stats (); |
486 | pl->map->insert (pl, pl->x, pl->y, pl); |
486 | pl->map->insert (pl, pl->x, pl->y, pl); |
487 | pl->speed_left -= fabs (pl->speed * 8); |
487 | pl->speed_left -= pl->speed * 8.; |
488 | } |
488 | } |
489 | |
489 | |
490 | static int |
490 | static int |
491 | attempt_jump (object *pl, int dir, int spaces, object *skill) |
491 | attempt_jump (object *pl, int dir, int spaces, object *skill) |
492 | { |
492 | { |
… | |
… | |
1237 | |
1237 | |
1238 | STRLEN char_len = utf8_length ((U8 *)msg, (U8 *)(msg+len)); |
1238 | STRLEN char_len = utf8_length ((U8 *)msg, (U8 *)(msg+len)); |
1239 | |
1239 | |
1240 | if (char_len <= item->weight_limit) |
1240 | if (char_len <= item->weight_limit) |
1241 | { |
1241 | { |
1242 | object *newbook = arch_to_object (item->other_arch); |
1242 | object *newbook = item->other_arch->instance (); |
1243 | item->decrease (); |
1243 | item->decrease (); |
1244 | newbook->nrof = 1; |
1244 | newbook->nrof = 1; |
1245 | newbook->msg = shstr (msg); |
1245 | newbook->msg = shstr (msg); |
1246 | newbook->flag [FLAG_IDENTIFIED] = true; |
1246 | newbook->flag [FLAG_IDENTIFIED] = true; |
1247 | |
1247 | |
… | |
… | |
1303 | pl->stats.grace -= SP_level_spellpoint_cost (pl, chosen_spell, SPELL_GRACE); |
1303 | pl->stats.grace -= SP_level_spellpoint_cost (pl, chosen_spell, SPELL_GRACE); |
1304 | pl->stats.sp -= SP_level_spellpoint_cost (pl, chosen_spell, SPELL_MANA); |
1304 | pl->stats.sp -= SP_level_spellpoint_cost (pl, chosen_spell, SPELL_MANA); |
1305 | |
1305 | |
1306 | if (random_roll (0, chosen_spell->level * 4 - 1, pl, PREFER_LOW) < skill->level) |
1306 | if (random_roll (0, chosen_spell->level * 4 - 1, pl, PREFER_LOW) < skill->level) |
1307 | { |
1307 | { |
1308 | object *newscroll = arch_to_object (scroll->other_arch); |
1308 | object *newscroll = scroll->other_arch->instance (); |
1309 | scroll->decrease (); |
1309 | scroll->decrease (); |
1310 | newscroll->nrof = 1; |
1310 | newscroll->nrof = 1; |
1311 | |
1311 | |
1312 | pl->contr->play_sound (sound_find ("inscribe_success")); |
1312 | pl->contr->play_sound (sound_find ("inscribe_success")); |
1313 | |
1313 | |