I edited Fenix's script to restrict to player only (ONLY works with 1st option!!!)
Once the computers don't have money, it doesn't matter if they have unlimited units.
Fenix's AOB position is correct, but every team runs that code.
After comparing I found player has a single 4 byte value '2', but it is randomly placed in a range of addresses.
It looks like there's some variable length buffer in the middle.
I don't know how to write this elegently so I used cmp to check all of them. Maybe there's more, if it doesn't work try restarting battle.