no. troops in the attacking country:
(by the way this algorithm assumes you roll one dice every time)
no. troops in the defending country: