Follow-up to this thread about Nintendo DS game recommendations. →[More:]the great big mulp, the game you are looking for, believe it or not, is
Puzzle Quest. It is the bastard child of Diablo and Bejeweled, with a couple of additional minor game mechanics lifted from Defender of the Crown and Heroes of Might and Magic, and it is life-ruiningly addictive. I probably spent three hours with it yesterday.
Stat tweaking after leveling up, forging new items with runes, researching spells, besieging cities, loads and loads of sidequests, multiple narrative paths depending on player choices, etc., etc. It's all there. The estimate I read of 100 hours to beat it does not seem implausible.