From the bug report in another thread:
(log file)
best spell so far Air Shield (score398)
best Horror Mark this far, 14 6 (2 pnts)
best Horror Mark this far, 15 6 (12 pnts)
best Horror Mark this far, 14 7 (13 pnts)
best Horror Mark this far, 14 12 (21 pnts)
best Frighten this far, 14 6 (18 pnts)
best Frighten this far, 15 6 (24 pnts)
best Frighten this far, 16 6 (25 pnts)
best Frighten this far, 17 6 (26 pnts)
best Frighten this far, 15 7 (32 pnts)
best Frighten this far, 16 7 (34 pnts)
best Frighten this far, 17 7 (35 pnts)
best Frighten this far, 18 7 (37 pnts)
best Frighten this far, 19 7 (39 pnts)
best Frighten this far, 18 8 (42 pnts)
best Curse this far, 14 6 (1 pnts)
best Curse this far, 15 6 (11 pnts)
best Curse this far, 16 6 (12 pnts)
best Curse this far, 15 8 (14 pnts)
best Curse this far, 14 12 (19 pnts)
best Flight this far, 45 10 (6 pnts)
best spell so far Raise Skeletons (score654)
best Regeneration this far, 42 2 (18 pnts)
best Regeneration this far, 41 3 (127 pnts)
best Regeneration this far, 46 17 (140 pnts
Therefore: This is what the AI does when targeting a given spell (like Body Ethereal). Picks some likely targets based on heuristics (things that sound clever), tests each one to see how it turned out (how many valuable friendly units got etherealized, for example), and assigns a score based on this! Then, when the AI finds the best target for "Falling Fires", it casts "Fire Shield" instead.
Ok, just kidding there. But it is interesting to see the AI working - this appears to be why horror mark and curse (and other prec=100 spells) always hit the most valuable targets.