version 1.4 | | version 1.5 |
---|
| | |
| | |
/* | | /* |
* static char *rcs_treasure_c = | | * static char *rcs_treasure_c = |
* "$Id: treasure.c,v 1.4 2000/12/04 00:40:03 cvs Exp $"; | | * "$Id: treasure.c,v 1.5 2000/12/05 04:56:36 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
for (i=0; i<NROFATTACKS; i++) { | | for (i=0; i<NROFATTACKS; i++) { |
if (change->resist[i]) { | | if (change->resist[i]) { |
if (change->resist[i] < 0) | | |
op->resist[i] = change->resist[i]; | | |
else if (change->resist[i] > 0) { | | |
if ((op->type==ARMOUR || op->type==HELMET || op->type==SHIELD) && i==ATNR_PHYSICAL) { | | |
op->resist[i] = (op->resist[i] * change->resist[i])/10; | | |
} | | |
else { | | |
op->resist[i] += change->resist[i]; | | op->resist[i] += change->resist[i]; |
} | | } |
} | | } |
} | | |
} | | |
if (change->stats.dam) { | | if (change->stats.dam) { |
if (change->stats.dam < 0) | | if (change->stats.dam < 0) |
op->stats.dam = (-change->stats.dam); | | op->stats.dam = (-change->stats.dam); |