… | |
… | |
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); |
… | |
… | |
1185 | if (op->type != PLAYER) |
1179 | if (op->type != PLAYER) |
1186 | return 0; |
1180 | return 0; |
1187 | |
1181 | |
1188 | if ((mflags & P_NO_CLERIC) && spell_ob->stats.grace) |
1182 | if ((mflags & P_NO_CLERIC) && spell_ob->stats.grace) |
1189 | new_draw_info_format (NDI_UNIQUE, 0, op, "This ground is unholy! %s ignores you.", godname); |
1183 | new_draw_info_format (NDI_UNIQUE, 0, op, "This ground is unholy! %s ignores you.", godname); |
|
|
1184 | else if (object *item = op->contr->ranged_ob) |
|
|
1185 | { |
|
|
1186 | if (item->type == SPELL) |
|
|
1187 | new_draw_info (NDI_UNIQUE, 0, op, "Something blocks your spellcasting."); |
|
|
1188 | else if (item->type == SCROLL) |
|
|
1189 | new_draw_info (NDI_UNIQUE, 0, op, "Something blocks the magic of your scroll."); |
|
|
1190 | else |
|
|
1191 | new_draw_info (NDI_UNIQUE, 0, op, "Something blocks the magic of your item."); |
|
|
1192 | } |
1190 | else |
1193 | else |
1191 | new_draw_info (NDI_UNIQUE, 0, op, "Something blocks the spell!"); |
1194 | new_draw_info (NDI_UNIQUE, 0, op, "Something blocks the spell!"); |
1192 | |
1195 | |
1193 | return 0; |
1196 | return 0; |
1194 | } |
1197 | } |