rendered paste body**** To Calculate defending figs lost:
if ($no_fear)
$defending_figs_lost = .06 / (1 + 0.85 * exp(-3.2 * ($a_figs / $d_figs))) * $a_figs * (1 + $attack_bonus) * sqrt(1.1);
else
$defending_figs_lost = .06 / (1 + 0.85 * exp(-3.2 * ($a_figs / $d_figs))) * $a_figs * (1 + $attack_bonus);
**** To Calculate defending fighters at time of attack:
if ($no_fear)
$defending_figs = (8 * ($a_figs_lost) * (1 + $attack_bonus) / sqrt(.9));
else
$defending_figs = (8 * ($a_figs_lost) * (1 + $attack_bonus));