version 1.58 | | version 1.59 |
---|
| | |
%{ | | %{ |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: loader.l,v 1.58 2004/06/11 07:23:42 mwedel Exp $"; | | * "$Id: loader.l,v 1.59 2004/08/18 06:29:24 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if ((op->type == ROD || op->type == WAND || op->type == SCROLL || op->type == HORN | | if ((op->type == ROD || op->type == WAND || op->type == SCROLL || op->type == HORN |
|| op->type == FIREWALL || | | || op->type == FIREWALL || |
/* POTIONS and ALTARS don't always cast spells, but if they do, update them */ | | /* POTIONS and ALTARS don't always cast spells, but if they do, update them */ |
((op->type == POTION || op->type == ALTAR) && op->stats.sp)) && !op->inv) { | | ((op->type == POTION || op->type == ALTAR) && op->stats.sp)) && !op->inv && !arch_init) { |
object *tmp; | | object *tmp; |
| | |
/* Fireall is bizarre in that spell type was stored in dam. Rest are 'normal' | | /* Fireall is bizarre in that spell type was stored in dam. Rest are 'normal' |
| | |
} | | } |
/* spellbooks & runes use slaying. But not to arch name, but to spell name */ | | /* spellbooks & runes use slaying. But not to arch name, but to spell name */ |
| | |
if ((op->type == SPELLBOOK || op->type == RUNE) && op->slaying && !op->inv) { | | if ((op->type == SPELLBOOK || op->type == RUNE) && op->slaying && !op->inv && !arch_init) { |
object *tmp; | | object *tmp; |
| | |
tmp = get_archetype_by_object_name(op->slaying); | | tmp = get_archetype_by_object_name(op->slaying); |
| | |
*/ | | */ |
if (op->arch) { | | if (op->arch) { |
object *tmp; | | object *tmp; |
| | char *yv=yval(); |
| | |
tmp=get_object(); | | tmp=get_object(); |
tmp->arch = find_archetype(yval()); | | tmp->arch = find_archetype(yv); |
if (tmp->arch!=NULL) | | if (tmp->arch!=NULL) |
copy_object(&tmp->arch->clone,tmp); | | copy_object(&tmp->arch->clone,tmp); |
| | else { |
| | if (tmp->name) free_string(tmp->name); |
| | /* record the name of the broken object */ |
| | tmp->name = add_string(yv); |
| | } |
strcpy(msgbuf, ""); | | strcpy(msgbuf, ""); |
strcpy(lorebuf, ""); | | strcpy(lorebuf, ""); |
lex_load(tmp, map_flags); | | lex_load(tmp, map_flags); |