This program calculates the chance you will win a battle in civilisation 3.
For calculating your chances in defence, simply calculate the chance to win for the attacker and substract that from 100.

For the calculations i used the folowing parameters:

terrain bonus: 
  	plans/grass: 	10%
   	forest/jungle: 	25%
	hills:		50%
	mountains:	100%

city bonus:
	wall/size 7	50%
	size 13		100%

river bonus:		25%
fortified bonus:	25%
fortification bonus:	50%

i asumed the following facts to be true:

-all bunuses are added then aplied to the defending units defence.
-units in a city still benefit from terrain and other bonusses.
-the chance you will win a hit (one hitpoint lost on your opponent) = 
	A/(A+D) 
	where A = your attack and D is the opponents defence after applying bonusses.

For those that want to verify my methods, i included the source file where the calculations are done.

The calculation is done by a recursive function, while this is not an efficient method (concerning system performance), it will do fine for a simple program like this where you just make 1 calculation at a time. 
I am new to C++ and this is one of my practice programms.

if you have any questions or comments, you can email me at arjensmit79@hotmail.com


   
