Ok problem fixed, the problem was that generals attacked always before the rest of troops and they are always the last . It happened with other generals too, but it is more important with the new generals because it changes the results.
technically It was a simple "order by" in a mysql search that was ASC instead of DESC :P.
Thanks for the advices