Sometimes you throw in something clever, and build up your character or something around it, and then realize you either have to work it into the plot or excise it entirely -- if the muse, capricious little flibbertigibbet that she is, will let you, so you may be stuck with getting it to work.
Like, say, giving your heroine an aptitude for and interest in a certain type of unpopular and scorned magic, and making her contrary enough to pursue it. Then, of course, that magic needs to prove crucial. And since at one point she has to be the one to bip the bad guys, it has to be crucial then. (There will be only one other wizard there, and her magic is crucial to Getting Away Alive, and it's an important plot twist, so even though it's not the climax of the plot, the heroine actually has Save the Day.)
And the bad guys have their own special type of magic, too. So what I have to wrestle with is how to get this specialty to work on that magic. Fortunately theirs can still be tweaked a little -- but magic works by metaphor. Mostly. As long as you are running on the Law of Similarity. (Opt for the Law of Contagion and its works by metonymy instead, or synecdoche, but that's less popular in fantasy. Possibly because it gets messier and involves lugging lots of stuff about.) Which means what it needs is a way for her magical specialty to metaphorically attack theirs, and win. 'cause then it can do it magically.
sigh. I think I'm glad that their special magic is not so interwoven with the plot thus far as to be immune to tweaking.