… | |
… | |
755 | return; |
755 | return; |
756 | |
756 | |
757 | /* Randomly change the players luck. Basically, we move it |
757 | /* Randomly change the players luck. Basically, we move it |
758 | * back neutral (if greater>0, subtract, otherwise add) |
758 | * back neutral (if greater>0, subtract, otherwise add) |
759 | */ |
759 | */ |
760 | if (RANDOM () % (FABS (tmp->stats.luck)) >= rndm (30)) |
760 | if (rndm (abs (tmp->stats.luck)) >= rndm (30)) |
761 | { |
761 | { |
762 | int diff = tmp->stats.luck > 0 ? -1 : 1; |
762 | int diff = tmp->stats.luck > 0 ? -1 : 1; |
763 | |
763 | |
764 | stats.luck += diff; |
764 | stats.luck += diff; |
765 | tmp->stats.luck += diff; |
765 | tmp->stats.luck += diff; |
… | |
… | |
2025 | else |
2025 | else |
2026 | /* note that when you lose exp, it doesn't go against |
2026 | /* note that when you lose exp, it doesn't go against |
2027 | * a particular skill, so we don't need to pass that |
2027 | * a particular skill, so we don't need to pass that |
2028 | * along. |
2028 | * along. |
2029 | */ |
2029 | */ |
2030 | subtract_player_exp (op, FABS (exp), skill_name, flag); |
2030 | subtract_player_exp (op, abs (exp), skill_name, flag); |
2031 | |
|
|
2032 | } |
2031 | } |
2033 | } |
2032 | } |
2034 | |
2033 | |
2035 | /* Applies a death penalty experience, the size of this is defined by the |
2034 | /* Applies a death penalty experience, the size of this is defined by the |
2036 | * settings death_penalty_percentage and death_penalty_levels, and by the |
2035 | * settings death_penalty_percentage and death_penalty_levels, and by the |