"Is it worth it" is a loaded question. It is obviously going to need work. Will you be doing it or paying for it? Is this a place with which you have an emotional attachment?
Looks like you can count on an entirely new roof. Is there interior water damage?
As far as the foundation, if the rot is just at the corners you might could get by with just a little jacking and replacing the rotted segments. If rot is all the way around I'd guess you'd have to jack the whole thing up.
What type of foundation is it? Is it a slab? What are the foundation logs sitting on?
What is the status of the plumbing, septic and drain field?