version 1.93 | | version 1.94 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_util_c = | | * static char *rcsid_spell_util_c = |
* "$Id: spell_util.c,v 1.93 2005/07/15 08:02:00 ryo_saeba Exp $"; | | * "$Id: spell_util.c,v 1.94 2005/08/12 08:18:59 ryo_saeba Exp $"; |
*/ | | */ |
| | |
| | |
| | |
* the spell must be of this skill, it can be NULL in which case all | | * the spell must be of this skill, it can be NULL in which case all |
* matching spells are used. | | * matching spells are used. |
*/ | | */ |
object *find_random_spell_in_ob(object *ob, char *skill) | | object *find_random_spell_in_ob(object *ob, const char *skill) |
{ | | { |
int k=0,s; | | int k=0,s; |
object *tmp; | | object *tmp; |
| | |
* also deals with multipart monsters properly. | | * also deals with multipart monsters properly. |
*/ | | */ |
| | |
void put_a_monster(object *op,char *monstername) { | | void put_a_monster(object *op,const char *monstername) { |
object *tmp,*head=NULL,*prev=NULL; | | object *tmp,*head=NULL,*prev=NULL; |
archetype *at; | | archetype *at; |
int dir; | | int dir; |
| | |
* players part (alchemy, reincarnation, etc) | | * players part (alchemy, reincarnation, etc) |
*/ | | */ |
| | |
int summon_hostile_monsters(object *op,int n,char *monstername){ | | int summon_hostile_monsters(object *op,int n,const char *monstername){ |
int i; | | int i; |
for(i=0;i<n;i++) | | for(i=0;i<n;i++) |
put_a_monster(op,monstername); | | put_a_monster(op,monstername); |
| | |
| | |
void prayer_failure(object *op, int failure,int power) | | void prayer_failure(object *op, int failure,int power) |
{ | | { |
char *godname; | | const char *godname; |
object *tmp; | | object *tmp; |
| | |
if(!strcmp((godname=determine_god(op)),"none")) godname="Your spirit"; | | if(!strcmp((godname=determine_god(op)),"none")) godname="Your spirit"; |
| | |
| | |
int cast_spell(object *op, object *caster,int dir,object *spell_ob, char *stringarg) { | | int cast_spell(object *op, object *caster,int dir,object *spell_ob, char *stringarg) { |
| | |
char *godname; | | const char *godname; |
int success=0,mflags, cast_level=0, old_shoottype; | | int success=0,mflags, cast_level=0, old_shoottype; |
object *skill=NULL; | | object *skill=NULL; |
| | |