--- deliantra/server/common/living.C 2007/01/18 19:42:09 1.31 +++ deliantra/server/common/living.C 2007/02/05 03:01:32 1.34 @@ -679,7 +679,7 @@ void object::drain_stat () { - drain_specific_stat (RANDOM () % NUM_STATS); + drain_specific_stat (rndm (NUM_STATS)); } void @@ -757,7 +757,7 @@ /* Randomly change the players luck. Basically, we move it * back neutral (if greater>0, subtract, otherwise add) */ - if (RANDOM () % (FABS (tmp->stats.luck)) >= rndm (30)) + if (rndm (abs (tmp->stats.luck)) >= rndm (30)) { int diff = tmp->stats.luck > 0 ? -1 : 1; @@ -928,7 +928,6 @@ /* OK - we've reset most all the objects attributes to sane values. * now go through and make adjustments for what the player has equipped. */ - for (tmp = inv; tmp; tmp = tmp->below) { /* See note in map.c:update_position about making this additive @@ -1023,7 +1022,7 @@ } /* Pos. and neg. protections are counted seperate (-> pro/vuln). - * (Negative protections are calculated extactly like positive.) + * (Negative protections are calculated exactly like positive.) * Resistance from potions are treated special as well. If there's * more than one potion-effect, the bigger prot.-value is taken. */ @@ -1042,9 +1041,9 @@ potion_resist[i] = tmp->resist[i]; } else if (tmp->resist[i] > 0) - prot[i] += ((100 - prot[i]) * tmp->resist[i]) / 100; + prot[i] += ((100 - prot[i]) * tmp->resist[i]) / 100; else if (tmp->resist[i] < 0) - vuln[i] += ((100 - vuln[i]) * (-tmp->resist[i])) / 100; + vuln[i] += ((100 - vuln[i]) * -tmp->resist[i]) / 100; } } @@ -2027,8 +2026,7 @@ * a particular skill, so we don't need to pass that * along. */ - subtract_player_exp (op, FABS (exp), skill_name, flag); - + subtract_player_exp (op, abs (exp), skill_name, flag); } }