Hello, I'm unsure if this is intended but the combat engine currently uses a fully predictable combat resolution, essentially taking each target in ascending value of total juice. In short the smallest targets are consistently shot first, while the strongest ones are never considered.
Quick testing showed this is solved by looping over shuffled targets during the "Calculate Regular Fire!" parts of
both attacks and defenses
foreach(shuffle_forces($DefShipsForce_Copy) as $TKey => $TForce)
With any acceptable shuffle (i.e. key-preserving), for instance
function shuffle_forces($list) {
if (!is_array($list)) return $list;
$keys = array_keys($list);
shuffle($keys);
$random = array();
foreach ($keys as $key) {
$random[$key] = $list[$key];
}
return $random;
}
Hello, I'm unsure if this is intended but the combat engine currently uses a fully predictable combat resolution, essentially taking each target in ascending value of total juice. In short the smallest targets are consistently shot first, while the strongest ones are never considered.
Quick testing showed this is solved by looping over shuffled targets during the "Calculate Regular Fire!" parts of
both attacks and defenses
foreach(shuffle_forces($DefShipsForce_Copy) as $TKey => $TForce)With any acceptable shuffle (i.e. key-preserving), for instance