… | |
… | |
564 | pl->map = m; |
564 | pl->map = m; |
565 | stop_jump (pl, i, spaces); |
565 | stop_jump (pl, i, spaces); |
566 | return calc_skill_exp (pl, NULL, skill); |
566 | return calc_skill_exp (pl, NULL, skill); |
567 | } |
567 | } |
568 | } |
568 | } |
|
|
569 | |
569 | pl->x = x; |
570 | pl->x = x; |
570 | pl->y = y; |
571 | pl->y = y; |
571 | pl->map = m; |
572 | pl->map = m; |
572 | } |
573 | } |
|
|
574 | |
573 | stop_jump (pl, i, spaces); |
575 | stop_jump (pl, i, spaces); |
|
|
576 | |
574 | return calc_skill_exp (pl, NULL, skill); |
577 | return calc_skill_exp (pl, NULL, skill); |
575 | } |
578 | } |
576 | |
579 | |
577 | /* jump() - this is both a new type of movement for player/monsters and |
580 | /* jump() - this is both a new type of movement for player/monsters and |
578 | * an attack as well. |
581 | * an attack as well. |
… | |
… | |
587 | |
590 | |
588 | dex = dex ? dex : 15; |
591 | dex = dex ? dex : 15; |
589 | str = str ? str : 10; |
592 | str = str ? str : 10; |
590 | |
593 | |
591 | int stats = str * str * str * dex * skill->level; |
594 | int stats = str * str * str * dex * skill->level; |
592 | |
|
|
593 | int spaces = min (2, pl->carrying ? stats / pl->carrying : 0); |
595 | int spaces = min (min (3, skill->level), pl->carrying ? stats / pl->carrying : 0); |
594 | |
596 | |
595 | if (spaces == 0) |
597 | if (spaces == 0) |
596 | { |
598 | { |
597 | new_draw_info (NDI_UNIQUE, 0, pl, "You are carrying too much weight to jump."); |
599 | new_draw_info (NDI_UNIQUE, 0, pl, "You are carrying too much weight to jump."); |
598 | return 0; |
600 | return 0; |