| version 1.6 | | version 1.7 |
|---|
| | |
| /* | | /* |
| * static char *rcsid_shop_c = | | * static char *rcsid_shop_c = |
| * "$Id: shop.c,v 1.6 2000/08/07 05:16:34 cvs Exp $"; | | * "$Id: shop.c,v 1.7 2000/10/05 18:42:42 peterm Exp $"; |
| */ | | */ |
| | | |
| /* | | /* |
| | |
| /* Give money based on how many charges the item could have. Not | | /* Give money based on how many charges the item could have. Not |
| * really a good method - some spells are certainly better than others. | | * really a good method - some spells are certainly better than others. |
| */ | | */ |
| val=(val*tmp->stats.food)/spells[tmp->stats.sp].charges; | | val=(val*tmp->stats.food)/MAX(1,spells[tmp->stats.sp].charges); |
| else | | else |
| val/=3; | | val/=3; |
| } | | } |