The totalPassiveDamage should be based on total toughness at start of pursuit. I have done a test with 50% passive damage and it resulted in 50% kills. If calculated every round it would result only in ~42% losses.
Also I think the share bug only applies to dailyDamageFromEnemyPursuit. So the passive damage is probably applied unit by unit, instead of summing it up and then splitting. But I'm not 100% sure of this and will verify later when I got time. Either way, the difference is quite small.
I know my combat mechanics topic explained this bit differently but I tried to keep it simple to understand.
Calculating it each round and applying share bug should cancel each other so with current information it's impossible to say which one is the correct way.
https://github.com/Myrten/CK3.Utils/blob/7226e61f7016ee58673caa77c738bb8f57053ade/CK3.Utils.BattleSimulator/Simulation/Army.cs#L101
The totalPassiveDamage should be based on total toughness at start of pursuit. I have done a test with 50% passive damage and it resulted in 50% kills. If calculated every round it would result only in ~42% losses.
Also I think the share bug only applies to dailyDamageFromEnemyPursuit. So the passive damage is probably applied unit by unit, instead of summing it up and then splitting. But I'm not 100% sure of this and will verify later when I got time. Either way, the difference is quite small.
I know my combat mechanics topic explained this bit differently but I tried to keep it simple to understand.