You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Game: some percentile ability check rolls are recorded one too low #101
make_player_check in globalScripts/game_abilitychecks.gd converts the percentile roll from DieManager.rollDice() to an integer with int(die_handler[1]*100).
DieManager builds a percentile roll as tens/10.0 + ones/100.0. That float isn't always exact (for example, 0.3 + 0.03 is 0.32999…), and int() truncates instead of rounding. As a result, rolls of 33, 58, 66, 78 and 79 are recorded as 32, 57, 65, 77 and 78.
This affects about 5% of ability checks. A check can pass that should fail, for example a total ability score of 32 against a real roll of 33. The wrong value also appears in the TestAbilityCheck output text.
Activity