ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/skills.C
(Generate patch)

Comparing deliantra/server/server/skills.C (file contents):
Revision 1.73 by root, Sun Nov 8 13:36:14 2009 UTC vs.
Revision 1.75 by root, Sun Nov 29 17:41:08 2009 UTC

482static void 482static void
483stop_jump (object *pl, int dist, int spaces) 483stop_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
490static int 490static int
491attempt_jump (object *pl, int dir, int spaces, object *skill) 491attempt_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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines