diff --git a/src/npc/descriptions/descriptionWidgets.js b/src/npc/descriptions/descriptionWidgets.js index 87fb4e935c4a645ca2d8f6a8fb70434248e8d5a1..82caa41b9bd2c0fef15a22743d768091dc0f4ac1 100644 --- a/src/npc/descriptions/descriptionWidgets.js +++ b/src/npc/descriptions/descriptionWidgets.js @@ -2,7 +2,7 @@ * @param {App.Entity.SlaveState} slave * @returns {string} Slave's nails */ -App.Desc.nails = function(slave) { + App.Desc.nails = function(slave) { const {He, His, his} = getPronouns(slave); if (!hasAnyArms(slave)) { return `${He} has no hands, and thus, no nails.`; @@ -397,42 +397,59 @@ App.Desc.ageAndHealth = function(slave) { } if (H.shortDamage > 5 || H.longDamage > 5 || H.condition < 0) { + let end = ''; + r += ` Upon closer inspection you note that ${he}`; array = []; - if (H.shortDamage >= 100) { - array.push(`looks <span class="red">absolutely brutalized</span> and will never be quite the way ${he} was`); - } else if (H.shortDamage >= 70) { - array.push(`is <span class="red">gravely injured</span> with assured lasting effects`); - } else if (H.shortDamage >= 40) { - array.push(`is <span class="red">seriously injured</span> with some lasting effects`); - } else if (H.shortDamage >= 20) { - array.push(`is <span class="orange">injured</span>`); - } else if (H.shortDamage > 5) { - array.push(`seems to have suffered a <span class="yellow">minor injury</span> recently`); + + if (H.shortDamage > 5) { + if (H.longDamage <= 5 && H.condition >= 0) { + end = '.'; + } + + if (H.shortDamage >= 100) { + array.push(`looks <span class="red">absolutely brutalized</span> and will never be quite the way ${he} was${end}`); + } else if (H.shortDamage >= 70) { + array.push(`is <span class="red">gravely injured</span> with assured lasting effects${end}`); + } else if (H.shortDamage >= 40) { + array.push(`is <span class="red">seriously injured</span> with some lasting effects${end}`); + } else if (H.shortDamage >= 20) { + array.push(`is <span class="orange">injured${end}</span>`); + } else { + array.push(`seems to have suffered a <span class="yellow">minor injury</span> recently${end}`); + } } - if (H.longDamage >= 70) { - array.push(`is suffering heavily under accumulated <span class="red">permanent health problems</span>`); - } else if (H.longDamage >= 40) { - array.push(`has some clear <span class="red">permanent health issues</span>`); - } else if (H.longDamage >= 20) { - array.push(`shows signs of <span class="orange">lasting health problems</span>`); - } else if (H.longDamage > 5) { - array.push(`carries some <span class="yellow">minor niggles</span>`); + if (H.longDamage > 5) { + if (H.shortDamage <= 5 && H.condition >= 0) { + end = '.'; + } + + if (H.longDamage >= 70) { + array.push(`is suffering heavily under accumulated <span class="red">permanent health problems${end}</span>`); + } else if (H.longDamage >= 40) { + array.push(`has some clear <span class="red">permanent health issues${end}</span>`); + } else if (H.longDamage >= 20) { + array.push(`shows signs of <span class="orange">lasting health problems${end}</span>`); + } else { + array.push(`carries some <span class="yellow">minor niggles${end}</span>`); + } } - if (H.condition < -80 && H.shortDamage !== 0 && H.longDamage !== 0) { - array.push(`has been treated so badly ${he} <span class="red">is close to the brink</span>`); - } else if (H.condition < -50) { - array.push(`appears to be in <span class="red">terrible condition</span>`); - } else if (H.condition < -20) { - array.push(`appears to be in <span class="orange">poor condition</span>`); - } else if (H.condition < 0) { - array.push(`could be in <span class="yellow">better condition</span>`); + if (H.condition < 0) { + if (H.condition < -80 && H.shortDamage !== 0 && H.longDamage !== 0) { + array.push(`has been treated so badly ${he} <span class="red">is close to the brink.</span>`); + } else if (H.condition < -50) { + array.push(`appears to be in <span class="red">terrible condition.</span>`); + } else if (H.condition < -20) { + array.push(`appears to be in <span class="orange">poor condition.</span>`); + } else { + array.push(`could be in <span class="yellow">better condition.</span>`); + } } - r += ` ${toSentence(array)}.`; + r += ` ${toSentence(array)}`; } if (H.tired > 30) {