Although I hated FF9, I don't think that is possible, although it works in theory. Okay it might work, but why go through all the trouble, it seems pointless. You could change it alot so that when a weapon is equipped the magic attack gets stronger the more it is used with the weapon equipped (maybe too hard to code that to) or how about reverse, like casting magic on weapons, and the weapon gains that attribute after so many casts. this way, it would be a few variables instead of all kinds of switches and monster group stuff. It could just be something like this(maybe)
>>hero casts Fire
>>variable operations:add 1 to [var:XXXX]
or similar, and after, say, 30 times of that; make a common event for each weapon:
If [var:XXXX](same as above) is 30
>>remove equipped sword
>>add flame sword equip
>>end
The only downside I could see in this is that you'd have to make special versions of the magic that you wish to have only go onto your characters (and change the names of them, so your characters don't accidentally light themselves
) but it seems easy enough.
Just a thought!