Complex sentence: Xavin shape-shifted into Karolina's form and took her place, to take all the punishment for their species' war.
Split into simpler sentences: Xavin shape-shifted into Karolina's form and took her place. Xavin would take all the punishment for their species' war.