diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt index e114b88f4898edd4ad5cb9d5893db1f121c1f6b8..38ab1c21a0884244f72b7f94e28bb459cef52e47 100644 --- a/devNotes/Useful JS Function Documentation.txt +++ b/devNotes/Useful JS Function Documentation.txt @@ -110,6 +110,12 @@ canHold(slave) - Returns if the slave can use both arms. canWalk(slave) - Returns if the slave can walk unassisted. +canStand(slave) - Returns if the slave can stand unassisted. + +canMove(slave) - Returns if the slave is capable of moving themselves. + +isHindered(actor) - Returns if the actor's movement is impeded for any reason. + canTalk(slave) - Returns if the slave can talk. canDoAnal(slave) - Returns if the slave can currently have anal sex. @@ -138,9 +144,16 @@ isVegetable(slave) - Returns if the slave is mindbroken. overpowerCheck(slave, PC) - Returns an integer that represents the chance of a slave overpowering the player. +canLift(actor1, actor2) - Returns if actor2 is capable of picking up and carrying actor1. + heelLength(slave) - Returns the length of a slave's heels should she be wearing any +Player Functions: + +onBedRest(actor) - Returns if the actor is on mandatory bedrest or just incapable of leaving their bed. (Mostly for player use.) + + Display Functions: properTitle() - Returns the player's proper title. (customTitle, Sir, Ma'am) diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt index 8c3a9c6a7e62f3b10d6ccbbeecedcdd0b3eed9b3..1d740d27a4f3d56e51bbb33549cc78d0af0ecac6 100644 --- a/slave variables documentation - Pregmod.txt +++ b/slave variables documentation - Pregmod.txt @@ -570,6 +570,8 @@ what porn she is known for "underage" "weight gain" "big dick" +"muscle" +"taboo" "generic" "deepthroat" "unwilling" @@ -610,6 +612,8 @@ what aspect of her the upgraded studio is focusing on for porn "loli" "gainer" "stud" +"muscle" +"incest" "porn" "gagfuck queen" "strugglefuck queen" @@ -656,6 +660,16 @@ porn.fame.stud: well hung porn fame accepts int +porn.fame.muscle: + +muscle porn fame +accepts int + +porn.fame.incest: + +incest porn fame +accepts int + porn.fame.loli: underage porn fame diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index 5982f0690fdecd940fc94c1ecc43e6d687dccc57..3723d1a3f37f7e0ba132e830c965e03d1c47fd04 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -905,6 +905,33 @@ globalThis.canMove = function(slave) { return true; }; +/** Assuming the actor can walk, is their movement hindered by anything? Intended for the player, but could be applied to slaves. + * @param {App.Entity.SlaveState} slave + * @returns {boolean} + */ +globalThis.isHindered = function(slave) { + if (!slave) { + return null; + } else if (!canWalk(slave) && canMove(slave)) { + return true; + } else if (slave.weight >= 130 || (slave.weight >= 95 + ((slave.physicalAge - 9) * 5))) { + return true; + } else if (slave.belly >= 60000 || slave.belly >= 60000 / (1 + Math.Pow(Math.E, -0.4 * (slave.physicalAge - 14))) || slave.belly >= Math.max(10000, ((12500 / 19) * slave.height) - (1172500 / 19))) { + return true; + } else if (slave.boobs > 5000) { + return true; + } else if (slave.balls >= 14) { + return true; + } else if (slave.hips > 2) { + return true; + } else if (slave.butt > 6) { + return true; + } else if (slave.muscles < -30) { + return true; + } + return false; +}; + /** * @param {App.Entity.SlaveState} slave * @param {boolean} checkLanguage Does a bad accent count as being unable to speak? diff --git a/src/js/storyJS.js b/src/js/storyJS.js index b2a89cadc6606761587d14c51aeb082f6324b25a..25cab312c4d852543b53db801848003cf59626eb 100644 --- a/src/js/storyJS.js +++ b/src/js/storyJS.js @@ -453,6 +453,33 @@ globalThis.overpowerCheck = function(slave, PC) { return strength; }; +/** + * returns if arg2 can pick up and carry arg1 + * @param {App.Entity.SlaveState} liftee + * @param {App.Entity.SlaveState} lifter + * @returns {boolean} + */ +globalThis.canLift = function(liftee, lifter) { + let sumWeight; + + sumWeight = liftee.height - lifter.height; + sumWeight += liftee.weight / 2; + sumWeight += liftee.boobs / 500; + sumWeight += liftee.belly / 1000; + sumWeight += liftee.butt / 2; + if (liftee.hips > 0) { + sumWeight += Math.pow(liftee.hips, 2); + } + if (liftee.dick >= 20) { + sumWeight += Math.trunc(liftee.dick / 10); + } + if (liftee.balls >= 10) { + sumWeight += Math.pow(Math.trunc(liftee.balls / 10), 3); + } + + return 20 + lifter.strength >= sumWeight && hasBothArms(lifter); +}; + /** * returns array of IDs of all characters who impregnated slave * @param {FC.HumanState} slave diff --git a/src/player/js/playerJS.js b/src/player/js/playerJS.js index 278777f61631947c84eed047ddd6a07fe3ca2b6d..a9a5df36f88e508c405884ac3bc9097c44605e4f 100644 --- a/src/player/js/playerJS.js +++ b/src/player/js/playerJS.js @@ -637,3 +637,20 @@ globalThis.IncreasePCSkills = function(input, increase = 1) { } return t; }; + +/** Returns if the player is on mandatory bedrest. + * @returns {boolean} + */ +globalThis.onBedRest = function(actor) { + // consider player health and injury in the future! + if (!actor) { + return null; + } else if (!canMove(actor)) { + return true; + } else if (actor.preg > actor.pregData.normalBirth / 1.33 && actor.womb.find((ft) => ft.genetics.geneticQuirks.polyhydramnios === 2 && ft.age >= 20)) { + return true; + } else if (actor.bellyPreg >= actor.pregAdaptation * 2200) { + return true; + } + return false; +};