In Genesis 12 there is a story about Abram and Sarai (as they still were then) going into Egypt, and Abram passing Sarai off as his sister because she was so beautiful that he was afraid people would kill him if they knew she was his wife. This is already a bit strange, considering that she was at least 65 by that time (cf. Gen.12:4; 17:17). Pharaoh takes her into his house (presumably as one of his harem), and the whole household is afflicted by plagues because he has committed adultery. He finds out the truth, hands her back to Abram and sends him away. Pharaoh is punished for something he did in all innocence, while Abram, having been a coward and a liar, goes away vastly better off because of all the gifts Pharaoh showered on him when he thought he was his brother-in-law! In the words of Abraham a little later on: "Shall not the Judge of all the earth do what is just?"
Later on, in chapter 20 (by which time Sarah is at least 90!), Abraham plays the same trick again, this time on Abimelech, king of Gerar. In this case insult is added to injury. God tells Abimelech that he will die unless he takes Sarah back to Abraham and asks Abraham to pray for him to be forgiven! Abimelech willingly does this, taking with him a present of a thousand pieces of silver and numerous cattle, sheep and slaves.
Then in chapter 26 Abraham's son Isaac tries the same trick again with Abimelech, but not so successfully. Nevertheless, Isaac is blessed by God.
Again, what kind of God is this?