version 1.65 | | version 1.66 |
---|
| | |
/* | | /* |
* static char *rcsid_living_c = | | * static char *rcsid_living_c = |
* "$Id: living.c,v 1.65 2005/03/06 19:05:24 akirschbaum Exp $"; | | * "$Id: living.c,v 1.66 2005/03/20 16:32:55 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* note that if we adjusted it with it is -1/1, that check above | | * note that if we adjusted it with it is -1/1, that check above |
* for 0 luck will happen, resulting in error. | | * for 0 luck will happen, resulting in error. |
*/ | | */ |
if (RANDOM()%(FABS(tmp->stats.luck)) > RANDOM()%30) | | if (RANDOM()%(FABS(tmp->stats.luck)) > RANDOM()%30) { |
tmp->stats.luck += tmp->stats.luck>0?-1:1; | | int diff = tmp->stats.luck>0?-1:1; |
| | op->stats.luck += diff; |
| | tmp->stats.luck += diff; |
| | } |
} | | } |
} | | } |
} | | } |