version 1.18 | | version 1.19 |
---|
| | |
/* | | /* |
* static char *rcsid_rune_c = | | * static char *rcsid_rune_c = |
* "$Id: rune.c,v 1.18 2001/05/29 04:41:54 mwedel Exp $"; | | * "$Id: rune.c,v 1.19 2001/07/14 04:11:18 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
tmp->direction=dir; /* where any spell will go upon detonation */ | | tmp->direction=dir; /* where any spell will go upon detonation */ |
tmp->level=SK_level(op); /* what level to cast the spell at */ | | tmp->level=SK_level(op); /* what level to cast the spell at */ |
if(inspell||tmp->stats.dam) set_owner(tmp,op); /* runes without need no owner */ | | if(inspell||tmp->stats.dam) set_owner(tmp,op); /* runes without need no owner */ |
insert_ob_in_map(tmp,op->map,op); | | insert_ob_in_map(tmp,op->map,op,0); |
return 1; | | return 1; |
| | |
} | | } |
| | |
else | | else |
op->invisible=1; | | op->invisible=1; |
if(op->invisible!=det) | | if(op->invisible!=det) |
update_object(op); | | update_object(op,UP_OBJ_FACE); |
} | | } |
| | |
| | |
| | |
/* This is necessary if the trap is inside something else */ | | /* This is necessary if the trap is inside something else */ |
remove_ob(trap); | | remove_ob(trap); |
trap->x=victim->x;trap->y=victim->y; | | trap->x=victim->x;trap->y=victim->y; |
insert_ob_in_map(trap,victim->map,trap); | | insert_ob_in_map(trap,victim->map,trap,0); |
if (was_destroyed (trap, trap_tag)) | | if (was_destroyed (trap, trap_tag)) |
return; | | return; |
cast_spell(trap,trap,trap->direction,trap->stats.sp,1,spellNormal,NULL); | | cast_spell(trap,trap,trap->direction,trap->stats.sp,1,spellNormal,NULL); |
| | |
tmp2=get_archetype("runedet"); | | tmp2=get_archetype("runedet"); |
tmp2->face=&new_faces[GET_ANIMATION(trap, 0)]; | | tmp2->face=&new_faces[GET_ANIMATION(trap, 0)]; |
tmp2->x=where->x;tmp2->y=where->y;tmp2->map=where->map; | | tmp2->x=where->x;tmp2->y=where->y;tmp2->map=where->map; |
insert_ob_in_map(tmp2,where->map,NULL); | | insert_ob_in_map(tmp2,where->map,NULL,0); |
return 1; | | return 1; |
| | |
} | | } |