Here's the math on the Mystic Cave so you wont lose any troops!
(Number of Units) x (Units Power) x 2 = Total Power of your forces
So basically you need to find out how many units you're fighting against, then find out how much power the unit is in question and multiply them together. Then double that and you have the amount of power of the forces you need to have zero losses.
If there are multiple types together like let's say Axemen and Lancer's (Cavalry with spears) then you're going to want to add in Lancer's power to the formula. For example:
(((Number of Axemen) x (Axemens Power)) + ((Number of Lancers) x (Units Lancers))) x 2 = Total Power of your forces
Since these are mixed the problem here now is that if you were to attack with axemen you would lose troops. The trick is to use swordsmen because they're strong against axemen and also strong against cavalry.
And of course if both troop types are infantry then you should use archers. If they're both cavalry use infantry that is strong against one troop and the same as the other. So Axemen against Lancers and Axeriders. Spearmen against Cavalry and Lancers, etc.
During the early game you may want to use this formula instead.
(Number of Units) x (Units Power) x 2.5 = Total Power of your forces
and for mixed
(((Number of Axemen) x (Axemens Power)) + ((Number of Lancers) x (Units Lancers))) x 2.5 = Total Power of your forces
The only change is that the 2 is now 2.5. The former formula tends to still lose some troops in early game.