It has been pointed out to us that damaging the wall has no effect on the current battle, only consecutive battles before wall is rebuilt. So the defense would still fight at 200% in the first strike.
Suggests why rams throw the calculation off because the wall works like a wall in this version of the game.
The wiki states:
The
Ram is used for tearing down the enemy Wall. This is done twice during a battle. The first ram attack will be executed before the battle starts and lowers the defense bonus of the defender if successful. The second attack is done after the battle with the surviving rams.
Therefore the pre-battle ramming lowers the wall level (which results in a different outcome for the wall bonus formula) but is not the final wall level. It only determines at which level the wall bonus would be. In TW1 this was limited to drop max 50% of the wall, thus a wall level 20 could only be downed to level 10 - and this is what my formula also is using.
Then the battle would commence and the wall bonus of the "downed" wall would be used (as stated by the wiki). After the battle (in which the rams also participate) a number of rams remain, and depending on who wins the remaining or all rams would ram again to determine how much the wall level would actually drop.
In that way it is possible that during the fight the wall was level 10 (in theory) but not enough rams survive and it is only dropped to level 15 (just an example value).
As the number of remaining rams depend on the defensive value, in which the wall bonus is factored in, the formula pre-battle is something that needs to be known in order to receive correct losses. (this is where my formula fails or comes short as it's based on TW1's formula)
And secondly you'd need to know the formula for post-battle ramming, both formulas, the formula used when the attack wins, and the one used when the defender wins. Again, for those formulas I use the TW1 version.
With all 3 formulas based on TW1 known facts, it comes close to the actual but is off in certain situations (very strange).
The one thing I didn't talk about here are trebuchets, which is totally new and no knowledge can be drawn from TW1. There is a formula which determines how many rams are killed by trebs pre-battle. Those rams are simply destroyed and do not participate in the pre or post battle ramming at all (drawn from own TW2 experience). That formula is totally unknown to me and I've many numerous attempts to figure it out based on reported I found on the forums and received in-game involving trebuchets and rams. Unfortunately I have nothing that comes close so far.