From 211079f8ea0875bebc0ede33713939a3715c9456 Mon Sep 17 00:00:00 2001
From: Anu <anulithic@gmail.com>
Date: Wed, 1 Mar 2023 18:04:48 -0800
Subject: [PATCH] More precise vagina checks

---
 src/endWeek/player/prHormones.js                | 16 ++++++++--------
 src/endWeek/player/prLongTermPhysicalEffects.js |  4 ++--
 src/endWeek/saAgent.js                          |  2 +-
 src/endWeek/saHormonesEffects.js                |  2 +-
 src/endWeek/saLongTermEffects.js                |  6 +++---
 src/endWeek/saLongTermPhysicalEffects.js        |  2 +-
 src/endWeek/shared/physicalDevelopment.js       |  2 +-
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/endWeek/player/prHormones.js b/src/endWeek/player/prHormones.js
index 51e3f73ba2e..b6a88f8bc4e 100644
--- a/src/endWeek/player/prHormones.js
+++ b/src/endWeek/player/prHormones.js
@@ -197,7 +197,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.butt += 0.2;
 					}
 				}
-				if (PC.vagina >= 0 && PC.ovaries !== 0 && PC.vaginaLube < 2) {
+				if (PC.vagina !== -1 && PC.ovaries !== 0 && PC.vaginaLube < 2) {
 					effects.push(`<span class="change positive">pussy to produce more lubricant`);
 					PC.vaginaLube++;
 				}
@@ -283,7 +283,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.butt += 0.2;
 					}
 				}
-				if (PC.vagina >= 0 && PC.ovaries !== 0 && PC.vaginaLube < 2) {
+				if (PC.vagina !== -1 && PC.ovaries !== 0 && PC.vaginaLube < 2) {
 					effects.push(`<span class="change positive">pussy to produce more lubricant`);
 					PC.vaginaLube++;
 				}
@@ -369,7 +369,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.butt += 0.2;
 					}
 				}
-				if (PC.vagina >= 0 && PC.ovaries !== 0 && PC.vaginaLube < 1) {
+				if (PC.vagina !== -1 && PC.ovaries !== 0 && PC.vaginaLube < 1) {
 					effects.push(`<span class="change positive">pussy to produce more lubricant`);
 					PC.vaginaLube++;
 				}
@@ -453,7 +453,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.butt += 0.2;
 					}
 				}
-				if (PC.vagina >= 0 && PC.ovaries !== 0 && PC.vaginaLube < 1) {
+				if (PC.vagina !== -1 && PC.ovaries !== 0 && PC.vaginaLube < 1) {
 					effects.push(`<span class="change positive">pussy to produce more lubricant`);
 					PC.vaginaLube++;
 				}
@@ -578,7 +578,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.balls++;
 					}
 
-					if (PC.clit < 5 && PC.dick === 0 && PC.vagina >= 0) {
+					if (PC.clit < 5 && PC.dick === 0 && PC.vagina !== -1) {
 						effects.push(`<span class="change positive">clit to swell`);
 						PC.clit++;
 					}
@@ -651,7 +651,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.balls++;
 					}
 
-					if (PC.clit < 4 && PC.dick === 0 && PC.vagina >= 0) {
+					if (PC.clit < 4 && PC.dick === 0 && PC.vagina !== -1) {
 						effects.push(`<span class="change positive">clit to swell`);
 						PC.clit++;
 					}
@@ -720,7 +720,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.balls++;
 					}
 
