using `Math.min(newMinLevel, MAX_PORTAL_LEVEL)` might be easier to read