Problem:
In Western style RPG type games, if the Allied NPCs offensive Area of Effect powers can hit friendlies, the NPCs will hit the party members with their AoE's more often than is acceptable.
(Western style here is defined as more strategic/total control like NWN/BGate/Etc, as opposed to eastern RPGs more action/movie style; with Final Fantasy, lost odyssey, etc)
Solution:
Reversing the targeting phase and the "casting delay" phase.
In this case, the spell is cast fully, and THEN targeted and the effect is generated instantly. This way the AI can be programmed to minimize or nullify friendly fire and maximize desired effect for the power more easily. This will occasionally result in spells that aren't really useful anymore when they are finished casting, but this would have happened anyway in the original order, and in fact happen MORE often (targets moving out of the targeted area, etc). You could even add a slider or perhaps a