So if I understand your way correctly: You create a Switch ability and when it's used it'll replace the unit to the other version of itself (melee/ranged)? If that's true, it could get annoying though. Imagine being in battle, first attacking ranged and then when they get close, you want to switch to melee. It'll probably attack the closest unit when you replace your unit, so there's a good chance it'll change targets when switching. I'd imagine that that would become quite annoying after a while.