Optimizing my spell casts!
Ruby, 114 113 characters

x,y=eval gets
(d=0..10).find{|r|d.find{|c|s=y.sort.combination(c).select{|s|s.reduce(:+)==x-r}.uniq
p s if s[0]}}


Input: a two-element array of the wizard mana and the spell list, formatted a one-line JSON.

Output: a 2D array of the spell lists, formatted as a one-line JSON, or nil if the wizard can cast no spell.

I especially love x,y = eval gets. So dangerous and evil, yet so powerful and simple. Perfect for golfing.

Both sort and uniq are neccessary. Otherwise, this will produce duplicates for input like [4, [1, 3, 1]]. I'm not happy about this.

find is a useful method for control flow. Its return value is not as useful here, though. Length-wise, it comes on par with any?, which return value is even less useful.

Examples:

&gt; [4, [1, 2, 3, 3, 7, 6]]
# [[1, 3]]
&gt; [3, [1, 3, 5, 2, 10]]
# [[3]]
&gt; [8, [4, 1, 9]]
# [[1, 4]]
&gt; [4, [1, 2, 2, 3]]
# [[1, 3], [2, 2]]
&gt; [4, [5, 6, 7]]
# nil