Not sure if this is based on a book, but some of the illustrations look that way.
For those with a Kindle fire (or if available through google or iTunes) its a choose your own adventure game.
Take on thieves by fighting, or with a spell.
Great for playing in a waiting room (or a roadtrip, bathroom or boards st a family gathering)
I survived the first day #Sorcery! http://www.inklestudios.com/sorcery