(Foundry Mire isn't a spell.)
When Foundry Mire enters the battlefield, sacrifice it unless you pay 1 life.
All creatures have Plainswalk.
, Pay 1 life, Sacrifice Foundry Mire: Search your library for a Swamp or Mountain card and put it onto the battlefield, then shuffle your library.