version 1.77 | | version 1.78 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_util_c = | | * static char *rcsid_spell_util_c = |
* "$Id: spell_util.c,v 1.77 2003/02/22 07:26:56 mwedel Exp $"; | | * "$Id: spell_util.c,v 1.78 2003/03/21 08:01:11 mwedel Exp $"; |
*/ | | */ |
| | |
| | |
| | |
int create_aura(object *op, object *caster, archetype *aura_arch, int spell_type, | | int create_aura(object *op, object *caster, archetype *aura_arch, int spell_type, |
int magic) | | int magic) |
{ | | { |
object *new_aura = arch_to_object(aura_arch); | | int refresh=0; |
| | object *new_aura; |
| | |
| | new_aura = present_arch_in_ob(aura_arch, op); |
| | if (new_aura) refresh=1; |
| | else new_aura = arch_to_object(aura_arch); |
| | |
new_aura->stats.food = SP_PARAMETERS[spell_type].bdur + | | new_aura->stats.food = SP_PARAMETERS[spell_type].bdur + |
10* SP_level_strength_adjust(op,caster,spell_type); | | 10* SP_level_strength_adjust(op,caster,spell_type); |
new_aura->stats.dam = SP_PARAMETERS[spell_type].bdam | | new_aura->stats.dam = SP_PARAMETERS[spell_type].bdam |
+SP_level_dam_adjust(op,caster,spell_type); | | +SP_level_dam_adjust(op,caster,spell_type); |
| | |
set_owner(new_aura,op); | | set_owner(new_aura,op); |
if(magic) new_aura->attacktype|=AT_MAGIC; | | if(magic) new_aura->attacktype|=AT_MAGIC; |
| | |
if(new_aura->owner) { | | if(new_aura->owner) { |
new_aura->chosen_skill = op->chosen_skill; | | new_aura->chosen_skill = op->chosen_skill; |
if(new_aura->chosen_skill) new_aura->exp_obj = op->chosen_skill->exp_obj; | | if(new_aura->chosen_skill) new_aura->exp_obj = op->chosen_skill->exp_obj; |
} | | } |
new_aura->level = SK_level(caster); | | new_aura->level = SK_level(caster); |
| | if (refresh) |
| | new_draw_info(NDI_UNIQUE, 0, op, "You recast the spell while in effect."); |
| | else |
insert_ob_in_ob(new_aura, op); | | insert_ob_in_ob(new_aura, op); |
return 1; | | return 1; |
} | | } |