diff --git a/src/npc/generate/newChildIntro.js b/src/npc/generate/newChildIntro.js index 189871626eb74a71b3a317736c8d3b2ad6b76f1c..fa70dd3be5a9ace14018f8c2e5634815ebb4687e 100644 --- a/src/npc/generate/newChildIntro.js +++ b/src/npc/generate/newChildIntro.js @@ -18,19 +18,28 @@ App.UI.newChildIntro = function(slave) { let tempParents = ""; - r.push(`You completed the legalities before heading to ${V.incubator.name}, knowing the tank will release ${him} on your approach,`); + r.push(`You completed the legalities before heading to ${V.incubator.name}, knowing the tank will release ${him} on your`); - if (tempMom.ID === V.PC.ID && tempDad.ID === V.PC.ID) { - } else if (tempMom.ID === V.PC.ID) { - tempParents = "father"; - } else if (tempDad.ID === V.PC.ID) { - tempParents = "mother"; - } else { - tempParents = "parents"; + if (tempDad) { + if (tempDad.ID !== V.PC.ID) { + tempParents = "father"; + } + } + if (tempMom) { + if (tempMom.ID !== V.PC.ID) { + tempParents = "mother"; + } + if (tempDad) { + if (tempMom.ID !== V.PC.ID && tempDad.ID !== V.PC.ID && tempMom.ID !== tempDad.ID) { + tempParents = "parents"; + } + } } if (tempParents !== "") { - r.push(`and instruct ${V.assistant.name} to notify the new ${girl}'s ${tempParents} to meet you in your office.`); + r.push(`approach, and instruct ${V.assistant.name} to notify the new ${girl}'s ${tempParents} to meet you in your office.`); + } else { + r.push(`approach.`); } r.push(`As the tank exhumes the disoriented ${girl},`);