From 6f512adf1aa75ba86fa1d5439190bd1632ea4421 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Thu, 26 Apr 2018 13:21:57 -0400
Subject: [PATCH] more changes

---
 src/uncategorized/pit.tw     | 7 ++-----
 src/utility/assignWidgets.tw | 3 +++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/uncategorized/pit.tw b/src/uncategorized/pit.tw
index 5e73ddcdb5c..a7ed7075f8c 100644
--- a/src/uncategorized/pit.tw
+++ b/src/uncategorized/pit.tw
@@ -5,11 +5,8 @@
 <<if $pitName != "the Pit">>
 	<<set $pitNameCaps = $pitName.replace("the ", "The ")>>
 <</if>>
-<<if $pitBG == 1>>
-	<<set _pit = $fighterIDs.findIndex(function(s) { return s == $Bodyguard.ID; })>>
-	<<if _pit != -1>>
-		<<set _dump = $fighterIDs.deleteAt(_pit), _DL-->>
-	<</if>>
+<<if $pitBG == 1 && $fighterIDs.includes($Bodyguard.ID)>>
+	<<set $fighterIDs.delete($Bodyguard.ID), _DL-->>
 <</if>>
 
 $pitNameCaps is clean and ready,
diff --git a/src/utility/assignWidgets.tw b/src/utility/assignWidgets.tw
index b4e2cc9a45d..138bd9f3a0c 100644
--- a/src/utility/assignWidgets.tw
+++ b/src/utility/assignWidgets.tw
@@ -93,6 +93,9 @@
 			<<if $dojo > 1>>
 				<<set $args[0].livingRules = "luxurious">>
 			<</if>>
+			<<if $pitBG == 1 && $fighterIDs.includes(_wID)>>
+				<<set $fighterIDs.delete(_wID)>>
+			<</if>>
 		<<case "be your agent" "live with your agent">>
 			<<set $args[0].assignment = $args[1],                       $args[0].assignmentVisible = 0,      $args[0].useRulesAssistant = 0>> /* non-visible roles exempt from Rules Assistant */
 			<<if $args[1] == "be your agent">>
-- 
GitLab