… | |
… | |
1763 | return; |
1763 | return; |
1764 | } |
1764 | } |
1765 | } |
1765 | } |
1766 | else if (item->type == ROD || item->type == HORN) |
1766 | else if (item->type == ROD || item->type == HORN) |
1767 | { |
1767 | { |
1768 | if (item->stats.hp < MAX (item->inv->stats.sp, item->inv->stats.grace)) |
1768 | sint16 spell_sp = MAX (item->inv->stats.sp, item->inv->stats.grace); |
|
|
1769 | |
|
|
1770 | // using the maximum of the rods charge allows at least one spell cast |
|
|
1771 | // for a rod or horn, this fixes some broken rods. |
|
|
1772 | if (item->stats.hp < MIN (spell_sp, item->stats.maxhp)) |
1769 | { |
1773 | { |
1770 | op->contr->play_sound (sound_find ("wand_poof")); |
1774 | op->contr->play_sound (sound_find ("wand_poof")); |
1771 | |
1775 | |
1772 | if (item->type == ROD) |
1776 | if (item->type == ROD) |
1773 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s whines for a while, but nothing happens.", query_base_name (item, 0)); |
1777 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s whines for a while, but nothing happens.", query_base_name (item, 0)); |