-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
feature_requestAll issues containing feature requests to add new functionalitiesAll issues containing feature requests to add new functionalitiesfeature_request:approvedAll feature requests reviewed and approved by the maintainersAll feature requests reviewed and approved by the maintainers
Description
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;
}Metadata
Metadata
Assignees
Labels
feature_requestAll issues containing feature requests to add new functionalitiesAll issues containing feature requests to add new functionalitiesfeature_request:approvedAll feature requests reviewed and approved by the maintainersAll feature requests reviewed and approved by the maintainers