Homebrew:Quagmire Perimeter Mine
Wondrous item, rare, very rare, or legendary
As an action, you bury this mine 5 ft. below the ground in your space and designate parameters for what creatures will trigger or not trigger the mine, using any perceivable features of creatures or specifying specific individuals. While the mine affects a radius of 1500 feet, you can customize the radius by excluding certain areas from being affected.
Rare mines have 25 charges. Once per turn whenever a qualifying creature moves within the area covered by the mine, the mine automatically spends one charge and creates a sinkhole beneath the intruder. The creature makes a Dexterity saving throw DC 16. If they fail, they become buried in mud up to their neck. A creature can free itself from the muck by making a Strength check and spending (20 - check result) minutes (minimum 1 action) working themselves free.
Very rare mines have 10 charges, and deal 2d10 fire damage to a creature that fails on their Dexterity save (half damage on success).
Legendary mines have a hearthstone socket. With no hearthstone inserted, they function identically to very rare mines except their range is only 900 feet instead of 1500. With a hearthstone inserted, a legendary mine does not expend charges when triggered.