-					if (PC.clit < 3 && PC.dick === 0 && PC.vagina >= 0) {
+					if (PC.clit < 3 && PC.dick === 0 && PC.vagina !== -1) {
 						effects.push(`<span class="change positive">clit to swell`);
 						PC.clit++;
 					}
@@ -787,7 +787,7 @@ App.EndWeek.Player.hormones = function(PC, selfManufactured, hormonePower) {
 						PC.balls++;
 					}
 
-					if (PC.clit < 2 && PC.dick === 0 && PC.vagina >= 0) {
+					if (PC.clit < 2 && PC.dick === 0 && PC.vagina !== -1) {
 						effects.push(`<span class="change positive">clit to swell`);
 						PC.clit++;
 					}
diff --git a/src/endWeek/player/prLongTermPhysicalEffects.js b/src/endWeek/player/prLongTermPhysicalEffects.js
index 0a4d813dee1..0587c85cda2 100644
--- a/src/endWeek/player/prLongTermPhysicalEffects.js
+++ b/src/endWeek/player/prLongTermPhysicalEffects.js
@@ -308,7 +308,7 @@ App.EndWeek.Player.longTermPhysicalEffects = function(PC = V.PC) {
 			PC.energy++;
 		}
 		PC.energy = Math.max(PC.energy, 0);
-		if (PC.pubertyXX === 1 && PC.vagina >= 0) {
+		if (PC.pubertyXX === 1 && PC.vagina !== -1) {
 			if (PC.energy > 60 && PC.vaginaLube === 0 && (V.policies.sexualOpenness === 1 || averageDicking.length > 0) && random(1, 100) > 95) {
 				r.push(`With all the excitement in your life, your formerly dry pussy <span class="change positive">starts moistening up.</span>`);
 				PC.vaginaLube++;
@@ -772,7 +772,7 @@ App.EndWeek.Player.longTermPhysicalEffects = function(PC = V.PC) {
 		}
 
 		if (PC.geneticQuirks.uterineHypersensitivity === 2) {
-			if (PC.vaginaLube < 2 && PC.vagina >= 0 && PC.preg >= PC.pregData.normalBirth * .75) {
+			if (PC.vaginaLube < 2 && PC.vagina !== -1 && PC.preg >= PC.pregData.normalBirth * .75) {
 				r.push(`You're so pregnant and so horny${V.geneticMappingUpgrade >= 1 ? ", thanks to your hypersensitive uterus," : ""} that it comes as little surprise when your cunt <span class="change positive">starts producing more sexual fluids.</span>`);
 				PC.vaginaLube += 1;
 			}
diff --git a/src/endWeek/saAgent.js b/src/endWeek/saAgent.js
index c9142771d2f..01e9659abe2 100644
--- a/src/endWeek/saAgent.js
+++ b/src/endWeek/saAgent.js
@@ -590,7 +590,7 @@ App.SlaveAssignment.agent = function(slave) {
 	}
 
 	if (slave.geneticQuirks.uterineHypersensitivity === 2) {
-		if (slave.vaginaLube < 2 && slave.vagina >= 0 && random(70 - slave.physicalAge, 200) < slave.hormoneBalance) {
+		if (slave.vaginaLube < 2 && slave.vagina !== -1 && random(70 - slave.physicalAge, 200) < slave.hormoneBalance) {
 			slave.vaginaLube += 1;
 		}
 		if (slave.geneMods.NCS === 0) {
diff --git a/src/endWeek/saHormonesEffects.js b/src/endWeek/saHormonesEffects.js
index 807a1902cce..f53743e6c64 100644
--- a/src/endWeek/saHormonesEffects.js
+++ b/src/endWeek/saHormonesEffects.js
@@ -171,7 +171,7 @@ App.SlaveAssignment.hormonesEffects = function saHormonesEffects(slave) {
 	 * @param {number} maxWetness
 	 */
 	function increaseWetness(slave, maxWetness) {
-		if (slave.vagina >= 0 && slave.ovaries !== 0 && slave.vaginaLube < maxWetness) {
+		if (slave.vagina !== -1 && slave.ovaries !== 0 && slave.vaginaLube < maxWetness) {
 			r.push(`Hormonal effects cause <span class="lime">${his} vagina to produce more copious natural lubricant.</span>`);
 			slave.vaginaLube++;
 		}
diff --git a/src/endWeek/saLongTermEffects.js b/src/endWeek/saLongTermEffects.js
index 714e142bf2a..e9225a4c1ae 100644
--- a/src/endWeek/saLongTermEffects.js
+++ b/src/endWeek/saLongTermEffects.js
@@ -565,7 +565,7 @@ App.SlaveAssignment.longTermEffects = function saLongTermEffects(slave) {
 			if (slave.voice.isBetween(0, 3)) {
 				Effects.push("VoiceHigher");
 			}
-			if (slave.vagina >= 0 && slave.ovaries !== 0 && slave.vaginaLube < 2) {
+			if (slave.vagina !== -1 && slave.ovaries !== 0 && slave.vaginaLube < 2) {
 				Effects.push("VaginaWetter");
 			}
 			let rearQuirkDivider = rearQuirk === 0 ? 1 : rearQuirk;
@@ -922,7 +922,7 @@ App.SlaveAssignment.longTermEffects = function saLongTermEffects(slave) {
 						slave.boobs -= 50 / gigantomastiaMod;
 					}
 					if (slave.geneMods.NCS === 0) {
-						if (slave.clit < 2 && slave.vagina >= 0 && slave.dick === 0 && random(1, 100) < 10) {
+						if (slave.clit < 2 && slave.vagina !== -1 && slave.dick === 0 && random(1, 100) < 10) {
 							r.push(`${He} feels <span class="change positive">unusual warmness</span> in ${his} clitoris.`);
 							slave.clit += 1;
 						}
@@ -946,7 +946,7 @@ App.SlaveAssignment.longTermEffects = function saLongTermEffects(slave) {
 							r.push(`${He} feels a <span class="change positive">strange weight</span> on ${his} rear.`);
 							slave.butt += 1;
 						}
-						if (slave.labia < 2 && slave.vagina >= 0 && random(1, 100) < 10) {
+						if (slave.labia < 2 && slave.vagina !== -1 && random(1, 100) < 10) {
 							r.push(`${He} feels an <span class="change positive">unusual tenderness</span> in ${his} labia.`);
 							slave.labia += 1;
 						}
diff --git a/src/endWeek/saLongTermPhysicalEffects.js b/src/endWeek/saLongTermPhysicalEffects.js
index 8e9058d626e..34e25c2bef9 100644
--- a/src/endWeek/saLongTermPhysicalEffects.js
+++ b/src/endWeek/saLongTermPhysicalEffects.js
@@ -1022,7 +1022,7 @@ App.SlaveAssignment.longTermPhysicalEffects = function saLongTermPhysicalEffects
 		}
 
 		if (slave.geneticQuirks.uterineHypersensitivity === 2) {
-			if (slave.vaginaLube < 2 && slave.vagina >= 0 && slave.preg >= slave.pregData.normalBirth * .75) {
+			if (slave.vaginaLube < 2 && slave.vagina !== -1 && slave.preg >= slave.pregData.normalBirth * .75) {
 				if (V.geneticMappingUpgrade >= 1) {
 					r.push(`${His} vagina begins to <span class="change positive">produce more sexual fluids</span> as the stimulation to ${his} hypersensitive uterus nears its climax.`);
 				} else {
diff --git a/src/endWeek/shared/physicalDevelopment.js b/src/endWeek/shared/physicalDevelopment.js
index 717fb4c6d22..b420ae34723 100644
--- a/src/endWeek/shared/physicalDevelopment.js
+++ b/src/endWeek/shared/physicalDevelopment.js
@@ -37,7 +37,7 @@ App.EndWeek.Shared.physicalDevelopment = function(actor, player = false) {
 					if (actor.balls.isBetween(0, 3)) {
 						increaseBalls(actor);
 					}
-					if (actor.vagina >= 0 && actor.ovaries > 0 && physicalAgeSwap > actor.pubertyAgeXX) {
+					if (actor.vagina !== -1 && actor.ovaries > 0 && physicalAgeSwap > actor.pubertyAgeXX) {
 						increaseWetness(actor);
 					}
 					if (actor.waist < 10) {
-- 
GitLab