Conventional Dammann grating is a binary-phase (0, π) transmission grating capable of splitting an incoming laser beam into multiple outgoing beams with equal intensity. In this paper, we present an alternative design for Dammann-type beamsplitter with a non π-phase shift value. In the design, the simulated annealing algorithm is taken to optimize the grating structure and phase difference simultaneously. We find that this non 0-π phase grating exhibits interesting properties. When the etching depth is slightly lower than the theoretical depth, the zero-order light intensity is enhanced compared to other diffraction orders. Conversely, when the etching depth is slightly greater than the theoretical depth, the zero-order light intensity is attenuated. This allows us to flexibly adjust the brightness of the zero-order diffractive light. In contrast, the deviation of the etching depth will always result in a brighter zero-order light for the conventional Dammann grating. Simulations and experiments are performed to verify the feasibility of the proposed grating.