From 11fff40226451206ec3df9387ed5fb850d9a0aba Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@gmail.com>
Date: Sat, 3 Aug 2019 21:25:46 +0200
Subject: [PATCH] convert limb access src/in SecExp/

---
 src/SecExp/attackHandler.tw   |  8 ++------
 src/SecExp/rebellionReport.tw | 18 +++++-------------
 2 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw
index b7ab66137cb..c98df00dab8 100644
--- a/src/SecExp/attackHandler.tw
+++ b/src/SecExp/attackHandler.tw
@@ -293,9 +293,7 @@
 		<<if $Bodyguard.skill.combat == 1>>
 			<<set _woundChance -= 2>>
 		<</if>>
-		<<if $Bodyguard.amp >= -4>>
-			<<set _woundChance -= 1>>
-		<</if>>
+		<<set _woundChance -= 0.25 * (getLimbCount($Bodyguard, 5) + getLimbCount($Bodyguard, 6))>>
 		<<if $Bodyguard.health >= 50>>
 			<<set _woundChance -= 1>>
 		<</if>>
@@ -423,9 +421,7 @@
 		<<if $HeadGirl.skill.combat == 1>>
 			<<set _woundChance -= 3>>
 		<</if>>
-		<<if $HeadGirl.amp >= -4>>
-			<<set _woundChance -= 1>>
-		<</if>>
+		<<set _woundChance -= 0.25 * (getLimbCount($HeadGirl, 5) + getLimbCount($HeadGirl, 6))>>
 		<<if $HeadGirl.health >= 50>>
 			<<set _woundChance -= 2>>
 		<</if>>
diff --git a/src/SecExp/rebellionReport.tw b/src/SecExp/rebellionReport.tw
index 241fc79d0de..ab79b6fa070 100644
--- a/src/SecExp/rebellionReport.tw
+++ b/src/SecExp/rebellionReport.tw
@@ -620,9 +620,7 @@
 			<<if $Concubine.skill.combat == 1>>
 				<<set _woundChance -= 2>>
 			<</if>>
-			<<if $Concubine.amp >= -4>>
-				<<set _woundChance -= 1>>
-			<</if>>
+			<<set _woundChance -= 0.25 * (getLimbCount($Concubine, 5) + getLimbCount($Concubine, 6))>>
 			<<if $Concubine.health >= 50>>
 				<<set _woundChance -= 1>>
 			<</if>>
@@ -685,10 +683,8 @@
 		<<if $Bodyguard.skill.combat == 1>>
 			<<set _woundChance -= 2>>
 		<</if>>
-		<<if $Bodyguard.amp >= -4>>
-			<<set _woundChance -= 1>>
-		<</if>>
-			<<if $Bodyguard.health >= 50>>
+		<<set _woundChance -= 0.25 * (getLimbCount($Bodyguard, 5) + getLimbCount($Bodyguard, 6))>>
+		<<if $Bodyguard.health >= 50>>
 			<<set _woundChance -= 1>>
 		<</if>>
 		<<if $Bodyguard.weight > 130>>
@@ -798,9 +794,7 @@
 			<<if $Concubine.skill.combat == 1>>
 				<<set _woundChance -= 2>>
 			<</if>>
-			<<if $Concubine.amp >= -4>>
-				<<set _woundChance -= 1>>
-			<</if>>
+			<<set _woundChance -= 0.25 * (getLimbCount($Concubine, 5) + getLimbCount($Concubine, 6))>>
 			<<if $Concubine.health >= 50>>
 				<<set _woundChance -= 1>>
 			<</if>>
@@ -912,9 +906,7 @@
 			<<if $Concubine.skill.combat == 1>>
 				<<set _woundChance -= 2>>
 			<</if>>
-			<<if $Concubine.amp >= -4>>
-				<<set _woundChance -= 1>>
-			<</if>>
+			<<set _woundChance -= 0.25 * (getLimbCount($Concubine, 5) + getLimbCount($Concubine, 6))>>
 			<<if $Concubine.health >= 50>>
 				<<set _woundChance -= 1>>
 			<</if>>
-- 
GitLab