Did attacking him lower your reputation? IIRC, he is friendly until the conversation ends. Even if he does start off friendly, though, this technique would still work with area effect spell that do not require a target.