I've hacked Dungeon Crawl a little, not because I liked the code (written in C, of medium quality), but because I like crawl's superior balance and more consistent flavor vs. alternatives such as nethack.
http://zooko.com/repos/
If you really want to write in C, then I recommend the crawl code base. For one thing, it is actively developed. However, I don't think you should write in C, but instead the Lua modding system of ToME (just from what you said about it -- I don't know anything else), or else just write your own in a nice language like Python or E.