version 1.97 | | version 1.98 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_util_c = | | * static char *rcsid_spell_util_c = |
* "$Id: spell_util.c,v 1.97 2005/10/01 17:46:05 ryo_saeba Exp $"; | | * "$Id: spell_util.c,v 1.98 2005/10/07 19:38:50 akirschbaum Exp $"; |
*/ | | */ |
| | |
| | |
| | |
/* Safety check to make sure we don't get any mana storms in scorn */ | | /* Safety check to make sure we don't get any mana storms in scorn */ |
if (get_map_flags(op->map, NULL, op->x, op->y, NULL, NULL) & P_NO_MAGIC) { | | if (get_map_flags(op->map, NULL, op->x, op->y, NULL, NULL) & P_NO_MAGIC) { |
new_draw_info(NDI_UNIQUE, 0, op, "The magic warps and you are turned inside out!"); | | new_draw_info(NDI_UNIQUE, 0, op, "The magic warps and you are turned inside out!"); |
hit_player(op,9998,op,AT_INTERNAL); | | hit_player(op,9998,op,AT_INTERNAL,1); |
| | |
} else { | | } else { |
new_draw_info(NDI_UNIQUE, 0,op,"You lose control of the mana! The uncontrolled magic blasts you!"); | | new_draw_info(NDI_UNIQUE, 0,op,"You lose control of the mana! The uncontrolled magic blasts you!"); |
| | |
switch (spell->subtype) { | | switch (spell->subtype) { |
case SP_CONE: | | case SP_CONE: |
if (QUERY_FLAG(victim, FLAG_ALIVE) && spell->speed && spell->attacktype) | | if (QUERY_FLAG(victim, FLAG_ALIVE) && spell->speed && spell->attacktype) |
hit_player(victim, spell->stats.dam, spell, spell->attacktype); | | hit_player(victim, spell->stats.dam, spell, spell->attacktype, 0); |
break; | | break; |
| | |
case SP_MAGIC_MISSILE: | | case SP_MAGIC_MISSILE: |
if (QUERY_FLAG (victim, FLAG_ALIVE)) { | | if (QUERY_FLAG (victim, FLAG_ALIVE)) { |
tag_t spell_tag = spell->count; | | tag_t spell_tag = spell->count; |
hit_player (victim, spell->stats.dam, spell, spell->attacktype); | | hit_player (victim, spell->stats.dam, spell, spell->attacktype, 1); |
if ( ! was_destroyed (spell, spell_tag)) { | | if ( ! was_destroyed (spell, spell_tag)) { |
remove_ob (spell); | | remove_ob (spell); |
free_object (spell); | | free_object (spell); |
| | |
| | |
case SP_MOVING_BALL: | | case SP_MOVING_BALL: |
if (QUERY_FLAG (victim, FLAG_ALIVE)) | | if (QUERY_FLAG (victim, FLAG_ALIVE)) |
hit_player (victim, spell->stats.dam, spell, spell->attacktype); | | hit_player (victim, spell->stats.dam, spell, spell->attacktype, 1); |
else if (victim->material || victim->materialname) | | else if (victim->material || victim->materialname) |
save_throw_object (victim, spell->attacktype, spell); | | save_throw_object (victim, spell->attacktype, spell); |
break; | | break; |