version 1.44 | | version 1.45 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_effect_c = | | * static char *rcsid_spell_effect_c = |
* "$Id: spell_effect.c,v 1.44 2001/03/17 05:03:08 mwedel Exp $"; | | * "$Id: spell_effect.c,v 1.45 2001/03/19 07:58:10 mwedel Exp $"; |
*/ | | */ |
| | |
| | |
| | |
| | |
int cast_charm_undead(object *op, object *caster,archetype *arch,int spellnum) { | | int cast_charm_undead(object *op, object *caster,archetype *arch,int spellnum) { |
int i,bonus; | | int i,bonus; |
object *tmp,*effect; | | object *tmp,*effect, *god=find_god(determine_god(op)); |
| | |
if (op->type != PLAYER) | | if (op->type != PLAYER) |
return 0; | | return 0; |
if (QUERY_FLAG(caster,FLAG_UNDEAD) || strstr(find_god(determine_god(op))->race,undead_name)!=NULL) { | | if (QUERY_FLAG(caster,FLAG_UNDEAD) || (god->race && strstr(god->race,undead_name)!=NULL)) { |
bonus = 5; | | bonus = 5; |
} else if (strstr(find_god(determine_god(op))->slaying,undead_name)!=NULL) { | | } else if (god->slaying && strstr(god->slaying,undead_name)!=NULL) { |
bonus = -5; | | bonus = -5; |
} else { | | } else { |
bonus = -1; | | bonus = -1; |