version 1.47 | | version 1.48 |
---|
| | |
/* | | /* |
* static char *rcsid_rune_c = | | * static char *rcsid_rune_c = |
* "$Id: rune.c,v 1.47 2006/05/05 09:26:35 ryo_saeba Exp $"; | | * "$Id: rune.c,v 1.48 2006/06/26 07:31:00 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
Copyright (C) 2003 Mark Wedel & Crossfire Development Team | | Copyright (C) 2003,2006 Mark Wedel & Crossfire Development Team |
Copyright (C) 1992 Frank Tore Johansen | | Copyright (C) 1992 Frank Tore Johansen |
| | |
This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify |
| | |
if ((trap->inv && trap->inv->type == SPELL) || | | if ((trap->inv && trap->inv->type == SPELL) || |
(trap->other_arch && trap->other_arch->clone.type == SPELL)) { | | (trap->other_arch && trap->other_arch->clone.type == SPELL)) { |
object *spell; | | object *spell; |
/* This is necessary if the trap is inside something else */ | | |
remove_ob(trap); | | if (trap->direction) |
trap->x=victim->x; | | rv.direction = trap->direction; |
trap->y=victim->y; | | |
insert_ob_in_map(trap,victim->map,trap,0); | | |
if (was_destroyed (trap, trap_tag)) | | |
return; | | |
| | |
for(i = 0; i < MAX(1, trap->stats.maxhp); i++) { | | for(i = 0; i < MAX(1, trap->stats.maxhp); i++) { |
if (trap->inv) | | if (trap->inv) |
cast_spell(trap,trap,trap->direction,trap->inv,NULL); | | cast_spell(env,trap,rv.direction,trap->inv,NULL); |
else { | | else { |
spell = arch_to_object(trap->other_arch); | | spell = arch_to_object(trap->other_arch); |
cast_spell(trap,trap,trap->direction,spell,NULL); | | cast_spell(env,trap,rv.direction,spell,NULL); |
free_object(spell); | | free_object(spell); |
} | | } |
} | | } |