Also i took your wall of text and put it into something more understandable.
Chance of attack succeeding in %= 100-(10A/(B1*A-B2*D))
Where
A is the size of the attacking army
D is the size of the defending army
B1 is the modifier applied to army A
B2 is the modifier applied to army D
B1=1*modifiers that apply to B1
B2=1*modifiers that apply to B2
Attacker modifiers are applied to B1
Defender modifiers are applied to B2
Modifiers (If more than 1 applies, multiply):
Defender receives a modifier of 1.5 at first attack
When A's first attack fails, the second time around, defender loses above modifier
A counterattack started by D after A took land causes A to be multiplied by 0.9
After A holds D's land for 2 turns, it is A's land and then A becomes the defender and receives the 1.5 modifier.
If either army is bombed, a modifier of 0.7 applies
If either army is bombed with nuclear weapons, a modifier of 0.7 applies and the defender modifier of 1.5 is cancelled.
If major city on either side bombed, a modifier of 0.8 for all armies of that nation applies for 3 turns and the defender modifier of 1.5 is cancelled.
Other:
Two or more armies can join forces to invade another.
Pacifist nations get their total populations divided by 20 to get their military