More than a few successful magnetic mines have been built. Some with rather complex magnetic influence fuses, including moored mines.
The saga of the British, German, and American magnetic fuse problems have been well described. I believe the mk 14 torpedo's mk6 explorer never did have it's magnetic influence function fixed.
Has anyone build a magnetic influence fuse that worked in torpedo?