Python, 71 bytes
lambda x:x-abs((a:=r(x)-r(x+1))+(a>=0))
from random import*
r=randrange
Surprisingly tricky. Uses the fact that the sum of 2 numbers form a rectangle, then using a>>8a>=0
to add 1 to negative numbers then abs merges both halves of the triangle.