diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 0a961c6e2c795278665da1a6499559c08f5c360c..e01730f6e641a4266d3f41ae47a9a891cf1bd3ec 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -1325,6 +1325,15 @@ App.Data.resetOnNGPlus = { cost: 0, // How much you have to spend until she forgives you }, + /* Unethical Doctor */ + pExoticSurgery: { + state: 0, // controls introduction and which halves you've met + fakePreg: 0, // is the female half teasing a male player? + cooldown: 0, // weeks until usable + visits: 0, // how many times you've given them money + clones: [], // you're starting to get boring, good thing I can fix that + }, + diversePronouns: 0, /* Weather effect on economy */ diff --git a/src/js/pregJS.js b/src/js/pregJS.js index e71093a5f81571088b15b5c701943a3d6d21dd88..8c27ea85d5ad03512ab2ec84c37ca4aff4889d6b 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -469,6 +469,87 @@ globalThis.knockMeUp = function(target, chance, hole, fatherID) { return r; }; +/** Attempt to get an actor pregnant with another actor's child. + * Assumes that sperm is at the point of meeting the egg, so check penetrative ability outside of this. + * Technically deprecates canImpreg() and canFemImpreg(). + * @param {App.Entity.SlaveState | App.Entity.PlayerState} mother is the actor attempting to become pregnant. + * @param {number} chance is the % chance to conceive. + * @param {0|1|2} hole control's the hole involved (0 - vagina, 1 - ass, 2 - both). + * @param {App.Entity.SlaveState | App.Entity.PlayerState} father is the actor doing the impregnating. + * @returns {string} Returns "${He} has become pregnant." if relevant + */ +globalThis.tryKnockMeUp = function(mother, chance, hole, father) { + let r = ``; + if (V.seePreg !== 0) { + if (canBreed(mother, father)) { + if (mother.geneMods.progenitor === 1) { + chance += 20; + } + if (father.geneMods.aggressiveSperm === 1) { + chance += 75; + } + if (father.geneticQuirks.potent === 2) { + chance *= 1.5; + } + if (V.reproductionFormula) { + if (mother.ID !== -1) { + chance += 10; + } + if (father.ID !== -1) { + chance += 10; + } + } + if (!isVirile(father) || !isFertile(mother) || (V.seeIncest === 0 && areRelated(mother, father))) { + chance = -10000; + } + if (mother.preg === -1) { + chance -= 350; // Allows making sperm so potent that they can overpower contraceptives. Shouldn't be possible at this value, but why stop a player from tweaking this if it's their thing? + } + if (mother.eggType !== father.ballType) { // Special case for fantasy races to create half-breeds. + chance -= 20; + } + if (random(0, 99) < chance) { + if (mother.mpreg === hole || hole === 2) { + if (mother.pregWeek <= 0) { + mother.preg = 1; + mother.pregSource = father.ID; + if (mother.ID !== -1) { + mother.pregWeek = 1; + } + } + + mother.pregType = setPregType(mother); + WombImpregnate(mother, mother.pregType, father.ID, 1); + + if (V.menstruation === 1) { + // + } else { + mother.pregKnown = 1; + if (mother.ID === -1) { + /* r += "<span class="lime">You have gotten pregnant.</span>"; */ + } else { + const {him} = getPronouns(mother); + if (father.ID === -1) { + r += `<span class="lime">You have gotten ${him} pregnant.</span>`; + } else { + r += `<span class="lime">${father.slaveName} has gotten ${him} pregnant.</span>`; + } + } + if (mother.geneticQuirks.superfetation === 2 && mother.womb.length > 0) { + if (V.seeHyperPreg === 1) { + mother.fertPeak = 1; + } else { + mother.fertPeak = 4; + } + } + } + } + } + } + } + return r; +}; + globalThis.getIncubatorReserved = function( /* slaves */ ) { return FetusGlobalReserveCount("incubator"); };