version 1.41 | | version 1.42 |
---|
| | |
| | |
/* | | /* |
* static char *rcs_treasure_c = | | * static char *rcs_treasure_c = |
* "$Id: treasure.c,v 1.41 2003/09/16 04:21:02 mwedel Exp $"; | | * "$Id: treasure.c,v 1.42 2003/11/02 05:18:02 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
break; | | break; |
| | |
case ROD: | | case ROD: |
if (op->stats.maxhp) | | |
op->stats.maxhp += rndm(0, op->stats.maxhp-1); | | |
op->stats.hp = op->stats.maxhp; | | |
op->level = level_for_item(op, difficulty, 0); | | op->level = level_for_item(op, difficulty, 0); |
/* Add 50 to both level an divisor to keep prices a little more | | /* Add 50 to both level an divisor to keep prices a little more |
* reasonable. Otherwise, a high level version of a low level | | * reasonable. Otherwise, a high level version of a low level |
| | |
* 10 time multiplier). This way, the value are a bit more reasonable. | | * 10 time multiplier). This way, the value are a bit more reasonable. |
*/ | | */ |
op->value= op->value * op->inv->value * (op->level +50) / (op->inv->level + 50); | | op->value= op->value * op->inv->value * (op->level +50) / (op->inv->level + 50); |
| | /* maxhp is used to denote how many 'charges' the rod holds before */ |
| | if (op->stats.maxhp) |
| | op->stats.maxhp *= MAX(op->inv->stats.sp, op->inv->stats.grace); |
| | else |
| | op->stats.maxhp = 2 * MAX(op->inv->stats.sp, op->inv->stats.grace); |
| | |
| | op->stats.hp = op->stats.maxhp; |
break; | | break; |
| | |
case SCROLL: | | case SCROLL: |