version 1.13 | | version 1.14 |
---|
| | |
| | |
/* | | /* |
* static char *rcs_treasure_c = | | * static char *rcs_treasure_c = |
* "$Id: treasure.c,v 1.13 2001/05/02 23:39:09 mwedel Exp $"; | | * "$Id: treasure.c,v 1.14 2001/05/29 04:41:53 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
SET_FLAG(op,FLAG_NO_PICK); | | SET_FLAG(op,FLAG_NO_PICK); |
if(creator->slaying&&!op->slaying) /* for check_inv floors */ | | if(creator->slaying&&!op->slaying) /* for check_inv floors */ |
op->slaying = add_string(creator->slaying); | | op->slaying = add_string(creator->slaying); |
#ifdef ALLOW_SKILLS /* add exp so reading it gives xp (once)*/ | | |
| | /* add exp so reading it gives xp (once)*/ |
op->stats.exp = op->value>10000?op->value/5:op->value/10; | | op->stats.exp = op->value>10000?op->value/5:op->value/10; |
#endif | | |
} | | } |
break; | | break; |
case SPELLBOOK: | | case SPELLBOOK: |
| | |
op->value=(op->value*spells[op->stats.sp].level)/ | | op->value=(op->value*spells[op->stats.sp].level)/ |
(spells[op->stats.sp].level+4); | | (spells[op->stats.sp].level+4); |
change_book(op,-1); | | change_book(op,-1); |
#ifdef ALLOW_SKILLS /* add exp so learning gives xp */ | | |
| | /* add exp so learning gives xp */ |
op->level = spells[op->stats.sp].level; | | op->level = spells[op->stats.sp].level; |
op->stats.exp = op->value; | | op->stats.exp = op->value; |
#endif | | |
break; | | break; |
case WAND: | | case WAND: |
do | | do |
| | |
if (op->level<1) op->level=1; | | if (op->level<1) op->level=1; |
op->value=(op->value*spells[op->stats.sp].level)/ | | op->value=(op->value*spells[op->stats.sp].level)/ |
(spells[op->stats.sp].level+4); | | (spells[op->stats.sp].level+4); |
#ifdef ALLOW_SKILLS /* add exp so reading them properly gives xp */ | | |
| | /* add exp so reading them properly gives xp */ |
op->stats.exp = op->value/5; | | op->stats.exp = op->value/5; |
#endif | | |
break; | | break; |
case RUNE: | | case RUNE: |
(*trap_adjust_func)(op,difficulty); | | (*trap_adjust_func)(op,difficulty); |