version 1.6 | | version 1.7 |
---|
| | |
/* | | /* |
* static char *rcsid_gods_c = | | * static char *rcsid_gods_c = |
* "$Id: gods.c,v 1.6 2000/04/27 07:35:01 cvs Exp $"; | | * "$Id: gods.c,v 1.7 2000/05/22 13:06:15 jec Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
int godnr = -1; | | int godnr = -1; |
| | |
/* spells */ | | /* spells */ |
if((op->type==FBULLET||op->type==CONE||op->type==FBALL)&&op->title) { | | if ((op->type == FBULLET || op->type == CONE || op->type == FBALL |
| | || op->type == SWARM_SPELL) && op->title) |
| | { |
if(lookup_god_by_name(op->title)>=0) return op->title; | | if(lookup_god_by_name(op->title)>=0) return op->title; |
} | | } |
| | |
| | |
| | |
if(caster->type==FBULLET | | if(caster->type==FBULLET |
||caster->type==CONE | | ||caster->type==CONE |
||caster->type==FBALL) caster_is_spell=1; | | ||caster->type==FBALL |
| | ||caster->type==SWARM_SPELL) caster_is_spell=1; |
| | |
if(!caster_is_spell) | | |
if(!god||(spellop->attacktype&AT_HOLYWORD&&!god->race)) { | | if(!god||(spellop->attacktype&AT_HOLYWORD&&!god->race)) { |
| | if ( ! caster_is_spell) |
new_draw_info(NDI_UNIQUE, 0, caster, | | new_draw_info(NDI_UNIQUE, 0, caster, |
"This prayer is useless unless you worship an appropriate god"); | | "This prayer is useless unless you worship an appropriate god"); |
| | else |
| | LOG (llevError, "BUG: tailor_god_spell(): no god\n"); |
free_object(spellop); | | free_object(spellop); |
return 0; | | return 0; |
} | | } |
| | |
} | | } |
| | |
/* only the godpower attacktype adds the god's attack onto the spell */ | | /* only the godpower attacktype adds the god's attack onto the spell */ |
if((spellop->attacktype&AT_GODPOWER)&&!caster_is_spell) | | if(spellop->attacktype & AT_GODPOWER) |
spellop->attacktype=spellop->attacktype|god->attacktype; | | spellop->attacktype=spellop->attacktype|god->attacktype; |
| | |
/* a little cosmetic for fun, we tack on the god's name to the spell */ | | /* tack on the god's name to the spell */ |
if(spellop->attacktype&AT_HOLYWORD||spellop->attacktype&AT_GODPOWER) { | | if(spellop->attacktype&AT_HOLYWORD||spellop->attacktype&AT_GODPOWER) { |
if(spellop->title) | | if(spellop->title) |
free_string(spellop->title); | | free_string(spellop->title); |