As a changeling, Harth had not only had his powers from birth, but all his ancestors had those powers and they had developed from millions of years ago, although the actual nature of how they had evolved is a concept of much speculation. However, the ability, as all traits passed down, is for survival. And every last phase of the ability has had a common feature- when an immediate threat has appeared, the body will change to fit that threat immediately and involuntarily. This dates back to before the species had achieved sentience; how could a creature which had no ability to solve problems select a form most resilient to the current problem? And so, in cases where a life is threatened, a changeling will immediately turn into a form that will not be harmed by what would otherwise cause damage. As quickly as possible.
When Harth was hit by the electric shocks, he hardly felt a thing. Instantly and instinctively, his body had turned into rock. He was no longer a green dragon, but a dragon made of rock. He stood still until the blasts stopped coming, then thought about his position. He walked for a while towards the centre of the building, then stopped. He then turned into a small rock. A pebble about the size of a person's thumb. He then proceeded to grow. He kept on growing past what you would call a stone, then reached the point where he would be called a boulder. He kept on growing until his height reached the top of the room. Then he kept on growing, breaking the ceiling and the walls around him. Someone wanted him out? He was inside. He might as well oblige their desires and turn the whole building inside out.