I don't understand this sentence in Baldur's Gate

As (blank) as my witness means that you are swearing upon that particular deity that you will do something.

In other words, you risk incurring the wrath of said deity should you not carry out what you are swearing to do.