From cbf21702e2dbcf7735e9380533f814467c8d667e Mon Sep 17 00:00:00 2001
From: DCoded <dcoded@live.com>
Date: Thu, 6 Aug 2020 11:04:20 -0400
Subject: [PATCH] Added simple relation check to childFriendshipRivalries()

---
 src/endWeek/reports/childrenReport.js | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/src/endWeek/reports/childrenReport.js b/src/endWeek/reports/childrenReport.js
index dfe6c138b91..5b55d58c14a 100644
--- a/src/endWeek/reports/childrenReport.js
+++ b/src/endWeek/reports/childrenReport.js
@@ -280,7 +280,6 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
 
 	// MARK: Miscellaneous Functions
 
-	// TODO: add relation checks
 	function childFriendshipRivalries(child) {
 		const
 			becomeFriends = () => `${child.slaveName} and ${target.slaveName} have realized that they have more in common that they originally thought, and have become friends.`,
@@ -322,6 +321,30 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
 					rival++;
 				}
 
+				if (areRelated(slave, target) || areCousins(slave, target)) {
+					if (areRelated(slave, target)) {
+						if (rival) {
+							div.append(`${child.slaveName} and ${target.slaveName} are siblings, and find it difficult to really stay mad at each other, and they make up their differences somewhat.`);
+
+							friend += 2;
+						} else {
+							div.append(`${child.slaveName} and ${target.slaveName} are siblings, a fact that draws them closer together.`);
+
+							friend += 2;
+						}
+					} else {
+						if (rival) {
+							div.append(`${child.slaveName} and ${target.slaveName} are cousins, and find it difficult to really stay mad at each other, and they make up their differences somewhat.`);
+
+							friend++;
+						} else {
+							div.append(`${child.slaveName} and ${target.slaveName} are cousins, a fact that draws them closer together.`);
+
+							friend++;
+						}
+					}
+				}
+
 				if (friend) {
 					if (rival) {
 						if (friend > rival && child.relationshipTarget !== target.ID) {
-- 
GitLab