From ffe071fb38c9e522ef82f27143f6b125b6aab4d7 Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Wed, 29 Jul 2020 22:51:03 -0700
Subject: [PATCH] PC PA health check fixes

---
 src/endWeek/slaveAssignmentReport.js |  2 +-
 src/uncategorized/fullReport.tw      |  2 +-
 src/uncategorized/persBusiness.tw    | 18 ++++++++----------
 3 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/endWeek/slaveAssignmentReport.js b/src/endWeek/slaveAssignmentReport.js
index 4ff9b0c3e5b..be509a15999 100644
--- a/src/endWeek/slaveAssignmentReport.js
+++ b/src/endWeek/slaveAssignmentReport.js
@@ -169,7 +169,7 @@ App.EndWeek.slaveAssignmentReport = function() {
 	if (V.HeadGirlID !== 0) {
 		V.HGEnergy++;
 		const slave = slaveStateById(V.HeadGirlID);
-		if (V.personalAttention === PersonalAttention.SUPPORTHG) {
+		if (V.personalAttention === PersonalAttention.SUPPORTHG && V.PC.health.shortDamage < 30) {
 			V.HGEnergy++;
 			if (slave.trust > 95) {
 				V.HGEnergy++;
diff --git a/src/uncategorized/fullReport.tw b/src/uncategorized/fullReport.tw
index f409b5fa69d..c04175c9939 100644
--- a/src/uncategorized/fullReport.tw
+++ b/src/uncategorized/fullReport.tw
@@ -83,7 +83,7 @@
 	<br>
 <</if>>
 
-<<if Array.isArray($personalAttention) && $personalAttention.findIndex(function(s) { return s.ID == $slaves[$i].ID; }) != -1>>
+<<if $PC.health.shortDamage < 30 && Array.isArray($personalAttention) && $personalAttention.findIndex(function(s) { return s.ID == $slaves[$i].ID; }) != -1>>
 	<<set $activeSlave = $slaves[$i]>>
 	<<include "PT Workaround">>
 	<br>
diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw
index bf4d33b4cdd..7bd43749694 100644
--- a/src/uncategorized/persBusiness.tw
+++ b/src/uncategorized/persBusiness.tw
@@ -29,16 +29,14 @@
 	<</if>>
 <</if>>
 <<if $PC.health.shortDamage >= 30>>
-	<<if $PC.health.shortDamage >= 30>>
-		<<run endWeekHealthDamage($PC)>>
-		The injuries received in the recent battle prevents you from engaging in tiring endeavors.
-		<<if $PC.health.shortDamage >= 51>>
-			Your trusted physician believes it will still take a few weeks to fully recover.
-		<<elseif $PC.health.shortDamage >= 39>>
-			You are starting to feel better. It's very likely you will be back to full working order within the next week.
-		<<else>>
-			You have finally recovered from your injuries.
-		<</if>>
+	<<run endWeekHealthDamage($PC)>>
+	The injuries received in the recent battle prevents you from engaging in tiring endeavors.
+	<<if $PC.health.shortDamage >= 51>>
+		Your trusted physician believes it will still take a few weeks to fully recover.
+	<<elseif $PC.health.shortDamage >= 39>>
+		You are starting to feel better. It's very likely you will be back to full working order within the next week.
+	<<else>>
+		You have finally recovered from your injuries.
 	<</if>>
 <<elseif ($personalAttention == "whoring")>>
 	<<set _income = random(2000,4500)>>
-- 
GitLab