In BFR you don't need any spies to preform a mission just mana, at least I was able to. All of my few dens were destroyed and I had mana, and not realizing I had lost all of my spies, I prepared my troops to attack, and it worked. Then I noticed I had no spies so it shouldn't have worked. This may have already been found. thought you may want to know it anyway.
You most probably had a few stragglers left. But I'll take care to fix that later. Maybe our display function shouldn't be floor()-ing but ceil()-ing after all? I wonder why I originally chose it to be floor() -- if I recall, there was a specific reason.
Math was great, and any fraction with zero as a denominator is undefined.
So you get 1 den anyway, but the ratio shouldn't be great enough for the missions to succeed should it? Maybe i am just crazy but it seems like a flaw to me.