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.18 by root, Fri Nov 17 15:48:07 2006 UTC vs.
Revision 1.19 by root, Tue Dec 12 20:53:03 2006 UTC

589 return 0; 589 return 0;
590 590
591 if (OB_TYPE_MOVE_BLOCK (tmp, GET_MAP_MOVE_BLOCK (m, x, y))) 591 if (OB_TYPE_MOVE_BLOCK (tmp, GET_MAP_MOVE_BLOCK (m, x, y)))
592 { 592 {
593 new_draw_info (NDI_UNIQUE, 0, op, "You can't cast the spell on top of a wall!\n"); 593 new_draw_info (NDI_UNIQUE, 0, op, "You can't cast the spell on top of a wall!\n");
594 free_object (tmp); 594 tmp->destroy (0);
595 return 0; 595 return 0;
596 } 596 }
597 597
598 598
599 599
957 if (failure <= -20 && failure > -40) /* wonder */ 957 if (failure <= -20 && failure > -40) /* wonder */
958 { 958 {
959 new_draw_info_format (NDI_UNIQUE, 0, op, "%s gives a sign to renew your faith.", godname); 959 new_draw_info_format (NDI_UNIQUE, 0, op, "%s gives a sign to renew your faith.", godname);
960 tmp = get_archetype (SPELL_WONDER); 960 tmp = get_archetype (SPELL_WONDER);
961 cast_cone (op, op, 0, tmp); 961 cast_cone (op, op, 0, tmp);
962 free_object (tmp); 962 tmp->destroy (0);
963 } 963 }
964 964
965 else if (failure <= -40 && failure > -60) /* confusion */ 965 else if (failure <= -40 && failure > -60) /* confusion */
966 { 966 {
967 new_draw_info (NDI_UNIQUE, 0, op, "Your diety touches your mind!"); 967 new_draw_info (NDI_UNIQUE, 0, op, "Your diety touches your mind!");
1001 if (failure <= -20 && failure > -40) /* wonder */ 1001 if (failure <= -20 && failure > -40) /* wonder */
1002 { 1002 {
1003 new_draw_info (NDI_UNIQUE, 0, op, "Your spell causes an unexpected effect."); 1003 new_draw_info (NDI_UNIQUE, 0, op, "Your spell causes an unexpected effect.");
1004 tmp = get_archetype (SPELL_WONDER); 1004 tmp = get_archetype (SPELL_WONDER);
1005 cast_cone (op, op, 0, tmp); 1005 cast_cone (op, op, 0, tmp);
1006 free_object (tmp); 1006 tmp->destroy (0);
1007 } 1007 }
1008 1008
1009 else if (failure <= -40 && failure > -60) /* confusion */ 1009 else if (failure <= -40 && failure > -60) /* confusion */
1010 { 1010 {
1011 new_draw_info (NDI_UNIQUE, 0, op, "Your magic recoils on you, making you confused!"); 1011 new_draw_info (NDI_UNIQUE, 0, op, "Your magic recoils on you, making you confused!");
1066 /* Always cast spell on caster */ 1066 /* Always cast spell on caster */
1067 success = cast_spell (op, caster, dir, spell, stringarg); 1067 success = cast_spell (op, caster, dir, spell, stringarg);
1068 1068
1069 if (caster->contr->party == NULL) 1069 if (caster->contr->party == NULL)
1070 { 1070 {
1071 remove_ob (spell); 1071 spell->remove ();
1072 return success; 1072 return success;
1073 } 1073 }
1074 for (pl = first_player; pl != NULL; pl = pl->next) 1074 for (pl = first_player; pl != NULL; pl = pl->next)
1075 if ((pl->ob->contr->party == caster->contr->party) && (on_same_map (pl->ob, caster))) 1075 if ((pl->ob->contr->party == caster->contr->party) && (on_same_map (pl->ob, caster)))
1076 { 1076 {
1077 cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg); 1077 cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg);
1078 } 1078 }
1079 remove_ob (spell); 1079 spell->remove ();
1080 return success; 1080 return success;
1081} 1081}
1082 1082
1083/* This is where the main dispatch when someone casts a spell. 1083/* This is where the main dispatch when someone casts a spell.
1084 * 1084 *
1683 { 1683 {
1684 hit_player (victim, spell->stats.dam, spell, spell->attacktype, 1); 1684 hit_player (victim, spell->stats.dam, spell, spell->attacktype, 1);
1685 1685
1686 if (!spell->destroyed ()) 1686 if (!spell->destroyed ())
1687 { 1687 {
1688 remove_ob (spell); 1688 spell->remove ();
1689 free_object (spell); 1689 spell->destroy (0);
1690 } 1690 }
1691 } 1691 }
1692 break; 1692 break;
1693 1693
1694 case SP_MOVING_BALL: 1694 case SP_MOVING_BALL:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines