version 1.79 | | version 1.80 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.79 2003/02/12 05:40:24 mwedel Exp $"; | | * "$Id: apply.c,v 1.80 2003/03/08 05:35:32 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
/* got positive resistance, now calculate improvement chance (0-100) */ | | /* got positive resistance, now calculate improvement chance (0-100) */ |
| | |
/* this bonus makes resistance increase easier at lower levels */ | | /* this bonus makes resistance increase easier at lower levels */ |
bonus = (MAXLEVEL - op->level) * 30. / ((double)MAXLEVEL); | | bonus = (settings.max_level - op->level) * 30. / ((double)settings.max_level); |
if (i == abil->stats.exp) | | if (i == abil->stats.exp) |
bonus += 5; /* additional bonus for resistance of ability-focus */ | | bonus += 5; /* additional bonus for resistance of ability-focus */ |
| | |
/* monster bonus increases with level, because high-level | | /* monster bonus increases with level, because high-level |
flesh is too rare */ | | flesh is too rare */ |
mbonus = op->level * 20. / ((double)MAXLEVEL); | | mbonus = op->level * 20. / ((double)settings.max_level); |
| | |
chance = (((double)MIN(op->level+bonus, meal->level+bonus+mbonus))*100. / | | chance = (((double)MIN(op->level+bonus, meal->level+bonus+mbonus))*100. / |
((double)MAXLEVEL)) - skin->resist[i]; | | ((double)settings.max_level)) - skin->resist[i]; |
| | |
if (chance >= 0.) | | if (chance >= 0.) |
chance += 1.; | | chance += 1.; |