Server-side part of the Roll Gains plugin, whose AdjustRollNumber hook adds bonuses to both sides of a roll made
against another player.
Between two non-Combine players each side gets up to 20 points from their strength. When one side is Combine and the roll is 80 or less, that side gets a bonus based on the rank in its name and the other side a small penalty offset by their strength.
Summary
Hooks
Hooks
PLUGIN:AdjustRollNumber(player, roll, max, target)
server gamemodes/cwhl2rp/plugins/rollgain/plugin/sv_plugin.lua:39Implements hook AdjustRollNumber
Called when a player rolls against another player; adds bonuses to both rolls.
Between two non-Combine players, each gets up to 20 points from their strength. When one side
is Combine and the caller's roll is 80 or less, the Combine side gets a bonus based on the rank
in its name (from 4 for RCT to 40 for EOW, or from the unit number), and the other side
takes a penalty of 2 or 5 offset by up to 20 points from their strength.
Parameters
- player Player The player who rolled
- roll Number The caller's unadjusted roll
- max Number The highest possible roll
- target Player The player being rolled against, or
nilfor a plain roll
Returns
- Number Adjustment for the caller's roll
- Number Adjustment for the target's roll