From d932bb3a67bba970b2465d102ed64fd8b1b405d7 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Mon, 21 Jan 2019 23:40:10 -0500
Subject: [PATCH] Added dog to setPregType()

---
 devNotes/VersionChangeLog-Premod+LoliMod.txt |  2 +-
 src/js/preg.js                               | 69 ++++++++++++++++++++
 2 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt
index 992af34ec1b..42b01e10778 100644
--- a/devNotes/VersionChangeLog-Premod+LoliMod.txt
+++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt
@@ -6,7 +6,7 @@
 
 	3
 	-fixes
-	-sufficiently grown children may survive slave bursting
+	-sufficiently grown babies may survive slave bursting
 
 	2
 	-more budget fixes to seeUnit and pPeaceKeepersDeficit
diff --git a/src/js/preg.js b/src/js/preg.js
index fca26a406d0..66360adef48 100644
--- a/src/js/preg.js
+++ b/src/js/preg.js
@@ -173,6 +173,75 @@ window.setPregType = function(actor) {
 						ovum = 3;
 					}
 				}
+			} else if(actor.eggType == "dog") {
+				if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm
+					ovum += jsEither([1, 2, 2, 3]);
+					fertilityStack++;
+					fertilityStack++;
+					fertilityStack++;
+				} else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples
+					ovum += jsEither([0, 1, 1, 2]);
+					fertilityStack++;
+					fertilityStack++;
+				} else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins
+					ovum += jsEither([0, 0, 0, 0, 1]);
+					fertilityStack++;
+				}
+				if(actor.ovaImplant == "fertility") {
+					ovum += jsEither([0, 0, 0, 0, 1]);
+					fertilityStack++;
+				}
+				if(actor.hormones == 2) {
+					ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 2]);
+					fertilityStack++;
+				}
+				if(actor.hormoneBalance >= 200) {
+					ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]);
+					fertilityStack++;
+				}
+				if(actor.diet == "fertility") {
+					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1]);
+					fertilityStack++;
+				}
+				if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) {
+					ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]);
+					fertilityStack++;
+					fertilityStack++;
+				}
+				if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) {
+					fertilityStack++;
+				}
+				if(actor.drugs == "super fertility drugs") {
+					ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]);
+					fertilityStack++;
+					fertilityStack++;
+					fertilityStack++;
+					fertilityStack++;
+					fertilityStack++;
+				} else if(actor.drugs == "fertility drugs") {
+					ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]);
+					fertilityStack++;
+				}
+				if(State.variables.seeHyperPreg == 1) {
+					if(actor.drugs == "super fertility drugs") {
+						ovum += jsRandom(0, fertilityStack*2);
+					} else {
+						ovum += jsRandom(0, fertilityStack);
+					}
+					if(actor.ovaImplant == "sympathy") {
+						ovum *= 2;
+					}
+				} else {
+					ovum += jsRandom(0, fertilityStack);
+					if(actor.ovaImplant == "sympathy") {
+						ovum *= 2;
+						if(ovum > 8) {
+							ovum = jsEither([6, 8]);
+						}
+					} else if(ovum > 8) {
+						ovum = jsRandom(6, 8);
+					}
+				}
 			} else if(actor.eggType == "pig") {
 				if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm
 					ovum += jsRandom(4, 8);
-- 
GitLab