Is the formula for winning an attack your atk stat plus sum of allies attack stat plus sum of pots used vs opponents def stats, sum of opponent ally def stats and opponent pots used? It seems there is some randomness in there too.
You forgot bonuses from perment items, but u get the gist. Those numbers give you a % chance to win (hence the randomness). So if the stats add up so that u have a 5-10% advantage, the scout report should say u have a 50-60% chance of winning. From there it's a dice role.
Yep, it's total attack versus total defense. Total means buildings, allies, permanent items, and pots. Then based on the comparison there will be a percentage range of chance of winning. From tests, I found the maximum was actually about 95% chance of winning; I have high atk bonus and even when hitting a pure osf I lose at least 1ce per round.