Skip to content
Snippets Groups Projects
Commit e3a78b83 authored by svornost's avatar svornost
Browse files

Don't ever schedule three fighters

parent df38a32e
No related branches found
No related tags found
1 merge request!8322More Fixes
......@@ -16,16 +16,18 @@ App.Facilities.Pit.fight = function(lethal) {
fighters.push(S.Bodyguard.ID, V.pit.slaveFightingBodyguard);
} else {
if (available.length > 0) {
// first fighter
if (S.Bodyguard && V.pit.bodyguardFights) {
available.delete(S.Bodyguard.ID);
fighters.push(S.Bodyguard.ID);
} else {
fighters.push(available.pluck());
}
// second fighter
if (available.length > 1 && !V.pit.animal) {
fighters.push(available.pluck());
}
fighters.push(available.pluck());
} else {
throw new Error(`Pit fight triggered with ${V.pit.fighterIDs.length} fighters.`); // should technically never be triggered
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment