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

Comparing deliantra/server/server/spell_util.C (file contents):
Revision 1.42 by root, Mon Apr 30 04:25:30 2007 UTC vs.
Revision 1.44 by root, Tue May 15 16:45:23 2007 UTC

627 ****************************************************************************/ 627 ****************************************************************************/
628void 628void
629regenerate_rod (object *rod) 629regenerate_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
641void 635void
642drain_rod_charge (object *rod) 636drain_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 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines