Lightning Gun (5e Equipment)
From D&D Wiki
Martial Ranged Weapons
A lightning gun fires a crackling arc of lightning at creatures, frying them to death in a matter of seconds. You have advantage on attack rolls with a lightning gun if your target is made of metal or is wearing armor made of metal. When you hit a creature with a lightning gun, the lightning locks onto the target and forms a sustained arc, allowing further attacks you make against the target with the lightning gun to automatically hit. This effect ends when any of the following happens:
Attacking Underwater. As it turns out, firing a lightning-based weapon underwater is really not a good idea. If you attempt to use a lightning gun while you are underwater, instead of the normal effects of this firearm, you expend all the remaining shots of the lightning gun as everything within 30 feet of you and in the same body of water, including yourself, is engulfed in a raging ball of electricity. All creatures in the area, including you, must make a DC 18 Dexterity saving throw, taking 42 (12d6) lightning damage on a failed save, or half as much damage on a successful one.