It's a random chance. You roll a dice from 0% to 100%, and steal that % from the player you just attacked.
The bigger your FAVOR is, the higher your minimum % is. Take a look at this table: https://hivegadgets.com/tccritanddodge.html
Eg if you have 40 Favor, your minimum % is 1% (so you can't roll between 0 and 1%). If your Favor is 10k, your minimum is 17.813%, and so on...