When bubbles collapse near a wall, they typically experience an asymmetric deformation. This collapse leads to the creation of a jet that strikes the bubble interface, causing the formation of a toroidal bubble and the subsequent release of a water-hammer shock. In this study, we present a systematic analysis of the collapse of a toroidal bubble in an open field or adjacent to a flat wall using high-fidelity numerical simulation. To maintain the sharpness of the interface, we employ the interface compression technique and the boundary variation diminishing approach within the two-phase model. Our findings demonstrate that shock waves emitted from the toroidal bubble consistently propagate toward the central axis of the torus, resulting in significant pressure shocks along the axis, similar to the water-hammer shock formed during the collapse of a spherical bubble. In contrast, weak pressure waves are generated in the transverse directions, leading to relatively weaker pressure peaks. Furthermore, the wall-pressure peak induced by the toroidal bubble is approximately three times higher than that induced by the spherical bubble. Based on the directional characteristics of pressure wave propagation from collapsing toroidal bubbles, toroidal-shaped pressure vessels can be designed as buoyancy materials for deep submersibles. This design enables the focused release of energy in a specific direction, effectively minimizing the destructive chain reaction caused by the implosion.