Got this bug worked out.
So this one was based on a single unit type that had a special=1 flag assigned to it. The flag was meant to perform part of the special features for the units Dwarf Runner, Human Knight, Orc Wolfmaster, Undead Knight. In addition to special features, it also took their melee attack and added it to a short range attack, and then logic further down the line would sometimes give it some long range attack as well.
For example, Runners were getting 0 melee attack, and instead getting 8 short range attack. Knights weren't getting any melee, but were getting huge short and ranged attacks.
This actually seemed to be a bug to do with how the units were configured in our config files, we didn't put info for all 3 phases of combat on each unit, we only put melee and ranged configs, and for units that had short attacks they were assigned as ranged attack in the config - then later in battle calcs those "ranged" fields were to be handled to convert to short, but something went haywire and didn't work out that way... It correctly converts those to short range now though, and the special=1 flag still works to perform the special unit functions it needs to do (knight healing, etc).
Such an annoying bug to hunt down and fix. That's two big bugs fixed today though, good progress!
Incidentally, I think the Shadow Warrior invisibility needs to be tweaked, because it's ridiculous... I tested +20 attacks and all passed invis test.