1
0

femcyc 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. # femcyc
  2. if $ARGS[0] = '':
  3. !{Hourly reduction in semen potency}
  4. !{First it sets the array index to the first index, then it checks to be sure the array tracking the age is less than 144 hours. If it is 144 hours old, it kills that index, which should shift the index up. If it is less than 144 hours old, it sets a current potency drop. The drop is 2x or 3x regularly, but during ovulation it is only 1x, to represent the better environment from fertile cervical mucus.}
  5. !{144 hours was selected due to that being approximately the maximum amount of time sperm is viable in the womb (120 would be more accurate, but there is leeway). PLEASE DO NOT CHANGE IT.}
  6. !{The potency drop may seem small in game-time, but is meant to be a reasonable approximation to real life. Avoid unprotected sex within 5 days of ovulation if you want to mitigate your risk.}
  7. !{the 'rcntorgzm' variable is set to determine whether Sveta has orgasmed within the last hour. If she has, a small potency boost for the guys she has slept with in that hour.}
  8. if rcntorgzm = 1:
  9. if rcntorgzmtmp = 1: rcntorgzm = 0 & rcntorgzmtmp = 0
  10. if rcntorgzmtmp = 0: rcntorgzmtmp = 1
  11. end
  12. cumarr_idx = 0
  13. :cumarrloop
  14. if cumarr_idx < arrsize('$cumarrnam'):
  15. if cumarrcpt[cumarr_idx] > 0 and cumarrage[cumarr_idx] < 144:
  16. if rcntorgzm = 1 and cumarrcpt[cumarr_idx] < cumarrppt[cumarr_idx] and cumarrage[cumarr_idx] < 1: cumarrcpt[cumarr_idx] += cumarrppt[cumarr_idx] / 12
  17. cumpdrop = cumarrcpt[cumarr_idx] / (144 - cumarrage[cumarr_idx])
  18. if cycle ! 2: cumpdrop += cumpdrop * rand(0, 2)
  19. cumarrcpt[cumarr_idx] -= cumpdrop
  20. if cumarrcpt[cumarr_idx] <= 0:
  21. gs 'cum_cleanup', 'cleanwomb', cumarr_idx
  22. else
  23. cumarrage[cumarr_idx] += 1
  24. cumarr_idx += 1
  25. end
  26. else
  27. gs 'cum_cleanup', 'cleanwomb', cumarr_idx
  28. end
  29. jump 'cumarrloop'
  30. end
  31. !!Succubus absorption of sperm in womb
  32. if succubusflag = 1:
  33. if arrsize('cumarrppt') > 0:
  34. succycletmp = 0
  35. :sucvagabs
  36. if cumarrdel[succycletmp] = 0:
  37. if cumarrcpt[succycletmp] > 10000:
  38. sexnutrition += 30 * succublvl
  39. succubxp += 3
  40. elseif cumarrcpt[succycletmp] < 3000 and cumarrcpt[succycletmp] > 1000:
  41. sexnutrition += 5 * succublvl
  42. succubxp += 2
  43. elseif cumarrcpt[succycletmp] =< 1000:
  44. sexnutrition += succublvl
  45. else
  46. sexnutrition += 25 * succublvl
  47. succubxp += 3
  48. end
  49. gs 'cum_cleanup', 'cleanwomb', succycletmp
  50. sucabscum = 1
  51. else
  52. succycletmp += 1
  53. end
  54. if succycletmp < arrsize('cumarrppt'): jump 'sucvagabs'
  55. end
  56. killvar 'succycletmp'
  57. end
  58. cumarrtemp = 0
  59. cumcondslip = 0
  60. cumcondslip_aware = 0
  61. if arrsize('sparrvol') > 0:
  62. :cumspaloop
  63. !!Succubus absorption for internal locations other than womb
  64. if succubusflag = 1:
  65. if sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
  66. sexnutrition += 25*succublvl
  67. succubxp += 3
  68. sucabscum = 1
  69. if sparrvol[cumarrtemp] > 0: sparrvol[cumarrtemp] = 0
  70. end
  71. end
  72. !!{if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
  73. sexnutrition += 30*succublvl
  74. sparrvol[cumarrtemp] -= 30*succublvl
  75. if sparrvol[cumarrtemp] < 0: sexnutrition += sparrvol[cumarrtemp] & sparrvol[cumarrtemp] = 0
  76. end}
  77. !!{ Process spatter until it has volume or is too old in vagina. }
  78. if sparrvol[cumarrtemp] > 0 or (sparrloc[cumarrtemp] = 0 and sparrage[cumarrtemp] < 10):
  79. sparrtmpv = arrsize('$cumarrnam')
  80. if sparrloc[cumarrtemp] = 17:
  81. sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
  82. if sparrtmpv >= 0:
  83. !!'Found guy id <<sparrtmpv>>'
  84. if sparrage[cumarrtemp] < 4:
  85. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/5
  86. elseif sparrage[cumarrtemp] < 10:
  87. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/30
  88. end
  89. end
  90. elseif sparrloc[cumarrtemp] = 0:
  91. sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
  92. if sparrtmpv >= 0:
  93. !!'Found guy id' & sparrtmpv
  94. if sparrage[cumarrtemp] < 4:
  95. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/40
  96. elseif sparrage[cumarrtemp] < 10:
  97. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/60
  98. end
  99. end
  100. elseif sparrslc[cumarrtemp] = 1 and sparrage < 5:
  101. if sparrloc[cumarrtemp] = 1:
  102. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  103. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  104. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  105. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  106. cumarrdel[sparrtmpv] = 1
  107. cumarrkno[sparrtmpv] = -1
  108. cumarrcon[sparrtmpv] = 0
  109. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  110. end
  111. elseif sparrslc[cumarrtemp] = 3 and sparrage < 5:
  112. if sparrloc[cumarrtemp] = 2:
  113. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  114. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  115. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  116. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  117. cumarrdel[sparrtmpv] = 3
  118. cumarrkno[sparrtmpv] = -1
  119. cumarrcon[sparrtmpv] = 0
  120. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  121. elseif sparrloc[cumarrtemp] = 4:
  122. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  123. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  124. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  125. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  126. cumarrdel[sparrtmpv] = 2
  127. cumarrkno[sparrtmpv] = -1
  128. cumarrcon[sparrtmpv] = 0
  129. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  130. end
  131. elseif sparrslc[cumarrtemp] = 5 and sparrage < 5:
  132. if sparrloc[cumarrtemp] = 3:
  133. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  134. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  135. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  136. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  137. cumarrdel[sparrtmpv] = 2
  138. cumarrkno[sparrtmpv] = -1
  139. cumarrcon[sparrtmpv] = 0
  140. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  141. elseif sparrloc[cumarrtemp] = 5:
  142. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  143. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  144. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  145. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  146. cumarrdel[sparrtmpv] = 3
  147. cumarrkno[sparrtmpv] = -1
  148. cumarrcon[sparrtmpv] = 0
  149. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  150. elseif sparrloc[cumarrtemp] = 6:
  151. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  152. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  153. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  154. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  155. cumarrdel[sparrtmpv] = 3
  156. cumarrkno[sparrtmpv] = -1
  157. cumarrcon[sparrtmpv] = 0
  158. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  159. end
  160. end
  161. if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
  162. sparrvol[cumarrtemp] -= sparrage[cumarrtemp]/2
  163. if sparrvol[cumarrtemp] < 0:sparrvol[cumarrtemp] = 0
  164. end
  165. if sparrloc[cumarrtemp] = 0 and cumsumvag > 60: sparrslc[cumarrtemp] = 1
  166. if sparrloc[cumarrtemp] = 3 and cumsumass > 60: sparrslc[cumarrtemp] = 1
  167. if sparrloc[cumarrtemp] = 17:
  168. cumcondslip += 1
  169. if sparridt[cumarrtemp] >= 0:
  170. cumcondslip_aware = 1
  171. end
  172. if sparrage[cumarrtemp] > 48:
  173. cumcondslip_aware = 1
  174. pcs_health -= rand(3,sparrage[cumarrtemp] - 45)
  175. '<br><b><font color="red">You feel nauseous.</font></b>'
  176. end
  177. end
  178. if sparrloc[cumarrtemp] ! 0 and sparrloc[cumarrtemp] ! 3 and sparrloc[cumarrtemp] ! 12 and isprok = 0 and sparrage < 5: sparrslc[cumarrtemp] += 1
  179. sparrage[cumarrtemp] += 1
  180. cumarrtemp += 1
  181. ctemp[0] += sparrvol[cumarrtemp]
  182. if sparrloc[cumarrtemp] = 0: ctemp[1] += sparrvol[cumarrtemp]
  183. if sparrloc[cumarrtemp] = 3: ctemp[2] += sparrvol[cumarrtemp]
  184. else
  185. gs 'cum_cleanup', 'cleandeposit', cumarrtemp
  186. end
  187. if cumarrtemp < arrsize('sparrvol'): jump 'cumspaloop'
  188. cumsumbod = ctemp[0]
  189. cumsumvag = ctemp[1]
  190. cumsumass = ctemp[2]
  191. KILLVAR 'ctemp'
  192. end
  193. if lactate > 0:
  194. if lactatemv <= 0:
  195. lactatemv = 0
  196. if lactatemm < pcs_cupsize*4 and milkgrowday < daystart:
  197. lactatemm += 1
  198. lactatemv += 1
  199. bgrowday = daystart
  200. elseif milkgrowday < daystart:
  201. if rand(0,30) = 0: pcs_cupsize += 1
  202. milkgrowday = daystart
  203. lactatemv += 1
  204. end
  205. elseif lactatemv < lactatemm:
  206. lactatemv += lactatemm/20
  207. elseif lactatemv = lactatemm and milkgrowday < daystart:
  208. milkgrowday = daystart
  209. lactatemm -= 1
  210. lactatemv -= 1
  211. if rand(0,90) = 0: pcs_cupsize -= 1
  212. elseif lactatemv > lactatemm:
  213. lactatemv = lactatemm
  214. end
  215. end
  216. if cycle <= 0:
  217. gs 'femcyc', 'cyc0'
  218. elseif cycle = 1:
  219. gs 'femcyc', 'cyc1'
  220. elseif cycle = 2:
  221. gs 'femcyc', 'cyc2'
  222. elseif cycle = 3:
  223. gs 'femcyc', 'cyc3'
  224. elseif cycle = 4:
  225. gs 'femcyc', 'cyc4'
  226. elseif cycle = 5:
  227. gs 'femcyc', 'preg'
  228. end
  229. dynamic $d_cycreport_update
  230. end
  231. !{Menstruation to Follicular. Verifies that the cycle is in the bloody phase. It then checks to see if you are done bleeding. If you are, it starts the Follicular phase. There is a small chance your follcular phase will be anywhere from a day to 3 days short, done by the random release of a boosted EggRH. Otherwise, it just starts it clean.}
  232. if $ARGS[0] = 'cyc0':
  233. if mesec <= 0:
  234. lastmens = daystart
  235. cycle = 1
  236. mesec = 0
  237. if rand(0,1000) = 1000:
  238. EggRH = rand(20,80)
  239. else
  240. EggRH = 0
  241. end
  242. FocH = EggRH
  243. else
  244. mesec -= 1
  245. end
  246. end
  247. !{Follicular to Ovulation. It checks to see if you are on the Follicular phase. If you are, it checks to see if you are ready to ovulate. If you arent, it increases your ovulation ticker by 1, then gives a random chance to increase it again. Then it checks to see if you have ovarian problems, and if you do, decreases your ovulation ticker. When all that is done, it checks to see if you have any birth control chemical, and if its above a certain amount, it reduces your ovulation ticker.}
  248. if $ARGS[0] = 'cyc1':
  249. FertEgg = 0
  250. if FocH <= 150:
  251. if pillcon <= 7000: EggRH += 1
  252. if rand(0,9) = 0: EggRH += 1
  253. FocH += 1
  254. temprand = rand(0,9) - sterileov + tempovbonus
  255. if temprand < 0:
  256. EggRH -= 1
  257. elseif temprand > 9:
  258. EggRH += 1
  259. end
  260. else
  261. !{If you are ready to ovulate, it creates a chance to double ovulate. That chance is increased by your age. Then it does the same for a triple ovulation. Then it sets the ovulation tag, ovulation hour count, and begins a ticker for the life of the eggs.}
  262. Temprand = rand(0,20)
  263. Temprand += age/15
  264. Temprand -= pillcon/1000
  265. if temprand > 20:
  266. EggRH += 205
  267. Temprand = rand(0,20)
  268. Temprand += age/15
  269. if temprand > 20: EggRH += 410
  270. end
  271. FocH = 0
  272. Ovulate = 24 + rand(0,20)
  273. cycle = 2
  274. ferteggage = 0
  275. end
  276. end
  277. !!{Fertilization.}
  278. if $ARGS[0] = 'cyc2':
  279. can_sz = arrsize('$cumarrnam')
  280. if Ovulate > 0 and can_sz > 0 and UnfertEgg > 0:
  281. KILLVAR 'cumtime'
  282. KILLVAR 'cumfthname'
  283. KILLVAR '$wombpotfath'
  284. $cumfthname[0] = 'unknown'
  285. cumtime[0] = 0
  286. can_idx = 0
  287. cum_total = 0
  288. !!{Compute array of unique fathers known to PC and another two arrays of unique total fathers and their individual sperm totals from all entries in cumarrcpt for that father. Also tally all cum present.}
  289. :FatherCumAnalyze
  290. !! If the current DNA is new (no occurence in the womb array), it is added to the end of $wombDNA array, and added the amount of cum to the end of cumamount array.
  291. !! If exists, just increase the amount of cum in the womb.
  292. !! $wombDNA: sperm in womb potent enough to cause pregnancy
  293. !! wombAmount: how potent is the sperm of a guy
  294. !! $wombName: the name of the NPC
  295. y = arrsize('$wombDNA')
  296. if arrpos('$wombDNA',$npc_dna[$cumarrnam[can_idx]]) = -1:
  297. !! New guy, create place for him at the end of the array, storing his DNA, sperm amount and name
  298. $wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
  299. wombAmount[y] = cumarrcpt[can_idx]
  300. $wombName[y] = $cumarrnam[can_idx]
  301. else
  302. !! This DNA is in the womb, but does it belong to the same guy?
  303. x = 0
  304. z = 0
  305. :LocalizeLoop
  306. if $wombDNA[x] = $npc_dna[$cumarrnam[can_idx]] and $wombName[x] = $cumarrnam[can_idx]: wombAmount[x] += cumarrcpt[can_idx] & z = 1
  307. if z = 0 and x < (y - 1):x += 1 & jump 'LocalizeLoop'
  308. killvar 'x'
  309. if z = 0:
  310. !! Since the DNA and the stored name does not match at the same time, it means this is a twin situation where the twin is not in array, so put him in
  311. $wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
  312. $wombName[y] = $cumarrnam[can_idx]
  313. wombAmount[y] = cumarrcpt[can_idx]
  314. end
  315. killvar 'z'
  316. end
  317. killvar 'y'
  318. if cumarrkno[can_idx] = 1 and arrpos('$wombpotfath', $cumarrnam[can_idx]) < 0:$wombpotfath[arrsize('$wombpotfath')] = $cumarrnam[can_idx]
  319. !! If the guy is a known/possible element (PC know about the sex, it was actual sex, condom/pill was not used or condom was broken, etc.), he can be considered as father.
  320. if instr('14570',str(cumarrcon[can_idx])) > 0 and cumarrdel[can_idx] = 0 and cumarrkno[can_idx] >= 0:
  321. !! If guy is recorded already, increase his cumtime, else record him for the first time.
  322. if arrpos('$cumfthname', $cumarrnam[can_idx]) = -1:
  323. $cumfthname[arrsize('$cumfthname')] = $cumarrnam[can_idx]
  324. cumtime[arrsize('$cumfthname')] = 1
  325. else
  326. cumtime[arrpos('$cumfthname', $cumarrnam[can_idx])] += 1
  327. end
  328. end
  329. cum_total += cumarrcpt[can_idx]
  330. if can_idx < can_sz:can_idx += 1 & jump 'FatherCumAnalyze'
  331. !! setting the default believed father if there is no difficult choice or there is no choice
  332. if arrsize('$cumfthname') = 2 and cumtime[0] = 0:
  333. $wombpotfath[0] = $cumfthname[1]
  334. elseif arrsize('$cumfthname') = 1:
  335. $wombpotfath[0] = $cumfthname[0]
  336. end
  337. !!{Create lotto of potential fathers based on each potential fathers sperm as a percentage of the total. The higher percentage of sperm from a given father, the more lotto entries he will have.}
  338. KILLVAR '$cumfathlotto'
  339. cfw_idx = 0
  340. cfw_sz = arrsize('wombAmount')
  341. :FathLottoLoop
  342. if cfw_idx < cfw_sz:
  343. cfl_ct = (wombAmount[cfw_idx] * 100) / cum_total
  344. if cfl_ct < 1: cfl_ct = 1
  345. cfl_idx = arrsize('$cumfathlotto')
  346. :FathLottoAdd
  347. if cfl_ct > 0:
  348. $cumfathlotto[cfl_idx] = $wombName[cfw_idx]
  349. $cumfatherDNA[cfl_idx] = $wombDNA[cfw_idx]
  350. cfl_idx += 1
  351. cfl_ct -= 1
  352. jump 'FathLottoAdd'
  353. end
  354. cfw_idx += 1
  355. jump 'FathLottoLoop'
  356. end
  357. killvar '$wombDNA'
  358. killvar '$wombName'
  359. killvar 'wombAmount'
  360. cfl_sz = arrsize('$cumfathlotto')
  361. egg_idx = 0
  362. egg_sz = UnfertEgg
  363. :FertLoop
  364. if egg_idx < egg_sz:
  365. !!{fert_thresh is the chance this specific egg is fertilized. Its modified by being on the pill, being sterilized, the brood curse, and so on. If it computes to less than the cum total calculated above, the egg is fertilized by a father randomly drawn from the lotto array.}
  366. fert_thresh = rand(1,250000)
  367. if pillcon < 0: pillcon = 0
  368. !!fert_thresh += pillcon
  369. if steriletu = 1: fert_thresh += fert_thresh*30
  370. if fert_thresh > 0 and broodcurse > 0: fert_thresh = fert_thresh / 2
  371. if fert_thresh <= cum_total:
  372. lotto_idx = rand(0, cfl_sz-1)
  373. UnfertEgg -= 1
  374. FertEgg += 1
  375. nextbaby = arrsize('$ChildFath')
  376. polkid[nextbaby] = rand(0, 1)
  377. $kidname[nextbaby] = 'unborn'
  378. kidage[nextbaby] = 0
  379. daykid[nextbaby] = 0
  380. monthkid[nextbaby] = 0
  381. yearkid[nextbaby] = 0
  382. Babyptype[nextbaby] = 0
  383. $kid_dna[nextbaby] = func('DNA', 'generate', $pcs_dna, $npc_dna[$cumfathlotto[lotto_idx]])
  384. $ChildFath[nextbaby] = $cumfathlotto[lotto_idx]
  385. $ChildFathDNA[nextbaby] = $cumfatherDNA[lotto_idx]
  386. if arrsize('$wombpotfath') = 1:
  387. $ChildThFath[nextbaby] = $wombpotfath[0]
  388. else
  389. $ChildThFath[nextbaby] = 'unknown'
  390. end
  391. hairkid[nextbaby] = rand(0, 3)
  392. eyeskid[nextbaby] = rand(0, 3)
  393. ChildConType = cumarrcon[nextbaby]
  394. if fertegg > 1:
  395. $childtype[nextbaby] = 'paternal twin'
  396. $childtype[nextbaby-1] = 'paternal twin'
  397. else
  398. $childtype[nextbaby] = ''
  399. end
  400. end
  401. egg_idx += 1
  402. jump 'FertLoop'
  403. end
  404. killvar 'temp'
  405. tempovbonus = 0
  406. end
  407. !!{Ovulation to Luteal. It checks to see if you are on the ovulation cycle. If you are, it checks you for your pillcon. If it is high enough, no egg is released. Under high concentrations of pill chemical, ovulation ticks away quicker. Otherwise, it checks to see if your ovulation hormone is high enough, and if it is it gives you an egg and drops a good chunk down on your ovulation hormone. if its still high, it drops another egg. Then it checks your ovulation hours. If its down to 0, it starts the Luteal phase. Otherwise, it adds an hour to the egg age and reduces the ovulation window by an hour.}
  408. if pillcon > 26000 and rand(0,400) ! 0: EggRH = 0
  409. :OviLoop
  410. If EggRH > ((UnfertEgg + FertEgg) * 150):
  411. UnfertEgg += 1
  412. EggRH -= (200 * UnfertEgg)
  413. jump 'OviLoop'
  414. end
  415. If ovulate <= 0:
  416. cycle = 3
  417. UnfertEgg = 0
  418. end
  419. if fertegg = 1 and ferteggage < 330:
  420. if rand(0,(2000 - age*20)) = 0:
  421. fertegg += 1
  422. nextbaby = arrsize('$ChildFath')
  423. polkid[nextbaby] = polkid[nextbaby-1]
  424. $kidname[nextbaby] = 'unborn'
  425. kidage[nextbaby] = 0
  426. daykid[nextbaby] = 0
  427. monthkid[nextbaby] = 0
  428. yearkid[nextbaby] = 0
  429. Babyptype[nextbaby] = Babyptype[nextbaby-1]
  430. $ChildFath[nextbaby] = $ChildFath[nextbaby-1]
  431. $ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
  432. $kid_dna[nextbaby] = $kid_dna[nextbaby-1]
  433. hairkid[nextbaby] = hairkid[nextbaby-1]
  434. eyeskid[nextbaby] = eyeskid[nextbaby-1]
  435. cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
  436. $childtype[nextbaby] = 'identical twin'
  437. $childtype[nextbaby-1] = 'identical twin'
  438. end
  439. end
  440. ferteggage += 1
  441. Ovulate -= 1
  442. end
  443. !{Luteal to Menstration or Pregnancy. First it verifies this is the Luteal phase. Then it adds an hour to the age of the eggs. Then if there is a fertized egg, it rolls a random chance. if the egg age is low, it checks for risk of an entopic pregnancy. This is increased with older age and if you have a tubal ligation sterilization.}
  444. !{If there is a ectopic pregnancy, it sets the first unborn baby in the array to this. Ectopic pregnancies occur when the fertilized egg implants "too early" after fertlization (and therefore in the fallopian tube). The risk is higher with age, but this is also a common complication with certain forms of birth control, notably tubal ligation. Each egg could be different. It then removes the fertilized egg, adds an embryo, Then it adds some pregnancy hormone if you arent already pregnant, and calls you officially pregnant.}
  445. !{Otherwise, it adds your womb sterility factor to the imp_rand. Then it checks if your imp_rand crosses a threshold for implantation. Younger women implant easier. It then sets the next baby to the next unimplanted baby in your kid array. It registers the kid as a normal pregnancy, removes a fertilized egg and adds an embryo. Then it adds some pregnancy hormone if you arent already pregnant, and calls you officially pregnant.}
  446. if $ARGS[0] = 'cyc3':
  447. if fertegg = 1 and ferteggage < 330:
  448. if rand(0,(2000 - age*20)) = 0:
  449. fertegg += 1
  450. nextbaby = arrsize('$ChildFath')
  451. polkid[nextbaby] = polkid[nextbaby-1]
  452. $kidname[nextbaby] = 'unborn'
  453. kidage[nextbaby] = 0
  454. daykid[nextbaby] = 0
  455. monthkid[nextbaby] = 0
  456. yearkid[nextbaby] = 0
  457. Babyptype[nextbaby] = Babyptype[nextbaby-1]
  458. $ChildFath[nextbaby] = $ChildFath[nextbaby-1]
  459. $ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
  460. $kid_dna[nextbaby] = $kid_dna[nextbaby-1]
  461. hairkid[nextbaby] = hairkid[nextbaby-1]
  462. eyeskid[nextbaby] = eyeskid[nextbaby-1]
  463. cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
  464. $childtype[nextbaby] = 'identical twin'
  465. $childtype[nextbaby-1] = 'identical twin'
  466. end
  467. end
  468. ferteggage += 1
  469. implant_idx = 0
  470. implant_sz = arrsize('Babyptype')
  471. :implant_loop
  472. if implant_idx < implant_sz:
  473. if Babyptype[implant_idx] = 0:
  474. imp_rand = rand(0,120000)
  475. if ferteggage < 120 and broodcurse <= 0:
  476. imp_rand += 170
  477. imp_rand -= age * 10
  478. if steriletu = 1: imp_rand -= 200
  479. if imp_rand <= 0:
  480. Babyptype[implant_idx] = 2
  481. FertEgg -= 1
  482. babyembryo += 1
  483. PregChem = rand(10,30)
  484. if preg = 0: preg = 1
  485. implant_day = daystart
  486. implant_hour = hour
  487. end
  488. else
  489. imp_rand += sterilewb
  490. imp_rand -= tempwbbonus
  491. if broodcurse > 0 and ferteggage >= 120: imp_rand = 0
  492. if imp_rand <= (1200 - (age * 7)):
  493. Babyptype[implant_idx] = 1
  494. FertEgg -= 1
  495. babyembryo += 1
  496. PregChem = rand(10,30)
  497. if preg = 0: preg = 1
  498. implant_day = daystart
  499. implant_hour = hour
  500. end
  501. tempwbbonus = 0
  502. end
  503. end
  504. implant_idx += 1
  505. jump 'implant_loop'
  506. end
  507. !!{Then, it progresses the Luteal phase. It checks to see if you are pregnant. If you are, it ends the cycle and sets preg if your Luteal hormone is at the max as well as cleans out any unimplanted eggs. Otherwise, it just progresses pregnancy chemical and Luteal Hormone. If you arent pregnant, it checks your Luteal hormone. If its at the maximum, it adds 3-5 days of bleeding, clears out your unimplanted eggs, and clears out your Luteal hormone, or ends your cycle if you are past your menopausal age. Otherwise it will just progress the Luteal hormone.}
  508. if LutH > 300:
  509. rej_idx = 0
  510. rej_sz = arrsize('Babyptype')
  511. :lutcycloop
  512. if rej_idx < rej_sz:
  513. if Babyptype[rej_idx] = 0:
  514. KILLVAR 'polkid',tempbabyi
  515. KILLVAR '$kidname',tempbabyi
  516. KILLVAR 'kidage',tempbabyi
  517. KILLVAR 'daykid',tempbabyi
  518. KILLVAR 'monthkid',tempbabyi
  519. KILLVAR 'yearkid',tempbabyi
  520. KILLVAR 'Babyptype',tempbabyi
  521. KILLVAR '$ChildFath',tempbabyi
  522. KILLVAR '$ChildThFath',tempbabyi
  523. KILLVAR 'hairkid',tempbabyi
  524. KILLVAR 'eyeskid',tempbabyi
  525. KILLVAR 'cumarrcon',tempbabyi
  526. FertEgg -= 1
  527. end
  528. rej_idx += 1
  529. jump 'lutcycloop'
  530. end
  531. LutH = 0
  532. if preg = 1:
  533. cycle = 5
  534. elseif menoage <= age:
  535. KILLVAR '$wombpotfath'
  536. killvar '$cumfthname'
  537. killvar '$cumfthusedname'
  538. killvar 'cumtime'
  539. cycle = 6
  540. else
  541. KILLVAR '$wombpotfath'
  542. killvar '$cumfthname'
  543. killvar '$cumfthusedname'
  544. killvar 'cumtime'
  545. temprand = rand(0,10)
  546. if pillcon < 30000 or temprand = 0:
  547. cycle = 0
  548. killvar 'abortionbirthdate'
  549. if cyccustom = 1: daylastperiod = daystart
  550. temprand = rand(0,10)
  551. if temprand = 0:
  552. mesec = 120
  553. elseif temprand < 9:
  554. mesec = 96
  555. else
  556. mesec = 72
  557. end
  558. else
  559. FocH = 0
  560. EggRH = 0
  561. cycle = 1
  562. mesec = 0
  563. end
  564. end
  565. else
  566. if preg = 1:PregChem += 1+pregspeedcheat
  567. if rand(0,100) < 100: LutH += 1
  568. end
  569. end
  570. !{Recovery to Follicular. It checks to see if you are in the recovery phase after a pregnancy. If you are, it checks to see if you still have recovery hormone. If you dont, it sets you into the follicular phase with a chance of a boosted Egg releasing hormone. Otherwise it decreases your recovery hormone with a chance to decrease it twice.}
  571. if $ARGS[0] = 'cyc4':
  572. if RecovH <= 0:
  573. cycle = 1
  574. if cyccustom = 1:
  575. knowpregloss = 0
  576. knowpregrecover = 0
  577. end
  578. if rand(0,1000) = 1000:
  579. EggRH = rand(20,80)
  580. else
  581. EggRH = 0
  582. end
  583. FocH = EggRH
  584. else
  585. RecovH -= 1
  586. if rand(0,10) = 0: RecovH -= 1
  587. end
  588. end
  589. !{Pregnancy Progression. It checks to see if you are in the pregnancy phase of a cycle. If you are, it progresses your pregnancy chemical. Then it gives a fluxuation of possible due dates. If you cross the due date threshold, you enter labor, marked by preg = 2. Other milestones will also be placed in here, including body deformations. Right now this is mostly an empty placeholder.}
  590. if $ARGS[0] = 'preg':
  591. if fertegg = 1 and ferteggage < 330:
  592. if rand(0,(2000 - age*20)) = 0:
  593. babyembryo += 1
  594. PregChem += rand(10,30)
  595. nextbaby = arrsize('$ChildFath')
  596. polkid[nextbaby] = polkid[nextbaby-1]
  597. $kidname[nextbaby] = 'unborn'
  598. kidage[nextbaby] = 0
  599. daykid[nextbaby] = 0
  600. monthkid[nextbaby] = 0
  601. yearkid[nextbaby] = 0
  602. Babyptype[nextbaby] = Babyptype[nextbaby-1]
  603. $ChildFath[nextbaby] = $ChildFath[nextbaby-1]
  604. hairkid[nextbaby] = hairkid[nextbaby-1]
  605. eyeskid[nextbaby] = eyeskid[nextbaby-1]
  606. cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
  607. $childtype[nextbaby] = 'identical twin'
  608. $childtype[nextbaby-1] = 'identical twin'
  609. end
  610. end
  611. PregChem += 1
  612. temprand = rand(-400,800)
  613. temprand -= (babyembryo-1)*588
  614. if PregChem > 6573 + temprand and preg ! 2:
  615. 'A sharp pain pierces your abdomen, and you feel something flow down your legs. Your water has broken!'
  616. $cycreport_txt = 'In labour'
  617. arrmodtmp =arrsize('$ChildFath')
  618. arrmodtmp -= (babyembryo+1)
  619. :babyfinalpreploop
  620. if arrmodtmp < arrsize('$ChildFath') and daykid[arrmodtmp] = 0:
  621. daykid[arrmodtmp] = 42
  622. $ChildThFath[arrmodtmp] = $wombthfath
  623. arrmodtmp += 1
  624. jump 'babyfinalpreploop'
  625. end
  626. KILLVAR '$wombpotfath'
  627. KILLVAR '$wombthfath'
  628. preg = 2
  629. pregminut = totminut + 1440
  630. if babyembryo > 1:
  631. 'Your babies are coming...'
  632. else
  633. 'Your baby is coming...'
  634. end
  635. if PregChem < 3885:
  636. 'Way too early!'
  637. elseif PregChem < 5229:
  638. 'Very early!'
  639. elseif PregChem < 6069:
  640. 'Early.'
  641. elseif PregChem > 6959:
  642. 'Late.'
  643. elseif PregChem > 7245:
  644. 'Very Late!'
  645. end
  646. 'You need to get to a clinic.'
  647. end
  648. if PregChem > 3887:
  649. if lactate <= 0:
  650. 'You begin lactating'
  651. lactate = 1
  652. lactatemv = 0
  653. lactatemm = 10
  654. else
  655. if lactate < 1: lactate = 1
  656. end
  657. end
  658. if PregChem > 2203:
  659. if pregchem > 2853 or kid > 0:
  660. if rand(0,7) = 0: dynamic $d_pregmovement
  661. else
  662. if rand(0,500) = 0: dynamic $d_pregmovement
  663. end
  664. end
  665. end
  666. --- femcyc ---------------------------------