… | |
… | |
627 | ****************************************************************************/ |
627 | ****************************************************************************/ |
628 | void |
628 | void |
629 | regenerate_rod (object *rod) |
629 | regenerate_rod (object *rod) |
630 | { |
630 | { |
631 | if (rod->stats.hp < rod->stats.maxhp) |
631 | if (rod->stats.hp < rod->stats.maxhp) |
632 | { |
632 | rod->stats.hp = min (rod->stats.maxhp, rod->stats.hp + 1 + rod->stats.maxhp / 10); |
633 | rod->stats.hp += 1 + rod->stats.maxhp / 10; |
|
|
634 | |
|
|
635 | if (rod->stats.hp > rod->stats.maxhp) |
|
|
636 | rod->stats.hp = rod->stats.maxhp; |
|
|
637 | } |
|
|
638 | } |
633 | } |
639 | |
|
|
640 | |
634 | |
641 | void |
635 | void |
642 | drain_rod_charge (object *rod) |
636 | drain_rod_charge (object *rod) |
643 | { |
637 | { |
644 | rod->stats.hp -= SP_level_spellpoint_cost (rod, rod->inv, SPELL_HIGHEST); |
638 | rod->stats.hp -= SP_level_spellpoint_cost (rod, rod->inv, SPELL_HIGHEST); |