We consider the bifurcations occurring in a two-dimensional piecewise-linear discontinuous map that describes the dynamics of a cobweb model in which firms rely on a regime-switching expectation rule. In three different partitions of the phase plane, separated by two discontinuity lines, the map is defined by linear functions with the same Jacobian matrix, having two real eigenvalues, one of which is negative and one equal to 0. This leads to asymptotic dynamics that can belong to two or three critical lines. We show that when the basic fixed point is attracting, it may coexist with at most three attracting cycles. We have determined their existence regions, in the two-dimensional parameter plane, bounded by border collision bifurcation curves. At parameter values for which the basic fixed point is repelling, chaotic attractors may exist - either one that is symmetric with respect to the basic fixed point, or, if not symmetric, the symmetric one also exists. The homoclinic bifurcations of repelling cycles leading to the merging of chaotic attractors are commented by using the first return map on a suitable line. Moreover, four different kinds of homoclinic bifurcations of a saddle 2-cycle, leading to divergence of the generic trajectory, are determined.