Swords are examples of weapons and "hearts" represent the people. To "pierce the heart" is an idiom that means "to kill." Alternate translation: "Their weapons will be turned against them and they will kill themselves" (See: [[rc://en/ta/man/translate/figs-synecdoche]] and [[rc://en/ta/man/translate/figs-idiom]])