1
0

femcyc.qsrc 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977
  1. # femcyc
  2. !! I have to initialize the variables somewhere, maybe in preCUST?
  3. if Luth_Max = 0: LutH_Max = rand(312,360) & !! 13-15 days including ovulation
  4. if Foch_Max = 0: FocH_Max = rand(312,360) & !! 13-15 days including menstruation
  5. if $ARGS[0] = '':
  6. !{Hourly reduction in semen potency}
  7. !{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.}
  8. !{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.}
  9. !{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.}
  10. !{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.}
  11. if rcntorgzm = 1:
  12. if rcntorgzmtmp = 1: rcntorgzm = 0 & rcntorgzmtmp = 0
  13. if rcntorgzmtmp = 0: rcntorgzmtmp = 1
  14. end
  15. cumarr_idx = 0
  16. :cumarrloop
  17. if cumarr_idx < arrsize('$cumarrnam'):
  18. if cumarrcpt[cumarr_idx] > 0 and cumarrage[cumarr_idx] < 144:
  19. if rcntorgzm = 1 and cumarrcpt[cumarr_idx] < cumarrppt[cumarr_idx] and cumarrage[cumarr_idx] < 1: cumarrcpt[cumarr_idx] += cumarrppt[cumarr_idx] / 12
  20. cumpdrop = cumarrcpt[cumarr_idx] / (144 - cumarrage[cumarr_idx])
  21. if cycle ! 2: cumpdrop += cumpdrop * rand(0, 2)
  22. cumarrcpt[cumarr_idx] -= cumpdrop
  23. if cumarrcpt[cumarr_idx] <= 0:
  24. gs 'cum_cleanup', 'cleanwomb', cumarr_idx
  25. else
  26. cumarrage[cumarr_idx] += 1
  27. cumarr_idx += 1
  28. end
  29. else
  30. gs 'cum_cleanup', 'cleanwomb', cumarr_idx
  31. end
  32. jump 'cumarrloop'
  33. end
  34. !!Succubus absorption of sperm in womb
  35. if succubusflag = 1:
  36. if arrsize('cumarrppt') > 0:
  37. succycletmp = 0
  38. :sucvagabs
  39. if cumarrdel[succycletmp] = 0:
  40. if cumarrcpt[succycletmp] > 10000:
  41. sexnutrition += 30 * succublvl
  42. succubxp += 3
  43. elseif cumarrcpt[succycletmp] < 3000 and cumarrcpt[succycletmp] > 1000:
  44. sexnutrition += 5 * succublvl
  45. succubxp += 2
  46. elseif cumarrcpt[succycletmp] =< 1000:
  47. sexnutrition += succublvl
  48. else
  49. sexnutrition += 25 * succublvl
  50. succubxp += 3
  51. end
  52. gs 'cum_cleanup', 'cleanwomb', succycletmp
  53. sucabscum = 1
  54. else
  55. succycletmp += 1
  56. end
  57. if succycletmp < arrsize('cumarrppt'): jump 'sucvagabs'
  58. end
  59. killvar 'succycletmp'
  60. end
  61. cumarrtemp = 0
  62. cumcondslip = 0
  63. cumcondslip_aware = 0
  64. if arrsize('sparrvol') > 0:
  65. :cumspaloop
  66. !!Succubus absorption for internal locations other than womb
  67. if succubusflag = 1:
  68. if sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
  69. sexnutrition += 25*succublvl
  70. succubxp += 3
  71. sucabscum = 1
  72. if sparrvol[cumarrtemp] > 0: sparrvol[cumarrtemp] = 0
  73. end
  74. end
  75. !!{if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
  76. sexnutrition += 30*succublvl
  77. sparrvol[cumarrtemp] -= 30*succublvl
  78. if sparrvol[cumarrtemp] < 0: sexnutrition += sparrvol[cumarrtemp] & sparrvol[cumarrtemp] = 0
  79. end}
  80. !!{ Process spatter until it has volume or is too old in vagina. }
  81. if sparrvol[cumarrtemp] > 0 or (sparrloc[cumarrtemp] = 0 and sparrage[cumarrtemp] < 10):
  82. sparrtmpv = arrsize('$cumarrnam')
  83. if sparrloc[cumarrtemp] = 17:
  84. sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
  85. if sparrtmpv >= 0:
  86. !!'Found guy id <<sparrtmpv>>'
  87. if sparrage[cumarrtemp] < 4:
  88. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/5
  89. elseif sparrage[cumarrtemp] < 10:
  90. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/30
  91. end
  92. end
  93. elseif sparrloc[cumarrtemp] = 0:
  94. sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
  95. if sparrtmpv >= 0:
  96. !!'Found guy id' & sparrtmpv
  97. if sparrage[cumarrtemp] < 4:
  98. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/40
  99. elseif sparrage[cumarrtemp] < 10:
  100. cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/60
  101. end
  102. end
  103. elseif sparrslc[cumarrtemp] = 1 and sparrage < 5:
  104. if sparrloc[cumarrtemp] = 1:
  105. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  106. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  107. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  108. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  109. cumarrdel[sparrtmpv] = 1
  110. cumarrkno[sparrtmpv] = -1
  111. cumarrcon[sparrtmpv] = 0
  112. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  113. end
  114. elseif sparrslc[cumarrtemp] = 3 and sparrage < 5:
  115. if sparrloc[cumarrtemp] = 2:
  116. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  117. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  118. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  119. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  120. cumarrdel[sparrtmpv] = 3
  121. cumarrkno[sparrtmpv] = -1
  122. cumarrcon[sparrtmpv] = 0
  123. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  124. elseif sparrloc[cumarrtemp] = 4:
  125. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  126. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  127. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  128. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  129. cumarrdel[sparrtmpv] = 2
  130. cumarrkno[sparrtmpv] = -1
  131. cumarrcon[sparrtmpv] = 0
  132. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  133. end
  134. elseif sparrslc[cumarrtemp] = 5 and sparrage < 5:
  135. if sparrloc[cumarrtemp] = 3:
  136. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  137. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  138. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  139. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  140. cumarrdel[sparrtmpv] = 2
  141. cumarrkno[sparrtmpv] = -1
  142. cumarrcon[sparrtmpv] = 0
  143. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  144. elseif sparrloc[cumarrtemp] = 5:
  145. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  146. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  147. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  148. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  149. cumarrdel[sparrtmpv] = 3
  150. cumarrkno[sparrtmpv] = -1
  151. cumarrcon[sparrtmpv] = 0
  152. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  153. elseif sparrloc[cumarrtemp] = 6:
  154. cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
  155. cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
  156. $cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
  157. cumarrage[sparrtmpv] = sparrage[cumarrtemp]
  158. cumarrdel[sparrtmpv] = 3
  159. cumarrkno[sparrtmpv] = -1
  160. cumarrcon[sparrtmpv] = 0
  161. cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
  162. end
  163. end
  164. if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
  165. sparrvol[cumarrtemp] -= sparrage[cumarrtemp]/2
  166. if sparrvol[cumarrtemp] < 0:sparrvol[cumarrtemp] = 0
  167. end
  168. if sparrloc[cumarrtemp] = 0 and cumsumvag > 60: sparrslc[cumarrtemp] = 1
  169. if sparrloc[cumarrtemp] = 3 and cumsumass > 60: sparrslc[cumarrtemp] = 1
  170. if sparrloc[cumarrtemp] = 17:
  171. cumcondslip += 1
  172. if sparridt[cumarrtemp] >= 0:
  173. cumcondslip_aware = 1
  174. end
  175. if sparrage[cumarrtemp] > 48:
  176. cumcondslip_aware = 1
  177. pcs_health -= rand(3,sparrage[cumarrtemp] - 45)
  178. '<br><b><font color="red">You feel nauseous.</font></b>'
  179. end
  180. end
  181. if sparrloc[cumarrtemp] ! 0 and sparrloc[cumarrtemp] ! 3 and sparrloc[cumarrtemp] ! 12 and isprok = 0 and sparrage < 5: sparrslc[cumarrtemp] += 1
  182. sparrage[cumarrtemp] += 1
  183. cumarrtemp += 1
  184. ctemp[0] += sparrvol[cumarrtemp]
  185. if sparrloc[cumarrtemp] = 0: ctemp[1] += sparrvol[cumarrtemp]
  186. if sparrloc[cumarrtemp] = 3: ctemp[2] += sparrvol[cumarrtemp]
  187. else
  188. gs 'cum_cleanup', 'cleandeposit', cumarrtemp
  189. end
  190. if cumarrtemp < arrsize('sparrvol'): jump 'cumspaloop'
  191. cumsumbod = ctemp[0]
  192. cumsumvag = ctemp[1]
  193. cumsumass = ctemp[2]
  194. KILLVAR 'ctemp'
  195. end
  196. !! new milkgrowday function.
  197. !! Not lactating yet, but there was milkdemand, meaning someone worked your nipples and breasts.
  198. if lactate = 0 and milkoverdemand >= 0 and prolactinlvl >= 0:
  199. if milkgrowday < daystart:
  200. temp_var = milkoverdemand/200
  201. if temp_var >= 10 and pregtimes <= 0: temp_var = 10
  202. if temp_var >= 50 and pregtimes > 0: temp_var = 50
  203. if temp_var <= 0 and milkoverdemand >0:
  204. prolactinlvl += 1
  205. else
  206. prolactinlvl += temp_var
  207. end
  208. !! if sveta had no kid, milk induction will take a while as her breasts need to change alot.
  209. if prolactinlvl >= 150 and kid <= 0 and pregtimes <= 0:milkinduceday += 1
  210. if prolactinlvl >= 100 and kid <= 0 and pregtimes <= 0 and pain['breasts'] <= 20: pain['breasts'] = 20
  211. !! as long as your tits are not over 11 growth will happen to them. If you do not pump or no pregnancy happens, no growth will happen.
  212. if milkoverdemand = 0 and pregchem = 0 and tits < 11:
  213. temp_var = prolactinlvl - 10
  214. if temp_var <= 0:
  215. prolactinlvl = 0
  216. end
  217. !! if prolactinlvl is sinking too much, the aveoli will deflate and thus the breasts growth is reverted. This only counts for induced lactation. If natural lactation occurs breasts will shrink a bit too, but stay bigger in total.
  218. if prolactinlvl < 100 and total_milkinduce_growth > 0:
  219. nbsize -= total_milkinduce_growth
  220. total_milkinduce_growth = 0
  221. if prolactinlvl > 10:
  222. prolactinlvl -= 10
  223. else
  224. prolactinlvl = 0
  225. end
  226. else
  227. if prolactinlvl > 10:
  228. prolactinlvl -= 10
  229. else
  230. prolactinlvl = 0
  231. end
  232. end
  233. milkoverdemand = 0
  234. milkgrowday = daystart
  235. elseif milkoverdemand > 0 and pregchem = 0 and tits < 11:
  236. !! inducing without ever being pregnant
  237. if prolactinlvl > 100 and kid <= 0:
  238. if total_milkinduce_growth < 8:
  239. total_milkinduce_growth += 1 + pumpinggrowth
  240. nbsize += 1 + pumpinggrowth
  241. pumpinggrowth = 0
  242. else
  243. pumpinggrowth = 0
  244. end
  245. !! inducing after being pregnant
  246. elseif prolactinlvl > 100 and kid > 0:
  247. if total_milkinduce_growth < (total_preg_growth/2):
  248. total_milkinduce_growth += 1 + pumpinggrowth
  249. nbsize += 1 + pumpinggrowth
  250. pumpinggrowth = 0
  251. end
  252. end
  253. milkoverdemand = 0
  254. elseif milkoverdemand >= 0 and pregchem > 0 and tits < 11:
  255. if prolactinlvl > 100 and pregchem < 3000 and kid <= 0:
  256. if total_milkinduce_growth < 8:
  257. total_milkinduce_growth += 1 + pumpinggrowth
  258. nbsize += 1 + pumpinggrowth
  259. pumpinggrowth = 0
  260. else
  261. pumpinggrowth = 0
  262. end
  263. !! first breast growth with first pregnancy
  264. elseif prolactinlvl >= 100 and pregchem >= 2000 and pregchem < 3000 and kid <= 0:
  265. if rand(0,100) > 55:
  266. first_preg_growth += 1
  267. total_preg_growth += 1
  268. if total_preg_growth > total_milkinduce_growth: nbsize += 1
  269. end
  270. !! there is little chance your breast grow additional sizes if you have more kids.
  271. elseif prolactinlvl >= 100 and pregchem >= 2000 and pregchem < 3000 and kid > 0:
  272. if first_preg_growth > total_preg_growth:
  273. total_preg_growth += 1
  274. if total_preg_growth > total_milkinduce_growth: nbsize += 1
  275. else
  276. if rand(0,100) > 95:
  277. total_preg_growth += 1
  278. if total_preg_growth > total_milkinduce_growth: nbsize += 1
  279. end
  280. end
  281. !! inducing after being pregnant
  282. elseif prolactinlvl > 100 and pregchem =< 3000 and kid > 0:
  283. if total_milkinduce_growth < (total_preg_growth/2):
  284. total_milkinduce_growth += 1 + pumpinggrowth
  285. nbsize += 1 + pumpinggrowth
  286. pumpinggrowth = 0
  287. end
  288. end
  289. milkoverdemand = 0
  290. milkgrowday = daystart
  291. end
  292. milkgrowday = daystart
  293. else
  294. milkgrowday = daystart
  295. end
  296. elseif lactate > 0 and milkoverdemand => 0 and prolactinlvl >= 0:
  297. lactatemm = func('lact_lib','$calc_lactatemm')
  298. !! checking if induced or not and if girl went through pregnancy already.
  299. if lactateinduced > 0 and kid <= 0:
  300. if milkgrowday < daystart:
  301. !! first breast growth with first pregnancy
  302. if prolactinlvl >= 100 and pregchem >= 2000 and pregchem < 3000 and kid <= 0:
  303. if rand(0,100) > 55:
  304. first_preg_growth += 1
  305. total_preg_growth += 1
  306. if total_preg_growth > total_milkinduce_growth: nbsize += 1
  307. end
  308. end
  309. if lactatemm > lactatemv and salo > 11:
  310. lactatemv += lactaterate
  311. temp_var = lactaterate/100
  312. if temp_var <= 0: temp_var = 1
  313. pcs_energy -= temp_var
  314. if lactatemv > lactatemm: lactatemv = lactatemm
  315. end
  316. if milkoverdemand > 0 and breastpumped > 0:
  317. !! lactationrate growing, so you make more milk the more demand there was in the day before.
  318. temp_var = prolactinlvl + milkoverdemand/20
  319. if temp_var > 120:
  320. prolactinlvl += milkoverdemand/20
  321. !! uppon reaching a specific limit, the lactationrate will grow slower. Human body limits etc... you know
  322. if lactaterate > 3500:
  323. lactaterate += 5*(prolactinlvl/200)
  324. elseif lactaterate > 6000:
  325. lactaterate += prolactinlvl/200
  326. else
  327. lactaterate += 10*(prolactinlvl/200)
  328. end
  329. prolactinlvl = 100
  330. else
  331. prolactinlvl = 100
  332. end
  333. 'Your breasts tingle a bit more from milkproduction.'
  334. elseif milkoverdemand = 0 and breastpumped > 0:
  335. prolactinlvl = 100
  336. elseif milkoverdemand = 0 and breastpumped = 0:
  337. if lactaterate > 0 and pregchem >=0:
  338. temp_var = lactaterate/4
  339. if temp_var < 1:temp_var = 0
  340. lactaterate = temp_var
  341. 'Your breasts tingle a little less from milkproduction.'
  342. elseif lactaterate = 0 and pregchem < 1000:
  343. lactate = 0
  344. lactateinduced = 0
  345. nbsize -= total_milkinduce_growth
  346. milkinduceday = 0
  347. 'You notice that you stopped lactating.'
  348. elseif lactaterate = 0 and pregchem >= 1000:
  349. lactaterate = 1
  350. else
  351. lactaterate = 0
  352. end
  353. end
  354. milkgrowday = daystart
  355. milkoverdemand = 0
  356. breastpumped = 0
  357. else
  358. milkgrowday = daystart
  359. if lactatemm >= lactatemv and salo > 11:
  360. if lactaterate > lactaterate_use:
  361. temp_lactaterate = lactaterate_use
  362. else
  363. temp_lactaterate = lactaterate
  364. end
  365. lactatemv += temp_lactaterate
  366. lactaterate_use = lactaterate
  367. if lactatemv > lactatemm:
  368. lactatemv = lactatemm
  369. lact_engorgement += 1
  370. if lact_engorgement > 2: lactatemess += 1
  371. end
  372. end
  373. end
  374. milkgrowday = daystart
  375. else
  376. if milkgrowday < daystart:
  377. if lactatemm > lactatemv and salo > 11:
  378. lactatemv += lactaterate
  379. temp_var = lactaterate/100
  380. if temp_var <= 0: temp_var = 1
  381. pcs_energy -= temp_var
  382. if lactatemv > lactatemm: lactatemv = lactatemm
  383. end
  384. if milkoverdemand > 0 and breastpumped > 0:
  385. !! lactationrate growing, so you make more milk the more demand there was in the day before.
  386. temp_var = prolactinlvl + milkoverdemand/10
  387. if temp_var > rand(150,200):
  388. prolactinlvl += milkoverdemand/20
  389. !! uppon reaching a specific limit, the lactationrate will grow slower. Human body limits etc... you know :D
  390. if lactaterate > 3500:
  391. lactaterate += 5*(prolactinlvl/200)
  392. elseif lactaterate > 6000:
  393. lactaterate += prolactinlvl/200
  394. else
  395. lactaterate += 10*(prolactinlvl/200)
  396. end
  397. prolactinlvl = 100
  398. else
  399. prolactinlvl = 100
  400. end
  401. 'Your breasts tingle a bit more from milkproduction.'
  402. elseif milkoverdemand = 0 and breastpumped > 0:
  403. prolactinlvl = 100
  404. else
  405. if lactaterate > 0 and pregchem >= 0:
  406. temp_var = lactaterate/8
  407. if temp_var < 1:temp_var = 0
  408. lactaterate = temp_var
  409. milkoverdemand = 0
  410. 'Your breasts tingle a little less from milkproduction.'
  411. elseif lactaterate = 0 and pregchem < 1000:
  412. lactate = 0
  413. lactateinduced = 0
  414. if total_milkinduce_growth > 0: nbsize -= total_milkinduce_growth
  415. if total_preg_growth > 0:
  416. nbsize -= total_preg_growth
  417. nbsize += first_preg_growth/2
  418. end
  419. total_milkinduce_growth = 0
  420. milkoverdemand = 0
  421. 'You stopped lactating.'
  422. elseif lactaterate = 0 and pregchem >= 1000:
  423. lactaterate = 1
  424. else
  425. lactaterate = 0
  426. end
  427. end
  428. milkgrowday = daystart
  429. milkoverdemand = 0
  430. breastpumped = 0
  431. else
  432. milkgrowday = daystart
  433. if lactatemm >= lactatemv and salo > 11:
  434. if lactaterate > lactaterate_use:
  435. temp_lactaterate = lactaterate_use
  436. else
  437. temp_lactaterate = lactaterate
  438. end
  439. lactatemv += temp_lactaterate
  440. lactaterate_use = lactaterate
  441. if lactatemv > lactatemm:
  442. lactatemv = lactatemm
  443. lact_engorgement += 1
  444. if lact_engorgement > 2: lactatemess += 1
  445. end
  446. end
  447. end
  448. milkgrowday = daystart
  449. end
  450. milkgrowday = daystart
  451. end
  452. if cycle <= 0:
  453. gs 'femcyc', 'cyc0'
  454. elseif cycle = 1:
  455. gs 'femcyc', 'cyc1'
  456. elseif cycle = 2:
  457. gs 'femcyc', 'cyc2'
  458. elseif cycle = 3:
  459. gs 'femcyc', 'cyc3'
  460. elseif cycle = 4:
  461. gs 'femcyc', 'cyc4'
  462. elseif cycle = 5:
  463. gs 'femcyc', 'preg'
  464. end
  465. dynamic $d_cycreport_update
  466. end
  467. !{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.}
  468. if $ARGS[0] = 'cyc0':
  469. if mesec <= 0:
  470. lastmens = daystart
  471. cycle = 1
  472. mesec = 0
  473. if rand(0,1000) = 1000:
  474. EggRH = rand(20,80)
  475. else
  476. EggRH = 0
  477. end
  478. FocH += EggRH
  479. else
  480. mesec -= 1
  481. FocH += 1
  482. end
  483. end
  484. !{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.}
  485. if $ARGS[0] = 'cyc1':
  486. FertEgg = 0
  487. if FocH <= FocH_Max:
  488. if pillcon <= 7000: EggRH += 1
  489. if rand(0,9) = 0: EggRH += 1
  490. FocH += 1
  491. temprand = rand(0,9) - sterileov + tempovbonus
  492. if temprand < 0:
  493. EggRH -= 1
  494. elseif temprand > 9:
  495. EggRH += 1
  496. end
  497. else
  498. !! the setting of the max_time can be here although it can be changed in the future
  499. LutH_Max = rand(312,360) & !! 13-15 days including ovulation
  500. !{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.}
  501. Temprand = rand(0,20)
  502. Temprand += age/15
  503. Temprand -= pillcon/1000
  504. if temprand > 20:
  505. EggRH += 205
  506. Temprand = rand(0,20)
  507. Temprand += age/15
  508. if temprand > 20: EggRH += 410
  509. end
  510. FocH = 0
  511. Ovulate = 24 + rand(0,20)
  512. cycle = 2
  513. ferteggage = 0
  514. end
  515. end
  516. !!{Fertilization.}
  517. if $ARGS[0] = 'cyc2':
  518. can_sz = arrsize('$cumarrnam')
  519. if Ovulate > 0 and can_sz > 0 and UnfertEgg > 0:
  520. KILLVAR 'cumtime'
  521. KILLVAR 'cumfthname'
  522. KILLVAR '$wombpotfath'
  523. $cumfthname[0] = 'unknown'
  524. cumtime[0] = 0
  525. can_idx = 0
  526. cum_total = 0
  527. !!{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.}
  528. :FatherCumAnalyze
  529. !! 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.
  530. !! If exists, just increase the amount of cum in the womb.
  531. !! $wombDNA: sperm in womb potent enough to cause pregnancy
  532. !! wombAmount: how potent is the sperm of a guy
  533. !! $wombName: the name of the NPC
  534. y = arrsize('$wombDNA')
  535. if arrpos('$wombDNA',$npc_dna[$cumarrnam[can_idx]]) = -1:
  536. !! New guy, create place for him at the end of the array, storing his DNA, sperm amount and name
  537. $wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
  538. wombAmount[y] = cumarrcpt[can_idx]
  539. $wombName[y] = $cumarrnam[can_idx]
  540. else
  541. !! This DNA is in the womb, but does it belong to the same guy?
  542. x = 0
  543. z = 0
  544. :LocalizeLoop
  545. if $wombDNA[x] = $npc_dna[$cumarrnam[can_idx]] and $wombName[x] = $cumarrnam[can_idx]: wombAmount[x] += cumarrcpt[can_idx] & z = 1
  546. if z = 0 and x < (y - 1):x += 1 & jump 'LocalizeLoop'
  547. killvar 'x'
  548. if z = 0:
  549. !! 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
  550. $wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
  551. $wombName[y] = $cumarrnam[can_idx]
  552. wombAmount[y] = cumarrcpt[can_idx]
  553. end
  554. killvar 'z'
  555. end
  556. killvar 'y'
  557. if cumarrkno[can_idx] = 1 and arrpos('$wombpotfath', $cumarrnam[can_idx]) < 0:$wombpotfath[arrsize('$wombpotfath')] = $cumarrnam[can_idx]
  558. !! 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.
  559. if instr('14570',str(cumarrcon[can_idx])) > 0 and cumarrdel[can_idx] = 0 and cumarrkno[can_idx] >= 0:
  560. !! If guy is recorded already, increase his cumtime, else record him for the first time.
  561. if arrpos('$cumfthname', $cumarrnam[can_idx]) = -1:
  562. $cumfthname[arrsize('$cumfthname')] = $cumarrnam[can_idx]
  563. cumtime[arrsize('$cumfthname')] = 1
  564. else
  565. cumtime[arrpos('$cumfthname', $cumarrnam[can_idx])] += 1
  566. end
  567. end
  568. cum_total += cumarrcpt[can_idx]
  569. if can_idx < can_sz:can_idx += 1 & jump 'FatherCumAnalyze'
  570. !! setting the default believed father if there is no difficult choice or there is no choice
  571. if arrsize('$cumfthname') = 2 and cumtime[0] = 0:
  572. $wombpotfath[0] = $cumfthname[1]
  573. elseif arrsize('$cumfthname') = 1:
  574. $wombpotfath[0] = $cumfthname[0]
  575. end
  576. !!{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.}
  577. KILLVAR '$cumfathlotto'
  578. cfw_idx = 0
  579. cfw_sz = arrsize('wombAmount')
  580. :FathLottoLoop
  581. if cfw_idx < cfw_sz:
  582. cfl_ct = (wombAmount[cfw_idx] * 100) / cum_total
  583. if cfl_ct < 1: cfl_ct = 1
  584. cfl_idx = arrsize('$cumfathlotto')
  585. :FathLottoAdd
  586. if cfl_ct > 0:
  587. $cumfathlotto[cfl_idx] = $wombName[cfw_idx]
  588. $cumfatherDNA[cfl_idx] = $wombDNA[cfw_idx]
  589. cfl_idx += 1
  590. cfl_ct -= 1
  591. jump 'FathLottoAdd'
  592. end
  593. cfw_idx += 1
  594. jump 'FathLottoLoop'
  595. end
  596. killvar '$wombDNA'
  597. killvar '$wombName'
  598. killvar 'wombAmount'
  599. cfl_sz = arrsize('$cumfathlotto')
  600. egg_idx = 0
  601. egg_sz = UnfertEgg
  602. if cheat_NoPregnancy = 1:egg_idx = egg_sz
  603. :FertLoop
  604. if egg_idx < egg_sz:
  605. !!{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.}
  606. fert_thresh = rand(1,250000)
  607. if pillcon < 0: pillcon = 0
  608. !!fert_thresh += pillcon
  609. if steriletu = 1: fert_thresh += fert_thresh*30
  610. if fert_thresh > 0 and broodcurse > 0: fert_thresh = fert_thresh / 2
  611. if fert_thresh <= cum_total:
  612. lotto_idx = rand(0, cfl_sz-1)
  613. UnfertEgg -= 1
  614. FertEgg += 1
  615. nextbaby = arrsize('$ChildFath')
  616. polkid[nextbaby] = rand(0, 1)
  617. $kidname[nextbaby] = 'unborn'
  618. kidage[nextbaby] = 0
  619. daykid[nextbaby] = 0
  620. monthkid[nextbaby] = 0
  621. yearkid[nextbaby] = 0
  622. Babyptype[nextbaby] = 0
  623. $kid_dna[nextbaby] = func('DNA', 'generate', $pcs_dna, $npc_dna[$cumfathlotto[lotto_idx]])
  624. $ChildFath[nextbaby] = $cumfathlotto[lotto_idx]
  625. $ChildFathDNA[nextbaby] = $cumfatherDNA[lotto_idx]
  626. if arrsize('$wombpotfath') = 1:
  627. $ChildThFath[nextbaby] = $wombpotfath[0]
  628. else
  629. $ChildThFath[nextbaby] = 'unknown'
  630. end
  631. hairkid[nextbaby] = rand(0, 3)
  632. eyeskid[nextbaby] = rand(0, 3)
  633. ChildConType[nextbaby] = cumarrcon[nextbaby]
  634. if fertegg > 1:
  635. $childtype[nextbaby] = 'paternal twin'
  636. $childtype[nextbaby-1] = 'paternal twin'
  637. else
  638. $childtype[nextbaby] = ''
  639. end
  640. end
  641. egg_idx += 1
  642. jump 'FertLoop'
  643. end
  644. killvar 'temp'
  645. tempovbonus = 0
  646. end
  647. !!{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.}
  648. if pillcon > 26000 and rand(0,400) ! 0: EggRH = 0
  649. :OviLoop
  650. If EggRH > ((UnfertEgg + FertEgg) * 150):
  651. UnfertEgg += 1
  652. EggRH -= (200 * UnfertEgg)
  653. jump 'OviLoop'
  654. end
  655. If ovulate <= 0:
  656. cycle = 3
  657. UnfertEgg = 0
  658. end
  659. if fertegg = 1 and ferteggage < 330:
  660. if rand(0,(2000 - age*20)) = 0:
  661. fertegg += 1
  662. nextbaby = arrsize('$ChildFath')
  663. polkid[nextbaby] = polkid[nextbaby-1]
  664. $kidname[nextbaby] = 'unborn'
  665. kidage[nextbaby] = 0
  666. daykid[nextbaby] = 0
  667. monthkid[nextbaby] = 0
  668. yearkid[nextbaby] = 0
  669. Babyptype[nextbaby] = Babyptype[nextbaby-1]
  670. $ChildFath[nextbaby] = $ChildFath[nextbaby-1]
  671. $ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
  672. $kid_dna[nextbaby] = $kid_dna[nextbaby-1]
  673. hairkid[nextbaby] = hairkid[nextbaby-1]
  674. eyeskid[nextbaby] = eyeskid[nextbaby-1]
  675. cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
  676. $childtype[nextbaby] = 'identical twin'
  677. $childtype[nextbaby-1] = 'identical twin'
  678. end
  679. end
  680. ferteggage += 1
  681. Ovulate -= 1
  682. LutH += 1
  683. end
  684. !{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.}
  685. !{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.}
  686. !{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.}
  687. if $ARGS[0] = 'cyc3':
  688. if fertegg = 1 and ferteggage < 330:
  689. if rand(0,(2000 - age*20)) = 0:
  690. fertegg += 1
  691. nextbaby = arrsize('$ChildFath')
  692. polkid[nextbaby] = polkid[nextbaby-1]
  693. $kidname[nextbaby] = 'unborn'
  694. kidage[nextbaby] = 0
  695. daykid[nextbaby] = 0
  696. monthkid[nextbaby] = 0
  697. yearkid[nextbaby] = 0
  698. Babyptype[nextbaby] = Babyptype[nextbaby-1]
  699. $ChildFath[nextbaby] = $ChildFath[nextbaby-1]
  700. $ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
  701. $kid_dna[nextbaby] = $kid_dna[nextbaby-1]
  702. hairkid[nextbaby] = hairkid[nextbaby-1]
  703. eyeskid[nextbaby] = eyeskid[nextbaby-1]
  704. cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
  705. $childtype[nextbaby] = 'identical twin'
  706. $childtype[nextbaby-1] = 'identical twin'
  707. end
  708. end
  709. ferteggage += 1
  710. implant_idx = 0
  711. implant_sz = arrsize('Babyptype')
  712. :implant_loop
  713. if implant_idx < implant_sz:
  714. if Babyptype[implant_idx] = 0:
  715. imp_rand = rand(0,120000)
  716. if ferteggage < 120 and broodcurse <= 0:
  717. imp_rand += 170
  718. imp_rand -= age * 10
  719. if steriletu = 1: imp_rand -= 200
  720. if imp_rand <= 0:
  721. Babyptype[implant_idx] = 2
  722. FertEgg -= 1
  723. babyembryo += 1
  724. PregChem = rand(10,30)
  725. if preg = 0: preg = 1
  726. implant_day = daystart
  727. implant_hour = hour
  728. end
  729. else
  730. imp_rand += sterilewb
  731. imp_rand -= tempwbbonus
  732. if broodcurse > 0 and ferteggage >= 120: imp_rand = 0
  733. if imp_rand <= (1200 - (age * 7)):
  734. Babyptype[implant_idx] = 1
  735. FertEgg -= 1
  736. babyembryo += 1
  737. PregChem = rand(10,30)
  738. if preg = 0: preg = 1
  739. implant_day = daystart
  740. implant_hour = hour
  741. end
  742. tempwbbonus = 0
  743. end
  744. end
  745. implant_idx += 1
  746. jump 'implant_loop'
  747. end
  748. !!{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.}
  749. if LutH > LutH_Max:
  750. rej_idx = 0
  751. rej_sz = arrsize('Babyptype')
  752. :lutcycloop
  753. if rej_idx < rej_sz:
  754. if Babyptype[rej_idx] = 0:
  755. KILLVAR 'polkid',tempbabyi
  756. KILLVAR '$kidname',tempbabyi
  757. KILLVAR 'kidage',tempbabyi
  758. KILLVAR 'daykid',tempbabyi
  759. KILLVAR 'monthkid',tempbabyi
  760. KILLVAR 'yearkid',tempbabyi
  761. KILLVAR 'Babyptype',tempbabyi
  762. KILLVAR '$ChildFath',tempbabyi
  763. KILLVAR '$ChildThFath',tempbabyi
  764. KILLVAR 'hairkid',tempbabyi
  765. KILLVAR 'eyeskid',tempbabyi
  766. KILLVAR 'cumarrcon',tempbabyi
  767. FertEgg -= 1
  768. end
  769. rej_idx += 1
  770. jump 'lutcycloop'
  771. end
  772. LutH = 0
  773. if preg = 1:
  774. cycle = 5
  775. elseif menoage <= age:
  776. KILLVAR '$wombpotfath'
  777. killvar '$cumfthname'
  778. killvar '$cumfthusedname'
  779. killvar 'cumtime'
  780. cycle = 6
  781. else
  782. KILLVAR '$wombpotfath'
  783. killvar '$cumfthname'
  784. killvar '$cumfthusedname'
  785. killvar 'cumtime'
  786. !! the setting of the max_time can be here although it can be changed in the future
  787. FocH_Max = rand(312,360) & !! 13-15 days including menstruation
  788. temprand = rand(0,10)
  789. if pillcon >= 38000 or rand(1,24) = 1:
  790. EggRH = 0
  791. cycle = 1
  792. mesec = 0
  793. else
  794. cycle = 0
  795. killvar 'abortionbirthdate'
  796. if cyccustom = 1: daylastperiod = daystart
  797. firstmens = daystart
  798. temprand = rand(0,10)
  799. if temprand = 0 and pillcon < 10000:
  800. mesec = rand(104,136) & !! 120
  801. elseif temprand < 9 and pillcon < 15000:
  802. mesec = rand(76,104) & !! 96
  803. elseif pillcon < 20000:
  804. mesec = rand(52,76) & !! 72
  805. else
  806. mesec = rand(44,52) & !! 48
  807. end
  808. end
  809. end
  810. else
  811. if preg = 1:PregChem += 1+pregspeedcheat
  812. if rand(0,100) < 100: LutH += 1
  813. end
  814. end
  815. !{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.}
  816. if $ARGS[0] = 'cyc4':
  817. if RecovH <= 0:
  818. cycle = 1
  819. if cyccustom = 1:
  820. knowpregloss = 0
  821. knowpregrecover = 0
  822. end
  823. if rand(0,1000) = 1000:
  824. EggRH = rand(20,80)
  825. else
  826. EggRH = 0
  827. end
  828. FocH = EggRH
  829. else
  830. RecovH -= 1
  831. if rand(0,10) = 0: RecovH -= 1
  832. end
  833. end
  834. !{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.}
  835. if $ARGS[0] = 'preg':
  836. if fertegg = 1 and ferteggage < 330:
  837. if rand(0,(2000 - age*20)) = 0:
  838. babyembryo += 1
  839. PregChem += rand(10,30)
  840. nextbaby = arrsize('$ChildFath')
  841. polkid[nextbaby] = polkid[nextbaby-1]
  842. $kidname[nextbaby] = 'unborn'
  843. kidage[nextbaby] = 0
  844. daykid[nextbaby] = 0
  845. monthkid[nextbaby] = 0
  846. yearkid[nextbaby] = 0
  847. Babyptype[nextbaby] = Babyptype[nextbaby-1]
  848. $ChildFath[nextbaby] = $ChildFath[nextbaby-1]
  849. hairkid[nextbaby] = hairkid[nextbaby-1]
  850. eyeskid[nextbaby] = eyeskid[nextbaby-1]
  851. cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
  852. $childtype[nextbaby] = 'identical twin'
  853. $childtype[nextbaby-1] = 'identical twin'
  854. end
  855. end
  856. PregChem += (1+pregspeedcheat)
  857. temprand = rand(-400,800)
  858. temprand -= (babyembryo-1)*588
  859. if PregChem > 6573 + temprand and preg ! 2:
  860. 'A sharp pain pierces your abdomen, and you feel something flow down your legs. Your water has broken!'
  861. $cycreport_txt = 'In labour'
  862. arrmodtmp =arrsize('$ChildFath')
  863. arrmodtmp -= (babyembryo+1)
  864. :babyfinalpreploop
  865. if arrmodtmp < arrsize('$ChildFath') and daykid[arrmodtmp] = 0:
  866. daykid[arrmodtmp] = 42
  867. $ChildThFath[arrmodtmp] = $wombthfath
  868. arrmodtmp += 1
  869. jump 'babyfinalpreploop'
  870. end
  871. KILLVAR '$wombpotfath'
  872. KILLVAR '$wombthfath'
  873. preg = 2
  874. pregminut = totminut + 1440
  875. if babyembryo > 1:
  876. 'Your babies are coming...'
  877. else
  878. 'Your baby is coming...'
  879. end
  880. if PregChem < 3885:
  881. 'Way too early!'
  882. elseif PregChem < 5229:
  883. 'Very early!'
  884. elseif PregChem < 6069:
  885. 'Early.'
  886. elseif PregChem > 6959:
  887. 'Late.'
  888. elseif PregChem > 7245:
  889. 'Very Late!'
  890. end
  891. 'You need to get to a clinic.'
  892. end
  893. if PregChem > 3887:
  894. if lactate <= 0:
  895. 'You begin lactating'
  896. lactate = 1
  897. lactatemv = 0
  898. lactatemm = func('lact_lib','$calc_lactatemm')
  899. lacaterate = 10
  900. prolactinlvl = 150
  901. else
  902. if lactate < 1: lactate = 1
  903. end
  904. end
  905. if PregChem > 1000:
  906. if prolactinlvl < 100 and lactate <= 0:
  907. if rand(0,100) > 50:
  908. prolactinlvl +=1
  909. end
  910. end
  911. end
  912. if PregChem > 2203:
  913. if pregchem > 2853 or kid > 0:
  914. if rand(0,7) = 0: dynamic $d_pregmovement
  915. else
  916. if rand(0,500) = 0: dynamic $d_pregmovement
  917. end
  918. end
  919. end
  920. --- femcyc ---------------------------------