Planar waveguide with "twisted" boundary conditions: Discrete spectrum