Skip to content
Snippets Groups Projects
Commit 6a048de1 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'fixes' into 'pregmod-master'

Added better guards to Pit fight casting

Closes #4167

See merge request !10976
parents 0c3d22ba 60c4b822
Branches
Tags
1 merge request!10976Added better guards to Pit fight casting
Pipeline #50760 passed
......@@ -77,6 +77,7 @@ App.Events.SEPitFight = class SEPitFight extends App.Events.BaseEvent {
}
function getAnimalFight() {
if (!V.active.canine && !V.active.hooved && !V.active.feline) { return getSlavesFight(); }
const fighter = available.pluck();
V.pit.slaveFightingAnimal = fighter;
......@@ -84,6 +85,7 @@ App.Events.SEPitFight = class SEPitFight extends App.Events.BaseEvent {
}
function getBodyguardFight() {
if (!S.Bodyguard) { return getSlavesFight(); }
if (available.includes(S.Bodyguard.ID)) {
available.delete(S.Bodyguard.ID);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment