| version 1.23 | | version 1.24 |
|---|
| | |
| /* | | /* |
| * static char *rcsid_shop_c = | | * static char *rcsid_shop_c = |
| * "$Id: shop.c,v 1.23 2003/09/03 13:42:19 tchize Exp $"; | | * "$Id: shop.c,v 1.24 2003/09/13 05:02:12 mwedel Exp $"; |
| */ | | */ |
| | | |
| /* | | /* |
| | |
| */ | | */ |
| val/=(1-tmp->magic); | | val/=(1-tmp->magic); |
| } | | } |
| #if 0 /* cha_bonus now takes this into account */ | | |
| if (flag==F_BUY) | | |
| val*=6; /* For charisma 25, the price is now x1.5 */ | | |
| #endif | | |
| if (tmp->type==WAND) { | | if (tmp->type==WAND) { |
| if (QUERY_FLAG(tmp, FLAG_IDENTIFIED) || !need_identify(tmp)) | | /* Value of the wand is multiplied by the number of |
| /* Give money based on how many charges the item could have. Not | | * charges. the treasure code already sets up the value |
| * really a good method - some spells are certainly better than others. | | |
| */ | | */ |
| val=(val*tmp->stats.food)/MAX(1,spells[tmp->stats.sp].charges); | | if (QUERY_FLAG(tmp, FLAG_IDENTIFIED) || !need_identify(tmp)) |
| else | | val=(val*tmp->stats.food) / 50; |
| val/=3; | | else /* if not identified, presume one charge */ |
| | | val/=50; |
| } | | } |
| | | |
| /* Limit amount of money you can get for really great items. */ | | /* Limit amount of money you can get for really great items. */ |