Got the last few bugs fixed that I had seen in attack tests last night. It actually wasn't the "end zero out conditions" fixer that I was thinking it might be - I was just confused my test attacks on my phone last night because I hadn't figured in healed troops from medical centers lol
But 3 good bugs fixed anyways. One bug the medical centers weren't adding healed troops into the returning general army. Another bug caused the entire army to get removed instead of just the casualties, another bug was not pulling garrisoned troops out of the system correctly (was adding healed/survived troops to both the garrison and also the general returning).
I think these 3 bugs were probably offshoots from the big bug fix yesterday. That big bug fix spawned bugs that weren't present under the old bugged calc, it's because those systems were built to work specifically with the bugged code, so now that the fix is in place we're kind of having to work backwards updating things to work under the new/correct calc.
Crossing fingers this is the end of it... But I still have the unit weighted damage allocation to implement as the final touch, so maybe some more bugs from that lol