Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch to my spell patch.
- To: crossfire (at) ifi.uio.no
- Subject: patch to my spell patch.
- From: Rupert G. Goldie <>
- Date: Tue, 6 Oct 92 13:40:01 EST
This is a patch to fix a couple of problems people have had with my last patch.
-Rupert
--------------------------------cut here 8<-----------------------------------
*** /tmp/T0a09393 Tue Oct 6 13:08:52 1992
--- living.c Tue Oct 6 11:54:27 1992
***************
*** 52,61 ****
for(j=0;j<6;j++)
if(op->contr->stat_count[j])
set_attr_value(&(op->contr->orig_stats),j,
! get_attr_value(&(op->contr->orig_stats),j)+get_attr_value(&(tmp->stats),j));
else
set_attr_value(&(op->stats),j,
! get_attr_value(&(op->stats),j)+get_attr_value(&(tmp->stats),j));
if(flag==1)
op->immune|=tmp->immune,
--- 52,61 ----
for(j=0;j<6;j++)
if(op->contr->stat_count[j])
set_attr_value(&(op->contr->orig_stats),j,
! get_attr_value(&(op->contr->orig_stats),j)+flag*get_attr_value(&(tmp->stats),j));
else
set_attr_value(&(op->stats),j,
! get_attr_value(&(op->stats),j)+flag*get_attr_value(&(tmp->stats),j));
if(flag==1)
op->immune|=tmp->immune,
*** /tmp/T0a09393 Tue Oct 6 13:08:57 1992
--- proto.h Mon Oct 5 17:52:59 1992
***************
*** 281,287 ****
extern int cast_change_attr( object *op,int dir,int spell_type );
extern void set_attr_value( living *stats, int attr, signed char value );
extern signed char get_attr_value( living *stats, int attr );
! extern int cast_create_obj( object *op,int dir,char *archetype );
extern int cast_earth2dust( object *op );
extern int isqrt ( int n );
extern void set_magic ( mapstruct *m, object *op, int magic );
--- 281,287 ----
extern int cast_change_attr( object *op,int dir,int spell_type );
extern void set_attr_value( living *stats, int attr, signed char value );
extern signed char get_attr_value( living *stats, int attr );
! extern int cast_create_obj( object *op,int dir,char *arch );
extern int cast_earth2dust( object *op );
extern int isqrt ( int n );
extern void set_magic ( mapstruct *m, object *op, int magic );
*** /tmp/T0a09393 Tue Oct 6 13:08:58 1992
--- spells.c Mon Oct 5 17:52:40 1992
***************
*** 830,836 ****
int
! cast_create_obj(object *op,int dir,char *archetype) {
object *tmp;
if(blocked(op->map,op->x+freearr_x[dir],op->y+freearr_y[dir])) {
--- 830,836 ----
int
! cast_create_obj(object *op,int dir,char *arch) {
object *tmp;
if(blocked(op->map,op->x+freearr_x[dir],op->y+freearr_y[dir])) {
***************
*** 837,843 ****
draw_info(op,"Something is in the way.");
return 0;
}
! tmp=get_archetype(archetype);
tmp->x=op->x+freearr_x[dir],tmp->y=op->y+freearr_y[dir];
insert_ob_in_map(tmp,op->map);
return 1;
--- 837,843 ----
draw_info(op,"Something is in the way.");
return 0;
}
! tmp=get_archetype(arch);
tmp->x=op->x+freearr_x[dir],tmp->y=op->y+freearr_y[dir];
insert_ob_in_map(tmp,op->map);
return 1;
--
Rupert G. Goldie, Research Scientist
Australian Artificial Intelligence Institute
Life's a bitch and then you die.